NSF FDS bankswitching

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
NSF FDS bankswitching
by on (#8292)
While creating a .nsf of "Yuushi no Monshou", I was wondering:

When several memory areas are set to the same bank, should a write to one of them affect the others as well? For example, if both 6xxx and 7xxx are set to bank 0, will a write to 6001 also change the value of 7001? VirtuaNES and FCE Ultra seem to think "no", whereas NotsoFatso and Nintendulator seem to think "yes".

I would prefer the "no" behavior, because it allows for some space-saving tricks for games that have their music code scattered in small bits throughout the whole 6000-DFFF address space. Also, a real FDS doesn't have "banks", it just loads data from a disk, so I imagine a write to 5FFx to simulate a read from the "virtual disk", as opposed to a real bank switch that sort of moves the "window" into a larger memory space, as is the case with ROM-based games.
Re: NSF FDS bankswitching
by on (#8316)
NewRisingSun wrote:
When several memory areas are set to the same bank, should a write to one of them affect the others as well? For example, if both 6xxx and 7xxx are set to bank 0, will a write to 6001 also change the value of 7001?


I don't think it should, but it would probably be best to make the NSF work in both cases.

NewRisingSun wrote:
Also, a real FDS doesn't have "banks", it just loads data from a disk, so I imagine a write to 5FFx to simulate a read from the "virtual disk", as opposed to a real bank switch that sort of moves the "window" into a larger memory space, as is the case with ROM-based games.


Writes to 5FFx are nice for FDS games if the sequence data blocks are close to 4K in size (or multiples thereof). Otherwise, it's more space efficient to write some code to transfer sequence data from the "virtual disk" to where it needs to be in RAM for NSF playback (my Patlabor rip is a pretty clean example of this).