Image Map Image Map
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: XT High density floppy code.

  1. #11

    Default

    The creation of the check sum requires non-standard action of
    the assembler. Some assemblers aren't even capable of doing
    it.
    Dwight

  2. #12
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    23,835
    Blog Entries
    20

    Default

    Dwight, who uses an assembler to generate the checksum? I never have.

    Some PROM programmers will do it, but the simplest is a little DEBUG script or utility.

    I can post a bit of C code here for a utility if anyone is interested; it's not rocket science.

  3. #13
    Join Date
    Dec 2014
    Location
    The Netherlands
    Posts
    1,582

    Default

    Yes, if anything, it's more of a linker's task. But with nasm you generally don't use a linker, but generate a binary blob directly from the assembler.
    The most compatible way would be to use a separate tool to calculate the checksum after the ROM image is made, and then patch the checksum into the image.
    That way you can just include the tool as the last step in your build script (which could just be a simple .bat file for DOS).

  4. #14

    Default

    Please Chuck if you don't mind, I usually use a hex editor and calculator

    Quote Originally Posted by Chuck(G) View Post
    ....I can post a bit of C code here for a utility if anyone is interested; it's not rocket science.

  5. #15
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    23,835
    Blog Entries
    20

    Default

    Malc, how's this:

    Code:
    DEBUG (whatever your BIOS file is]
    -a80
    0822:0080 push cx
    0822:0081 mov ch,[102]
    0822:0085 xor ax,ax
    0822:0087 mov cl,al
    0822:0089 add cx,cx
    0822:008B dec cx
    0822:008C mov si,100
    0822:008F lodsb
    0822:0090 add ah,al
    0822:0092 loop 8f
    0822:0094 neg ah
    0822:0096 mov [si],ah
    0822:0098 pop cx
    0822:0099 int 3
    0822:009A
    
    -g=80
    -w
    -q
    I haven't tested it, but it should work.

  6. #16
    Join Date
    Mar 2009
    Location
    Pleasant Hill, CA USA
    Posts
    2,135
    Blog Entries
    1

    Default

    Quote Originally Posted by Malc View Post
    I use the DTK HD floppy bios in my XT 5160 with no problems except for the fact that i can not format a 1.44M floppy but there are utilities to get around that. I use "SetDrive".
    Just out of curiosity, what does that look like? As in, what is the BIOS code running on? Is it a replacement/mod of the IBM BIOS or something completely different such as an ad-in card?

    IBM 5160 - 360k, 1.44Mb Floppies, NEC V20, 8087-3, 45MB MFM Hard Drive, Vega 7 Graphics, IBM 5154 Monitor running MS-DOS 5.00
    IBM PCJr Model 48360 640kb RAM, NEC V20,, jrIDE Side Cart, 360kb Floppy drives running MS-DOS 5.00
    Evergreen Am5x86-133 64Mb Ram, 8gb HDD, SB16 in a modified ATX case running IBM PC-DOS 7.10

  7. #17
    Join Date
    Feb 2010
    Location
    Russia, St.Petersburg
    Posts
    111

    Default

    JFYI: There is also a sourcecode for the "800.COM" by Alberto Pasquale, another popular diskette driver (mostly in Europe).
    It consumes very few memory as TSR.
    Alberto was interviewed by Russian "Downgrade Magazine" and kindly gives sourcecode for public.
    Unfortunately there is no English translation for this interview.

    "Downgrade Magazine" 2015 N15 p.6
    http://dgmag.in/N15/DowngradeN15b.pdf
    (in Russian, google translation may help?)

    Binaries and sourcecode
    http://old-dos.ru/index.php?page=fil...do=show&id=243

  8. #18

    Default

    Thanks Chuck, Worked a treat

    Quote Originally Posted by Chuck(G) View Post
    Malc, how's this:

    I haven't tested it, but it should work.

  9. #19

    Default

    In one of my machines i have an 8-bit HD floppy controller and dumped the bios to use in my other machines, i use either a ROM board / Boot ROM socket on a nic / 16-bit multi IO card with it's own boot rom / XT-IDE card ROM, Basically anywhere i can home the BIOS.

    Quote Originally Posted by lutiana View Post
    Just out of curiosity, what does that look like? As in, what is the BIOS code running on? Is it a replacement/mod of the IBM BIOS or something completely different such as an ad-in card?

  10. #20

    Default

    Quote Originally Posted by prime View Post
    You need to patch the last byte of the bin file so it has the correct checksum,

    run :
    debug xtfdc.bin
    from within debug :
    g=106

    OK i tried this method but how can i see the checksum value that was left in the AL register?


    Anyhow, all i needed to do in this BIOS was to edit the drive type and change the checksum. The drive type byte is at 02BAh and the checksum byte is at 1F66h. 1F66h is the exact last byte of the 16th and last 512 byte block.

    Knowing this i was lucky enough that Phoenix BIOS reports how much bytes are off the checksum so with this cue i was able to get to the correct checksum byte manually. I've made a table based on the original from config.asm:



    Code:
                                         (02BAh)              (1F66h)
    ; drive A     drive B	              value 	         Checksum
    ;  360		360		        00h	             6Ah	
    ; 1200	 	360		        01h	             69h
    ;  720		360		        02h	             68h
    ; 1440		360		        03h 	             67h
    ;  360		1200		        04h	             66h
    ; 1200		1200		        05h	             65h
    ;  720		1200		        06h	             64h
    ; 1440		1200		        07h	             63h
    ;  360		720		        08h	             62h
    ; 1200 		720		        09h	             61h
    ;  720		720		        0Ah                  60h
    ; 1440 		720		        0Bh	             5Fh
    ;  360		1440		        0Ch	             5Eh
    ; 1200		1440		        0Dh	             5Dh
    ;  720		1440		        0Eh	             5Ch
    ; 1440		1440		        0Fh	             5Bh
    Last edited by CarlosTex; January 12th, 2017 at 07:35 AM.

Page 2 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •