Reverse-engineered FDS BIOS?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Reverse-engineered FDS BIOS?
by on (#126543)
Has anyone ever attempted to make a replacement FDS BIOS? Using the dumped real FDS BIOS obviously works for emulation, but that dump is still a copyrighted work.

The replacement BIOS wouldn't need to be a drop-in replacement for the real thing on real hardware. It would only need to work well enough so that emulating .FDS images works. In other words, it would just need to emulate the real BIOS' behavior from the Famicom's point of view.
Re: Reverse-engineered FDS BIOS?
by on (#126544)
There is high-level emulation (HLE), which isn't cycle-accurate but which GBA emulators have successfully offered for a long time. But one thing that makes HLE easy on GBA but hard on FDS is the fact that while GBA uses syscall numbers, FDS uses hardcoded entry points. This is the same thing that makes reimplementing the BIOS from scratch in 6502 assembly language so hard, as the replacement routines have to be the same lengths as the originals..
Re: Reverse-engineered FDS BIOS?
by on (#126554)
I guess I never really checked... do any FDS games use the disk IO regs directly instead of invoking the bios?
Re: Reverse-engineered FDS BIOS?
by on (#126563)
Yes, in a sense. Games that have copy protection / counterfeit checks like Doki Doki Panic run their own "implementations" of the BIOS file check routine in software, counting the # of files manually, then reading past what the BIOS just read. So a few games manually edit ZP variables and FDS regs which the BIOS uses.
Re: Reverse-engineered FDS BIOS?
by on (#126579)
tepples wrote:
...as the replacement routines have to be the same lengths as the originals..

Can't the new routines just jump around a bit if they happen to be larger than the originals?
Re: Reverse-engineered FDS BIOS?
by on (#163701)
tokumaru wrote:
tepples wrote:
...as the replacement routines have to be the same lengths as the originals..

Can't the new routines just jump around a bit if they happen to be larger than the originals?

The ROM of the Enhanced Apple IIe and Apple IIGS computers does that, with some routines stored in a separate ROM bank. But there probably isn't much space left in the FDS BIOS unless you make the intro screen dramatically simpler and use it for overflow.


(I occasionally bump if I have a substantive reply to a post that I found while searching for something else.)