[Coco] HDBDOS - RETRIEVE FIXED!!

Chad H chadbh74 at hotmail.com
Sun Jan 18 19:01:19 EST 2015


Yes I know right!!   I played around with that section of code ALL DAY yesterday!! You have to adjust this section every time you change the length of the code before it...

* HARD DISK DRIVER

               org       MAGICDG+$193D       It all starts here!

* Indirect Jump Table ( jsr [$MMMM] )

               fdb       DISKIO              universal hard disk input / output
               fdb       SETUP               Setup command packet
               fdb       BEEP                Make a beep sound
               fdb       DSKCON2             DSKCON Re-entry

HDBHI          fcb       $00                 HDB-DOS Offset hi-byte
HDBLO          fdb       $0000               HDB-DOS Offset lo-word

PORT           fdb       DATAADDR            Interface base address
CCODE          fcb       TDELAY              IDE: startup delay / SCSI: wakeup delay

That "MAGICDG" Offset, if not right, made it freeze instantly.     If you use a hex editor on the original HDBDOS.ROM file for your computer you will see at the offset they have there this long string of ff's with a data marker at that address. (ff ff ff 99 da ad da b3 ...."   It's that first 'da' that you have to find the offset of and change it beside the MAGICDG.

-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Robert Gault
Sent: Sunday, January 18, 2015 3:55 PM
To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] HDBDOS - RETRIEVE FIXED!!

Chad,

I been trying something similar but for some reason my version of hdbdos.asm does not correctly use the fill statement at the end and I either get overflow past $2000 or inadequate filling with $39. Also the default positions for things like jump tables and the drive value table change location in memory.

Anyway I used

LD69A      pshs      B               SAVE SECTOR COUNTER
            ldu       #DBUF1          POINT U TO THE TABLE OF LOGICAL SECTORS
            ldb       B,U             * GET LOGICAL SECTOR NUMBER FROM TABLE AND
            stb       DSEC            * SAVE IT IN THE DSKCON VARIABLE
            ldu       #LD6D4          POINT U TO TABLE OF SECTOR FORMATTING DATA
            ldb       #$03            * GET FIRST 3 DATA BLOCKS AND
            bsr       LD6C8           * WRITE THEM TO BUFFER
            lda       DCTRK           = GET TRACK NUMBER AND STORE lT
            sta       ,X+             = IN THE RAM BUFFER
            lda       <DCDRV          should be $EB ie. drive #
            lsra                      0&1 become 0 while 2&3 become 1
            sta       ,x+
            lda       DSEC            * GET SECTOR NUMBER AND
            sta       ,X+             * STORE IT IN THE BUFFER
            ldb       #$09            = GET THE LAST NINE DATA BLOCKS AND
etc.

This did not work for me on my system but it could have been a problem compiling the code.

Robert


--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list