It is currently Thu Dec 14, 2017 6:23 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: FDS .qd format?
PostPosted: Wed Apr 12, 2017 4:27 pm 
Offline

Joined: Fri Oct 02, 2015 9:48 am
Posts: 15
Location: Miami, Florida
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!


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Wed Apr 12, 2017 5:31 pm 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 924
Location: Japan
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

_________________
http://www.chrismcovell.com


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Wed Apr 12, 2017 8:35 pm 
Offline

Joined: Fri Oct 02, 2015 9:48 am
Posts: 15
Location: Miami, Florida
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!


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Wed Apr 12, 2017 8:56 pm 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 924
Location: Japan
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?

_________________
http://www.chrismcovell.com


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Wed Apr 12, 2017 9:04 pm 
Offline

Joined: Sun Mar 27, 2016 7:56 pm
Posts: 138
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.


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Thu Apr 13, 2017 6:00 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
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.)


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Thu Apr 13, 2017 7:29 pm 
Offline

Joined: Sat May 09, 2015 7:21 pm
Posts: 31
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.


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Fri Apr 14, 2017 12:27 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 928
Location: Sweden
So in other words, maybe the Famicom Mini BIOS doesn't check the CRC.


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Fri Apr 14, 2017 8:13 am 
Offline

Joined: Sat May 09, 2015 7:21 pm
Posts: 31
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.


Last edited by hex_usr on Sat Apr 15, 2017 11:29 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Sat Apr 15, 2017 10:45 am 
Offline

Joined: Fri Oct 02, 2015 9:48 am
Posts: 15
Location: Miami, Florida
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?


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Sat Apr 15, 2017 10:49 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
The giant Pause screens are built into the emulator, not the game itself.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Sat Apr 15, 2017 11:28 am 
Offline

Joined: Sat May 09, 2015 7:21 pm
Posts: 31
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.


Top
 Profile  
 
 Post subject: Re: FDS .qd format?
PostPosted: Wed Nov 15, 2017 7:54 am 
Offline

Joined: Mon Nov 13, 2017 4:24 am
Posts: 1
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group