pvc wrote:I was wondering if I could port some of my code to Amiga line of computers. It would give me a good opportunity to code for some vintage architecture; trying to reduce RAM usage as low as possible; implementing 'NOMMU' variants; testing my code against big endian arch; etc. But I have no idea how to build bootable floppy or hard disk image for these machines. I tried to analyze AROS source a little but maybe there is someone here who knows how to do that already
What code are you trying to port?
With the Amiga it's easy enough to create a bootable disk that drops you into the GUI environment, there you have a fairly standard CLI console to use your code. Fire up a decent emulator, like WinUAE, create a blank floppy image, then in the Amiga's command line type "install df0:", thats all you need to have a bootable floppy disk. Most of the cli commands are in the ROM so that makes things quite simple.
If you use a later ROM image (Kickstart 2.0+), then WinUAE can mount a directory as a hard disk in AmigaOS, and you can use that as an easy shared storage for getting thing into the Amiga environment.
I'd be happy to send you anything you need.
-Edit- If it's just the hardware you are interested in, then you just need to write your boot loader to the first two blocks (1024 bytes) of the floppy image, starting at offset 0xC (the first 12 bytes of block 0 have significance to the OS). There you need to set up the hardware (The ROM will have set up your interrupt vector table and organised the memory, so you can then use the value found at address 0x4 to access the kernel/executive function table), or you can go it alone. The hardest part for a new Amiga coder is that before any video will work you need to set up the display coprocessor using something called a "copper list" and allocate it some framebuffer RAM, if you are really interested, message me privately and we can work though it. My advice is just let the OS do all the hard work, the Amiga hardware doesn't really work like modern hardware and can take a little while to get your head around.
bzt wrote:As far as I know, the boot process differs for each Amiga. The 500 for example loads the first two sectors of a disk (very similar to BIOS boot), while the A1000 has kickstart code in ROM which does lots of things before it finally loads the boot sectors. I'm not expert on this topic, but it looks like there are many
different versions of kickstart too.
Only the Amiga 1000, had that weird two stage boot process, and that was due to the motherboard ROM being 64k... All other Amiga's had at least 256K ROMs (or larger), so were able to boot fully from a cold start.
There are only two ROMs worth using, Kickstart 1.3 (which was in the original Amiga500, so many many games expect it, but it lacks features one would expect in an Operating System now), and Kickstart 3.1 which was the last released by Commodore and is what AROS is a clone of, and provides what would now be considered the bare minimum features of a proper operating system.