Amiga boot process

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
pvc
Member
Member
Posts: 201
Joined: Mon Jan 15, 2018 2:27 pm

Amiga boot process

Post by pvc »

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 :)
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: Amiga boot process

Post by bzt »

Hi,

I don't think examining AROS would do any good for you. It is not for the Amiga hardware, it is just an OS which provides the same interface towards user land as the original AmigaOS did. For one, Amiga hardware used M68k CPU, and AROS is available for x86 and PPC. The same stands for other forks too, like MorphOS and AmigaOne (the latter has its own special hardware).

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.

Maybe this turns out to be helpful:
https://wiki.amigaos.net/wiki/Amiga_Flo ... ot_process
https://retrocomputing.stackexchange.co ... -workbench

Google is your friend and good luck :-)

Cheers,
bzt
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Amiga boot process

Post by iansjack »

There is an AROS port for Amiga hardware: http://www.evillabs.net/index.php/AROS_ ... iga_Status
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Amiga boot process

Post by iansjack »

You might also like to check the NetBSD port: http://www.uk.netbsd.org/ports/amiga/

Although this only works on Amigas with an MMU, it might provide useful information about the boot process.

There's also a (discontinued) OpenBSD port: https://www.openbsd.org/amiga.html

Some more information here which should be useful, and point to further avenues of research: https://retrocomputing.stackexchange.co ... -workbench

And here you can find header files for the various bootblocks: http://amigadev.elowar.com/read/ADCD_2. ... e0554.html

And you'll want to look at the Amiga Hardware Reference Manual: http://amigadev.elowar.com/read/ADCD_2. ... e0000.html
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: Amiga boot process

Post by bzt »

@iansjack: why haven't I thought of that? Reading BSD sources is a great idea for this!

Cheers,
bzt
jane477
Posts: 1
Joined: Tue Jul 21, 2020 1:38 am

Re: Amiga boot process

Post by jane477 »

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 :)
I was just wondering, were you successful in your attempt
User avatar
bloodline
Member
Member
Posts: 264
Joined: Tue Sep 15, 2020 8:07 am
Location: London, UK

Re: Amiga boot process

Post by bloodline »

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.
CuriOS: A single address space GUI based operating system built upon a fairly pure Microkernel/Nanokernel. Download latest bootable x86 Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip
Discord:https://discord.gg/zn2vV2Su
User avatar
pvc
Member
Member
Posts: 201
Joined: Mon Jan 15, 2018 2:27 pm

Re: Amiga boot process

Post by pvc »

Thanks, but unfortunately my 1200 died (probably something with Chip Ram and floppy drisk drive got flaky) and I, sort of, lost motivation. I've got some success with it but for now, nah. I am working on something else. Maybe I am going to resume this project when I get to fix my Amiga. I don't feel like working with emulator only.
User avatar
bloodline
Member
Member
Posts: 264
Joined: Tue Sep 15, 2020 8:07 am
Location: London, UK

Re: Amiga boot process

Post by bloodline »

pvc wrote:Thanks, but unfortunately my 1200 died (probably something with Chip Ram and floppy drisk drive got flaky) and I, sort of, lost motivation. I've got some success with it but for now, nah. I am working on something else. Maybe I am going to resume this project when I get to fix my Amiga. I don't feel like working with emulator only.
Ahhh, yeah the problem of ageing hardware. I don't have any compatible monitors to run my vintage hardware...

Feel free to drop me a line if you want to pursue this avenue in the future. (finally a topic on OSDev where I can actually help someone \:D/ )
CuriOS: A single address space GUI based operating system built upon a fairly pure Microkernel/Nanokernel. Download latest bootable x86 Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip
Discord:https://discord.gg/zn2vV2Su
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Amiga boot process

Post by Octocontrabass »

bloodline wrote:I don't have any compatible monitors to run my vintage hardware...
Which hardware? If it's old enough, it might output something resembling standard composite NTSC or PAL video, which you might be able to hook up to your TV. (My Amiga does, at least.) There are also upscalers that can handle such signals and convert them into something a modern monitor can handle. Don't be too surprised if there are compatibility issues, though.

I haven't figured out what to do with EGA yet.
User avatar
bloodline
Member
Member
Posts: 264
Joined: Tue Sep 15, 2020 8:07 am
Location: London, UK

Re: Amiga boot process

Post by bloodline »

Octocontrabass wrote:
bloodline wrote:I don't have any compatible monitors to run my vintage hardware...
Which hardware? If it's old enough, it might output something resembling standard composite NTSC or PAL video, which you might be able to hook up to your TV. (My Amiga does, at least.) There are also upscalers that can handle such signals and convert them into something a modern monitor can handle. Don't be too surprised if there are compatibility issues, though.
I have one 10 year old 20” LCD TV packed away in the garage somewhere, which can accept an RF and Scart signal, I only kept it for use with my vintage hardware. But sadly I don’t have space to set it up, so it was packed away years ago, and after two house moves I’ve not seen it since (though it must still be in a box in the garage).

My daughter has a RaspberryPi in an A1200 case (with a Keyrah2) running Amibian, hooked up to her TV for playing games in her room. It’s almost impossible to tell that it isn’t just an ordinary Amiga with an HD.
I haven't figured out what to do with EGA yet.
Hmmm... Looking at the spec, the output does seem difficult :?
CuriOS: A single address space GUI based operating system built upon a fairly pure Microkernel/Nanokernel. Download latest bootable x86 Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip
Discord:https://discord.gg/zn2vV2Su
Post Reply