Can all registered uses please login, even just for a few minutes..
It helps build a picture where our "good traffic" is coming from..
Thanks :)

Falcon Speed 286 emulator

Tool suggestions, soldering tips, general useful electronics knowhow.
SteveBagley
Posts: 40
Joined: Fri Jul 26, 2024 3:53 pm

Re: Falcon Speed 286 emulator

Post by SteveBagley »

Badwolf wrote: Sat Sep 12, 2026 10:20 pm Ooo, if you're looking at Ghidra (I still must learn to use that -- the few attempts I've had so far to play with it have ended in ignominy), let me know if you see anything related to IDE. Seems to be a big weak point. I suspect it struggles with modern devices for a couple of reasons. Timing may be one (there are a *lot* of lockups with my CF card) but the biggest hurdle is it doesn't seem to accept any *drive* over a figure between 64 and 256 MB. Perhaps cylinder count is stored as a byte?!
Here's the code that handles the IDE sector/cylinders/head stuff…

Code: Select all

                             **************************************************************
                             *                          FUNCTION                          *
                             **************************************************************
                               undefined FUN_00018480()
             undefined         <UNASSIGNED>   <RETURN>
                             FUN_00018480                                         XREF[2]:     FUN_00018df4:00018390(c), 
                                                                                              FUN_000189a8:000183f4(c)  
        00018480 38 2e 00 8c     move.w          (0x8c,A6),D4w
        00018484 13 c4 ff        move.b          D4b,(DAT_fff00008).l
                 f0 00 08
        0001848a 28 2e 00 90     move.l          (0x90,A6),D4
        0001848e 88 ee 07 56     divu.w          (0x756,A6),D4
        00018492 48 44           swap            D4
        00018494 52 44           addq.w          #0x1,D4w
        00018496 13 c4 ff        move.b          D4b,(DAT_fff0000c).l
                 f0 00 0c
        0001849c 42 44           clr.w           D4w
        0001849e 48 44           swap            D4
        000184a0 88 ee 07 54     divu.w          (0x754,A6),D4
        000184a4 13 c4 ff        move.b          D4b,(DAT_fff00010).l
                 f0 00 10
        000184aa e0 4c           lsr.w           #0x8,D4w
        000184ac 13 c4 ff        move.b          D4b,(DAT_fff00014).l
                 f0 00 14
        000184b2 48 44           swap            D4
        000184b4 00 04 00 a0     ori.b           #0xA0,D4b
        000184b8 13 c4 ff        move.b          D4b,(DAT_fff00018).l
                 f0 00 18
        000184be 4e 75           rts
which seems to implement a conversion back from LBA to CHS, i.e. the reverse of: LBA = (( C x HPC ) + H ) x SPT + S - 1.

Steven
Post Reply

Return to “ELECTRONICS”