Famicom Disk System HLE?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
oRBIT2002
Posts: 634
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Famicom Disk System HLE?

Post by oRBIT2002 » Mon Apr 03, 2006 3:41 am

I'm a bit interested in adding FDS support in my emulator. I've read that high-level-emulation of the FDS BIOS routines would be possible. Have anyone tried it and perhaps got some hints on how to implement it?

tepples
Posts: 22281
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Mon Apr 03, 2006 4:31 pm

You'll need a list of the FDS BIOS entry points and approximate cycle counts. Then whenever the program does a JSR to one of the entry points, run the appropriate algorithm in native code and then halt the CPU for an appropriate number of cycles. Does anybody have such a list?

NewRisingSun
Posts: 1286
Joined: Thu May 19, 2005 11:30 am

Post by NewRisingSun » Mon Apr 03, 2006 5:10 pm

I think the whole point of a high-level FDS emulation is to speed up the read/write procedure, so worrying about halting the CPU and how many cycles a BIOS routine takes probably is dispensable. Brad Taylor's FDS document has a list of entry points, though I don't know how complete it is.

tepples
Posts: 22281
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Mon Apr 03, 2006 7:24 pm

NewRisingSun wrote:I think the whole point of a high-level FDS emulation is to speed up the read/write procedure
Or to keep people from having to buy an FDS and dump the BIOS. Most GBA emulators high-level-emulate the GBA BIOS for the same reason.

User avatar
Disch
Posts: 1849
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch » Mon Apr 03, 2006 8:56 pm

tepples wrote:Or to keep people from having to buy an FDS and dump the BIOS. Most GBA emulators high-level-emulate the GBA BIOS for the same reason.
It doesn't seem any less reasonable to leave BIOS supply up to the user than it does to leave ROM/disk image supply up to the user. Most people wouldn't have any trouble downloading a copy of the BIOS off the net -- especially considering they're probably already downloading ROMs off the net.

tepples
Posts: 22281
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Mon Apr 03, 2006 9:48 pm

Disch wrote:It doesn't seem any less reasonable to leave BIOS supply up to the user than it does to leave ROM/disk image supply up to the user. Most people wouldn't have any trouble downloading a copy of the BIOS off the net -- especially considering they're probably already downloading ROMs off the net.
What if you want to run a homebrew FDS program?

User avatar
oRBIT2002
Posts: 634
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Post by oRBIT2002 » Mon Apr 03, 2006 10:43 pm

My reason (at the moment anyway) to high-level emulate the FDS is the complexity of the unit. The documents on this website are very detailed and interesting but is most likely not written for a swedish emulator-coder with limited electronics-skills. :)
However it would be nice to have a FDS-"test-disc-image" to help with accurate FDS emulation, if anyone feels up for the task? ;)

User avatar
Dwedit
Posts: 4410
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Mon Apr 03, 2006 11:23 pm

Even though certain calls to the FDS bios can be HLEd, many games actively poll the status of the FDS hardware. So even if all the bios functions are high level emulated, some of the low level stuff also needs to be supported.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
Zepper
Formerly Fx3
Posts: 3223
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper » Tue Apr 04, 2006 9:10 am

I can't find any decent FDS docs. Most of available docs are japanese translations, overloaded of 'guessed' information. No RE was done yet AFAIK. It would be very interesting to get something up in the wiki, rather than cryptic source codes around... -_-;;.

User avatar
oRBIT2002
Posts: 634
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Post by oRBIT2002 » Tue Apr 04, 2006 11:11 am

My current FDS emulation gives me an error $20 which I can't find documented anywhere.... :/

Post Reply