d0k3 / GodMode9

GodMode9 Explorer - A full access file browser for the Nintendo 3DS console :godmode:
GNU General Public License v3.0
2.15k stars 194 forks source link

[FEATURE REQUEST] Include .txt with dump info in GAMECART #607

Closed mariomadproductions closed 3 years ago

mariomadproductions commented 4 years ago

It'd be useful if a text file with dump info was included in the virtual gamecart folder. Something like

Product Code: xxxx
Revision: xxxx
etc

Here the details of some useful ROM header fields for this file:

DS Field Offset (hex) Length (hex) Note
Cart ID N/A N/A Same as displayed in C: drive name in GM9
Platform 12 1 00=DS, 02=DSi Enhanced, 03=DSi
Product Code C 4 ASCII
Revision 1E 1 Should be displayed as decimal

(source: https://problemkaputt.de/gbatek.htm#dscartridgeheader)

3DS Field Section Offset (hex) Length (hex) Note
Cart ID N/A N/A N/A Same as displayed in C: drive name in GM9
Platform main NCCH 18C 1 01 = 3DS, 02 = New 3DS
Product Code main NCCH 150 10 ASCII
Revision NCSD 312 2 Should be displayed as decimal

(source: https://www.3dbrew.org/wiki/NCCH, https://www.3dbrew.org/wiki/NCSD, https://www.3dbrew.org/wiki/NCCH)

InternalLoss commented 4 years ago

This would be super useful, especially since users could then just paste the contents of said GAMEINFO into No-Intro/etc, and we wouldnt have to notate Cart ID etc

aspargas2 commented 4 years ago

Personally I don't see a virtual file in the gamecart drive as the appropriate place for something like this. Couldn't a script be written relatively quickly to generate the info in a nice format and append it to a text file somewhere?

mariomadproductions commented 4 years ago

That'd be reasonable. Although I'm not sure how straightforward it'd be to retrieve the info, especially the Cart ID.

d0k3 commented 4 years ago

I think we either need to provide the interface to generate such a file, or we need to provide the file itself. It's pretty useful for digital preservation.

InternalLoss commented 4 years ago

I think the GAMECART drive would be a good place to put this file, since the header etc is already here when dumping, so users could just mark the full NDS/3DS, gameinfo and header when applicable and copy to 0:/gm9/out - makes life a lot easier c:

d0k3 commented 3 years ago

I had an idea. Just throwing that in, for now. Wouldn't it be a good idea to include all that stuff in the filename?

mariomadproductions commented 3 years ago

I think that it'd be a good idea to put it in the filename. That'd mean people would be getting this info with "normal use" of GM9 - they wouldn't have to go out of their way to get it by copying an additional file.

Also, some revisions to the my initial post:

d0k3 commented 3 years ago

I got something to test for you here: https://f.secretalgorithm.com/aSHQu/godmode9.firm

Notes:

  1. We got no relevant size limit for the dump name anymore.
  2. There's no special calculation for platform yet.
  3. I had to code blind. Don't have any carts here. I hope this build does not do anything super weird.
  4. Name format is up for discussion.

As for the private header... I think you're not aware of it's purpose. It's used (was used) in the Gateway card, to allow online play without the risk of a ban. Each private header is unique, thus you could just grab a header from a cheap game (doesn't even need online capabilities) and use it for all your online gaming. Apparently Nintendo doesn't do any sanity checks here (check if the private header matches the actual game played).

mariomadproductions commented 3 years ago

I'll try that out.

Yeah I'm aware the private header is used for online stuff. But that just makes it more sensitive.

mariomadproductions commented 3 years ago

Here are the results:

v1.9.1: Drive name suffix v1.9.1: .3ds filename ROM image: Prod. Code Test build: Drive name suffix Test build: .3ds filename Notes
CTR9080FA45 0004000000132800-v00.3ds CTR-P-AYNP KTR9080FA45 0004000000132800_CTR-P-AYNP_00_1_9080FA45.3ds Seems good, except "KTR" should be "CTR", and I'm not sure what the "1" is after the revision is.
NTR00001FC2 NEW_MARIO_A2DP01_00.nds A2DP01 NTR00001FC2 NEW_MARIO_A2DP01_00_0_00001FC2.nds Seems good, except I'm not sure what the "0" is after the revision is.
TWL40003FC2 SONICCOLLECT_VSOV8P_00.nds VSOV8P TWL40003FC2 SONICCOLLECT_VSOV8P_00_2_40003FC2 Seems good, except I'm not sure what the "2" is after the revision is.

Btw, there are two other useful pieces of info that could be put in the filename:

d0k3 commented 3 years ago

Okay, sorry bout the radio silence. "KTR" is the codename for the N3DS ("Kontrolle"). It is only shown for N3DS exclusive carts. "CTR" may be better because that's what Nintendo also uses internally.

The unknown numbers specify the platform (O3DS/N3DS/DS/DSi-enhanced/DSi-exclusive). Could be solved better, I guess.

As I got no way of testing this myself (no carts), I will need some help. Is the extension still visible for all dump names? Got any ideas on how to make the filename format better? Any issues (you can still copy the dumps, right?)?

mariomadproductions commented 3 years ago

Okay, sorry bout the radio silence.

NP.

"KTR" is the codename for the N3DS ("Kontrolle"). It is only shown for N3DS exclusive carts. "CTR" may be better because that's what Nintendo also uses internally.

Yeah, But the thing is, AYNP (Mario & Luigi: Paper Jam Bros.) isn't a New 3DS exclusive game. I thought that maybe it showed up like this due to it being New 3DS enhanced (it supports NFR for amiibo and the c-stick for the 3D battles), but then I tried a a launch game - AWAP (Pilotwings Resort) and got the same problem (although maybe it isn't a problem for Paper Jam Bros.). Here are the results from that:

v1.9.1: Drive name suffix v1.9.1: .3ds filename ROM image: Prod. Code Test build: Drive name suffix Test build: .3ds filename Notes
CTR90007FC2 0004000000031D00_v00.3ds CTR-P-AWAP KTR90007FC2 0004000000031D00_CTR-P-AWAP_00_1_90007FC2.3ds "KTR" should be "CTR".

The unknown numbers specify the platform (O3DS/N3DS/DS/DSi-enhanced/DSi-exclusive). Could be solved better, I guess.

Well I guess that keeps it short. As long as its documented what the numbers mean, it should be fine.

As I got no way of testing this myself (no carts), I will need some help. Is the extension still visible for all dump names?

Yeah, I just missed it when transcribing the filename for Sonic Classic Collection

Got any ideas on how to make the filename format better?

Here is a proposed format: NameSlashTitleID_ProductCode_Revision_Platform_CartID_GM9Ver_USTDateDumpMade e.g. 0004000000132800_CTR-P-AYNP_00_1_9080FA45_1.9.1_2020-12-11.3ds

I also wonder if a text file containing this info should also be automatically copied alongside the ROM file, incase the dumper renames the file to something more "friendly". But maybe that could be (at least partially) solved by appending the title name from the SMDH to the file (in the case of .3ds - .nds banner title is probably "friendly" enough).

Any issues (you can still copy the dumps, right?)?

I tested dumping Pilotwings Resort, and the dump matches one made with GodMode9 v1.9.1.

d0k3 commented 3 years ago

Okay, here's a new try: https://f.secretalgorithm.com/l3AfB/godmode9.firm

This includes an .nfo file and reverts the file naming to what it was before. Any additional info (date / GM9 version) can be added later.

Can you try this and tell me what you think?

d0k3 commented 3 years ago

Alright, I'm assuming this solved. If you're okay with it, you can close this, @mariomadproductions

mariomadproductions commented 3 years ago

Yeah, looks like we've ironed out any bugs in our DMs.