Changes

Jump to: navigation, search

FPGAmstrad

343 bytes added, 18:07, 19 May 2017
/* TODO : tapes */
In November 2014, I bought MiST-board, with two USB pro joysticks.
In September 2014, I bought NEXYS4, more powerfull than NEXYS2, with same external RAM, internal mini-sd, no PS/2 (it is a pmod option)... I have some patchs to make (MSB FAT32 offset). I would like to make a USB snifer sniffer also with it (usb to ethernet (wireshark))
----
==== perl FDC frame decoder ====
Adding a snifer sniffer into UPD765A.java :
writePort(int port, int value){System.out.println("writePort "+Util.hex((byte)port)+" "+Util.hex((byte)value));
readPort(int port) {
return data; // just before that
fdcMessages.pl
# perl fdcMessages.pl < test.dsk.snifersniffer.txt > test.snif.txt # perl fdcMessages.pl < orion.dsk.snifersniffer.txt > orion.snif.txt
use Switch;
my $param_count=0;my $data_read_count=0;my $data_write_count=0;my $result_count=0;
=== TODO : pause Z80 while OSD is displayed ===
Cause playing Double Dragon II without "pause", is quite difficult.
 
Or else using "Pause" key ?
 
Can have border effect in sound (perhaps sound can be "freeze" and then still up...)
 
=== TODO : tapes ===
Do read .CDT files also.
 
I think @ralferoo had already written FPGA code for tape reading for his FPGA CPC. Maybe you can borrow some code from him?
Bryce.
----
http://www.youtube.com/watch?v=fh4v4OXridc
USB is just a state machine (welcome how are you today, show me your state, show me your state, show me your state....), encoding (have to read USB manual), you can use some usb snifer sniffer softwares to decode them(wireshark unix version does it fine). Snifer Sniffer software does not show low level message messages (ack ko ok) but does show the high level message messages (ones that show that a button is pressed or not)
As it is just encoding, you can capture signals and show that they differ only when you do unpress or press a button.
For reaching which wire you have to pull-up or pull-down, here the tips :
*For slave (ideal for sniffing) : just take your USB1 joystick without plug it, just supply it (+5v red, 0v black), and test while-black and green-black with voltmeter, if you have got 5v then put a VHDL pull-up, and if you have got 0v then put a VHDL pull-down.
*For master (ideal for creating a mini-host) : just take your PC USB1 port, and test whilewhite-black and green-black with voltmeter, if you have got 5v then put a VHDL pull-up, and if you have got 0v then put a VHDL pull-down. Normally you result two pull-down.
==== Synchronize, decode and check USB frames ====
One time sample is done, it is not readable. In fact USB frames are synchronized (they started with a certain synchronization pattern), encoded (NRZI), and checked (CRC). CRC type depends on frame length. Encoding is done for synchronization optimization.
Then using USB HID manual, you can understand type of frames, and author of them, and remark that the author alternatealternates: USB master (PC) or USB slave (joystick)
You can use some "USB sniffer software" in order to understand more easily some frames contain, but they generally don't give all frame, and full frame.
1,200
edits