NES/SNES 240p dejitter mod

The place for all discussion on gaming hardware
beast1x5
Posts: 83
Joined: Sun Feb 02, 2014 8:39 pm
Location: New York

Re: NES/SNES 240p dejitter mod

Post by beast1x5 »

i believe a friend of mine has a USB blaster so they may be able to help... I can further stress test the snes some more as this was also occurring during Mario Kart gameplay
thebigcheese
Posts: 707
Joined: Sun Aug 21, 2016 5:18 pm

Re: NES/SNES 240p dejitter mod

Post by thebigcheese »

konkers wrote:
thebigcheese wrote: Yup, that's the one. Awesome, thanks! I have it set to require a confirmed email to upload pictures, but I'm starting to think that's more hassle than it's worth, so maybe I'll just switch it to needing an account. Did it at least send you an email asking for confirmation? Hopefully that's working... Anyway, guides are here: https://www.retromodwiki.com/wiki/NES_dejitter_mod
Perhaps you could convert the guides to markdown and submit a pull request to marqs' git hub repo. That way all the instructions will be in the same place (i.e. https://github.com/marqs85/snes_dejitte ... stallation)

Cheers,
Erik
I am super unfamiliar with how Git Hub works, as I have never used it and frankly have a hard enough time even figuring out how to find the download pages for things, but Marqs is welcome to use anything I've got. I've also edited permissions so that you only have to register to upload files, no more confirmed email business. Having said that, the goal of the wiki is to have one place for all the mods so that creators can focus on making the mods and not on running web sites and maintaining guides, and to that end I believe it now has guides for NES-001, NES-101, and Famicom dejitter installs as well as SNES dejitter installs (though that could probably use some additional updates). Sadly, it's still mostly me adding info and guides, so it hasn't become as complete as I was hoping... Maybe one day.
qcretro
Posts: 12
Joined: Thu Jul 26, 2018 2:33 pm

Re: NES/SNES 240p dejitter mod

Post by qcretro »

I've been fiddling with the dejitter board for a while now and I have to say it is a fantastic product! My living room panel is super picky on inputs and cannot sync with NES or SNES at higher scaling settings and using 256x240 optimal sampling which is less than ideal, but with the dejitter mod it works perfectly up to 5x!

I have come upon an edge case that is very strange and that I think needs confirmation from someone else to confirm the problem. I have a frontloader US NES (NES-001) with NESRGB. Last week, I decided to try the dejitter board inside it, since I've had so much success with it on other systems. And while I'm at it, let me try enabling expansion audio...

The dejitter mod works fine. But... there is a but. Using an Everdrive N8, I load Akumajou Densetsu to try the expansion audio. Works good, but after 2 minutes, the screen garbles and the game hangs. Weird. Load it again, now it hangs on startup screen. I load up another rom of it, the translated one, same behavior. I am now suspect of the Everdrive, so I try loading up the roms on a different SD card. I am able to play the ROM once, but it hangs up at the same spot in the game, in between 2 sections of a level, and afterwards, it just hangs at loading screen. Now, I am suspect of the system.

I try the game with an unmodded NES-001, it works fine. Ok. I wire up expansion audio on the unmodded system, it works fine. I take another NES-001 board that I had lying around and replicate the NESRGB mod on it. Try the game with the N8, it works fine. Hmmm, maybe the other system was bad after all... I install the dejitter mod on it, I now have the same crashes as the previous system.

I am gaining experience doing all these mods, but I am no expert in this field. What does expansion audio have to do with C-sync? Or is it something to do with the Everdrive N8? I don't have an original Akumajou Densetsu cartridge to test, so I can't rule out this possibility. Also, I don't have another NES type (NES-101 or Famicom) with NESRGB to try.

What are your thoughts on this? Can anyone try to replicate this scenario?
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

qcretro wrote:I try the game with an unmodded NES-001, it works fine. Ok. I wire up expansion audio on the unmodded system, it works fine. I take another NES-001 board that I had lying around and replicate the NESRGB mod on it. Try the game with the N8, it works fine. Hmmm, maybe the other system was bad after all... I install the dejitter mod on it, I now have the same crashes as the previous system.

I am gaining experience doing all these mods, but I am no expert in this field. What does expansion audio have to do with C-sync? Or is it something to do with the Everdrive N8? I don't have an original Akumajou Densetsu cartridge to test, so I can't rule out this possibility. Also, I don't have another NES type (NES-101 or Famicom) with NESRGB to try.
That is certainly strange as I don't see how expansion audio could lead to a game crashing other than indirectly through e.g. added supply noise. The clock signal is always a suspect since after the mod it gets gated for 4 cycles every 33ms typically, but as it only drives CPU & PPU it shouldn't matter for VRC or other extra chips (unlike if they were hypothetically clocked by the same clock and contained PLL etc. circuitry that would be upset from nonideal clock). One thing you could try is temporarily disabling de-jitter functionality by wiring a) CPLD pin 34 (MCLK_XTAL_o) to MCLK_EXT_i and b) CLK_SEL_i to 5V. That should reveal whether the problem is caused by de-jitter or clock generation itself.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

beast1x5 wrote:i believe a friend of mine has a USB blaster so they may be able to help... I can further stress test the snes some more as this was also occurring during Mario Kart gameplay
USB Blasters can be a bit tricky to configure as a more generic JTAG programmer,. Below are some of my notes about USB Blasters - please correct if you think something is wrong:

* There are several variants: USB Blaster, USB Blaster II and various clones. "Official" ones (from Altera, Terasic etc.) consist of a USB interface chip, CPLD with propiertary firmware and level shifter IC(s). USB Blaster has fixed 6MHz TCK frequency while USB Blaster II supports USB 2.0 and has configurable frequency. Clones may not include CPLD and don't necessarily support all features (basic JTAG programming only), but are likely to have configurable frequency.
* They don't supply voltage for the target board, but the target powers level shifters in the Blaster instead via Vcc(TRGT) pin. Some of the clones may not come with level shifters and just work with a fixed voltage level (e.g. 3.3V).
* Not all (official) USB Blasters are equal: For example Altera one supports 1.5V-5.0V levels while Terasic one only 2.5V-3.3V
* OpenOCD supports USB Blaster but patches may be needed for some clones (see a few pages back)

I tried to configure my Terasic USB Blaster for programming standalone snes_dejitter board but it wasn't that straightforward. First I had to pull 5V (for powering snes_dejitter) and 3.3V (for Vcc(TRGT)) out from the Blaster box (easy to get, though). Then I noticed that it had failrly strong pull-up resistors (330 ohm) on the output side signal pins of the bus switcher / level shifter IC, so there was no way snes_dejitter could drive TDO to 0, especially with its voltage divider. I replaced the pull-up with 10k and also replaced snes_dejitter voltage divider with a zener clamp at which point OpenOCD detected the board correctly. However, programming still failed and when I took a quick look with a scope, it seemed that 6MHz was too fast for reliable programming/response. At this point it didn't make sense to go forward since there was no way to change the frequency. With a dedicated TDO driver it might have worked, but I think too many hacks were already required to get to that point. To summarize, I don't recommend USB Blaster for programming snes_dejitter unless it has configurable TCK frequency.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

marqs wrote:
qcretro wrote:I try the game with an unmodded NES-001, it works fine. Ok. I wire up expansion audio on the unmodded system, it works fine. I take another NES-001 board that I had lying around and replicate the NESRGB mod on it. Try the game with the N8, it works fine. Hmmm, maybe the other system was bad after all... I install the dejitter mod on it, I now have the same crashes as the previous system.

I am gaining experience doing all these mods, but I am no expert in this field. What does expansion audio have to do with C-sync? Or is it something to do with the Everdrive N8? I don't have an original Akumajou Densetsu cartridge to test, so I can't rule out this possibility. Also, I don't have another NES type (NES-101 or Famicom) with NESRGB to try.
That is certainly strange as I don't see how expansion audio could lead to a game crashing other than indirectly through e.g. added supply noise. The clock signal is always a suspect since after the mod it gets gated for 4 cycles every 33ms typically, but as it only drives CPU & PPU it shouldn't matter for VRC or other extra chips (unlike if they were hypothetically clocked by the same clock and contained PLL etc. circuitry that would be upset from nonideal clock). One thing you could try is temporarily disabling de-jitter functionality by wiring a) CPLD pin 34 (MCLK_XTAL_o) to MCLK_EXT_i and b) CLK_SEL_i to 5V. That should reveal whether the problem is caused by de-jitter or clock generation itself.
I just tried Akumajou Densetsu on my N8 and didn't get it to crash while playing for some time. However, I noticed wavy noise on the video output while audio was playing (pressing start or switching to US rom made it disappear). It looks like either the poor old 7805 regulator is at its limits or there's some signal integrity issue with N8 PCB (haven't opened it yet to study closer). That might be related to your issue - I can try genuine Lagrange Point (VRC7) next to see if I can see similar issues with that.
qcretro
Posts: 12
Joined: Thu Jul 26, 2018 2:33 pm

Re: NES/SNES 240p dejitter mod

Post by qcretro »

Thanks for the reply marqs.
marqs wrote:That is certainly strange as I don't see how expansion audio could lead to a game crashing other than indirectly through e.g. added supply noise. The clock signal is always a suspect since after the mod it gets gated for 4 cycles every 33ms typically, but as it only drives CPU & PPU it shouldn't matter for VRC or other extra chips (unlike if they were hypothetically clocked by the same clock and contained PLL etc. circuitry that would be upset from nonideal clock). One thing you could try is temporarily disabling de-jitter functionality by wiring a) CPLD pin 34 (MCLK_XTAL_o) to MCLK_EXT_i and b) CLK_SEL_i to 5V. That should reveal whether the problem is caused by de-jitter or clock generation itself.
By temporary disabling with the wiring explained above, do you mean that I could wire a switch to those connections to test between on and off? Also, the voltage regulator in all my test units have been replaced by new reputable brand 1.5A 7805. Maybe this has nothing to do with expansion audio specifically, but more just about the N8, I don't know. I haven't tried other games in comparison, it just happens that I was testing that out. I did load VRC7 Lagrange Point and it didn't seem to crash.

Here is a screenshot of the crash at loading of the ROM.

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 »

qcretro wrote:By temporary disabling with the wiring explained above, do you mean that I could wire a switch to those connections to test between on and off?
CPLD pin 34 (MCLK_XTAL_o) can be permanently connected to to MCLK_EXT_i, and then an on-off switch between CLK_SEL_i and 5V will turn de-jitter functionality on and off (not recommended to switch while running, though). While at it, you could also try using a coax cable for MCLK_o (gnd connected on both ends) since a glitch/interference on the clock line is a likely explanation for your crash.
beast1x5
Posts: 83
Joined: Sun Feb 02, 2014 8:39 pm
Location: New York

Re: NES/SNES 240p dejitter mod

Post by beast1x5 »

hey marqs so after some playtime it shows 449220 - 449228 bouncing between those values. i hope this helps
beast1x5
Posts: 83
Joined: Sun Feb 02, 2014 8:39 pm
Location: New York

Re: NES/SNES 240p dejitter mod

Post by beast1x5 »

audio flickering also occurs when using the SD2SNES , I have all of my official games in storage so the sd2snes is what i use to play regularly
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

beast1x5 wrote:hey marqs so after some playtime it shows 449220 - 449228 bouncing between those values. i hope this helps
That means the board is not working properly. Did you wire CSYNC_i from S-RGB pin 7 as in the instructions? If you can't update the firmware yet, you could try S-RGB pin 18 instead which should provide slightly delayed sync to the dejitter board that might fix the issue.
beast1x5
Posts: 83
Joined: Sun Feb 02, 2014 8:39 pm
Location: New York

Re: NES/SNES 240p dejitter mod

Post by beast1x5 »

my friend actually did the install. check it out here

https://imgur.com/3yFojwN

https://imgur.com/37qawy0

https://imgur.com/KLDfVE4
User avatar
NoAffinity
Posts: 1018
Joined: Mon May 07, 2018 5:27 pm
Location: Escondido, CA, USA

Re: NES/SNES 240p dejitter mod

Post by NoAffinity »

A couple observations:

1) S-RGB csync output is coming from pin 18. Marqs suggests S-RGB pin 7 as the output which I never knew why but now have an explanation thanks to his post above. :)
2) Csync_o from the dejitter board is then routing through the voultar board. But, I believe that may impose some additional affect on it, unless it's simply a pass-thru...sorry, I don't know enough about the voultar board. If it's going through more components on the voultair board, it's probably best to take it directly to the appropriate pin at the multi-out, which corresponds to the sync line in your cable.
qcretro
Posts: 12
Joined: Thu Jul 26, 2018 2:33 pm

Re: NES/SNES 240p dejitter mod

Post by qcretro »

marqs wrote:
qcretro wrote:By temporary disabling with the wiring explained above, do you mean that I could wire a switch to those connections to test between on and off?
CPLD pin 34 (MCLK_XTAL_o) can be permanently connected to to MCLK_EXT_i, and then an on-off switch between CLK_SEL_i and 5V will turn de-jitter functionality on and off (not recommended to switch while running, though). While at it, you could also try using a coax cable for MCLK_o (gnd connected on both ends) since a glitch/interference on the clock line is a likely explanation for your crash.
Thanks for your feedback marqs. I might have jumped to conclusions too quickly. I wired the MCLK_o with a shielded / grounded coax cable and everything seems stable so far. I'll report back if anything comes up.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

beast1x5 wrote:my friend actually did the install. check it out here

https://imgur.com/3yFojwN

https://imgur.com/37qawy0

https://imgur.com/KLDfVE4
It seems it is already wired to S-RGB pin 18, so I'd suggest then switching it to pin 7 as in the instruction.
konkers
Posts: 13
Joined: Tue Apr 24, 2018 10:15 pm

Re: NES/SNES 240p dejitter mod

Post by konkers »

marqs wrote:While at it, you could also try using a coax cable for MCLK_o (gnd connected on both ends) since a glitch/interference on the clock line is a likely explanation for your crash.
Do you have a recommendation for what type of coax to use?

Edit: Also, how would you wire up the shield? Ground it at both ends?
beast1x5
Posts: 83
Joined: Sun Feb 02, 2014 8:39 pm
Location: New York

Re: NES/SNES 240p dejitter mod

Post by beast1x5 »

i stress tested my snes jr with the dejitter + voultar board and i moved the pin from 18 to 7. the values started from 449222 and slowly moved to a max of 449228 at it's highest. Barely any audio clipping and no top screen shaking as well as no on screen wobbles or capture card wobbles between SA-1 , Super FX and regular games.

Big thanks for the help!!
Denxing
Posts: 4
Joined: Mon Feb 26, 2018 10:18 pm

Re: NES/SNES 240p dejitter mod

Post by Denxing »

I am getting a weird issue when I installed the v1.2 dejitter board to an sns-cpu-gpm-01. I installed similar to the instructions for the gpm-02. The screen will go black and I'll lose sync with the OSSC it seems when things are loaded from the cart. So, Wild Guns loses sync when you hit 1 player but regains sync once the first level is loaded. I can play the stage perfectly fine (even at 5x which was giving my tv problems before the install) but once I beat the boss I will lose picture again and regain it again once the game over happens. Does anybody know why this is happening?
thebigcheese
Posts: 707
Joined: Sun Aug 21, 2016 5:18 pm

Re: NES/SNES 240p dejitter mod

Post by thebigcheese »

Check the display of the OSSC on these different screens. Is the game changing resolutions? I didn't think any SNES games did that, but maybe this one does.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: NES/SNES 240p dejitter mod

Post by rama »

The game may be using 239 line mode.
I don't know what makes it special, but my upscaler struggles more with it than with regular 224 line mode.

If that's the case, the dejitter board is probably working okay normally, but exceeds some margin in 239 mode.
Denxing
Posts: 4
Joined: Mon Feb 26, 2018 10:18 pm

Re: NES/SNES 240p dejitter mod

Post by Denxing »

I tried to turn on my SNES this morning and it was spazzing out between 239p-247p-259p as well as unstable Hz. Turned it off and on and got picture but same issues as before. Since this seemed to be an issue with the MCLK_o point I replaced the wire and gobbed on the solder for good measure. I bridged JP3 but that shouldn't really have any impact. JP2 was already bridged and does seem to be a requirement for this board. But I am getting rock solid sync now with OSSC. Played some random carts and ran through some MSU stuff on the SD2SNES as well.

I am also getting picture through Live Gamer Extreme in 5x line mode which I did not think possible and did not expect at all. So, instructions for the SNS-CPU-GPM-02 board also work on the SNS-CPU-GPM-01.

Thanks for the help and sorry for cluttering up this thread.
copy
Posts: 232
Joined: Fri Apr 29, 2016 10:38 pm

Re: NES/SNES 240p dejitter mod

Post by copy »

Can anyone recommend a good JTAG programmer for flashing the "NES fix" firmware?
qcretro
Posts: 12
Joined: Thu Jul 26, 2018 2:33 pm

Re: NES/SNES 240p dejitter mod

Post by qcretro »

copy wrote:Can anyone recommend a good JTAG programmer for flashing the "NES fix" firmware?
Find an FT2232H breakout board, this is the best option for easy use with OpenOCD. Otherwise, if you have a Raspberry Pi lying around, you can go back a few pages on this thread to find info on how to set it up and use the GPIO pins to flash the chip.
beast1x5
Posts: 83
Joined: Sun Feb 02, 2014 8:39 pm
Location: New York

Re: NES/SNES 240p dejitter mod

Post by beast1x5 »

which firmware would be appropriate for an AV famicom? has the expansion slot on the side for the light gun games and microphone
thebigcheese
Posts: 707
Joined: Sun Aug 21, 2016 5:18 pm

Re: NES/SNES 240p dejitter mod

Post by thebigcheese »

Same as any other NES.
qcretro
Posts: 12
Joined: Thu Jul 26, 2018 2:33 pm

Re: NES/SNES 240p dejitter mod

Post by qcretro »

marqs wrote:
xthechar wrote:
mdd45 wrote:On a Pal SNES SNS-CPU-GPM-02 (moded with 50/60 switch) and sync on luma RGB scart cable dejitter mod will work or a C sync cable is mandatory?
I have a similar question. I'm not sure why the csync signal itself needs to be passed through the mod board; if the clock is gated properly won't it affect the sync signal timing anyway?

I'll be testing this mod with HD retrovision cables which work with sync on composite. My hope is that the mod will properly alter the sync signal present there as well. But some clarity on how the mod affects the sync on composite and sync on luma signals would be greatly appreciated.
The mod uses CSYNC_i (the signal from PPU that also goes to composite encoder chip) to decide when to gate MCLK, so it can't normalize the source signal itself. You have a couple options if you want to use a cable with sync wired to composite/luma multi-AV pin:

1. Disconnect existing connection from respective multiAV pin and wire CSYNC_o to it. Recommended unless you want to preserve composite/s-video support

2. Disconnect csync input of composite/s-video encoder and wire normalized csync from de-jitter board (straight from U1 pin 15) to that pin.

3. If you are using OSSC or some other digitizer which uses or can be set to use H-PLL post-coast of at least 2 scanlines, you can use composite/luma as sync (or original c-sync on the models which have it) without connecting CSYNC_o anywhere. That's because after the mod those outputs have a short scanline immediately followed by a long scanline, i.e. the 3rd scanline after vsync starts at correct time so sync should be stable as long as the digitizer does not try to lock on those 2 post-vsync lines.

I am trying to get the mod to work with HD retrovision component cables on an NES with NESRGB. As I understand, it is taking its sync from composite video I have tried simply connecting CSYNC_o from the dejitter board to the CVBS pin of the AV multiout, but the OSSC isn't picking up any sync. I don't have a scope to look at the signals, is it expecting a different voltage level? Should I try the "normalized" sync signal directly from U1 pin 15? I am not sure of the actual difference here. Also, I have identified the sync_in pin for the NESRGB video encoder (BH7236AF), but I am uncomfortable lifting the pin off of my NESRGB board, I am not sure I would actually try that option.

Did anyone here succeed in making this work?
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: NES/SNES 240p dejitter mod

Post by paulb_nl »

qcretro wrote: I am trying to get the mod to work with HD retrovision component cables on an NES with NESRGB. As I understand, it is taking its sync from composite
video I have tried simply connecting CSYNC_o from the dejitter board to the CVBS pin of the AV multiout, but the OSSC isn't picking up any sync.
Doesn't Luma or CVBS connected from the NESRGB to the multiout work with H-PLL Pre and Post Coast on the OSSC set to 2 as Marqs said?

If you connect CSYNC_o to the CVBS multiout pin then there should be a 330Ohm resistor in series to lower the voltage.
Also, I have identified the sync_in pin for the NESRGB video encoder (BH7236AF), but I am uncomfortable lifting the pin off of my NESRGB board, I am not sure I would actually try that option.
There is probably a resistor or capacitor nearby which you can use to remove sync_in signal from the pin. That way you don't have to touch the pin.
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: NES/SNES 240p dejitter mod

Post by marqs »

paulb_nl wrote:
qcretro wrote: I am trying to get the mod to work with HD retrovision component cables on an NES with NESRGB. As I understand, it is taking its sync from composite
video I have tried simply connecting CSYNC_o from the dejitter board to the CVBS pin of the AV multiout, but the OSSC isn't picking up any sync.
Doesn't Luma or CVBS connected from the NESRGB to the multiout work with H-PLL Pre and Post Coast on the OSSC set to 2 as Marqs said?

If you connect CSYNC_o to the CVBS multiout pin then there should be a 330Ohm resistor in series to lower the voltage.
H-PLL cost adjustments are only relevant to SNES as NES jitter occurs far from vsync. Before connecting CSYNC_o to multiAV, I assume you disconnected existing connection to CVBS pin, right? Depending on the termination and chip inside HD retrovision cables (anyone have more info about them?), a series resistor might be necessary as paulb_nl noted.
Also, I have identified the sync_in pin for the NESRGB video encoder (BH7236AF), but I am uncomfortable lifting the pin off of my NESRGB board, I am not sure I would actually try that option.
I don't see any reason why you should touch the video encoder, CSYNC_i can be tapped from CS# of NESRGB and CSYNC_o is provided by snes_dejitter board.
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: NES/SNES 240p dejitter mod

Post by paulb_nl »

marqs wrote:I don't see any reason why you should touch the video encoder, CSYNC_i can be tapped from CS# of NESRGB and CSYNC_o is provided by snes_dejitter board.
If the HDRetrovision cables only take composite video for sync and you replace the sync in on the video encoder with CSYNC_o then you can get jitter free composite video and s-video right?
qcretro
Posts: 12
Joined: Thu Jul 26, 2018 2:33 pm

Re: NES/SNES 240p dejitter mod

Post by qcretro »

marqs wrote:H-PLL cost adjustments are only relevant to SNES as NES jitter occurs far from vsync. Before connecting CSYNC_o to multiAV, I assume you disconnected existing connection to CVBS pin, right? Depending on the termination and chip inside HD retrovision cables (anyone have more info about them?), a series resistor might be necessary as paulb_nl noted.
Yes, I am connecting CSYNC_O to an isolated CVBS pin. I will try a series resistor like paulb_nl suggested. Will report back, thanks.
Post Reply