-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 4:3 aspect ratio and add 8:7. #193
base: master
Are you sure you want to change the base?
Conversation
This isn't actually true. Nintendo's artists stopped trying to compensate for the stretch after the NES. Every square and circle in lttp, smw, smetroid, only holds that shape at 8:7. The SNES was originally designed to have backwards compatibility with the NES to increase sales. That never happened, but the PPU resolution stuck. So everything gets a bit stretched. Janky, but acceptably so. |
History details apart, there are two facts here: So, in any case, what this PR does is a good idea, the game looks as it looked on a TV when the 4:3 option is selected, and won't harm anybody. |
It gets even more complicated. The SNES aspect ratio isn't really 8:7, it's 16:15. The main resolution output by the system is 256x240 with line 1 blank, and 15 extra lines blanked when ntsc overscan bit is set. Blanked lines are still output, so their existence can't be ignored in trying to replicate how much crts widened pixels. The multiplier for 256 would be more like 1.25x and not 1.16x. |
I wanted to game to render at a very different resolution (720x720, or better 240x240 scaled up by 3) for a specific device. I made some changes here Your case, @vanfanel, would be achieved via: AspectRatio = 8:7 # this is also the default now
WindowSize = 640x480 # possibly scaled up further
IgnoreAspectRatio = 1 I will rename |
@gerudoga Hi. Sorry to use this thread to ask, but the topic seemed the most appropriate. I'm trying out your fork on my RGB30 (720x720 display) and everything works well, except that I've been unable to get a 1:1 image (240x240p times 3) centered on the display (the right gets cut off). From reading the source, I think this should work. Do you have any configuration tips? Thanks. |
@metchebe That's exactly the same device I am using. So, the main purpose of my changes was to make that work well. Specifically, the asymmetric cropping should be fixed. I don't understand why you would still see it. The config that works for me is:
But it sounds like that's what you are using. Can you enable
|
@gerudoga Yes that's exactly what I'm using, and debug shows those values. However the display instead of showing the square image centered, it seems to stretch it horizontally and crop off the right side. The weird thing is that other wider aspect ratios work as expected (16:15 works good and is the best comprimise for me right now). It might be a quirk in my OS (the latest Rocknix), or the fact that I'm using KMSDRM. |
@metchebe Could you post your full config file? |
@gerudoga My ini file is copied below. I also want to add that none of this happens when I try 1:1 on my PC, this only happens on the RGB30. I tried to reproduce what I see in an image editor. From what I can tell, the 240x240 (SNES resolution) image gets trimmed to something like 232x240, then stretched back to 240x240 resulting in this:
|
@metchebe Your config is virtually identical to mine. I have I fear we need to dig a bit deeper and I need to somehow reproduce it... Or you need to find where the bug is in the code on your hardware :) I would suggest you create a new issue with all info in my repo since it's actually not related to @vanfanel changes in this PR: https://github.com/gerudoga/zelda3/issues |
Description
On the SNES, Zelda ALTTP is rendered internally at 256x224, which is an 8:7 resolution, not 4:3.
However, when output to TV, the game is stretched to 4:3 by the SNES hardware. That's true for every SNES game running at 256x224.
So the game looks better at 4:3 as it looks on a real SNES on a real TV. At 8:7, everything is too "thin".
What this does is make 4:3 really 4:3 (graphics are slightly stretched by OpenGL/SDL2, as in the SNES), and add a 8:7 ratio that matches the internal resolution. This 8:7 ratio is what was previously called 4:3 (that was wrong, because 256x224 is not 4:3 by any means).
Will this Pull Request break anything?
No.
Suggested Testing Steps
Run the game at 4:3 and run it at 8:7 (both can be set on the zelda3.ini file) and compare.
This is simple but somewhat important stuff so the game looks as intended, IMHO.