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

Discussion in '3DS - Homebrew Development and Emulators' started by TheStoneBanana, Oct 27, 2015.

  1. TheStoneBanana
    OP

    Member TheStoneBanana GBAtemp Fan

    Joined:
    Aug 19, 2015
    Messages:
    472
    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.)
     


  2. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,948
    Location:
    Sacramento, California
    Country:
    United States
    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.
     
  3. bobrocks95

    Newcomer bobrocks95 Advanced Member

    Joined:
    May 9, 2007
    Messages:
    58
    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.
     
  4. tatundria

    Member tatundria GBAtemp Regular

    Joined:
    Feb 24, 2009
    Messages:
    243
    Country:
    Argentina
    I couldn't make it work. Please, could you give more details on how to do it? especially the rebuild part...
     
  5. Sonic Angel Knight

    Member Sonic Angel Knight GBAtemp Guru

    Joined:
    May 27, 2016
    Messages:
    7,867
    Location:
    New York
    Country:
    United States
    So then what is the right values for full screen? :unsure:
     
  6. TechyTurtle

    Member TechyTurtle GBAtemp Regular

    Joined:
    Jan 23, 2016
    Messages:
    290
    Location:
    MY ASS!
    Country:
    United States
    Good tutorial got same problems like everyone else and this should be in tutorial and FAQ section
     
  7. TheStoneBanana
    OP

    Member TheStoneBanana GBAtemp Fan

    Joined:
    Aug 19, 2015
    Messages:
    472
    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.
    Rebuild the ROMFS and inject the file either by building a custom CIA or using HANS.
     
  8. Sonic Angel Knight

    Member Sonic Angel Knight GBAtemp Guru

    Joined:
    May 27, 2016
    Messages:
    7,867
    Location:
    New York
    Country:
    United States
    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:
     
  9. CeeDee

    Member CeeDee the Eevee

    Joined:
    May 4, 2014
    Messages:
    3,473
    Location:
    Country:
    Bermuda
    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.
     
  10. coinblock

    Member coinblock GBAtemp Regular

    Joined:
    Sep 4, 2015
    Messages:
    184
    Country:
    Antarctica
    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!"
     
  11. Ryccardo

    Member Ryccardo WiiUaboo

    Joined:
    Feb 13, 2015
    Messages:
    2,037
    Location:
    Imola
    Country:
    Italy
    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.
     

    Attached Files:

  12. CeeDee

    Member CeeDee the Eevee

    Joined:
    May 4, 2014
    Messages:
    3,473
    Location:
    Country:
    Bermuda
    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?
     
  13. Ryccardo

    Member Ryccardo WiiUaboo

    Joined:
    Feb 13, 2015
    Messages:
    2,037
    Location:
    Imola
    Country:
    Italy
    Where did you get the cia?
    Braindump's output is not good for recreating 3ds/cia as it can't dump the exheader correctly!
     
  14. CeeDee

    Member CeeDee the Eevee

    Joined:
    May 4, 2014
    Messages:
    3,473
    Location:
    Country:
    Bermuda
    CIAngel, decrypted using decrypt9
     
  15. WiiUBricker

    Member WiiUBricker Fake News™ Reporter

    Joined:
    Sep 19, 2009
    Messages:
    6,741
    Location:
    Espresso
    Country:
    Argentina
    Fullscreen would be 400x240. See if it works. But it wouldn't look good.
     
  16. Sonic Angel Knight

    Member Sonic Angel Knight GBAtemp Guru

    Joined:
    May 27, 2016
    Messages:
    7,867
    Location:
    New York
    Country:
    United States
    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.
     
  17. MushGuy

    Member MushGuy GBAtemp Advanced Fan

    Joined:
    Feb 11, 2010
    Messages:
    776
    Country:
    United States
    Now if someone did an automatic patcher.
     
    Presto99 likes this.
  18. tatundria

    Member tatundria GBAtemp Regular

    Joined:
    Feb 24, 2009
    Messages:
    243
    Country:
    Argentina
    That would be GREAT
     
  19. WiiUBricker

    Member WiiUBricker Fake News™ Reporter

    Joined:
    Sep 19, 2009
    Messages:
    6,741
    Location:
    Espresso
    Country:
    Argentina
    Do we need to use Braindump? Can't we use Decrypt9?
     
  20. Ryccardo

    Member Ryccardo WiiUaboo

    Joined:
    Feb 13, 2015
    Messages:
    2,037
    Location:
    Imola
    Country:
    Italy
    Yes you can (if you decrypt the cia first), in fact it's a superior way as you can rebuild to cia afterwards...
     

Share This Page