Skip to content
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

NTSC non-interlaced mode doesn't work properly. #12

Open
IvanDSM opened this issue Apr 16, 2020 · 5 comments
Open

NTSC non-interlaced mode doesn't work properly. #12

IvanDSM opened this issue Apr 16, 2020 · 5 comments

Comments

@IvanDSM
Copy link

IvanDSM commented Apr 16, 2020

Setting the "Interlaced" setting to Off on the menu stretches the emulator's screen such that only half the screen is displayed. I'm trying to use the emulator in 240p. Am I doing something wrong?

I'm using a SCPH-90XXX console with the latest release [x.3.3], connected to a CRT through component cables. I can provide a picture if necessary!

@IvanDSM
Copy link
Author

IvanDSM commented Apr 17, 2020

I was able to fix this issue with a small change to the source code. Here's the diff:

diff --git a/src/drivers/ps2/init.c b/src/drivers/ps2/init.c
index 4c447c7..6b13f00 100644
--- a/src/drivers/ps2/init.c
+++ b/src/drivers/ps2/init.c
@@ -168,7 +168,7 @@ void init_custom_screen()
         gsGlobal->Interlace = GS_INTERLACED;
         gsGlobal->Field = GS_FIELD;
         gsGlobal->Width = 640;
-        gsGlobal->Height = 448;
+        gsGlobal->Height = 480;
         VCK = 4;
     }
     else if (Settings.display == 1) {

I realized that the code that deals with the non-interlaced mode in src/drivers/ps2/init.c (pasted below) would result in a 640x224 video mode when using the NTSC non-interlaced mode. Changing the NTSC resolution to 640x480 as done above so that the non-interlaced mode would be 640x240 fixed the image.

if (Settings.display == 0 || Settings.display == 1) {
        if (!Settings.interlace) {
            gsGlobal->Interlace = GS_NONINTERLACED;
            gsGlobal->Height = gsGlobal->Height / 2; <-- This results in 640x224 in NTSC
            VCK = 2;
        }
    }

@smeagol44
Copy link

I was able to fix this issue with a small change to the source code. Here's the diff:

diff --git a/src/drivers/ps2/init.c b/src/drivers/ps2/init.c
index 4c447c7..6b13f00 100644
--- a/src/drivers/ps2/init.c
+++ b/src/drivers/ps2/init.c
@@ -168,7 +168,7 @@ void init_custom_screen()
         gsGlobal->Interlace = GS_INTERLACED;
         gsGlobal->Field = GS_FIELD;
         gsGlobal->Width = 640;
-        gsGlobal->Height = 448;
+        gsGlobal->Height = 480;
         VCK = 4;
     }
     else if (Settings.display == 1) {

I realized that the code that deals with the non-interlaced mode in src/drivers/ps2/init.c (pasted below) would result in a 640x224 video mode when using the NTSC non-interlaced mode. Changing the NTSC resolution to 640x480 as done above so that the non-interlaced mode would be 640x240 fixed the image.

if (Settings.display == 0 || Settings.display == 1) {
        if (!Settings.interlace) {
            gsGlobal->Interlace = GS_NONINTERLACED;
            gsGlobal->Height = gsGlobal->Height / 2; <-- This results in 640x224 in NTSC
            VCK = 2;
        }
    }

Can you upload a compiled .elf somewhere? Would greatly appreciate it!

@KingKannibal
Copy link

I would also like access to an elf with this tweak. I'm using a 9PT50 and 240p games look the best on it without the flickering from the interlaced 480i signal.

@AKuHAK
Copy link
Member

AKuHAK commented Jan 22, 2021

NES resolutions:
PAL: 256x240
NTSC: 256x240 - overscan = 256x224

or doubled:
PAL: 512x480
NTSC: 512x448

unfortunately, PS2 doesn't handle 512 widths, so I changed it to 640 in all resolutions
in fact, I think it is possible to add one more overscan (left and right) so the picture will not be stretched. Your solution will lead to non-pixel-perfect output, while now it is pixel perfect.
Picture will get more blurry in your case.

@MondoGecko
Copy link

I was able to fix this issue with a small change to the source code. Here's the diff:

diff --git a/src/drivers/ps2/init.c b/src/drivers/ps2/init.c
index 4c447c7..6b13f00 100644
--- a/src/drivers/ps2/init.c
+++ b/src/drivers/ps2/init.c
@@ -168,7 +168,7 @@ void init_custom_screen()
         gsGlobal->Interlace = GS_INTERLACED;
         gsGlobal->Field = GS_FIELD;
         gsGlobal->Width = 640;
-        gsGlobal->Height = 448;
+        gsGlobal->Height = 480;
         VCK = 4;
     }
     else if (Settings.display == 1) {

I realized that the code that deals with the non-interlaced mode in src/drivers/ps2/init.c (pasted below) would result in a 640x224 video mode when using the NTSC non-interlaced mode. Changing the NTSC resolution to 640x480 as done above so that the non-interlaced mode would be 640x240 fixed the image.

if (Settings.display == 0 || Settings.display == 1) {
        if (!Settings.interlace) {
            gsGlobal->Interlace = GS_NONINTERLACED;
            gsGlobal->Height = gsGlobal->Height / 2; <-- This results in 640x224 in NTSC
            VCK = 2;
        }
    }

Also wondering if you could please upload your compiled .elf. I would love to play 240p on my CRT and the interlaced flickering is just too much on the eyes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants