shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Tue Aug 21, 2018 12:04 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 267 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 12, 2018 4:43 pm 


User avatar

Joined: 07 May 2018
Posts: 101
^all spot on. To give some "in order" steps:

1) working locally on the pi, which presumably you are thebigcheese:
> sudo openocd -f openocd-pi.conf
this starts the openocd server

2) alt+f2 will open a new terminal and you will now be in that new terminal, with the original terminal (and openocd server) still running in the background. Login with the same credentials (username: pi, password: raspberry)

3) once logged in, in the new terminal:
> telnet localhost 4444

4) you will now be in telnet
> svf snes_dejitter.svf
(or whatever your svf filename is, if you are using a file that I did not include in the image, i.e. the latest svf file posted in output_files on marqs' github)
you should then see the printout from openocd while the atf1502as is being programmed. it should finish as shown in the picture I posted above, with no errors.

5) > exit
this will close telnet

6) > sudo shutdown now
presumably the same as the command nmalinoski suggested, but this is what I use. You don't need to switch terminals to shut down the pi, so long as you are back at the command prompt and not still in telnet, in the second terminal.

7) Wait for the pi to completely power down, disconnect dejitter board, and test in SNES.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 12, 2018 5:05 pm 



Joined: 21 Aug 2016
Posts: 302
So when it hasn't been working, it just displays this: https://photos.app.goo.gl/NB51zgb4J8nrZ77y8. It accepts no commands as far as I can tell. I haven't tried CTRL+C specifically, but any time I press CTRL it just adds a "^" to the screen. Typing exit also does nothing. It seems like it's just stuck and I don't know what to do with it.

Edit: Ah, I see I'm just not understanding the console commands. CTRL+C to kill the current running application (ie OpenOCD), CTRL+Z to pause it and return to the prompt (at which point bg will run it in the background or fg will bring it back to the foreground). That should take care of that. Thanks!


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 12, 2018 5:27 pm 


User avatar

Joined: 07 May 2018
Posts: 101
thebigcheese wrote:
So when it hasn't been working, it just displays this: https://photos.app.goo.gl/NB51zgb4J8nrZ77y8. It accepts no commands as far as I can tell. I haven't tried CTRL+C specifically, but any time I press CTRL it just adds a "^" to the screen. Typing exit also does nothing. It seems like it's just stuck and I don't know what to do with it.

You should not get the errors or the warning about JTAG event setup being bypassed. The pi isn't communicating with the atf1502as. Everything you see on the screen, up to the point of the errors, is correct. In place of the errors, you should get a response about a TAP controller with id 0x0150203f. The second warning about gbd services will still appear even when everything is working correctly, but can be ignored. It's something I could probably clean up in openocd-pi.conf but probably won't because it's inconsequential.

1) You should have dejitter board JTAG connector connected to pi gpio header physical pins as follows:
dejitter tck connected to pi physical pin 23
dejitter tms connected to pi physical pin 22
dejitter tdi connected to pi physical pin 19
dejitter tdo connected to pi physical pin 21
2) You have tested the pi pins with an LED to confirm they are functioning properly?
3) You have tested continuity from the JTAG header to the associated pins at the atf1502as (tck, tms, tdi, tdo, 5v and ground)?
4) Regardless of 5V power source, you are grounded from dejitter board jtag header to pi?


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 12, 2018 5:34 pm 



Joined: 21 Aug 2016
Posts: 302
That all comes tonight, I just knew I was going to have some questions about using OpenOCD and figured o ought to get them out of the way before I start. I'll have another go tonight once my parts show up and let you know.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 12, 2018 5:46 pm 


User avatar

Joined: 07 May 2018
Posts: 101
Well, if you want to test it as is, you can start the openocd server, then press alt+f2. Login, telnet localhost 4444, and you should get a response about the open chip debugger programmer. You will be in telnet at that point, with openocd waiting for input. You won't be able to go further with actually programming, but programming would be the next step once the pi is successfully communicating with the atf1502as.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 12, 2018 11:40 pm 



Joined: 21 Aug 2016
Posts: 302
Okay! Back with some (good) results. Tested with an LED to make sure everything was communicating correctly and it was. The pin numbers were right, but trying to run OpenOCD still gave the same errors. I changed the base address to the value you gave for RPi 3 and... now everything works! So it seems that value is also the correct value for the Pi 2. My board is now updated and initial testing shows stable sync. Last time it didn't start going crazy for a week or two, though, so I'll keep an eye on it and report back.

Anyway, thanks Marqs for bearing with me and NoAffinity for being extremely helpful in this endeavor and putting together the tools to make it happen. We are good to go now :)


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Thu Jul 12, 2018 11:41 pm 


User avatar

Joined: 07 May 2018
Posts: 101
thebigcheese wrote:
Okay! Back with some (good) results. Tested with an LED to make sure everything was communicating correctly and it was. The pin numbers were right, but trying to run OpenOCD still gave the same errors. I changed the base address to the value you gave for RPi 3 and... now everything works! So it seems that value is also the correct value for the Pi 2. My board is now updated and initial testing shows stable sync. Last time it didn't start going crazy for a week or two, though, so I'll keep an eye on it and report back.

Anyway, thanks Marqs for bearing with me and NoAffinity for being extremely helpful in this endeavor and putting together the tools to make it happen. We are good to go now :)

Great news and congrats! I will add this model to my compatibility list, and note the base address needs to be changed. Thank you for testing.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Fri Jul 13, 2018 4:20 pm 



Joined: 21 Apr 2018
Posts: 3
Quote:
1. Make sure the ground wire between dejitter board and snes PCB is as short as possible - there has been at least one case where a long wire resulted to to noise issues which affected sync stability.

2. If your CSYNC cable has a series resistor on sync line, you should replace R10 (3.3k) on snes_dejitter board with a 8.2k resistor to bring sync to nominal level. This change has been applied to the manufactured v1.2 batch that goes on sale soon.

3. You could try an older version of snes_dejitter.svf which has a bit different timing. The new version has been tested with SHVC-CPU-01 and Famicom (HVC-CPU-07) so I'd assume it should also work fine on SNS-CPU-GPM-02, but you never know.


So, I did #1 and #2 and it didn't seem to make a difference in my issue. I'm going to try #3 soon.
One thing I did notice, and I can't tell if this is in my head, is that the picture looks a little...darker? dimmer? Could changing the resistance value (noting that my sync is on luma) affect this or am I nuts?

Also, I have a Visio that didn't work before the dejitter mod that is now working fine with and without the AV receiver (unfortunately didn't test the dejitter mod on this one before I did #1 and #2), so the Sony X900E definitely seems to be the single source of issue.

I will note that the OSSC does not show any signs of lost sync when the picture drops out. LED stays green, screen display doesn't change.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Sat Jul 14, 2018 8:04 am 


User avatar

Joined: 15 Dec 2012
Posts: 560
Location: Finland
ggj wrote:
So, I did #1 and #2 and it didn't seem to make a difference in my issue. I'm going to try #3 soon.
One thing I did notice, and I can't tell if this is in my head, is that the picture looks a little...darker? dimmer? Could changing the resistance value (noting that my sync is on luma) affect this or am I nuts?
Sync level itself does not change brightness, but sync timing change can theoretically affect clamp position and thus indirectly affect brightness too. Is the issue in all processing modes (generic, optim.)? As for sync on luma, I take you have wired C_SYNC_o to an isolated luma pin on multiAV? Otherwise it needs extra steps to make sync stable.

ggj wrote:
Also, I have a Visio that didn't work before the dejitter mod that is now working fine with and without the AV receiver (unfortunately didn't test the dejitter mod on this one before I did #1 and #2), so the Sony X900E definitely seems to be the single source of issue.
Does X900E work properly with other 240p sources that are slightly off from 59.94/60.0Hz rate?


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



Joined: 21 Aug 2016
Posts: 302
NoAffinity, quick question. I originally wrote the image file to a 64 GB card because that was all I could find lying around, but I found a 16 GB card finally. It looks like the image is some how just slightly over 16 GB, so Win32 Disk Imager is telling me there appears to be data there that will be lost. What size card are you using and what program are you writing it with?


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Sun Jul 15, 2018 10:21 pm 


User avatar

Joined: 07 May 2018
Posts: 101
thebigcheese wrote:
NoAffinity, quick question. I originally wrote the image file to a 64 GB card because that was all I could find lying around, but I found a 16 GB card finally. It looks like the image is some how just slightly over 16 GB, so Win32 Disk Imager is telling me there appears to be data there that will be lost. What size card are you using and what program are you writing it with?

It's a Lexar 300x 16gb card. I have only used win32 disk imager. Not sure why it would be saying that.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 6:38 am 


User avatar

Joined: 02 Apr 2018
Posts: 17
Location: Arkansas
NoAffinity wrote:
It's a Lexar 300x 16gb card. I have only used win32 disk imager. Not sure why it would be saying that.

There are minor variations in the availabe size of any given SD card (to account for errors and defects in the NAND) so since win32 disk imager copies the entire card image sometimes the card you are trying to write to is a few KBs smaller than the image expects. You should be able to shrink the partition and make a new image of it to improve compatibility.
_________________
plus ça change,
plus c'est la même chose,
The more that things change,
The more they stay the same.- RUSH- Circumstances


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 4:32 pm 



Joined: 01 Jul 2015
Posts: 60
does the dijitter mod come with a switch to restore jittering? I ask only if there is a possibility that dejittering causes bugs


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 4:39 pm 


User avatar

Joined: 07 May 2018
Posts: 101
Arthrimus wrote:
NoAffinity wrote:
It's a Lexar 300x 16gb card. I have only used win32 disk imager. Not sure why it would be saying that.

There are minor variations in the availabe size of any given SD card (to account for errors and defects in the NAND) so since win32 disk imager copies the entire card image sometimes the card you are trying to write to is a few KBs smaller than the image expects. You should be able to shrink the partition and make a new image of it to improve compatibility.

Good idea. I'll see if I can shrink it down to something that could fit on a minimum 4GB SD card.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 4:40 pm 



Joined: 21 Aug 2016
Posts: 302
MidOrFeed2015 wrote:
does the dijitter mod come with a switch to restore jittering? I ask only if there is a possibility that dejittering causes bugs


No.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 6:02 pm 


User avatar

Joined: 07 May 2018
Posts: 101
To expand on ^ that, the dejitter board replaces the native csync circuit, and the native csync circuit is disabled in so doing.

However, if you're lucky enough to have a SNES mini/jr., csync is present at 2 pins on S-RGB - pins 7 and 18. We are deriving csync from just one of them for the dejitter mod. You could pull native csync from the other pin that is not being used for the dejitter board, then wire both sync sources to a simple STDP switch (I believe that would be the appropriate configuration?), with the output from that switch going to the appropriate multi-av out pin.

More info on sync sources of the 1-chip models here: http://retrorgb.com/snescsync.html

But in short, this is not something natively supported on the dejitter board. And, I don't think anybody has reported compatiblity issues as of yet, only that they are solved as is hoped for, with the dejitter board.


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



Joined: 21 Aug 2016
Posts: 302
NoAffinity wrote:
Arthrimus wrote:
NoAffinity wrote:
It's a Lexar 300x 16gb card. I have only used win32 disk imager. Not sure why it would be saying that.

There are minor variations in the availabe size of any given SD card (to account for errors and defects in the NAND) so since win32 disk imager copies the entire card image sometimes the card you are trying to write to is a few KBs smaller than the image expects. You should be able to shrink the partition and make a new image of it to improve compatibility.

Good idea. I'll see if I can shrink it down to something that could fit on a minimum 4GB SD card.


Out of curiosity, what all did you have to do to get OpenOCD working? I'm thinking it might be nice to stick this on a version of Raspbian with the GUI to make it easier to find/download/transfer over files to be flashed. I suppose I could probably just use the command to download the GUI portion (I think that's a thing) with the build you have, but if it's not too annoying to set up OpenOCD, might just make my own build.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 9:31 pm 



Joined: 24 Apr 2018
Posts: 9
thebigcheese wrote:
MidOrFeed2015 wrote:
does the dijitter mod come with a switch to restore jittering? I ask only if there is a possibility that dejittering causes bugs


No.


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.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 9:51 pm 


User avatar

Joined: 07 May 2018
Posts: 101
thebigcheese wrote:
Out of curiosity, what all did you have to do to get OpenOCD working? I'm thinking it might be nice to stick this on a version of Raspbian with the GUI to make it easier to find/download/transfer over files to be flashed. I suppose I could probably just use the command to download the GUI portion (I think that's a thing) with the build you have, but if it's not too annoying to set up OpenOCD, might just make my own build.

I believe I followed these instructions: https://learn.adafruit.com/programming- ... ng-openocd

It took about 40 minutes, from what I remember, start to finish, on my Pi 1 B+. It will probably be quicker on 2's and 3's.

The OS is Debian 9 Stretch. I just did a quick google search for adding a gui to this releae, and didn't find anything. The below command is suggested for adding a gui to the previous release (8 Jessie), but I'm not certain it would succeed.

> sudo apt-get install raspberrypi-ui-mods

I'm going to make a few quick revisions before re-ripping the image tonight, and then trying my hand at resizing the image. I'll test adding the gui, also.


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 10:12 pm 



Joined: 26 Jun 2016
Posts: 23
I ordered one of these boards from VGP precisely because I didn't want to have to fiddle with figuring out how to update the firmware, but since it's for a front-loading NES, now apparently I have to figure out how to update it anyway.

For the last three hours I've been trying to figure out how to get OpenOCD to work with my USB Blaster. I'm running Fedora 26.

I soldered together an adapter from a JTAG header and a row of 6 pin-headers, similarly to what I did with the NES RGB (obviously the pins were in a different order). I've checked continuity and resistance with a DMM, everything appears to be wired as it should be.

This is about as far as I was able to get:
Code:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'usb_blaster' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
adapter speed: 3000 kHz
Info : No lowlevel driver configured, will try them all
Info : usb blaster interface using libftdi
Error: unable to get latency timer
Info : This adapter doesn't support configurable speed
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Info : JTAG tap: auto0.tap tap/device found: 0xffff6031 (mfg: 0x018 (Toshiba), part: 0xfff6, ver: 0xf)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0xffff6031"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined


Either my Google-Fu is getting rusty, or there are precious few people trying to do this.

Does anyone have a clue what's going wrong with OpenOCD and USB Blaster?

Is there a different programmer that's more plug-and-play with OpenOCD that I could buy to do this? (I really don't want to buy a Pi to do this with).


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Mon Jul 16, 2018 10:39 pm 


User avatar

Joined: 07 May 2018
Posts: 101
^What command are you using to start openocd? What make and model of USB Blaster are you using?


Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Tue Jul 17, 2018 12:38 am 



Joined: 26 Jun 2016
Posts: 23
NoAffinity wrote:
^What command are you using to start openocd? What make and model of USB Blaster are you using?


I set up ~/.openocd/openocd.conf with the following:
Code:
#
# Altera USB-Blaster
#
# http://www.altera.com/literature/ug/ug_usb_blstr.pdf
#

interface usb_blaster
# These are already the defaults.
#usb_blaster_vid_pid 0x09FB 0x6001
#usb_blaster_device_desc "USB-Blaster"
adapter_khz 3000


And I'm launching openocd with:
Code:
openocd


Though I've also tried this with nearly identical results (doesn't set speed by default):
Code:
openocd -f /usr/share/openocd/scripts/interface/altera-usb-blaster.cfg


I've tried running these commands as my login account and as root.

This is the USB Blaster I have:
Image

lsusb reports it as:
Code:
Bus 001 Device 041: ID 09fb:6001 Altera Blaster


Last edited by samson7point1 on Tue Jul 17, 2018 11:59 am, edited 1 time in total.

Top
 Offline Profile  
 
 Post subject: Re: NES/SNES 240p dejitter mod
PostPosted: Tue Jul 17, 2018 2:49 am 


User avatar

Joined: 07 May 2018
Posts: 101
The pi image is now 1.8G. Should be writeable to a 2GB card or larger.

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

I tested installing a gui with the command I found. It worked like a charm. The next boot booted into a desktop GUI. I'll probably also post an image with the gui included.

> sudo apt-get install raspberrypi-ui-mods

samson7point1, I can't see the picture you posted. The thing that catches my eye, though is:

Code:
Info : usb blaster interface using libftdi


followed by

Code:
Error: unable to get latency timer


Doing some quick poking around online, it seems the cheap USB Blasters may have problems with libftdi, and there are other versions of the library (such as libftdi1-1.0) which may improve compatibility. I'm not saying yours is cheap, and again I can't see the pic of it. Have you used this USB Blaster with your Redhat distro successfully on other projects?


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


User avatar

Joined: 15 Dec 2012
Posts: 560
Location: Finland
konkers wrote:
thebigcheese wrote:
MidOrFeed2015 wrote:
does the dijitter mod come with a switch to restore jittering? I ask only if there is a possibility that dejittering causes bugs


No.


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.

NoAffinity wrote:
Doing some quick poking around online, it seems the cheap USB Blasters may have problems with libftdi, and there are other versions of the library (such as libftdi1-1.0) which may improve compatibility. I'm not saying yours is cheap, and again I can't see the pic of it. Have you used this USB Blaster with your Redhat distro successfully on other projects?
Also note that "official" USB Blasters need Vcc(TRGT) voltage for its internal drivers / level shifters. Dejitter board only provides 5V supply so you'd need to check whether that's safe to use with your exact USB-Blaster model (Terasic Blaster does e.g. only support 2.5-3.3V). Unofficial models may work without Vcc(TRGT) supply and use 3.3V signaling which is ok for programming de-jitter board.


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



Joined: 26 Jun 2016
Posts: 23
NoAffinity wrote:
samson7point1, I can't see the picture you posted. The thing that catches my eye, though is:


Stupid Google. I think the link in the original post is fixed now.

NoAffinity wrote:
Doing some quick poking around online, it seems the cheap USB Blasters may have problems with libftdi, and there are other versions of the library (such as libftdi1-1.0) which may improve compatibility. I'm not saying yours is cheap, and again I can't see the pic of it. Have you used this USB Blaster with your Redhat distro successfully on other projects?


It has been so long since I bought it, I don't remember what I paid, and it very well may be cheap. I've only ever used it with Quartus on Windows.

marqs wrote:
Also note that "official" USB Blasters need Vcc(TRGT) voltage for its internal drivers / level shifters. Dejitter board only provides 5V supply so you'd need to check whether that's safe to use with your exact USB-Blaster model (Terasic Blaster does e.g. only support 2.5-3.3V). Unofficial models may work without Vcc(TRGT) supply and use 3.3V signaling which is ok for programming de-jitter board.


I believe that the markings on my device "1.0V ≤ VCC ≤ 5.5V" indicate that it would be fine with 5V. The board isn't installed into a console yet so I just temporarily connected it to an external 5V supply.


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



Joined: 21 Aug 2016
Posts: 302
NoAffinity wrote:
The pi image is now 1.8G. Should be writeable to a 2GB card or larger.

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

I tested installing a gui with the command I found. It worked like a charm. The next boot booted into a desktop GUI. I'll probably also post an image with the gui included.

> sudo apt-get install raspberrypi-ui-mods


Excellent! That should work quite nicely then. Thanks!


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


User avatar

Joined: 15 Dec 2012
Posts: 560
Location: Finland
samson7point1 wrote:
I believe that the markings on my device "1.0V ≤ VCC ≤ 5.5V" indicate that it would be fine with 5V. The board isn't installed into a console yet so I just temporarily connected it to an external 5V supply.
Ok, so you're connected 5V and GND from the supply to both dejiter board and USB Blaster (Vcc(TRGT)/GND) but it still shows invalid TAP ID? You could try bypassing TDO voltage divider (exists for 3.3V programmers, might as well add a jumper for future revs) by shorting R4.


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



Joined: 26 Jun 2016
Posts: 23
marqs wrote:
samson7point1 wrote:
I believe that the markings on my device "1.0V ≤ VCC ≤ 5.5V" indicate that it would be fine with 5V. The board isn't installed into a console yet so I just temporarily connected it to an external 5V supply.
Ok, so you're connected 5V and GND from the supply to both dejiter board and USB Blaster (Vcc(TRGT)/GND) but it still shows invalid TAP ID? You could try bypassing TDO voltage divider (exists for 3.3V programmers, might as well add a jumper for future revs) by shorting R4.


Funny you should mention that. I've been tinkering with FTDI drivers off an on and somehow managed to effect a change in the output I get, though it still errors out:
Code:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'usb_blaster' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
adapter speed: 3000 kHz
Info : No lowlevel driver configured, will try them all
Info : usb blaster interface using libftdi
Error: unable to get latency timer
Info : This adapter doesn't support configurable speed
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Info : JTAG tap: auto0.tap tap/device found: 0x203f6031 (mfg: 0x018 (Toshiba), part: 0x03f6, ver: 0x2)
Info : TAP auto1.tap does not have IDCODE
Info : TAP auto2.tap does not have IDCODE
Info : TAP auto3.tap does not have IDCODE
Info : TAP auto4.tap does not have IDCODE
Info : JTAG tap: auto5.tap tap/device found: 0xfffff015 (mfg: 0x00a (I.T.T.), part: 0xffff, ver: 0xf)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 8 -expected-id 0x203f6031"
Warn : AUTO auto1.tap - use "jtag newtap auto1 tap -irlen 8 -expected-id 0x00000000"
Warn : AUTO auto2.tap - use "jtag newtap auto2 tap -irlen 3 -expected-id 0x00000000"
Warn : AUTO auto3.tap - use "jtag newtap auto3 tap -irlen 2 -expected-id 0x00000000"
Error: auto3.tap: IR capture error; saw 0x0003 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined


I'm guessing that other tap is the CPLD?

When I try to run
Code:
svf /path/to/snes_dejitter.svf


It results in a screen full of operations and ends with this:
Code:
~
RUNTEST 30001E-6 SEC;
SIR 10 TDI (2bf);
SIR 10 TDI (2a1);
SDR 11 TDI (05e);
SIR 10 TDI (290);
SDR 86 TDI (3f35fceeb3af33bc8f3fcc);
SIR 10 TDI (29e);
STATE IDLE;
RUNTEST 30001E-6 SEC;
SIR 10 TDI (2bf);
SIR 10 TDI (2a1);
SDR 11 TDI (05f);
SIR 10 TDI (290);
tdo check error at line 21
    READ = 0x43f0101
    WANT = 0x150203f
    MASK = 0xffffffff
fail to run command at line 711
tdo check error at line 21
    READ = 0x43f0101
    WANT = 0x150203f
    MASK = 0xffffffff

Time used: 0m3s246ms
svf file programmed failed


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



Joined: 26 Jun 2016
Posts: 23
NoAffinity, did your suggestion about using older drivers for USB Blaster clones come from here?: https://sourceforge.net/p/openocd/mailm ... /30528957/

Based on that thread, I kind of got the gist of what was going on so I made my own patch to ignore latency check failures, and that did seem to get me past the errors. Does that is look better?:
Code:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'usb_blaster' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
Info : No lowlevel driver configured, will try them all
Info : usb blaster interface using libftdi
Info : This adapter doesn't support configurable speed
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Info : JTAG tap: auto0.tap tap/device found: 0x0150203f (mfg: 0x01f (Atmel), part: 0x1502, ver: 0x0)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 3 -expected-id 0x0150203f"
Warn : gdb services need one or more targets defined


I'm able to get a bit further this way - at least in theory - it fails at a much higher line number:
Code:
~
RUNTEST 20001E-6 SEC;
SIR 10 TDI (290);
   MASK (3fffffffffffffffffffff);
SIR 10 TDI (2a1);
SDR 11 TDI (03e);
SIR 10 TDI (28c);
tdo check error at line 1756
    READ = 0x3fffffffffffffffffffff
    WANT = 0x3f37fcefb3ef33fc8f3fcc
    MASK = 0x3fffffffffffffffffffff
fail to run command at line 2200
tdo check error at line 1756
    READ = 0x3fffffffffffffffffffff
    WANT = 0x3f37fcefb3ef33fc8f3fcc
    MASK = 0x3fffffffffffffffffffff

Time used: 0m8s639ms
svf file programmed failed


From what I've read, OpenOCD is supposed to automagically define a target, but clearly it's not doing that. Do I actually need a target defined for the svf to work? If I need to manually define a target, what should the target type be?


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


User avatar

Joined: 15 Dec 2012
Posts: 560
Location: Finland
samson7point1 wrote:
From what I've read, OpenOCD is supposed to automagically define a target, but clearly it's not doing that. Do I actually need a target defined for the svf to work? If I need to manually define a target, what should the target type be?
It should work with auto0.tap now that you have it correctly detected, you can ignore the message related to gdb. Your error suggests TDO is stuck to 1 after programming stage (I assume RUNTEST commands are related to verify) - perhaps there was an error during programming (too high JTAG clock, interference?).


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

All times are UTC


Who is online

Users browsing this forum: ASDR 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