Center USB port (small one) is the PC connection. Other two are for USB flash.

Device is a EZ-OTG based on the Cypress USB devkit. Driver may or may not 
be needed from Cypress. Doesn't hurt anyway. Definately also needs libusb-win32
from SourceForge.

8:58:46 PM: okay ;) I've been reading the literature on this cypress chip - nice little chip!
8:59:04 PM: Yeah, it really was the perfect fit.  And I probably looked at a dozen of them.

Put these files together in the same directory, rename the .skunk file to a
.exe file to fix Google's stupid virus filter, and then try this from the
command line:

qtudump 0xc028 w 2
qtudump 0xc028 w 0

Watch the Jaguar.  It should reset.  If you get any error messages let me know.

C:\WORK\jaguar\skunk>qtudump.exe 0xc028 w 2

DEV: \\.\USBSCAN0 VID=4b4 PID=7200 FW_Ver:0009 BIOS_Rev:7 Core_Rev:a
Write to Address c028 = data 2
C:\WORK\jaguar\skunk>qtudump.exe 0xc028 w 0

(..black screen..)

DEV: \\.\USBSCAN0 VID=4b4 PID=7200 FW_Ver:0009 BIOS_Rev:7 Core_Rev:a
Write to Address c028 = data 0

(..reset..)

Unzip the contents of this folder.  Then, at the command prompt, try jcp
jagmand.cof.  If that works, try this:

jreset
jcp flash.cof
jcp <your ROM>.jag

Don't laugh at me... but, it looks like JCP tries to read
c:\jag\ez\turbow\turbow.bin.  So, here's the file.  You have to create that
path for it.

jreset - resets the Jaguar
jcp - copy a file to the Jaguar. COF files are executed (flash.cof is a Jag
program that wipes the flash). JAG files can be programmed.

You should always do those three steps when you want to flash a ROM:  reset, flash.cof, ROM
You have to let flash.cof finish its job, then you have to send a ROM.  If you change your mind, you have to reset.  You can't send anything but a ROM after you send flash.cof, and you can't send that ROM until it's done erasing (screen stops flashing).
 
If you go by chip specs, it is possible to flash a new game in about 10 seconds.  You still need 20 seconds of erase time up front.  But, my idea was to start erasing immediately in the background on startup, and then just load the menu loader.  Hopefully by the time they select a game the erase is done and they only have 10 more seconds to wait.

  11:09:20 PM: Just make sure to only use 16-bit reads when you are reading from scratchpad SRAM on the EZ-HOST.  32-bit have timing problems.  It's fine on the 68K because it breaks 32-bit reads into separate bus cycles.  The GPU is so fast that it does two 16-bit reads back-to-back without releasing the bus, which does not increment the scratchpad pointer.  That is fixable in the CPLD but I figured it wasn't worth it.
  
 11:16:04 PM: But, file this part away in confusing but useful to know...  The EZ-HOST is actually a little endian processor.  But, it is also a 16-bit processor.
 
  11:18:41 PM: To let the EZ-HOST talk directly to the 68K, I reverse the bits on the 16-bit EZ-HOST bus.  You might not have noticed this, but you are writing pure little endian 16-bit words from the PC, and the GPU is picking them up out of scratchpad memory, and they are coming out big endian.  That's the CPLD doing you a favor.
  
  11:19:58 PM: But, there's a downside.  That means that bytes get swapped, so if you write things byte-wise (not 16-bit word wise), you have to swap bytes.  Which is why deep in the guts of jcp I am swapping bytes.
  11:20:15 PM: For the most part it's a win though, makes using the USB functions of the EZ-HOST on the Jaguar _way_ easier.

