shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Mon Dec 10, 2018 8:10 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 328 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Tue Jul 17, 2018 8:28 pm 


User avatar

Joined: 07 May 2018
Posts: 254
^All of my failures were related to speed. it failed every time with JTAG clock set to 100khz, worked fine at 8khz and 16khz. that may very well be the first place to look/adjust.

Some other things which may or may not be helpful:

I think this is probably the most useful infromation, from openocd documentation:

Code:
2.4 USB-JTAG / Altera USB-Blaster compatibles

These devices also show up as FTDI devices, but are not protocol-compatible with the FT2232 devices. They are, however, protocol-compatible among themselves. USB-JTAG devices typically consist of a FT245 followed by a CPLD that understands a particular protocol, or emulates this protocol using some other hardware.

They may appear under different USB VID/PID depending on the particular product. The driver can be configured to search for any VID/PID pair (see the section on driver commands).

    USB-JTAG Kolja Waschk’s USB Blaster-compatible adapter

    Link: http://ixo-jtag.sourceforge.net/
    Altera USB-Blaster
    Link: http://www.altera.com/literature/ug/ug_usb_blstr.pdf


It's not clear if this is already included by way of the ftdi libraries, but something like the following may hone in the compatibility:

> openocd -f /interface/usb_blaster.cfg

It also seems the USB Blasters can operate in bitbang mode or byte shift mode. I haven't found how to force bitbang mode. I believe bitbang is default for openocd, but that may be worth purusing other things don't pan out.

Lastly, I had at least one failure that was a result of not having the dejitter board connected to the pi :? while it appeared to program with nearly ~60% completion before failing. :oops:


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Tue Jul 17, 2018 9:48 pm 



Joined: 26 Jun 2016
Posts: 35
Well, I finally managed to get it to program successfully, though it was far from consistent. But I'll explain what worked in case it's helpful to anyone else.

After looking at "official" USB Blaster prices, yeah, there's no way mine isn't a cheap clone. I paid more than $10, but not $300.

So based on a thread (that I think NoAffinity found first) which explained that OpenOCD will error out when it can't get latency timing because that's not a feature with USB Blaster clones, I wound up messing with the OpenOCD source code to "patch" out the check.

I also shorted the R4 resistor on the dejitter board per marqs' recommendation.

And finally, I switched to a higher-current 5V power supply. The one I was initially using was rated at 700mA - and it may not have even been that high. I switched to a 2400mA supply and the OpenOCD was able to program the chip on the first try.

Just to verify it was necessary, I replaced the R4 resistor and was back to getting failures during programming. When I re-shorted R4, it took a couple of tries before I could get it to work again.


The TL;DR version of "patching" OpenOCD to work with USB Blaster clones:
Some of this will be different if you're using a Debian-based distro like Ubuntu, or unnecessary if you prefer just to 'make install', but I thought I'd post it here because as far as I know this info is no longer available anywhere else.

Download and install the Source RPM for OpenOCD 0.10.0 for your distro.
This puts the source tarball at ~/rpmbuild/SOURCES/openocd-0.10.0.tar.bz2
Unpack it:
Code:
cd ~/rpmbuild/SOURCES/
tar -xf openocd-0.10.0.tar.bz2


With the source tarball extracted, edit the source file that controls the latency timer check:
Code:
vim ~/rpmbuild/SOURCES/openocd-0.10.0/src/jtag/drivers/usb_blaster/ublast_access_ftdi.c


Comment out lines 105-109 and save the file:
Code:
105 /* if (ftdi_get_latency_timer(ftdic, &latency_timer) < 0)
106       LOG_ERROR("unable to get latency timer");
107    else
108       LOG_DEBUG("current latency timer: %u", latency_timer);
109 */


Then while still in the directory "~/rpmbuild/SOURCES", rename the old tarball and replace it with the edited source:
Code:
mv openocd-0.10.0.tar.bz2 openocd-0.10.0.tar.bz2.old
tar -cf openocd-0.10.0.tar openocd-0.10.0
bzip2 openocd-0.10.0.tar


With that done build the RPM
Code:
cd ~/rpmbuild/SPECS
rpmbuild -bb openocd.spec


Of course this requires that you have "rpm-build" installed, and will probably bug you for a bunch of dependencies.

When successful rpmbuild should give you the location of the RPM
Code:
Wrote: /home/user/rpmbuild/RPMS/x86_64/openocd-0.10.0-2.fc26.x86_64.rpm
Wrote: /home/user/rpmbuild/RPMS/x86_64/openocd-debuginfo-0.10.0-2.fc26.x86_64.rpm


From there just install the newly-created RPM and it will no longer check for a latency timer on USB Blaster clones.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Tue Jul 17, 2018 10:05 pm 


User avatar

Joined: 07 May 2018
Posts: 254
^'Grats, and nice persistence! :)


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 18, 2018 7:46 am 



Joined: 24 Apr 2018
Posts: 10
marqs wrote:
konkers wrote:
I've got some boards on order from Oshpark and have been thinking of manually adding such a switch. Looking at the schematic, there's plenty of unused pins on the CPLD. The RTL modifications for such an enable switch should be trivial. This won't completely bypass the board but would enable/disable the clock gating behavior. I'll report back on how that works.
There might be an easier way that doesn't involve RTL modifications. Assuming you're not using MCLK_EXT_i (with multiregion SNES), you could wire it to CPLD pin 37 (MCLK_XTAL_i) and add a ON-OFF switch that connects MCLK_SEL_i to 5V. That should cause both clk & sync to be bypassed to output.


That makes sense. I'll try that when my boards come it and I populate them. Thanks!


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 19, 2018 1:55 am 


User avatar

Joined: 07 May 2018
Posts: 254
I have uploaded the gui version of the pi image. It looks like it should fit on a 4GB drive. Both images are now here:

https://drive.google.com/drive/folders/ ... yIsduTYyF9


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 19, 2018 2:13 am 



Joined: 21 Aug 2016
Posts: 368
NoAffinity wrote:
I have uploaded the gui version of the pi image. It looks like it should fit on a 4GB drive. Both images are now here:

https://drive.google.com/drive/folders/ ... yIsduTYyF9


Awesome! Thank you!


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Sun Jul 22, 2018 6:40 pm 



Joined: 24 Apr 2018
Posts: 10
konkers wrote:
marqs wrote:
There might be an easier way that doesn't involve RTL modifications. Assuming you're not using MCLK_EXT_i (with multiregion SNES), you could wire it to CPLD pin 37 (MCLK_XTAL_i) and add a ON-OFF switch that connects MCLK_SEL_i to 5V. That should cause both clk & sync to be bypassed to output.


That makes sense. I'll try that when my boards come it and I populate them. Thanks!


Got the dejitter mod installed this weekend. Of course my bus pirate stopped working :( Thankfully I had a raspberry pi sitting around :) I had to use the new firmware. After that it worked perfectly. See before and after in MM2 as captured by a startech usb3hdcap:
Spoiler: show
Image

The bypass switch works as you suggested. Any chance you could upload the new firmware image to github. I got kinda confused by the latest not being there.

Thanks Marqs!!!


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 23, 2018 8:31 am 


User avatar

Joined: 15 Dec 2012
Posts: 591
Location: Finland
konkers wrote:
Got the dejitter mod installed this weekend. Of course my bus pirate stopped working :( Thankfully I had a raspberry pi sitting around :) I had to use the new firmware. After that it worked perfectly.
So the default firmware was not stable with your NES either? It's a bit unfortunate if a separate image is needed for NES even though the changes are minimal.

konkers wrote:
The bypass switch works as you suggested. Any chance you could upload the new firmware image to github. I got kinda confused by the latest not being there.
I'll double-check the functionality on my FC setup and upload it into a separate branch in a couple days.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 23, 2018 8:48 pm 



Joined: 24 Apr 2018
Posts: 10
marqs wrote:
konkers wrote:
Got the dejitter mod installed this weekend. Of course my bus pirate stopped working :( Thankfully I had a raspberry pi sitting around :) I had to use the new firmware. After that it worked perfectly.
So the default firmware was not stable with your NES either? It's a bit unfortunate if a separate image is needed for NES even though the changes are minimal.


Correct. Here's what the output looked like with the firmware from github: https://photos.app.goo.gl/j5auat437wwkPJx79


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 23, 2018 8:56 pm 



Joined: 21 Aug 2016
Posts: 368
Yup, that looks similar to what I was experiencing. Probably makes the most sense to keep SNES and NES firmwares separate. Honestly, I'm still using the one from before the first NES update in my SNES and it's working great. So maybe you'd want to revert the SNES branch back to that one and use this most recent one for just NES. At least the hardware is the same, so there's only one physical item.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 1:19 am 



Joined: 02 Sep 2016
Posts: 78
Is there any disadvantages to the dejitter mods? Does it change the NES speed (like the FPGA solutions, etc) ?

I can't get the OSSC to work with 3x, 4x, and 5x with my Panasonic Plasma (TCP50GT25).


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 1:29 am 



Joined: 19 Jul 2017
Posts: 847
sofakng wrote:
Is there any disadvantages to the dejitter mods? Does it change the NES speed (like the FPGA solutions, etc) ?

I can't get the OSSC to work with 3x, 4x, and 5x with my Panasonic Plasma (TCP50GT25).

Isn't it only the Hi-Def NES that underclocks the NES? As I understand it, the NESRGB doesn't touch CPU clock.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 1:36 am 



Joined: 02 Sep 2016
Posts: 78
Correct. I don't think the NESRGB affects the clock speed like the HiDef NES.

However, I'm wondering about the impact or differences with the dejitter mod + NESRGB (and the SNES).


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 4:50 pm 



Joined: 02 Sep 2016
Posts: 78
One more question... can anybody tell me what needs to be connected for this mod and a SNES 1CHIP-03 using Voultar's RGB amp?

Do I follow the instructions for the SNS-CPU-1CHIP-01 but connect dejitter mod CSYNC_o to CS on the RGB amp? Do I need to do anything else? I'm using a SCART cable with a 470 ohm resistor and the RGB amp set to 'TTL' CSYNC.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 5:04 pm 



Joined: 21 Aug 2016
Posts: 368
Quote:
However, I'm wondering about the impact or differences with the dejitter mod + NESRGB (and the SNES).


It runs just like it would without the dejitter mod, only without jitter :p It is otherwise just like playing a stock NES.

Quote:
Do I follow the instructions for the SNS-CPU-1CHIP-01 but connect dejitter mod CSYNC_o to CS on the RGB amp? Do I need to do anything else? I'm using a SCART cable with a 470 ohm resistor and the RGB amp set to 'TTL' CSYNC.


I put some guides together on my wiki that might help answer your question (since I am also using Voultar's amp): https://www.retromodwiki.com/wiki/SNES_dejitter_mod. Basically:
Sync out from the dejitter board goes to sync in on the bypass board
Sync in on the dejitter board connects to wherever on the SNES you previously had the bypass sync line connected to.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 5:47 pm 


User avatar

Joined: 19 Jan 2016
Posts: 250
Location: Sweden
sofakng wrote:
I can't get the OSSC to work with 3x, 4x, and 5x with my Panasonic Plasma (TCP50GT25).


I wouldn’t count on dejittermod helping for that particular display. Panasonics are really hit and miss for higher linemodes. Have you confirmed the tv can display x3 and up for any other console (e.g. Genesis/MD, PS1, N64 etc)?
_________________
OSSC TV Compatibility report thread


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 9:43 pm 



Joined: 02 Sep 2016
Posts: 78
Oh... I ordered it hoping it might solve my problem :(


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 9:54 pm 



Joined: 21 Aug 2016
Posts: 368
For me, it made it so I could use NES and SNES in 3x, 4x, and 5x without audio dropping out or other sync issues. However, other consoles already worked in those modes.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Wed Jul 25, 2018 11:05 pm 


User avatar

Joined: 15 Dec 2012
Posts: 591
Location: Finland
sofakng wrote:
Correct. I don't think the NESRGB affects the clock speed like the HiDef NES.

However, I'm wondering about the impact or differences with the dejitter mod + NESRGB (and the SNES).
Gating of the clock affects speed but the difference is minimal - in 1 hour of gameplay a de-jittered system falls less than 2 frames behind a vanilla system.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 26, 2018 2:49 pm 



Joined: 26 Jul 2018
Posts: 10
I want to try the mod on my NES frontloader with NESRGB. I was looking a the schematic and think I've got this figured out, but I am looking for confirmation. I will remove XTAL, C44 and C45, than bridge C44 and C45 so that the CLK signal goes directly from the CPU pin 29 to PPU pin 18, where I will wire the rest to the NESRGB board in the same way as shown on the Famicom installation page. Is this correct?


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Fri Jul 27, 2018 5:16 am 



Joined: 26 Jun 2016
Posts: 35
Since I wasn't able to find any posted instructions for installing the dejitter board in an NES-001 Front-loader, I thought I would upload mine.

To prep the NES, you'll need to remove C44, C45, and X1. You'll also need to flatten the three capacitors arranged vertically between the CPU and PPU so they lay flat against the board.

Image

Then to connect Pin 29 on the CPU to Pin 18 on the PPU, solder a jumper wire between the outer legs of the removed C44 and C45 (the red wire in this image).

Image

Also, I strongly recommend orienting the dejitter board like this when you attach it to the NESRGB - it allows access to the update socket and will allow the dejitter board to fit (barely).
Image


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Fri Jul 27, 2018 11:23 am 



Joined: 21 Aug 2016
Posts: 368
Mind if I put your images on my wiki? Then it'll have the instructions :)


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Fri Jul 27, 2018 8:47 pm 



Joined: 26 Jun 2016
Posts: 35
thebigcheese wrote:
Mind if I put your images on my wiki? Then it'll have the instructions :)

Please do. I tried to update the retromodding wiki (maybe that's the wiki you mean mean?). I posted instructions but I couldn't upload pics.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Fri Jul 27, 2018 8:52 pm 



Joined: 21 Aug 2016
Posts: 368
samson7point1 wrote:
thebigcheese wrote:
Mind if I put your images on my wiki? Then it'll have the instructions :)

Please do. I tried to update the retromodding wiki (maybe that's the wiki you mean mean?). I posted instructions but I couldn't upload pics.


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


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Sat Jul 28, 2018 4:26 am 



Joined: 24 Apr 2018
Posts: 10
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


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Sat Jul 28, 2018 10:17 am 


User avatar

Joined: 15 Dec 2012
Posts: 591
Location: Finland
Finally got around testing the NES-tailored fw with my Famicom. It worked just as well as the default one, so it's probably safer choice for all NES/FC installations. If the caps (or a cap in case of NES-101) were left on the console, the mod might have worked stable with the stock firmware (due to them shifting clock phase), but then the installation would not have been as straightforward. I guess separate NES / SNES firmware is still a manageable solution as long as they work across all console revisions. I'll next update the repo and copy instructions for NES-CPU-?? (NES-001) and NESN-CPU-01 (NES-101).


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Sun Jul 29, 2018 9:23 pm 



Joined: 02 Feb 2014
Posts: 81
Location: New York
Hey Marqs , I've been streaming with my Snes jr with voultars RGB board as well as your dejitter board via the OSSC , retrogaming cables packapunch C-sync cable and the gscartsw lite to a datapath vision LCHD2 and after some extensive play the top part of the screen on game play flickers and sometimes cuts off completely

https://www.twitch.tv/videos/290746800

This is star fox on the SD2Snes highlighted with the issue

https://www.twitch.tv/videos/290748725

During game play of mike tysons punch out the top part of the screen basically removed itself from play


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 30, 2018 8:42 am 


User avatar

Joined: 15 Dec 2012
Posts: 591
Location: Finland
beast1x5 wrote:
Hey Marqs , I've been streaming with my Snes jr with voultars RGB board as well as your dejitter board via the OSSC , retrogaming cables packapunch C-sync cable and the gscartsw lite to a datapath vision LCHD2 and after some extensive play the top part of the screen on game play flickers and sometimes cuts off completely

https://www.twitch.tv/videos/290746800

This is star fox on the SD2Snes highlighted with the issue
Does that only occur with SuperFX roms and only after extensive play? I've tested some genuine SuperFX carts with the mod and they seemed to work without issues.

beast1x5 wrote:
https://www.twitch.tv/videos/290748725

During game play of mike tysons punch out the top part of the screen basically removed itself from play
Which NES/FC model you use and have you installed the NES-tailored firmware on the board? Some NES-001 owners have reported similar issues with the stock fw.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 30, 2018 9:05 am 



Joined: 02 Feb 2014
Posts: 81
Location: New York
For the snes it occurs with any game after some time

The AV famicom I'm not sure.. also the firmware for both boards are the ones provided from vgp


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 30, 2018 9:25 am 


User avatar

Joined: 15 Dec 2012
Posts: 591
Location: Finland
beast1x5 wrote:
For the snes it occurs with any game after some time

The AV famicom I'm not sure.. also the firmware for both boards are the ones provided from vgp
Do you have any JTAG programmer you could use for updating the board firmware? Also, when the issue occurs, could you try repeatedly pressing INFO on OSSC remote and check whether the large number on bottom-right corner of the character LCD screen varies by more than 1?


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 328 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11  Next

All times are UTC


Who is online

Users browsing this forum: Das Muel, Exabot [Bot], geekmiki, unmaker and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group