NES/SNES 240p dejitter mod

The place for all discussion on gaming hardware
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

neorichieb1971 wrote:In regards to the OSSC. Will this mod bring compatibility levels up to the Megadrive/Genesis level? Some TV's can only display SNES/NES to x2 where as the Sega consoles can go up to x5. If you did this mod would your OSSC to TV compatibility also be able to reach x5?
Yes, it should help with such compatibility issues.
Ikaruga11
Posts: 1454
Joined: Thu Apr 07, 2016 1:32 pm

Re: NES/SNES 240p dejitter mod

Post by Ikaruga11 »

Will this benefit me if I use a CRT?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

GeneraLight wrote:Will this benefit me if I use a CRT?
No, as explained in the first post.
viletim
Posts: 550
Joined: Mon Aug 07, 2006 6:44 am
Location: Sydney, Australia
Contact:

Re: NES/SNES 240p dejitter mod

Post by viletim »

marqs wrote:
borti4938 wrote:Are you planning to put everything open source?
Personally I would love to include the dejitter mod into the multiregion mod by putting clock selecting, region bit patching and optionally controller sniffing in the CPLD. This will save a lot of ICs.
Yes, the design will be open-source with a permissive license. I'm also hoping Tim will make an alternative NESRGB firmware with the dejitter logic which would remove the need for additional hardware with NES/FC.
I might have a go at putting it into the NESRGB some time next year. The hardware can't do it as is though. I would have to drop a bit form each DAC. That would free up 3 pins on the FPGA for PPU clock out, sync in, sync out.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

viletim wrote:
marqs wrote:
borti4938 wrote:Are you planning to put everything open source?
Personally I would love to include the dejitter mod into the multiregion mod by putting clock selecting, region bit patching and optionally controller sniffing in the CPLD. This will save a lot of ICs.
Yes, the design will be open-source with a permissive license. I'm also hoping Tim will make an alternative NESRGB firmware with the dejitter logic which would remove the need for additional hardware with NES/FC.
I might have a go at putting it into the NESRGB some time next year. The hardware can't do it as is though. I would have to drop a bit form each DAC. That would free up 3 pins on the FPGA for PPU clock out, sync in, sync out.
Hi, I planned to contact you once I've got everything on github but now that you're here, I'll post ideas/questions regarding NESRGB integration on this thread instead.

By saying no extra hardware, I was thinking about an alternative firmware that would utilize those 3 GPIO pins normally used for hardwired palette selection. That way the only required extra hardware would be a few passive components. Of course it's not an ideal solution as it'd involve desoldering of a couple SMD parts of NESRGB board, but still something that numerous owners of existing NESRGB should be able to do. Snes_dejitter board can also be installed on NES/FC, so that is an alternative way for those who prefer not touching NESRGB. One thing I noted on NESRGB, though, is that there didn't seem to be level conversion for incoming clock signal. MAX II datasheet specifies max. 4.0V input voltage and I measured Vpp of the original oscillator circuit to be a bit below that. However, if its clock is replaced by snes_dejitter, then it's something that needs attention. Snes_dejitter includes a resistor divider on board (identical to the one in early SNES revisions) that drops output level to ~4.2V, but by selecting slightly different resistors output level could be easily dropped below 4V.
nmalinoski
Posts: 1974
Joined: Wed Jul 19, 2017 1:52 pm

Re: NES/SNES 240p dejitter mod

Post by nmalinoski »

marqs wrote:The mod board supports both oscillator and external clock configurations, and they can be both installed if dual-frequency configuration is desired.
Would such a dual-frequency config would allow, for example, an NTSC NES to play PAL games at 50Hz? If so, is this something that would be automatic, or controlled by a manual switch?
20L5
Posts: 2
Joined: Sat Dec 30, 2017 6:58 am

Re: NES/SNES 240p dejitter mod

Post by 20L5 »

A post above says this does nothing for CRT's but I tossed 2 mint condition 27" and 32" Panasonic Tau's because of this jitter/oscillating I was getting when connecting my RGB modded SNES mini via SCART to a Shinybow component converter. None of my other CRT's, which include a Toshiba AF, Sony KV-36FS13, and a PVM 20L5, had this problem. I thought it had something to do with how Panasonic CRT's handled the signal. Was this the culprit???
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

nmalinoski wrote:
marqs wrote:The mod board supports both oscillator and external clock configurations, and they can be both installed if dual-frequency configuration is desired.
Would such a dual-frequency config would allow, for example, an NTSC NES to play PAL games at 50Hz? If so, is this something that would be automatic, or controlled by a manual switch?
No, besides a secondary oscillator you'd also need PAL CPU and PPU to play NES games in 50Hz.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

20L5 wrote:A post above says this does nothing for CRT's but I tossed 2 mint condition 27" and 32" Panasonic Tau's because of this jitter/oscillating I was getting when connecting my RGB modded SNES mini via SCART to a Shinybow component converter. None of my other CRT's, which include a Toshiba AF, Sony KV-36FS13, and a PVM 20L5, had this problem. I thought it had something to do with how Panasonic CRT's handled the signal. Was this the culprit???
For some newer CRTs that sample the incoming signal (e.g. 100/120Hz sets) it might be a problem even though I haven't heard of such occurences before.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

Project files are now on github. PCBs and parts should arrive in 1-2 weeks, so if all goes fine the project should be finished before end of the month.
borti4938

Re: NES/SNES 240p dejitter mod

Post by borti4938 »

Thank you very much :) Time to get it included into a new generation of multi region mod.
momi_bot
Posts: 4
Joined: Sun Dec 10, 2017 1:44 am

Re: NES/SNES 240p dejitter mod

Post by momi_bot »

I know nothing about the technical details, but is there any chance this mod could fix signal dropping on SNES 1CHIPs like here: https://www.youtube.com/watch?v=bl03MrKK_pg? Happens both on PEXHDCAP capture with/without OSSC and when using OSSC on a PC monitor. Also only happens to me on Mega Man X stage select, never seen it anywhere else.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: NES/SNES 240p dejitter mod

Post by paulb_nl »

momi_bot wrote:I know nothing about the technical details, but is there any chance this mod could fix signal dropping on SNES 1CHIPs like here: https://www.youtube.com/watch?v=bl03MrKK_pg? Happens both on PEXHDCAP capture with/without OSSC and when using OSSC on a PC monitor. Also only happens to me on Mega Man X stage select, never seen it anywhere else.
That is caused by a voltage glitch with 1-CHIPs when games change display register 2100. It is also talked about in this thread:viewtopic.php?p=1286695#p1286695

On your video you can see gray stripes appearing in the black borders on the side during the blinds effect. That does not happen with a pre 1-CHIP console.

You can fix it with the OSSC by increasing Analog sync Vth. I had to increase it to 281mV with my 1-CHIP-01 with Luma sync cable. With my SNESjr with C11 changed to 470nF I could leave it at default 135mV. People have also reported to not have sync drops with a CSYNC cable.
momi_bot
Posts: 4
Joined: Sun Dec 10, 2017 1:44 am

Re: NES/SNES 240p dejitter mod

Post by momi_bot »

paulb_nl wrote:
momi_bot wrote:I know nothing about the technical details, but is there any chance this mod could fix signal dropping on SNES 1CHIPs like here: https://www.youtube.com/watch?v=bl03MrKK_pg? Happens both on PEXHDCAP capture with/without OSSC and when using OSSC on a PC monitor. Also only happens to me on Mega Man X stage select, never seen it anywhere else.
That is caused by a voltage glitch with 1-CHIPs when games change display register 2100. It is also talked about in this thread:viewtopic.php?p=1286695#p1286695

On your video you can see gray stripes appearing in the black borders on the side during the blinds effect. That does not happen with a pre 1-CHIP console.

You can fix it with the OSSC by increasing Analog sync Vth. I had to increase it to 281mV with my 1-CHIP-01 with Luma sync cable. With my SNESjr with C11 changed to 470nF I could leave it at default 135mV. People have also reported to not have sync drops with a CSYNC cable.
Thanks for the info and link. Unfortunately I tried increasing Analog sync Vth and it didn't fix the problem. I use a composite video sync cable stripped using an LM1881 through a Crosspoint. It's nice to have a lead towards fixing the issue though.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

First installation pics:
Spoiler
Image
Spoiler
Image
On the pictured SHVC-CPU-01 board, installation only requires removal of 3 SMD parts (highlighted in red) and attachment of 5 wires. The chosen JTAG header is a bit too tall for the board to comfortably fit within the metal chassis, but it could be replaced with a low-profile female socket like this.
dataDave
Posts: 7
Joined: Thu Dec 10, 2015 3:26 am

Re: NES/SNES 240p dejitter mod

Post by dataDave »

20L5 wrote:A post above says this does nothing for CRT's but I tossed 2 mint condition 27" and 32" Panasonic Tau's because of this jitter/oscillating I was getting when connecting my RGB modded SNES mini via SCART to a Shinybow component converter. None of my other CRT's, which include a Toshiba AF, Sony KV-36FS13, and a PVM 20L5, had this problem. I thought it had something to do with how Panasonic CRT's handled the signal. Was this the culprit???

I'm getting this with my SFC 1chip with RGC Packapunch RGB SCART on my Sony BVM14M4. It's driving me insane!! Once seen cannot be unseen. :/

Desperately looking for a fix.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

There's a few open questions about 1-CHIP that can affect compatibility of the mod in current state.

* Is PLL in SCPU-N bypassed while in NTSC mode, or does it use 1x multiplier? In the latter case I see little chance of snes_dejitter working with the board.

* Does SCPU-N use XTAL input (2 pins) instead of a clock pin? In that case its internal clock is likely to be inversion of the signal fed to XIN pin, and snes_jitter firmware would need to be tweaked a bit. Looking at some random PCB photos I could find online this appears to be the case. Maybe someone with a 1CHIP and dual-channel scope could check the relation between XIN and output clock (e.g. pin 1 of cart connector).
User avatar
ikari_01
Posts: 27
Joined: Mon Jan 30, 2012 9:07 am

Re: NES/SNES 240p dejitter mod

Post by ikari_01 »

I can take a look at it later. Might not get around to it today.
BTW, what about 50Hz interlaced mode where one of the scanlines is 4 clocks longer? :wink:
User avatar
ikari_01
Posts: 27
Joined: Mon Jan 30, 2012 9:07 am

Re: NES/SNES 240p dejitter mod

Post by ikari_01 »

S-CPUN does have crystal inputs. In case of my console XIN is connected to the active output of a switchable oscillator (for 50/60Hz switching).
Top: XIN
Bottom: SYSCK
Image
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

ikari_01 wrote:S-CPUN does have crystal inputs. In case of my console XIN is connected to the active output of a switchable oscillator (for 50/60Hz switching).
Top: XIN
Bottom: SYSCK
Thanks for taking the capture. There's quite a bit of delay between XIN and SYSCK, but it still seems like SYSCK is derived from XIN and not from its inversion (which is fed to XOUT). Assuming that PLL is bypassed in NTSC mode, the current CPLD image should work ok but we'll see once the mod gets installed on a 1-CHIP.
ikari_01 wrote:BTW, what about 50Hz interlaced mode where one of the scanlines is 4 clocks longer? :wink:
The mod won't help with that as mentioned earlier.
User avatar
Link83
Posts: 342
Joined: Tue May 21, 2013 2:39 am

Re: NES/SNES 240p dejitter mod

Post by Link83 »

Sorry to bump this thread but this project really interests me, and I just wondered if there had been any further progress?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

The mod has been successfully tested on a 1-CHIP, so there only some minor tasks left (e.g. SuperCIC-specific firmware). All project files are available on github, but installation instructions exist currently only for SHVC-CPU-01.
User avatar
citrus3000psi
Posts: 668
Joined: Wed Dec 25, 2013 11:56 pm
Location: Indiana

Re: NES/SNES 240p dejitter mod

Post by citrus3000psi »

On the installation into the SHVC-CPU-01 what purpose of desoldering C5, R6? (I have no idea what these parts are connected to)
User avatar
Link83
Posts: 342
Joined: Tue May 21, 2013 2:39 am

Re: NES/SNES 240p dejitter mod

Post by Link83 »

marqs wrote:The mod has been successfully tested on a 1-CHIP, so there only some minor tasks left (e.g. SuperCIC-specific firmware). All project files are available on github, but installation instructions exist currently only for SHVC-CPU-01.
Great work, thanks marqs :)
I'm curious why specific firmware is required for the SuperCIC?
Also, might there be any chance of some pictures of the installation on a 1CHIP?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

citrus3000psi wrote:On the installation into the SHVC-CPU-01 what purpose of desoldering C5, R6? (I have no idea what these parts are connected to)
Removing those isolates on-board oscillation circuitry from rest of the system, so you can then just wire snes_dejitter clock output to a suitable place.
Link83 wrote:I'm curious why specific firmware is required for the SuperCIC?
Also, might there be any chance of some pictures of the installation on a 1CHIP?
The board was originally tailored for 3-CHIPs, so on a modded PAL console it is possible to switch between exact NTSC clock (generated on the mod board) and PAL clock (routed from S-CLK to the mod board) to stay true to original 60.09Hz / 50.00Hz refresh rates. On 1-CHIPs SuperCIC (or DFO) provides a single clock output that is dynamically switched between NTSC and PAL frequency, with the latter getting further multiplied inside S-CPUN. In such installation snes_dejitter just needs to use one of its clock input, but disable de-jitter functionality while in PAL mode as its input clock is not equal to MCLK then. Pictures from 1-CHIP installation will be added in near future.
User avatar
Link83
Posts: 342
Joined: Tue May 21, 2013 2:39 am

Re: NES/SNES 240p dejitter mod

Post by Link83 »

marqs wrote:On 1-CHIPs SuperCIC (or DFO) provides a single clock output that is dynamically switched between NTSC and PAL frequency, with the latter getting further multiplied inside S-CPUN. In such installation snes_dejitter just needs to use one of its clock input, but disable de-jitter functionality while in PAL mode as its input clock is not equal to MCLK then.
I didn't think the SuperCIC itself had any clock output? I thought it just detected if PAL or NTSC software is being played, and then switched the PPU to the correct video mode by toggling one pin high or low?

...Unless you mean the multi-region mod boards like borti4938's which combine multiple different mods together? (e.g. SuperCIC, 50/60Hz Crystals, uIGR, D4 Patch)
https://oshpark.com/shared_projects/qqk5bC5L
The VGP website does incorrectly list this board as the "SNES Super CIC Board", but the SuperCIC name actually only refers to the PIC code released by ikari_01:-
https://sd2snes.de/blog/cool-stuff/supercic

If thats the case i'm guessing the 3-Chip version without the 50/60Hz crystals would work fine?:-
https://oshpark.com/shared_projects/lLVx26eP
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

Link83 wrote:...Unless you mean the multi-region mod boards like borti4938's which combine multiple different mods together? (e.g. SuperCIC, 50/60Hz Crystals, uIGR, D4 Patch)
https://oshpark.com/shared_projects/qqk5bC5L
The VGP website does incorrectly list this board as the "SNES Super CIC Board", but the SuperCIC project is actually just the code for the PIC released by ikari_01:-
https://sd2snes.de/blog/cool-stuff/supercic
Yeah, without keeping a close eye on the project I thought it had evolved into that over the years, but apparently they are separate.
Link83 wrote:If thats the case i'm guessing the 3-Chip version without the 50/60Hz crystals would work fine?:-
https://oshpark.com/shared_projects/lLVx26eP
Yes.
User avatar
Harrumph
Posts: 368
Joined: Tue Jan 19, 2016 10:06 pm
Location: Sweden

Re: NES/SNES 240p dejitter mod

Post by Harrumph »

marqs wrote:The board was originally tailored for 3-CHIPs, so on a modded PAL console it is possible to switch between exact NTSC clock (generated on the mod board) and PAL clock (routed from S-CLK to the mod board) to stay true to original 60.09Hz / 50.00Hz refresh rates.
Am I reading this right? True 60.09Hz on a PAL 3-chip?! Borti wrote on assembler forums about a year ago that this might never be possible. https://assemblergames.com/threads/pal- ... tor.65575/
Really awesome if this is truly fixed now! :)
User avatar
Link83
Posts: 342
Joined: Tue May 21, 2013 2:39 am

Re: NES/SNES 240p dejitter mod

Post by Link83 »

Great, thanks for the help :)

So just one more question, i'm not sure if you have read the thread "Video probs w/ SNES RGB (Vertical Bands, etc)", but Voultar discovered that on 1CHIP systems capacitor C11 was responsible for video interference:-
viewtopic.php?f=6&t=61072&p=1282757#p1282757

Replacing C11 with 470nF fixed the interference, however it created a small issue with some Capcom games missing lines at the top of the screen:-
viewtopic.php?f=6&t=61072&p=1286695#p1286695
viewtopic.php?f=6&t=61072&p=1287176#p1287176

I just wondered if this dejitter mod could have any affect on this issue? Or is it completely unrelated?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

Harrumph wrote:Am I reading this right? True 60.09Hz on a PAL 3-chip?! Borti wrote on assembler forums about a year ago that this might never be possible. https://assemblergames.com/threads/pal- ... tor.65575/
Really awesome if this is truly fixed now! :)
Perhaps you misunderstood his post - it's not possible with a simple crystal swap but I see no reason why you couldn't bypass S-CLK and generate suitable clock elsewhere. I can't confirm this as I don't have a PAL 3-chip or its schematic here but it probably doesn't take long until someone tries it.
Link83 wrote:So just one more question, i'm not sure if you have read the thread "Video probs w/ SNES RGB (Vertical Bands, etc)", but Voultar discovered that on 1CHIP systems capacitor C11 was responsible for video interference:-
viewtopic.php?f=6&t=61072&p=1282757#p1282757

Replacing C11 with 470nF fixed the interference, however it created a small issue with some Capcom games missing lines at the top of the screen:-
viewtopic.php?f=6&t=61072&p=1286695#p1286695
viewtopic.php?f=6&t=61072&p=1287176#p1287176

I just wondered if this dejitter mod could have any affect on this issue? Or is it completely unrelated?
I noticed the discovery, yes. I doubt this mod has any effect on those lines as it should be invisible to the system but like above, we'll see once somebody tries it.
Post Reply