nesdev.com
http://forums.nesdev.com/

FDS .qd format?
http://forums.nesdev.com/viewtopic.php?f=2&t=15792
Page 1 of 1

Author:  jaek_3 [ Wed Apr 12, 2017 4:27 pm ]
Post subject:  FDS .qd format?

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!

Author:  ccovell [ Wed Apr 12, 2017 5:31 pm ]
Post subject:  Re: FDS .qd format?

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

Author:  jaek_3 [ Wed Apr 12, 2017 8:35 pm ]
Post subject:  Re: FDS .qd format?

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!

Author:  ccovell [ Wed Apr 12, 2017 8:56 pm ]
Post subject:  Re: FDS .qd format?

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?

Author:  Nicole [ Wed Apr 12, 2017 9:04 pm ]
Post subject:  Re: FDS .qd format?

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.

Author:  Myask [ Thu Apr 13, 2017 6:00 pm ]
Post subject:  Re: FDS .qd format?

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.)

Author:  hex_usr [ Thu Apr 13, 2017 7:29 pm ]
Post subject:  Re: FDS .qd format?

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.

Author:  Pokun [ Fri Apr 14, 2017 12:27 am ]
Post subject:  Re: FDS .qd format?

So in other words, maybe the Famicom Mini BIOS doesn't check the CRC.

Author:  hex_usr [ Fri Apr 14, 2017 8:13 am ]
Post subject:  Re: FDS .qd format?

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.

Author:  jaek_3 [ Sat Apr 15, 2017 10:45 am ]
Post subject:  Re: FDS .qd format?

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?

Author:  Dwedit [ Sat Apr 15, 2017 10:49 am ]
Post subject:  Re: FDS .qd format?

The giant Pause screens are built into the emulator, not the game itself.

Author:  hex_usr [ Sat Apr 15, 2017 11:28 am ]
Post subject:  Re: FDS .qd format?

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.

Author:  JoelSun [ Wed Nov 15, 2017 7:54 am ]
Post subject:  Re: FDS .qd format?

Dwedit wrote:
The giant Pause screens are built into the emulator, not the game itself.


Ah yes, they are annoying as hell. Any way to change them?

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/