240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

The place for all discussion on gaming hardware
User avatar
citrus3000psi
Posts: 668
Joined: Wed Dec 25, 2013 11:56 pm
Location: Indiana

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by citrus3000psi »

Artemio wrote:Any console you'd like this to see this implemented first? I was going to go for PC Engine since that is what I have been working on, but I am guessing only I use that ^^

I can implement it really fast, since it is a very easy test.

For me genesis would be the easiest. I'm thinking the Teensy-LC might be a nice candidate. https://www.pjrc.com/store/teensylc.html, its also 15USD via amazon. Just need to design a hat. I also have a partial implementation working in simulation.
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

citrus3000psi wrote: For me genesis would be the easiest. I'm thinking the Teensy-LC might be a nice candidate. https://www.pjrc.com/store/teensylc.html, its also 15USD via amazon. Just need to design a hat. I also have a partial implementation working in simulation.
Excellent, I'll close the PCE in an hour and work on that after some RL stuff, so I will probably have something for you today.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by rama »

Great, I'll chime in and and try to do ESP8266 hardware :)

By the way, is there anything (much) known about audio latency of consoles? Say Genesis and SNES?
If it's a known and low latency, a tone could be used as trigger.
(Only good for real hardware tests though.)
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

Well, it is software dependent. I've measured with the oscilloscope, for example for teh audio sync test, so I am giving a perfect frame of both audio and white video.

I will of course check the same with the scope on the genesis, but since these consoles have no frame buffer or extra video RAM (just the VRAM for tiles and BAT maps), then there is no extra lag

i.e. key is *released*, it is read back next vsync so the delay here is the moment it was pressed and then released, and up to that vsync, the palette swap occurs, the next frame is draw with the updated white blocks, and next frame will be black again...

In that last part, I am wondering if I should ignore any key press in while the white frame is being displayed. I will only trigger if the button was pressed and released. This "keypress" should last at least 16.688 ms I guess, for the genesis HW.

In reality I guess it would be better to do a "follow up" approach. That is, detect the key being pressed and draw the squares while it is being pressed up to release. Delay here will be the time it takes between the press and vsync, an average of 1/2 vsync

The external HW would need to be configured to the framerate of the console, the genesis HW is at 16.88 ms per frame, etc
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by rama »

I like the "follow up" approach, but a single frame bright flash should work (on an LCD).
It depends on "how many photons" the light the light detector needs to trigger, of course.

I'm still deliberating on how the start trigger could work.
The audio cue may be too impractical after all, as the signal out of the headphone port may not be enough to trigger a digital 3.3V pin.

So maybe just a strip of wire and a pushbutton, to be pressed together with the gamepad button?
User avatar
donluca
Posts: 852
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by donluca »

There is oomek's device as well which, IIRC, it's pretty cheap as well: http://forum.arcadecontrols.com/index.p ... 722.0.html

It was meant to work with GroovyMAME but maybe it can be adapted somehow for this purpose?
User avatar
citrus3000psi
Posts: 668
Joined: Wed Dec 25, 2013 11:56 pm
Location: Indiana

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by citrus3000psi »

I feel the trigger should start on the key press (high -> low etc)

I created a controller for Coury a while back, https://www.youtube.com/watch?v=fPMkQCemnrY to do essentially this but with the highspeed camera

I plan to use this style of modding a controller to trigger the start of the detection.

@Artemio I'm not sure if we should remove the keypress delay? Is that what you are saying, tying the device into vsync and only triggering when its the start/half of vsync? Isn't part of the delay of the keypress depended on different polling times of emulators vs real consoles.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by rama »

citrus3000psi:
I think I'll go the same route for now.
My initial setup (just some LED out of the hobby box) worked to detect light changes, but synchronizing with a good trigger seems to be a more difficult problem.

So to rule out trigger inconsistency, I'll just wire up an old controller :p

donluca:
That's a nice project for already being in some limited production.
Unfortunately there's no source code that I could find.
But it does have a neat case and tuned circuitry, so that's something.
User avatar
citrus3000psi
Posts: 668
Joined: Wed Dec 25, 2013 11:56 pm
Location: Indiana

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by citrus3000psi »

It also would make sense to the let the device trigger the button press. That way multiple tests could be preformed in sequence to get a Mean/Max/Min value.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by rama »

Yep, that'd be great if we could do that.
So the device should probably include some retro controller emulation.. Sigh :p

citrus3000psi:
How quickly does your sensor react to the brightness going down?
Mine is pretty slow right now, and that'll limit the rate of events I can use, and thus the speed of measuring.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by paulb_nl »

Hi Artemio,

I have been looking into the aspect ratio for the Turbografx core on MiSTer. I noticed that on my CRT the circles in the 320x224 linearity test are narrower than the 256x224 circles.

You seem to have used the same raw 244x223 circle as the Genesis version but the Turbografx has a much higher pixel clock than the Genesis in 320 mode. This means that everything appears narrower in 320 mode on the Turbografx so the circles should be wider to compensate.

Am I not understanding it correctly?
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

paulb_nl wrote:Hi Paul,

I have been looking into the aspect ratio for the Turbografx core on MiSTer. I noticed that on my CRT the circles in the 320x224 linearity test are narrower than the 256x224 circles.
Overscan can be different. Have you tried using the Grid pattern and enable the white background that fills the whole signal? I am not saying I didn't make a mistake, just verifying everything.
paulb_nl wrote: You seem to have used the same raw 244x223 circle as the Genesis version
Just checked, and I used a 256x224 pattern. Just to confirm, the circles are not supposed to be the exact same size between resolutions, they are just intended to be circles in each resolution.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by paulb_nl »

Artemio wrote: Overscan can be different. Have you tried using the Grid pattern and enable the white background that fills the whole signal? I am not saying I didn't make a mistake, just verifying everything.
More of the white background is visible in 320 mode but that is to be expected because the 320 pixels are only 70% of the line length(320/455) compared to 75% of 256 mode (256/341) and 320 Genesis (320/427.5).
Artemio wrote: Just checked, and I used a 256x224 pattern. Just to confirm, the circles are not supposed to be the exact same size between resolutions, they are just intended to be circles in each resolution.
Is that with any margins around the circle? The 244x223 I mentioned is purely the big white circle in 320x224 resolution. The 320x224 and 256x224 circles are almost the same height (222 vs 223) so in this case they should be the same size on the CRT.
energizerfellow‌
Posts: 208
Joined: Thu Sep 27, 2018 1:04 am

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by energizerfellow‌ »

Do any of the consoles make the distinction between IRE 0.0 on NTSC-J and the IRE 7.5 setup pedestal on NTSC-U in either hardware or software? The non-JDM NTSC hardware should technically be putting out 53.57 mV (7.5 IRE) video black for RGB (0,0,0) black, but many/most/all seem to be doing PAL/NTSC-J style 0 mV (IRE 0.0)? The NesDev wiki seems to imply that at least the NES/Famicom are all IRE 0?

https://wiki.nesdev.com/w/index.php/NTSC_video

IRE 7.5 was also only on CVBS composite and YC S-video, right? YPbPr never had an IRE 7.5 setup pedestal on consumer equipment?
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

I'm sorry I didn't reply back then, somehow the notifications stopped and I assumed there were no responses.
paulb_nl wrote: More of the white background is visible in 320 mode but that is to be expected because the 320 pixels are only 70% of the line length(320/455) compared to 75% of 256 mode (256/341) and 320 Genesis (320/427.5).
That's why it would be really hard to match, but possible. And why I mentioned that they are intended to be circles, nor match exactly with one another originally. If you want to help me make them match, that's quite welcome. Right now I'm working on MDFourier for NES and SNES, but can alternate with this to improve the patterns.
Artemio wrote: Is that with any margins around the circle? The 244x223 I mentioned is purely the big white circle in 320x224 resolution. The 320x224 and 256x224 circles are almost the same height (222 vs 223) so in this case they should be the same size on the CRT.
There is a one pixel border (top and bottom) in the 256 pattern, and a 1 pixel border only at bottom in the 320 pattern. I believe I made it so because I couldn't match a big enough circle with the right proportions (did this in 2014 and have no notes regarding this particular decision).

Here are my source filles: http://junkerhq.net/Suite/linearity-PCE.rar

If I made a mistake please help me correct it. I can provide scope captures of the sync signals in both modes, and the output on various PVMS from OG HW.
Last edited by Artemio on Fri Jan 17, 2020 7:59 pm, edited 1 time in total.
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

energizerfellow‌ wrote:Do any of the consoles make the distinction between IRE 0.0 on NTSC-J and the IRE 7.5 setup pedestal on NTSC-U in either hardware or software? The non-JDM NTSC hardware should technically be putting out 53.57 mV (7.5 IRE) video black for RGB (0,0,0) black, but many/most/all seem to be doing PAL/NTSC-J style 0 mV (IRE 0.0)? The NesDev wiki seems to imply that at least the NES/Famicom are all IRE 0?

https://wiki.nesdev.com/w/index.php/NTSC_video

IRE 7.5 was also only on CVBS composite and YC S-video, right? YPbPr never had an IRE 7.5 setup pedestal on consumer equipment?
All the ones I've tested are IRE 0.0 on NTSC-J, that's why in the help I advise to use the full range patterns. However we have no idea on how developers had their monitors calibrated, if they ever did. We can only assume.
energizerfellow‌
Posts: 208
Joined: Thu Sep 27, 2018 1:04 am

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by energizerfellow‌ »

Artemio wrote: All the ones I've tested are IRE 0.0 on NTSC-J, that's why in the help I advise to use the full range patterns. However we have no idea on how developers had their monitors calibrated, if they ever did. We can only assume.
Just real-deal JDM sold-in-Japan consoles (IRE 0.0 being in-spec for NTSC-J) or all NTSC consoles sold globally are IRE 0.0?
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

energizerfellow‌ wrote:
Artemio wrote: All the ones I've tested are IRE 0.0 on NTSC-J, that's why in the help I advise to use the full range patterns. However we have no idea on how developers had their monitors calibrated, if they ever did. We can only assume.
Just real-deal JDM sold-in-Japan consoles (IRE 0.0 being in-spec for NTSC-J) or all NTSC consoles sold globally are IRE 0.0?
I wouldn't say ALL. But what I meant is: All Genesis US or Japanese, All PCE/TG-16, all Snes/Super Fami, all GC I've seen and tested are IRE 0.0. That is, they have no setting for a pedestal at 7.5. You can limit your art and resources to them if you want to, but all of them are perfctly capable of doing full range and there is nothing enforcing you to change that. They were after all born in Japan, and in a market that was derived from computers.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by rama »

So far I haven't seen a single console made before circa 2000 that defaults to anything else than IRE 0.0.
The first one I know that sometimes uses a pedestal is the original XBOX.

I've heard that NTSC-U Sony Playstations use a pedestal, but I could never verify this.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by paulb_nl »

Artemio wrote: Here are my source filles: http://junkerhq.net/Suite/linearity-PCE.rar

If I made a mistake please help me correct it. I can provide scope captures of the sync signals in both modes, and the output on various PVMS from OG HW.
Thanks for the source files. It appears that the 320x224 pattern is identical to the Genesis version which I believe is not correct with the difference in pixels per line between the consoles.

I have redrawn the 320x240 and 320x224 patterns and made them wider by (width x 455 ÷ 427.5).

Here are the adjusted patterns: https://drive.google.com/file/d/1YitoQ7 ... sp=sharing

I hope they are correct and usable.
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

paulb_nl wrote:
Artemio wrote: I have redrawn the 320x240 and 320x224 patterns and made them wider by (width x 455 ÷ 427.5).

Here are the adjusted patterns: https://drive.google.com/file/d/1YitoQ7 ... sp=sharing

I hope they are correct and usable.
Thank you, here are the patterns you made inserted into the ROM. Please let me know what your results are.

http://junkerhq.net/Suite/240pSuite_lin.pce
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by paulb_nl »

Artemio wrote: Thank you, here are the patterns you made inserted into the ROM. Please let me know what your results are.
That was fast! It needs to be verified on original hardware but it looks perfect now on my CRT with the MiSTer TurboGrafx16 core.
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

paulb_nl wrote:
Artemio wrote: Thank you, here are the patterns you made inserted into the ROM. Please let me know what your results are.
That was fast! It needs to be verified on original hardware but it looks perfect now on my CRT with the MiSTer TurboGrafx16 core.
Did you measure them?
energizerfellow‌
Posts: 208
Joined: Thu Sep 27, 2018 1:04 am

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by energizerfellow‌ »

Artemio wrote: I wouldn't say ALL. But what I meant is: All Genesis US or Japanese, All PCE/TG-16, all Snes/Super Fami, all GC I've seen and tested are IRE 0.0. That is, they have no setting for a pedestal at 7.5. You can limit your art and resources to them if you want to, but all of them are perfctly capable of doing full range and there is nothing enforcing you to change that. They were after all born in Japan, and in a market that was derived from computers.
While there may not be a UI setting for IRE 0.0 vs 7.5, I've always wondered if there was something like a jumper on the board that got open/closed or a firmware flag that got set on NTSC consoles destined for North/South America to properly set the setup pedestal for black levels.
rama wrote:So far I haven't seen a single console made before circa 2000 that defaults to anything else than IRE 0.0.
The first one I know that sometimes uses a pedestal is the original XBOX.

I've heard that NTSC-U Sony Playstations use a pedestal, but I could never verify this.
That would certainly be worth testing and wouldn't be surprising as Sony's hardware team always seemed to be on top of their spec compliance and color accuracy game. If I had to make a wild stab in the dark, the PS1 is fixed at IRE 0.0 globally, but both the PS2 and PS3 probably have proper region-specific IRE values. That's just educated speculation that needs testing, however. Wouldn't surprise me if the PS1 expects 9300k D93 color temperature instead of 6500k D65 too.

Microsoft doing the setup pedestal doesn't surprise me given the North American origins. I wonder what the NTSC-J versions of the OG/360 Xbox do for IRE values.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by paulb_nl »

Artemio wrote: Did you measure them?
I measured them with a ruler on the CRT and they are circles.
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

paulb_nl wrote: I measured them with a ruler on the CRT and they are circles.


That's good. Since you mentioned it, I assume the Genesis version also does the same thing in your setup, right?

I've been swamped with work, and want to pay this full attention and not just a superficial glance. But I need to make the time for it, hopefully this week.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by paulb_nl »

Artemio wrote:
That's good. Since you mentioned it, I assume the Genesis version also does the same thing in your setup, right?
The circles on the Genesis suite are the same size on my CRT with 320x224 and 256x224 so they are correct.
Artemio wrote: I've been swamped with work, and want to pay this full attention and not just a superficial glance. But I need to make the time for it, hopefully this week.
That's fine, no hurry :)
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

paulb_nl wrote:
The circles on the Genesis suite are the same size on my CRT with 320x224 and 256x224 so they are correct.
Thanks, this helps me so I can just limit my tests
User avatar
the Goat
Posts: 210
Joined: Tue Aug 30, 2016 12:26 am
Location: Burlington, Vermont, USA
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by the Goat »

Has anybody explored the possibility of a Sega 32X version of the 240p test suite? The 32X generates its own graphics that are overlayed on the Genesis' in the analog domain.
-the Goat
Heliopause Heavy Industries :: video game console repairs and modifications
User avatar
Artemio
Posts: 648
Joined: Tue Jun 09, 2009 12:55 am
Location: Mexico
Contact:

Re: 240p test suite for DC,PCE,Wii,SNES,GC,MD and SCD

Post by Artemio »

the Goat wrote:Has anybody explored the possibility of a Sega 32X version of the 240p test suite? The 32X generates its own graphics that are overlayed on the Genesis' in the analog domain.
Is there a homebrew SDK? (would be great if it is open source) If there is one, It will be added to the queue =)
Post Reply