Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!ucbcad!ucbvax!hoser.berkeley.edu!bryce From: bryce@hoser.berkeley.edu (Bryce Nesbitt) Newsgroups: comp.sys.amiga Subject: Re: Boot-block checksum? Message-ID: <21472@ucbvax.BERKELEY.EDU> Date: Tue, 27-Oct-87 02:43:44 EST Article-I.D.: ucbvax.21472 Posted: Tue Oct 27 02:43:44 1987 Date-Received: Thu, 29-Oct-87 19:44:32 EST References: <538@esunix.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 47 Keywords: disk checksum boot block nofastmem decigel In article <538@esunix.UUCP> blgardne@esunix.UUCP (Blaine Gardner) writes: >A friend is trying to install a DeciGel and/or NoFastMem type patch in >the boot-block (to persuade EA and Psygnosis games to work), and has run >into problems calculating the checksum for the boot-block. > >> I need the _exact_ procedure for calculating the boot block checksum >> (after the four character identifier). Assembly source would be >> _ideal_. Also, any info about where I can find more disk _structure_ >> information (block checksums, VTOC, etc.) would be helpful. > >Can anyone give him a hand? lea.l bblock,a0 ;address of 1024 byte boot block move.l a0,a1 move.l #128+127,d3 ;how many longs in the block moveq #0,d0 move.l d0,4(a0) ;Zero out checksum location move.w #0,CCR ;Unset extend bit (for addx) chksum move.l (a1)+,d1 addx.l d1,d0 dbra d3,chksum neg.l d0 subq.l #1,d0 move.l d0,4(a0) ;Set checksum into block This is from the "install" progam I wrote a while back for the Amigados Replacement Project (What ever happened to that?). Anyhow, complete source code to this and another install is on a recent fish disk (don't have the number handy). Good project to have noFASTmem in the boot block! Be sure to SetFunction() the Allocate and Avail exec library vectors. Replace them with your own "there is no fast memory here" flavors. You had better check for a nonstandard boot block and warn the user before wiping it out! The DOS has a standard bit of code, followed by garbage. If the sector is the same up to the end of the standard code (checksum excepted) then wipe it out without regret. |\ /| . Ack! (NAK, SOH, EOT) {o O} . bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce (") U "I never said you _could_, I merely said you _should_." -Humpty Dumpty