How to develop an Amiga application that is bootable from a floppy disk (NON-DOS)?
Asked Answered
H

1

6

Following up on the "How do I code and compile an Amiga application?" question, which development library is required to boot an Amiga application from a floppy disk?

Update: (2012-04-10) To consider the question solved, I have edited the title and body to focus only on the library. Still missing are boot from floppy deployment tools that can be asked in another question.

Hobbism answered 26/8, 2009 at 23:10 Comment(2)
From Wikipedia, AmigaOS Article: "Upon start-up or reset [Kickstart will] examine connected boot devices and attempt to boot from the one with the highest boot priority. If no boot device is present a screen will be displayed asking the user to insert a boot disk - typically a floppy disk. [...] The Workbench environment does not have to be loaded for software to run. In fact, to take over the Amiga hardware and keep all memory and resources to themselves, many games boot directly from Kickstart (using a custom bootblock on the floppy disk)." Now searching for information on Amiga Bootblock.Hobbism
From mediasrv.ns.ac.yu/extra/fileformat/emulator/adf/adf.txt : "The boot block is the boot strap of the amiga. The OS will load in these 2 blocks (1024 bytes), and process them as the amiga's boot strap. The standard workbench boot block simply makes the OS look at a startup routine in the Dos.Library, while games boot blocks can kick the OS out and load the rest of the game."Hobbism
S
13

Detailed description of how to write boot blocks on floppies

You'll need to learn how to use trackdisk.device. I strongly advise not bypassing trackdisk; the requirements to read floppies are tricky and you have to know the allowed mechanical variances; the trackdisk floppy code is really, really good and deals with errors better than anything anyone else did. Published books on how to "code at the bare-metal level" for the Amiga (and in particular the book on using the floppies directly) have so many errors and failed assumptions that my copy had a forest of stickies marking errors.

Note bene: I was the person at Commodore who totally rewrote trackdisk for AmigaOS 2.0.


If you're talking a normal AmigaOS application, you'd have a startup-script file on the disk to boot the disk and start the application (plus minimal set of AmigaOS files), and an icon/executable to start it if the Amiga booted off another disk or HD. Hunt around, and search for info on making a bootable disk for the Amiga.

Squishy answered 16/9, 2009 at 18:44 Comment(4)
jesup, thanks for the tip, this is really valuable info to get me started.Hobbism
I can remember writing my own DMA loader for my game, and indeed I ran into tons of problems. Bits has to be interleaved with 0's as to not make the diskhead magnetize too much and vice versa. On the flipside, it took a lot of work, but ohhh what was the loader fast.Ic
I'd probably take that speed bet... :-) I rewrote trackdisk totally for AmigaOS 2.0. In 2.0, trackdisk was Darn Hard to beat, speed-wise. In fact, 90% of "fastloaders" I examined were slower or at best no faster than trackdisk - and virtually all the others violated the drive specs to where they would fail on specific manufacturer's drives, or if the user's drive happened to be at one end or the other of the spec range. (The fastload developer would test on their own machine and a few others, and miss ever testing on a machine built with a Sanyo (or whatever)).Squishy
Pointed out by jesup, taken from Amiga RKM Devices: "The Amiga trackdisk device directly drives the disk, controls the disk motors, reads raw data from the tracks, and writes raw data to the tracks. Normally, you use the AmigaDOS functions to write or read data from the disk. The trackdisk device is the lowest-level software access to the disk data and is used by AmigaDOS to access the disks." Previously in the question's body as an update, it is more appropriate as a comment in this answer.Hobbism

© 2022 - 2024 — McMap. All rights reserved.