home *** CD-ROM | disk | FTP | other *** search
- __________
- Multi-Boot
- ~~~~~~~~~~
-
-
- This document describes how to transform your KickStart disk into a
- "multi-booting" disk, that is, after loading the KickStart it will
- go on and boot from it like from any normal installed DOS disk.
-
- There is already a patch available (called KickBench) that does this,
- but it relies on toggling your disk's ID back and forth between 'KICK'
- and 'DOS0'. Thus you'll have to keep a KickBench write-enabled, and
- write back the 'KICK' ID before switching off.
-
- The technique described here is more convenient; After applying the
- patches the OS will recognize a KickStart disk as being a DOS disk.
- Thus, if it has a valid boot-block, a KickStart disk can be booted
- from, and if it has a valid root-block/bit-map files can be written
- to, or read from it.
-
-
-
- Required:
- ~~~~~~~~~
- - Amiga 1000
-
- - KickStart 1.3 (V 34.5)
- Eventhough the absolute locations mentioned in this document
- are specific to this KickStart version, similar modifications
- are likely to work on other KickStarts. This is why I've made
- this an in-depth discussion instead of just listing the patch
- bytes.
-
- - Mon 1.24 (by Timo Rossi, on Fish 310 or comp.bin.amiga)
- This program provides us with a means of reading and writing
- blocks to and from disks. It's also useful for recomputing the
- checksum of the boot-block.
- There are probably lots of other programs/disk-editors that
- allow you to similar things, Mon however contains almost all
- the options we will need in order to apply the patch.
-
- - SumKick (by Benjamin Fuller, also on Fish 179 in the KickFont package)
- This program will recompute the KickStart checksum after
- you've applied the patches.
- USAGE: SumKick [DF0:|DF1:|DF2:|DF3:] [-f(ixit)]
- It's included in this archive.
-
- - TFile (by Eddy Carrol on comp.bin.amiga, also on Fish 350)
- This program can be used to create a pseudo file that occupies,
- and thus protects the tracks containing the KickStart data.
- This program is no absolute requirement; you might hack the
- bitmap yourself, or, if your boot disk only needs to mount a
- network driver or harddrive, the KickStart area probably won't
- even be endangered.
-
-
-
- The Patches
- ~~~~~~~~~~~
-
- Format an empty disk, this installs the rootblock and bitmap, required
- for writing files. Subsequently copy tracks 0-23 from your KickStart
- disk onto it. You can use TCopy (distributed together with TFile) to
- do this, there are, however, zillions of other utilities that can
- perform the same task.
-
- Now we need to apply the patches. At six locations in the KickStart,
- data is compared to the 'DOS0' ID. The patches make sure that these
- comparisons match the 'KICK' ID as well. To do this, a few subroutines
- must be patched-in. Space for these subroutines can made by shortening
- Commodore's copyright message at the start of the KickStart code.
-
-
-
- Load Mon (or whatever program you use to modify disks), and allocate
- some memory for disk blocks at a convenient location.
-
- -------------------------------
-
- Patch 1:
- (block 394($18A), byte $142) FF1342: 0CAD 444F5300 FFFC => 4EB9 00FC0058 4E71
- (block 394($18A), byte $16A) FF136A: 0CAD 444F5300 FFFC => 4EB9 00FC0058 4E71
- ^^^^^^ ^^^^^^^^^ ^^^^^^^^^
- Address Old Bytes New Bytes
-
- This replaces
- cmp.l #$444F5300,-4(A5) ; 'DOS0' ID
- with
- jsr $FC0058 ; Subroutine to be patched in later
- nop
-
- Note that this is a reference to an absolute location. Remapping the
- KickStart into RAM without a MMU won't be possible. (68010s '20s etc.
- do have MMUs though). Besides, I noticed some absolute references in
- the original KickStart, so they were there anyway.
-
- -------------------------------
-
- Patch 2 & 3:
- (block 493($1ED), byte $66) FFD866: 0CAA 444F5300 0428 => 4EB9 00FC006C 4E71
-
- This replaces
- cmp.l #$444F5300,$428(A2) ; 'DOS0' ID
- with
- jsr $FC006C ; Subroutine to be patched in later
- nop
-
- -------------------------------
-
- Patch 4:
- (block 507($1FB), byte $68) FFF468: 0CAA 444F5300 033C => 4EB9 00FC0080 4E71
- (block 508($1FC), byte $20) FFF620: 0CAA 444F5300 033C => 4EB9 00FC0080 4E71
-
- This replaces
- cmp.l #$444F5300,$33C(A2) ; 'DOS0' ID
- with
- jsr $FC0080 ; Subroutine to be patched in later
- nop
-
- -------------------------------
-
- Patch 5 & 6:
- (block 323,($143) byte $1A4) FE85A4: 2014 B0BA FE74 => 4EB9 00FC0094
-
- This replaces
- move.l (A4),D0 ; PC relative reference to
- cmp.l -396(PC),D0 ; 'DOS0' ID. Was hard to find.
- with
- jsr $FC0094 ; Subroutine to be patched in later
-
- This one is in the boot code (the bootstrap I believe).
-
- -------------------------------
-
- Patch 7:
- (block 1, byte $55) FC0055: 20 61 6E => 0D 0A 00
-
- This replaces
- "Amiga ROM Operating System and Libraries Copyright (C) 1985 etc......"
- with
- "Amiga ROM Operating System CR+LF+NULL"
-
- Thus creating some space for our subroutines while keeping the
- Copyright string properly terminated.
-
- -------------------------------
-
- Patch 8:
- (block 1, byte $58) FC0058:
-
- < 00FC0058: 64204C69 62726172 6965730D 0A436F70 'd Libraries..Cop'
- < 00FC0068: 79726967 68742028 43292031 3938352C 'yright (C) 1985,'
- < 00FC0078: 20436F6D 6D6F646F 72652D41 6D696761 ' Commodore-Amiga'
- < 00FC0088: 2C20496E 632E0D0A 416C6C20 52696768 ', Inc...All Righ'
- < 00FC0098: 74732052 65736572 7665642E 0D0A0000 'ts Reserved.....'
-
- > 00FC0058: 0CAD444F 5300FFFC 67080CAD 4B49434B '.¡DOS. ⁿg..¡KICK'
- > 00FC0068: FFFC4E75 0CAA444F 53000428 67080CAA ' ⁿNu.¬DOS..(g..¬'
- > 00FC0078: 4B49434B 04284E75 0CAA444F 5300033C 'KICK.(Nu.¬DOS..<'
- > 00FC0088: 67080CAA 4B49434B 033C4E75 20140C80 'g..¬KICK.<Nu ...'
- > 00FC0098: 444F5300 67060C80 4B49434B 4E750000 'DOS.g...KICKNu..'
-
- This patch installs the subroutines referenced in previous patches.
-
- FC0058 cmp.l #$444F5300,-4(A5) ; 'DOS0' ID
- beq.s Exit1
- cmp.l #'KICK',-4(A5)
- Exit1 rts
-
- FC0064 cmp.l #$444F5300,$428(A2) ; 'DOS0' ID
- beq.s Exit2
- cmp.l #'KICK',$428(A2)
- Exit2 rts
-
- FC0080 cmp.l #$444F5300,$33C(A2) ; 'DOS0' ID
- beq.s Exit3
- cmp.l #'KICK',$33C(A2)
- Exit3 rts
-
- FC0094 move.l (a4),d0
- cmp.l #$444F5300,d0 ; 'DOS0' ID
- beq.s Exit4
- cmp.l #'KICK',d0
- Exit4 rts
-
- -------------------------------
-
-
-
-
- While you're at it, you might consider patching a few other things
- in your KickStart.
-
- -------------------------------
-
- < 00FFFAE0: 113A4C2F 4469736B 2D56616C 69646174 '.:L/Disk-Validat'
- < 00FFFAF0: 6F720000 'or..'
-
- > 00FFFAE0: 104C3A44 69736B2D 56616C69 6461746F '.L:Disk-Validato'
- > 00FFFAF0: 72000000 'r...'
-
- This one prevents the disk-validator virus from entering your system.
- Note that this is a BCPL string; the preceding length byte has to be
- modified as well.
-
- -------------------------------
-
- FE9668: 086B 0001 0041 => 08EB 0001 0041
-
- This replaces
- bchg #1,$41(A3) ; Reverse step direction
- with
- bset #1,$41(A3) ; Fix step direction
-
- The trackdisk device steps the drive head from 0 to 1 to 0 etc.
- This is required for sensing disk changes (don't ask me why).
- Modern disk drives know when the software tries to step the drive
- head below track 0, and will prevent it. Thus this patch will cause
- these drives to stop clicking.
- In A1000s, the internal drives are mostly very old, so this patch is
- unlikely to work for your internal drive. Though I haven't had any
- problems so far, I wonder if it is harmful; if you apply this patch,
- the internal drive's head will bounce (try to move below track 0).
-
- -------------------------------
-
- FEAF9C: B0B9 0000 8000 => 0C80 0000 8000
-
- This replaces
- cmp.l $8000,D0 ; Obvious bug
- with
- cmp.l #$8000,D0 ; Added omitted #
-
- Fixes a bug in the trackdisk device code.
-
- -------------------------------
-
-
- Summing your KickStart
- ~~~~~~~~~~~~~~~~~~~~~~
-
- Now that all patches have been installed, your KickStart's checksum
- needs to be recomputed. Use SumKick for this;
- SumKick DF?: -f
-
- I think SumKick requires a continuous 256K Chip RAM buffer, so you'd
- better not be fragmented.
-
- Perhaps now is a fine time for making a backup of your work in case
- something goes wrong with it later on.
-
-
-
- Installing your files:
- ~~~~~~~~~~~~~~~~~~~~~~
-
- You are (almost) ready to copy your files onto the shared kick/boot
- disk. Note though that the ID in the boot-block reads 'KICK'. Thus the
- KickStart currently in your A1000 won't recognize your Multi-Boot disk
- as being a valid writable DOS disk.
- You must therefore switch off your A1000, and kick from your Multi-Boot.
- After booting the KickStart the "Insert Workbench Disk" hand will pop
- into view. This is still the case because no valid boot-block has been
- installed yet.
-
- Anyway, your A1000 now has the patched KickStart in its WORAM, so
- boot from your old boot disk to get yourself into operational mode.
-
- If you now insert the Multi-Boot disk, DOS should recognize it as a
- DOS disk. You are now able to write files to it. Experiment indicates
- that the OFS starts writing files from track 40 downwards. The KickStart
- data runs from track 0 to 23, thus, if you need to copy more than say
- 100K of files onto the Multi-Boot disk, the first 24 tracks must be
- protected. TFile (mentioned in the requirements list) is perfect for this
- job, though there are alternatives.
-
-
-
- Fixing up the boot block
- ~~~~~~~~~~~~~~~~~~~~~~~~
-
- You'll need to load your disk block hacking tool again (Mon for me),
- and read block 0 and 1 of your MultiBoot disk into a buffer (The first
- 1024 bytes).
-
- Next, put a copy of the "standard installed DOS disk" boot-block code in
- the buffer. This runs from location $8 to $31. You may copy it from any
- normal installed disk instead of typing it.
-
- 0008: 00000370 43FA0018 4EAEFFA0 4A80670A '...pC·..N« áJ.g.'
- 0018: 20402068 00167000 4E7570FF 60FA646F ' @ h..p.Nup `·do'
- 0028: 732E6C69 62726172 79000000 00000000 's.library.......'
-
- The only thing left to do is fixing the checksum of the boot-block.
- If you're using Mon, type:
- # <BootBlockBufferBaseAddres>
-
- Now write out the boot-block to the disk.
-
- Note that byte 512 to 1024 of the boot-block contains the first 512
- bytes of the KickStart data. If you've the same KickStart version
- I have, and have installed the patches at $FC0058 in an appropriate
- manner, then your boot-block's checksum should be $8BABD775.
-
- 0000: 4B49434B 8BABD775 00000370 43FA0018 'KICK.......pC·..'
- ^^^^ ^^^^^^^^
- ID CheckSum
-
-
-
- Conclusion
- ~~~~~~~~~~
-
- If you think this was a tedious exercise, just wait until Kick 2.0
- becomes available. Since it will be 512K, you'll require some fast
- RAM to load it. A worst case scenario might be:
-
- - Essential libraries distributed across both 256K halves, so no
- possibility of booting a lean 2.0 into your 256K WORAM and using
- it to boot the additional 256K bytes. I.o.w. old KickStart needed
- to boot 2,0.
- - 512K continuous fast RAM needed.
- - MMU required to map it at $F80000
-
- This awakens visions of a Mega-Multi-Boot disk, one that first kicks
- 1.3, boots on into a startup-sequence which reads the kick 2.0 image
- into fastram, changes some vectors, and resets. Next, OS 2.0 awakens,
- boots from your Mega-Multi-Boot disk (because it has also been patched),
- and enters the same startup sequence which recognizes it is now running
- under OS 2.0, and therefore boots your network or hardisk driver. Yep,
- four boot phases from one disk :-).
-
-
- Feedback? here's me:
-
-
- UUCP: hp4nl!neabbs!ajbrouw
-
- or
-
- SMAIL: Albert-Jan Brouwer
- St-Eustatiusstr. 2
- 2612 HA Delft
- The Netherlands
-
- Enjoy
-