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

Retrotink 2x HDMI issue - black and white display #8

Closed
chmcarro opened this issue Feb 2, 2021 · 13 comments
Closed

Retrotink 2x HDMI issue - black and white display #8

chmcarro opened this issue Feb 2, 2021 · 13 comments

Comments

@chmcarro
Copy link

chmcarro commented Feb 2, 2021

The ROMs play in black and white when displayed through the Retrotink 2x with either composite video or s-video with output via HDMI.

This issue is not present when the composite video is sent directly to the display without HDMI.

This issue is not present when using the the OSSC RGB signal via SCART and displayed via HDMI.

@hcs64
Copy link
Owner

hcs64 commented Feb 2, 2021

This sounds like a Retrotink bug, it sounds like those devices have upgradable firmware so they might be able to fix it if you bug them enough.

It may be possible to fix by fiddling with color burst width or other VI config options, if you get something working I'll consider taking it.

@chmcarro
Copy link
Author

chmcarro commented Feb 2, 2021

This issue is not present in neon64 v1.2

@hcs64
Copy link
Owner

hcs64 commented Feb 2, 2021

v1.2 has some pretty unpleasant video quality issues of its own, so I'm not just going to take its VI config, and the current 2.0 beta works on all the TVs I've tried. I don't have this device to test, if you fiddle with the VI regs and find something that works for you I'll consider making the adjustment.

@chmcarro
Copy link
Author

chmcarro commented Feb 2, 2021

do you by chance have the v1.2 vi.asm color burst width or other values for comparison? I will try and adjust and build a file to see what works, but no clue what should be changed.

@hcs64
Copy link
Owner

hcs64 commented Feb 2, 2021

Here is the old VI init.

@chmcarro
Copy link
Author

chmcarro commented Feb 2, 2021

I'm a complete novice when it comes to this. Please correct if there's anything misstated, but to the best of my understanding, its possible the video is being degraded to black and white due to the colorburst signal being sent from the N64 as configured in the Neon64 rom from vi.asm is stating to start the colorsync 20 pixels past the hsync line. Perhaps this is slightly off from the requirements when this is converted to a digital signal through the Retrotink. Any concerns with attempting a 1 pixel modification as follows:

// hsync width (pixels)(0), color burst width (pixels)(8), vsync height (lines)(16), color burst start (pixels from hsync)(21)
la t1, (50<<0)|(30<<8)|(5<<16)|(58<<21)

Or:

// hsync width (pixels)(0), color burst width (pixels)(8), vsync height (lines)(16), color burst start (pixels from hsync)(19)
la t1, (50<<0)|(30<<8)|(5<<16)|(58<<19)

@chmcarro
Copy link
Author

chmcarro commented Feb 3, 2021

I got color working!

With the help of other developers, I was pointed to the libdragon display.c which uses 0x03e52239

https://github.com/DragonMinded/libdragon/blob/trunk/src/display.c

Here's the diff of the changes I made (replacements first)
48,49c48,49
< la t1, 0x03e52239
< sw t1, VI_TIMING(t0)

la t1, (14<<16)|(516<<0)
sw t1, VI_V_BURST(t0)

VI_TIMING might be defined/mapped elsewhere for cleaner code, or maybe there's a better sw to use. I'm just happy to be back in color.

@emukidid
Copy link

emukidid commented Feb 3, 2021

To match VI_TIMING as per libdragon, you'd want:

la t1, (57<<0)|(34<<8)|(5<<16)|(62<<20)
sw t1, VI_TIMING(t0)

@chmcarro tried the following (just color burst set to 34 to match libdragon) and color worked:
la t1, (50<<0)|(34<<8)|(5<<16)|(58<<20)

Matching the full value as per my suggestion also worked.

@jombo23
Copy link

jombo23 commented Feb 7, 2021

@hcs64 This user has been talking about other games/software that exhibit similar behavior in IRC, most recently Dark Rift. Don't break your nice software because it doesn't work on a cheap upscaler.

@chmcarro
Copy link
Author

chmcarro commented Feb 7, 2021

The problem exhibited on Dark Rift is independent from the RetroTINK-2X scaler and neon64. For context on the Dark Rift report, see here:

https://videogameperfection.com/forums/topic/n64-game-issue-dark-rift-no-signal/

@hcs64
Copy link
Owner

hcs64 commented Feb 7, 2021

I don't have any objection to making the change in principle, I just need to test on a few TVs to make sure things still look like I intend. I expect the color burst is probably independent from the scaling stuff I'm interested in, but I need to run the tests and haven't had the time yet.

hcs64 added a commit that referenced this issue Feb 27, 2021
@hcs64
Copy link
Owner

hcs64 commented Feb 27, 2021

Please check that this fixes it, sorry for the delay.

@ghost
Copy link

ghost commented Mar 13, 2021

This issue appears to be fixed as of d7046be - tested via s-video on retrotink 2x-pro with latest v1.7 firmware. Thank you!!

@hcs64 hcs64 closed this as completed Mar 13, 2021
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

4 participants