ClusterM / fdskey

Famicom Disk System drive emulator
GNU General Public License v3.0
190 stars 16 forks source link

Some files don't seem to load with a header #18

Closed GreatGlobox closed 4 months ago

GreatGlobox commented 4 months ago

Hi there. I mainly bought this because I'm into composing chiptune and I wanted to listen to it on the real hardware with authentic FDS audio. I use FamiStudio to compose, and it's able to export either FDS or NES files. For some reason, the files exported by it aren't working on my FDSKey. At first, I thought the issue could be related to NMI not being disabled during disk loading (FamiStudio related, that will be fixed later), but then I found out that removing the 16 byte FDS header and padding the end of the file makes it load. I have no idea why this is, because other games have headers and they load just fine. I can just strip the headers for now since it works, but I just wanted to mention this in case.

GreatGlobox commented 4 months ago

Just wanted to report back to say that it was actually an issue with the file size on the FamiStudio end. When the fds file was padded, it was only padding it to 65500, while the size of the header was supposed to be included to make it 65516. The FDSKey was assuming the smaller filesize meant no header was present, hence it failing to read the files.