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

TheStoneBanana

Well-Known Member
OP
Member
Joined
Aug 19, 2015
Messages
496
Trophies
0
Age
20
XP
1,020
Country
United States
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.)
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,467
Trophies
1
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
4,949
Country
United States
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.)

I want to say they were trying to get the 4:3 effect like how they were back in the day of the CRT TVs, but back then, the pixels on such displays were shown as wider, and LCD screens can't produce the same effect.
 

bobrocks95

Well-Known Member
Newcomer
Joined
May 9, 2007
Messages
93
Trophies
0
XP
407
Country
United States
To go a little more in-depth, CRTs had non-square pixels. So the slight horizontal scaling is (presumably) trying to better match the aspect ratio the game would have had on a CRT.

I tweeted Frank Cifaldi about it a few times, and Mega Man Legacy Collection does the same thing, even in the "pixel-perfect" mode that doesn't have vertical scaling. The pixels are ever-so-slightly less sharp since a bilinear or similar filter has to be used to avoid repeating pixels where they shouldn't be (I tried my best to word this nicely but I'm still explaining it poorly...) due to using non-integer scaling, but the resulting image should be more accurate, especially since you probably wouldn't have had a CRT that looked as sharp as a tiny LCD with or without bilinear filtering.
 

tatundria

Well-Known Member
Member
Joined
Feb 24, 2009
Messages
374
Trophies
0
XP
1,523
Country
Argentina
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.)

I couldn't make it work. Please, could you give more details on how to do it? especially the rebuild part...
 

TheStoneBanana

Well-Known Member
OP
Member
Joined
Aug 19, 2015
Messages
496
Trophies
0
Age
20
XP
1,020
Country
United States
So then what is the right values for full screen? :unsure:
The NES PPU always is outputting an image of 256x240. I think that it's generally agreed that the screen area without overscan (areas where the picture is not drawn) is 256x224, but it's technically 256x240. This isn't important for the purposes of this emulator though.
The width value was increased to presumably, as mentioned before, give the effect of blurring on a CRT. This tutorial gives you the correct width value that makes the image pixel perfect.
I couldn't make it work. Please, could you give more details on how to do it? especially the rebuild part...
Rebuild the ROMFS and inject the file either by building a custom CIA or using HANS.
 

Sonic Angel Knight

Well-Known Member
Member
Joined
May 27, 2016
Messages
14,160
Trophies
1
Location
New York
XP
11,814
Country
United States
The NES PPU always is outputting an image of 256x240. I think that it's generally agreed that the screen area without overscan (areas where the picture is not drawn) is 256x224, but it's technically 256x240. This isn't important for the purposes of this emulator though.
The width value was increased to presumably, as mentioned before, give the effect of blurring on a CRT. This tutorial gives you the correct width value that makes the image pixel perfect.

So then what is the value for full screen? :huh:
If the 256x224 is for original output resolution for the nes console that your trying to fix it to that nintendo "Incorrectly" applied, what if someone wanted it to fit the screen entirely? What is the resolution for that? :mellow:
 

CeeDee

art by @x65943
Member
Joined
May 4, 2014
Messages
5,133
Trophies
2
XP
8,216
Country
United States
Is there any way to rebuild as a .3ds or .cia with Download Play still intact? 3DSBuilder doesn't give an option and without it, the option on the touch screen menu still shows, but broken.
 

coinblock

Well-Known Member
Member
Joined
Sep 4, 2015
Messages
253
Trophies
0
XP
265
Country
I would love to know Nintendo's thought processes' behind doing what they do with VC games.

"Hey, I've got the GBA Virtual Console simulation working great on 3DS, check it out!"
"Hmm, well that looks alright, but what it really needs is a nice dark filter to mute all the colors, then smear up that image a bit with some ghosting."
"Oh, let's not release any of these totally functional games to 99% of our legit users, either!"
"PERFECT!"
 

Ryccardo

watching Thames TV from London
Member
Joined
Feb 13, 2015
Messages
7,406
Trophies
0
Age
26
Location
Imola
XP
6,346
Country
Italy
Is there any way to rebuild as a .3ds or .cia with Download Play still intact? 3DSBuilder doesn't give an option and without it, the option on the touch screen menu still shows, but broken.

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.
 

Attachments

  • ctrtool 3dstool makerom Windows64.zip
    1,015.3 KB · Views: 350

CeeDee

art by @x65943
Member
Joined
May 4, 2014
Messages
5,133
Trophies
2
XP
8,216
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.
Ah, I had @ihaveamac help me out with that part, thanks anyways though! The app has an infinite boot screen though, how do I go about fixing that?
 

WiiUBricker

News Police
Banned
Joined
Sep 19, 2009
Messages
7,828
Trophies
0
Location
Espresso
XP
7,410
Country
Argentina
So then what is the value for full screen? :huh:
If the 256x224 is for original output resolution for the nes console that your trying to fix it to that nintendo "Incorrectly" applied, what if someone wanted it to fit the screen entirely? What is the resolution for that? :mellow:
Fullscreen would be 400x240. See if it works. But it wouldn't look good.
 

Sonic Angel Knight

Well-Known Member
Member
Joined
May 27, 2016
Messages
14,160
Trophies
1
Location
New York
XP
11,814
Country
United States
Fullscreen would be 400x240. See if it works. But it wouldn't look good.
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.
 
General chit-chat
Help Users
    NeoGaming @ NeoGaming: dank meme