This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

FDS .qd format?

FDS .qd format?
by on (#193112)
If you didn't know, the version of The Legend of Zelda on the Famicom Mini features a prologue that isn't in broken English. Anyways, after a lot of searching, I was finally able to find the game inside of the console - but, it's in Nintendo's .qd format, so I can't actually write it to a physical disk. Is there anyway to convert this to .fds? I've been looking all through the internet, but most of the information available on the subject are in Japanese. I did read that there was a converter (qd2fds) but the link seems to have gone down. Any help would be appreciated!
Re: FDS .qd format?
by on (#193118)
You'll have to examine the differences between this format and the FWNES/iNES .FDS format. Could it be similar to the Virtual Console format, as in this thread? viewtopic.php?f=2&t=12169&p=138161


I did modify FDSList to handle the VC dump in this version: http://www.chrismcovell.com/data/FDSLCRC.zip
Re: FDS .qd format?
by on (#193125)
jaek_3 wrote:
If you didn't know, the version of The Legend of Zelda on the Famicom Mini features a prologue that isn't in broken English. Anyways, after a lot of searching, I was finally able to find the game inside of the console - but, it's in Nintendo's .qd format, so I can't actually write it to a physical disk. Is there anyway to convert this to .fds? I've been looking all through the internet, but most of the information available on the subject are in Japanese. I did read that there was a converter (qd2fds) but the link seems to have gone down. Any help would be appreciated!
Well, I converted the .qd into .fds - but now the text is identical to the original unmodified game!
Re: FDS .qd format?
by on (#193126)
Without running afoul of copyright, could you

1) Document the QD format and
2) see if a patch (that modifies the text) is somewhere in the .qd or elsewhere in the Famicom Mini?
Re: FDS .qd format?
by on (#193127)
I remember hearing something along the lines of Nintendo actually patching this stuff at run-time, rather than modifying the actual game images themselves.

There's already evidence they've done stuff like this with the Virtual Console in things like EarthBound, which mitigates certain screen-flashing effects by fading the screen during them, in a way that isn't possible on a real SNES. There's also Pokémon Yellow on 3DS, which recolors Jynx to be purple in a way that gives the sprite more colors than normally possible on a Game Boy Color.
Re: FDS .qd format?
by on (#193222)
Relatedly,
Gamecube (and, I expect, VC) versions of Zelda II: the Adventure of Link have a glaring, not-tile-aligned/sized PAUSE text (kinda like closed-captioning white-on-black) on the overworld…that isn't in the ROM.

(The alterations of the flashing on death are in there, though.)
Re: FDS .qd format?
by on (#193228)
At a glance: in the .qd format, each side is 65,536 bytes long instead of 65,500 bytes. Also, there is no header. In .fds, the 16-byte header is required by a few emulators and optional in others, but it doesn't exist in .qd. Also, each block ends in the 16-byte CRC that actual Famicom Disks have, but I think the CRC for the *NINTENDO-HVC* header might be bad: it's just 00 00.

It's worth noting that the FDS BIOS in the Famicom Mini is different from the one in the actual Famicom Disk System RAM adapter. Its SHA256 hash is FDC1A76E654FEEA993FCB38366E05EE5F4EB641F86FE6BEBAEEFD412E112DD72.
Re: FDS .qd format?
by on (#193237)
So in other words, maybe the Famicom Mini BIOS doesn't check the CRC.
Re: FDS .qd format?
by on (#193257)
I think I found a lead on where the runtime patches are stored.

I did a search on the entire /usr/share/ directory for the byte sequence 10 0A 17 18 17, which spells "GANON" in the game's text encoding. I found only 1 file with this byte string:

/usr/share/games/nes/kachikachi/CLV-P-HAANJ/autoplay/0be33d87903018bde4f01672b434800b89c4fa7e_0.inputs.state

This looks like a save state that the emulator loads every time the game is loaded.

In it, there is a block of data that is exactly 0xB96D 0x1802 bytes long, starting at $013FD2 which patches the .qd image at $008665. It includes the entire intro text and a few other things. Most notably, the font is included in this patch included in a separate patch in this file; the original had "©" copyright symbol glyphs at 0xF0 and 0xFC, but the Famicom Mini version replaces the one at 0xFC with a "," comma glyph, which is the cause of a typo on the ending screen.

Image

=============================
Myask wrote:
Gamecube (and, I expect, VC) versions of Zelda II: the Adventure of Link have a glaring, not-tile-aligned/sized PAUSE text (kinda like closed-captioning white-on-black) on the overworld…that isn't in the ROM.

I don't know about the Wii Virtual Console versions, but among the GameCube versions, the first game also has that very same pause graphic:
Image
Image
The Game Boy Advance versions have smaller "PAUSE" graphics instead. They are not in the 3DS or Wii U Virtual Console versions.

EDIT: Crossed out some errors in my patch research.
Re: FDS .qd format?
by on (#193336)
hex_usr wrote:
I think I found a lead on where the runtime patches are stored.

I did a search on the entire /usr/share/ directory for the byte sequence 10 0A 17 18 17, which spells "GANON" in the game's text encoding. I found only 1 file with this byte string:

/usr/share/games/nes/kachikachi/CLV-P-HAANJ/autoplay/0be33d87903018bde4f01672b434800b89c4fa7e_0.inputs.state

This looks like a save state that the emulator loads every time the game is loaded.

In it, there is a block of data that is exactly 0xB96D bytes long, starting at $013FD2 which patches the .qd image at $008665. It includes the entire intro text and a few other things. Most notably, the font is included in this patch; the original had "©" copyright symbol glyphs at 0xF0 and 0xFC, but the Famicom Mini version replaces the one at 0xFC with a "," comma glyph, which is the cause of a typo on the ending screen.



=============================
Myask wrote:
Gamecube (and, I expect, VC) versions of Zelda II: the Adventure of Link have a glaring, not-tile-aligned/sized PAUSE text (kinda like closed-captioning white-on-black) on the overworld…that isn't in the ROM.

I don't know about the Wii Virtual Console versions, but among the GameCube versions, the first game also has that very same pause graphic:

The Game Boy Advance versions have smaller "PAUSE" graphics instead. They are not in the 3DS or Wii U Virtual Console versions.

Is there any chance that you could post a patched copy of the .qd?
Re: FDS .qd format?
by on (#193338)
The giant Pause screens are built into the emulator, not the game itself.
Re: FDS .qd format?
by on (#193341)
Do you really want me posting copyrighted ROMs on the NesDev forums? I'll PM it to you instead, and you can share it at your discretion after that.

But unfortunately, I made some errors in my calculations. Both offsets are correct (from inputs.state: $013FD2 to qd: $008665), but the size is actually 0x1802, not 0xB96D. And that section only affects the intro text and not the font, so I think there's another patch section specifically for the font. I'll analyze it further, then create an archive with both .qd and .fds versions of both the unpatched and patched versions to PM to jaek_3.

If you can't find a Famicom Mini for cheap enough and you really want the files it comes with, they have been preserved in torrent form along with the files in the NES Classic Edition. I won't say where to find that torrent, but it's easy if you know where to look.

EDIT: The font is at $008AD2 in the save state/patch, and it patches offset $000161 in the .qd image for 0x2000 bytes. It includes graphics for Link, some of the items he uses, the title screen, the main font, and most importantly, the comma that replaces the copyright symbol.
Re: FDS .qd format?
by on (#227189)
Hi, I'm a guy who spent ages looking at this format in its various occurrences.

ccovell wrote:
Could it be similar to the Virtual Console format, as in this thread? http://forums.nesdev.com/viewtopic.php? ... 9&p=138161

The .qd format has been used by Nintendo for FDS games since Animal Crossing on GC. It is the same one used in FDS games on VC for Wii, 3DS and I'm in no way surprised to see it on the Famicom Mini.

hex_usr wrote:
At a glance: in the .qd format, each side is 65,536 bytes long instead of 65,500 bytes. Also, there is no header. In .fds, the 16-byte header is required by a few emulators and optional in others, but it doesn't exist in .qd. Also, each block ends in the 16-byte CRC that actual Famicom Disks have, but I think the CRC for the *NINTENDO-HVC* header might be bad: it's just 00 00.

Basically this. Also it should be noted at least one game I looked at had "bad" CRCs for every block (Super Mario Bros. 2 on 3DS VC).

hex_usr wrote:
It's worth noting that the FDS BIOS in the Famicom Mini is different from the one in the actual Famicom Disk System RAM adapter. Its SHA256 hash is FDC1A76E654FEEA993FCB38366E05EE5F4EB641F86FE6BEBAEEFD412E112DD72.

I believe it would be identical to the one hacked for 3DS, which bypasses the initial loading screen (for shame) and seems to skip a few things from my bad memory.

Anyway, have a FDS-to-QD (and vice-versa) conversion script https://gist.github.com/einstein95/6545 ... c4cc8ca4f0