Homebrew [Very Small Tutorial] Fixing NES VC's Screen Resolution

WiiUBricker

News Police
Banned
Joined
Sep 19, 2009
Messages
7,827
Trophies
0
Location
Espresso
XP
7,485
Country
Argentina
Thank you for the response. :)
the idea of what looks good is all opinion based. Various people have their reasons, i prefer stuff in full screen cause i have focus problems for things like the obvious black borders and other reasons.
I have tested it. It works. But you have to set ClipUp and ClipDown both to 0, else you have 8 lines padding at the top and 1 line padding at the bottom.

There are various other settings in the config.ini. I wonder if we can fix GBA games the same way without hex-editing.
 

Sonic Angel Knight

Well-Known Member
Member
Joined
May 27, 2016
Messages
14,402
Trophies
1
Location
New York
XP
12,946
Country
United States
I have tested it. It works. But you have to set ClipUp and ClipDown both to 0, else you have 8 lines padding at the top and 1 line padding at the bottom.

There are various other settings in the config.ini. I wonder if we can fix GBA games the same way without hex-editing.
Well yeah, i also like this idea cause it used to annoy me how megaman 3, 4, 5, and 6, had this obvious odd resolution with the games that the left side of the screen had this annoying black line guessing they maybe miss programed the game. I wondered for while if there was any fix for the rom instead of having to just alter screen size. :unsure:
 

WiiUBricker

News Police
Banned
Joined
Sep 19, 2009
Messages
7,827
Trophies
0
Location
Espresso
XP
7,485
Country
Argentina
Well yeah, i also like this idea cause it used to annoy me how megaman 3, 4, 5, and 6, had this obvious odd resolution with the games that the left side of the screen had this annoying black line guessing they maybe miss programed the game. I wondered for while if there was any fix for the rom instead of having to just alter screen size. :unsure:
I have tested it with Mega Man IV and there still is a black line at left side. It seems this is programmed into the game.
 

shoemaker

Well-Known Member
Member
Joined
Jul 22, 2014
Messages
125
Trophies
0
Age
32
XP
201
Country
United States
Use the trinity instead (ctrtool-3dstool-makerom), making sure to include partition 2:
(This will leave the remote copy untouched for the purposes of leaving it legit as far as the other console knows; if you also want to edit it, know that partition 2 is a CFA (follow PART of the guide in my signature) containing, in its romfs, a CIA (extract again with this guide... in a different folder!!))

Fully decrypt (cryptofix) the cia with D9 or alternatives

ctrtool the-game.cia --content=ncch <<< "ncch.°°°°.????????" files are made. °°°° is the partition number (0=app, 1=manual, 2=remote application)

3dstool -xvtf cxi ncch.0000.whatever --header header.bin --exh exheader.bin --plain plain.bin --logo logo.bcma.lz --exefs exefs.bin --romfs romfs.bin <<< extracts partition 0. Note any missing parts that were skipped.

3dstool -xvtf exefs exefs.bin --header exefs-header.bin --exefs-dir exefs <<< extract exefs (optional)
3dstool -xvtf romfs romfs.bin --romfs-dir romfs <<< extract romfs (optional)

Edit as you'd like!

3dstool -cvtf exefs exefs.bin --header exefs-header.bin --exefs-dir exefs <<< compress exefs (if you edited it)
3dstool -cvtf romfs romfs.bin --romfs-dir romfs <<< compress romfs (if you edited it)

3dstool -cvtf cxi ncch.0000.whatever --header header.bin --exh exheader.bin --plain plain.bin --logo logo.bcma.lz --exefs exefs.bin --romfs romfs.bin <<< EXAMPLE of compressing cxi. Remove from the command any parts (logo and/or romfs, depending on title) that failed extraction because they didn't exist.

makerom -f cia -o "the-game hacked.cia" -content ncch.0000.????????:0:???????? -content ncch.0001.????????:1:???????? -major 6 -minor 9 <<< EXAMPLE of creating cia. Add a "-content filename : partitionNumber : partitionId" for each ncch (you want to include). You can edit the last number to use a different title version than 6.9.

Nice! Thanks for the help! That got my NES VC games looking perfectly.

For other users needing step-by-step instructions...
  • Get the NES VC .cia of your choice, for me, I redownloaded the games I'd already bought as .cia's through CIAngel, then did a full Decrypt in Decrypt9 (place the .cia in "/D9Game" on the root of the SD card, then in Decrypt9, select "Content Decryptor Options" -> "CIA Decryptor (deep)")
  • Download the .zip file from Ryccardo's post and place the unzipped files in a New Folder on your computer's desktop. Also, place the .cia in there, and give it the new "game.cia".
  • Hold shift and right click on the New Folder so you can select "Open command window here"
  • Run the command: ctrtool game.cia --content=ncch
This will create a ncch.0000.SomeNumbers and a ncch.0001.SomeOtherNumbers file, where "SomeNumbers" and "SomeOtherNumbers" are actually numbers. Make note of these and replace them in future commands (so don't actually put "SomeNumbers" and "SomeOtherNumbers" in the command, put the actual numbers in their place).
NOTE: If the game supports download play, it'll create a ncch.0002.EvenMoreNumbers file
  • Run the command: 3dstool -xvtf cxi ncch.0000.SomeNumbers --header header.bin --exh exheader.bin --plain plain.bin --logo logo.bcma.lz --exefs exefs.bin --romfs romfs.bin
  • Run the command: 3dstool -xvtf romfs romfs.bin --romfs-dir romfs
  • Open up the "romfs" folder and edit the file "config.ini"
  • Under [NES], change the Width to 256 (this fixes the aspect ratio of the NES VS) and under [Mask], "Normal Mode", change the DarkEnable0 to 0 (this fixes the dark filter over the screen)
  • Run the command: 3dstool -cvtf romfs romfs.bin --romfs-dir romfs
  • Run the command: 3dstool -cvtf cxi ncch.0000.SomeNumbers --header header.bin --exh exheader.bin --plain plain.bin --logo logo.bcma.lz --exefs exefs.bin --romfs romfs.bin (NOTE: If an error occurs on this step, remove the file that doesn't exist. For instance, "logo.bcma.lz" often doesn't exist, so remove the "-- logo logo.bcma.lz" from the command)
  • Run the command (unless it's a Download Play supported game!): makerom -f cia -o "game_hacked.cia" -content ncch.0000.SomeNumbers:0:SomeNumbers -content ncch.0001.SomeOtherNumbers:1:SomeOtherNumbers
  • NOTE: If the game created a "ncch.0002" file (so, it supports Download Play), run this command instead: makerom -f cia -o "game_hacked.cia" -content ncch.0000.SomeNumbers:0:SomeNumbers -content ncch.0001.SomeOtherNumbers:1:SomeOtherNumbers -content ncch.0002.EvenMoreNumbers:2:EvenMoreNumbers
  • Put "game_hacked.cia" back on your 3DS and install it - Note that you will lose your save after installing. If you want to get it, export the save with JKSM before installing the new .cia, then import it after you have installed it.
Worked great for me; someone could probably easily make a batch script to automate this. It should be noted that I lost my saves of the games that I modified doing this - no problem for me but just a fair warning. I also don't know if the "6.9" version number thing was just a joke but I left it the same. *updated in the post*

EDIT: Added the Download Play fixes, removed the version numbering
 
Last edited by shoemaker,

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,691
Trophies
1
Age
28
Location
Imola
XP
6,913
Country
Italy
It should be noted that I lost my saves of the games that I modified doing this - no problem for me but just a fair warning. I also don't know if the "6.9" version number thing was just a joke but I left it the same.

It is a joke, you can use whatever numbers you like (or even completely remove the "major" and "minor" options!)
[Removing and] reinstalling a cia (which must be done if the new wersion is equal or lower) will obviously delete saves: DevMenu supports updating in place to a higher version number, I don't know if other title managers also do this or blindly uninstall first...

And, to keep download play, you must also add "-content ncch.0002.SomeDifferentNumbers:2:SomeDifferentNumbers" to makerom too! :)
 

Doomguy

Member
Newcomer
Joined
Jul 20, 2016
Messages
16
Trophies
0
XP
218
Country
United States
If I have a CIA that creates an "ncch.002" file for download play, how do I continue with the process? Whenever I do the usual routine in the Command Prompt, I get an error saying the filetype is a mismatch.
 

shoemaker

Well-Known Member
Member
Joined
Jul 22, 2014
Messages
125
Trophies
0
Age
32
XP
201
Country
United States
It is a joke, you can use whatever numbers you like (or even completely remove the "major" and "minor" options!)
[Removing and] reinstalling a cia (which must be done if the new wersion is equal or lower) will obviously delete saves: DevMenu supports updating in place to a higher version number, I don't know if other title managers also do this or blindly uninstall first...

And, to keep download play, you must also add "-content ncch.0002.SomeDifferentNumbers:2:SomeDifferentNumbers" to makerom too! :)

Thanks! Fixed the post accordingly. And I checked, exporting and importing the save with JKSM works without losing anything, so that's good to know!
 
  • Like
Reactions: Ryccardo

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,691
Trophies
1
Age
28
Location
Imola
XP
6,913
Country
Italy
If I have a CIA that creates an "ncch.002" file for download play, how do I continue with the process? Whenever I do the usual routine in the Command Prompt, I get an error saying the filetype is a mismatch.

As I said, all partitions except 0 (and this isn't even true for all titles, althugh it's true for all games) are CFA, not CXI!
 

MushGuy

Well-Known Member
Member
Joined
Feb 11, 2010
Messages
1,280
Trophies
1
XP
2,583
Country
United States
Nice! Thanks for the help! That got my NES VC games looking perfectly.

For other users needing step-by-step instructions...
  • Get the NES VC .cia of your choice, for me, I redownloaded the games I'd already bought as .cia's through CIAngel, then did a full Decrypt in Decrypt9 (place the .cia in "/D9Game" on the root of the SD card, then in Decrypt9, select "Content Decryptor Options" -> "CIA Decryptor (deep)")
  • Download the .zip file from Ryccardo's post and place the unzipped files in a New Folder on your computer's desktop. Also, place the .cia in there, and give it the new "game.cia".
  • Hold shift and right click on the New Folder so you can select "Open command window here"
  • Run the command: ctrtool game.cia --content=ncch
This will create a ncch.0000.SomeNumbers and a ncch.0001.SomeOtherNumbers file, where "SomeNumbers" and "SomeOtherNumbers" are actually numbers. Make note of these and replace them in future commands (so don't actually put "SomeNumbers" and "SomeOtherNumbers" in the command, put the actual numbers in their place).
NOTE: If the game supports download play, it'll create a ncch.0002.EvenMoreNumbers file
  • Run the command: 3dstool -xvtf cxi ncch.0000.SomeNumbers --header header.bin --exh exheader.bin --plain plain.bin --logo logo.bcma.lz --exefs exefs.bin --romfs romfs.bin
  • Run the command: 3dstool -xvtf romfs romfs.bin --romfs-dir romfs
  • Open up the "romfs" folder and edit the file "config.ini"
  • Under [NES], change the Width to 256 (this fixes the aspect ratio of the NES VS) and under [Mask], "Normal Mode", change the DarkEnable0 to 0 (this fixes the dark filter over the screen)
  • Run the command: 3dstool -cvtf romfs romfs.bin --romfs-dir romfs
  • Run the command: 3dstool -cvtf cxi ncch.0000.SomeNumbers --header header.bin --exh exheader.bin --plain plain.bin --logo logo.bcma.lz --exefs exefs.bin --romfs romfs.bin (NOTE: If an error occurs on this step, remove the file that doesn't exist. For instance, "logo.bcma.lz" often doesn't exist, so remove the "-- logo logo.bcma.lz" from the command)
  • Run the command (unless it's a Download Play supported game!): makerom -f cia -o "game_hacked.cia" -content ncch.0000.SomeNumbers:0:SomeNumbers -content ncch.0001.SomeOtherNumbers:1:SomeOtherNumbers
  • NOTE: If the game created a "ncch.0002" file (so, it supports Download Play), run this command instead: makerom -f cia -o "game_hacked.cia" -content ncch.0000.SomeNumbers:0:SomeNumbers -content ncch.0001.SomeOtherNumbers:1:SomeOtherNumbers -content ncch.0002.EvenMoreNumbers:2:EvenMoreNumbers
  • Put "game_hacked.cia" back on your 3DS and install it - Note that you will lose your save after installing. If you want to get it, export the save with JKSM before installing the new .cia, then import it after you have installed it.
Worked great for me; someone could probably easily make a batch script to automate this. It should be noted that I lost my saves of the games that I modified doing this - no problem for me but just a fair warning. I also don't know if the "6.9" version number thing was just a joke but I left it the same. *updated in the post*

EDIT: Added the Download Play fixes, removed the version numbering
Thank you for pointing out the brightness setting! To make things easier, I used the Hacking Toolkit 3DS for cia extracting and rebuilding, and the NES CIA does work, including Download Play. Now, is there a way to make Download Play have the same resolution as config.ini?

OK, so I now tried editing the .ini file from the Download Play CIA and then rebuilt the entire CIA (game in question: Super Mario Bros. 3). Unfortunately, it didn't work. The second 3DS instead gets a black screen.

Edit: Now I'm in a bit of a problem. I reinstalled the unmodified CIA, and tried Download Play again. Now what I get is an error message on the second 3DS telling me to turn off the 3DS. Is there a way to fix this?
 
Last edited by MushGuy,
  • Like
Reactions: Presto99

Presto99

You slammin, bro?
Member
Joined
Feb 24, 2010
Messages
915
Trophies
1
Age
28
Location
Skyworld
Website
https
XP
320
Country
United States
Thanks for the work and instructions everybody! I'm a lazy bum and wish there was a place to download the prefixed .cia files of some NES games though. This seems like a long process per game, but I might do it eventually.
 

CrazyBlergh

Well-Known Member
Member
Joined
Sep 11, 2016
Messages
130
Trophies
0
Age
35
XP
171
Country
Gambia, The
So are you forcing pixel perfect output with this - ignoring the fact(?) that it's just the internal resolution and not the intended way it would have looked like on a CRT back in the day? I'm not trying to be confrontional or anything, I'd just like to understand and possibly use this myself but what exactly did Nintendo do wrong with their NES VC games?
 

Deleted member 370283

Well-Known Member
OP
Member
Joined
Aug 19, 2015
Messages
496
Trophies
0
Age
22
XP
1,021
Country
United States
Some people enjoy a pixel perfect ratio (including myself). Some don't.
When I initially made this, I wasn't really thinking about how it was trying to replicate the look of 4:3, so my usage of "botched" perhaps wasn't entirely correct.
 

CrazyBlergh

Well-Known Member
Member
Joined
Sep 11, 2016
Messages
130
Trophies
0
Age
35
XP
171
Country
Gambia, The
Some people enjoy a pixel perfect ratio (including myself). Some don't.
When I initially made this, I wasn't really thinking about how it was trying to replicate the look of 4:3, so my usage of "botched" perhaps wasn't entirely correct.
Oh alright, I see.
Still, it's good for those who want to use it that way.

If anyone else is interested, this reddit topic sheds more light on this topic: https://www.reddit.com/r/3DS/comments/48uoqt/what_pixelperfect_mode_looks_like_onoff_in_the/

Btw, this is going to be really off-topic, but are there any games that were (erroneously perhaps?) supposed to be displayed at their internal resolution? I'm thinking unintended stretched or squished geometry in 4:3 non-pixel mode might indicate that.
 

Hanafuda

Well-Known Member
Member
Joined
Nov 21, 2005
Messages
4,493
Trophies
2
XP
6,959
Country
United States
So are you forcing pixel perfect output with this - ignoring the fact(?) that it's just the internal resolution and not the intended way it would have looked like on a CRT back in the day? I'm not trying to be confrontional or anything, I'd just like to understand and possibly use this myself but what exactly did Nintendo do wrong with their NES VC games?

If you like it the way it is, leave it and enjoy. I'm old enough (the NES came out my freshman year of college) that the proportions of the screen on 8bit & 16bit machines matter to me as much as the sharpness, and for me a square image just isn't right. It may be sharp, but its scrunched.
 

metroid maniac

An idiot with an opinion
Member
Joined
May 16, 2009
Messages
2,087
Trophies
2
XP
2,632
Country
Ever notice how, in NES Virtual Console games, the screen looks... off?
Well, with the recent release of HANs, as well as Braindump, this is very easy to fix.
  1. Use Braindump to extract the ROMFS and EXEFS.
  2. Extract the ROMFS using Pack Hack. (If you need this, you can grab it from the thread here.)
  3. Find the 'config.ini' file within the ROMFS files.
  4. Look for the [NES] section.
  5. Simply change the width value from 284 to 256.
  6. Rebuild and enjoy.
It kind of baffles me that the width was botched like this, considering the incredibly easy fix. Ah well.

(Also I wasn't sure whether this would fit better in the tutorial section or here, so feel free to move it if it doesn't belong here.)

What baffles me more is the choice of value.
256 is the actual horizontal resolution the NES outputs, but 320 is the number of pixels you'd need to scale it to if you want a correct aspect ratio of 4:3
284 is just sort of arbitrary. I don't get it.
 

CrazyBlergh

Well-Known Member
Member
Joined
Sep 11, 2016
Messages
130
Trophies
0
Age
35
XP
171
Country
Gambia, The
If you like it the way it is, leave it and enjoy. I'm old enough (the NES came out my freshman year of college) that the proportions of the screen on 8bit & 16bit machines matter to me as much as the sharpness, and for me a square image just isn't right. It may be sharp, but its scrunched.
I have no agenda either way. I just want to know what is the most accurate and intended way to play these games.
 

metroid maniac

An idiot with an opinion
Member
Joined
May 16, 2009
Messages
2,087
Trophies
2
XP
2,632
Country
I have no agenda either way. I just want to know what is the most accurate and intended way to play these games.

There isn't really an answer to that. Nintendo "intends" you to play it with some godawful scaling to 284x224, but that's not accurate to how an NES game looks at all.
As far as this topic goes you can either choose the image to be sharp (256) or you can choose for it to be in the correct aspect ratio (320). 284 is nonsensical and it doesn't represent an NES picture at all.
 

CrazyBlergh

Well-Known Member
Member
Joined
Sep 11, 2016
Messages
130
Trophies
0
Age
35
XP
171
Country
Gambia, The
There isn't really an answer to that. Nintendo "intends" you to play it with some godawful scaling to 284x224, but that's not accurate to how an NES game looks at all.
As far as this topic goes you can either choose the image to be sharp (256) or you can choose for it to be in the correct aspect ratio (320). 284 is nonsensical and it doesn't represent an NES picture at all.
I should have said 'originally intended at the time of release'.
When is 284 used by Nintendo?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @Mondooooo, sadly I dont have any tips