CommLinkUSB

Start a log and update it occasionally with your projects progress
Post Reply
User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

CommLinkUSB

Post by Greg » July 3rd, 2015, 4:25 pm

Build your own USB version of the Comm Link ISA card, info: https://github.com/gpoteau/CommLinkUSB
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2393
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: CommLinkUSB

Post by Shadow » July 3rd, 2015, 5:29 pm

Very cool. Thanks for sharing!
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

User avatar
CosmoGuy
Serious PSXDEV User
Serious PSXDEV User
Posts: 91
Joined: May 30th, 2012, 1:22 am
I am a: Hell knows who I am
PlayStation Model: SCPH-7502
Skype: not using anymore
Steam: amiga3000
Location: Polska, Wrocław
Contact:

Re: CommLinkUSB

Post by CosmoGuy » July 13th, 2015, 5:47 am

Great job bro, will try to make that board myself :D
Image

User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Re: CommLinkUSB

Post by Greg » July 13th, 2015, 11:16 am

Thanks, soon I will finish to add all features to PSEXEU and I will work on XLinkUSB ( USB link for xplorer / xploder ).
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2393
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: CommLinkUSB

Post by Shadow » July 13th, 2015, 11:49 am

Greg wrote:Thanks, soon I will finish to add all features to PSEXEU and I will work on XLinkUSB ( USB link for xplorer / xploder ).
Let me know if you get the 'XLinkUSB' running. We can get some cartridges made that will become the long and overdue "PSX Blaster" based on your hardware :P
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

User avatar
sickle
C Programming Expert
C Programming Expert
Posts: 230
Joined: July 17th, 2013, 9:32 pm
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Re: CommLinkUSB

Post by sickle » July 18th, 2015, 4:30 pm

What's the plan with XLinkUSB, Greg?

I tried using LTP emulation with catflap over a serial connection, but obviously having to send the Strobe/Ack sequence values in the same stream slowed things down lots... and it's already pretty slow.

On the other hand using a buffer between the two meant rewriting every routine on catflap's end to dump all the data to the board's memory, then programming the board to deal different Strobe/Ack sequences (e.g. upload, download, reset, pause, etc), buffering return values and the likes. Caetla just further complicates things with it's weird ordering and ack table.

I even toyed with connecting the board to both the parallel and serial ports so the cart can be triggered to reset/read/write/etc while your program is running, but again, it's a bit messy and on my board at least needs softserial.

I don't fully understand what's going on from the schematic/binaries, but I'm guessing one of the boards is being used as some kinda transparent USB->tty serial interface... but then what? Does the other board translate in realtime or buffer up and run the upload sequence? What commands does it actually support? What sort of speed can we get?
(but hey, at least the Xplorer already has a pair of 74hc373's so we dont need the 74hc573's)

If I had an arduino style board like the R3 but with about ~3mb of RAM and a slightly beefier processor I'd be pretty happy rewriting catflap to handle some kinda protocol like
->command=upload,length=0x1234,loc=0x1234,pc=0x80010000
<-ready
->[data]
<-complete / fail
[card uploads to XPlorer]
<-25%
<-50%
<-75%, etc
<-jumping to 0x80010000
[card executes jump on Xplorer]

Would all be a nonissue if I just went ahead and used the serial but, y'know I enjoy developing ROMs and XFlash kicks all kinds of ass. I tried contacting Tim (author) to grab the source and maybe add serial support, but I can't get ahold of him :\

User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Re: CommLinkUSB

Post by Greg » July 19th, 2015, 8:52 am

@sicklebrick
Let's start by the speed result ;-)
I love inc^lightforce's rectangle demo: viewtopic.php?f=41&t=272&p=1972&hilit=r ... demo#p1972, so I used it as a bench mark, here the results.

Filename : rect.psx
Filesize : 192512
--Transfer size : 0x0002E800

Code: Select all

╔═════════════════╤═══════════════╤═══════════════════╗
║Software         │Time in Second │Hardware           ║
╠═════════════════╪═══════════════╪═══════════════════╣
║PSXSERIAL 1.3    │20 Seconds     │Serial Cable       ║
╟─────────────────┼───────────────┼───────────────────╢
║Catflap 2.36 PAR │1.5 Seconds    │ISA Comm Link Card ║
╟─────────────────┼───────────────┼───────────────────╢
║Catflap 2.36 XP  │8.562 Seconds  │Printer POrt       ║
╟─────────────────┼───────────────┼───────────────────╢
║PSEXEU.EXE       │1.688 Seconds  │CommLinkUSB        ║
╚═════════════════╧═══════════════╧═══════════════════╝
Now heavy load result

Filename : trex.psx
Filesize : 1316864
--Transfer size : 0x00141000
Pxexeu.exe : Time 7.031 Seconds

The board is a replication the comm Link ISA card, I just change the chip that communicate with the ISA port by a mcu that support usb natively, to resume it's a pure usb device, that why it can achieve those pretty speed.

For the command it's just a few:
send 1 byte receive 1 byte: useful for sending command to the caetla or check state, other than that it's to slow.
Bulk send or bulk receive: minimum size 64Byte, No max size, for send and receive big block
send and receive [2Byte to 64Byte variable size].

The XLinkUSB's hardware must be more simple than the CommLinkUSB, I have to check the voltage at the Xplorer pin to know if the mcu can handle it.

About Arduino, I still has the sketch from the earlier version of CommLinkUSB. ;)
It was a long way to arrive at the actual version; BAsic Stamp for the proof of concept, arduino for the speed up, FTDI chip in native usb, Atmega 2313 with soft usb (low Speed 1.5Mbit no bulk transfer), and finally Atmega32u4 hardware USB support (Full Speed 12Mbit).
Last edited by Greg on July 22nd, 2015, 9:32 pm, edited 1 time in total.
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
Shadow
Admin / PSXDEV
Admin / PSXDEV
Posts: 2393
Joined: December 31st, 2012, 5:37 pm
PlayStation Model: H2000/5502

Re: CommLinkUSB

Post by Shadow » July 19th, 2015, 3:32 pm

Reckon you could design the PCB into a 2 layer board that is a self contained cartridge?
Also, does it work with PSEXE.COM? (I'd imagine it would).
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Re: CommLinkUSB

Post by Greg » July 21st, 2015, 10:33 am

Shadow wrote:Reckon you could design the PCB into a 2 layer board that is a self contained cartridge?
Also, does it work with PSEXE.COM? (I'd imagine it would).
Yes it's possible, but the cartridge's connectors are hard to found.
About PSEXE.COM, it does not work, but I already write a new software like PSEXE.COM, name PSEXEU.EXE (Just add a U for USB ;) ) same functionality as PSEXE.COM, actually I work on some features like the < -C Console Mode >....
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
danhans42
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 278
Joined: November 28th, 2012, 11:51 pm
IRC: danhans42
PlayStation Model: SCPH-7502
Want to Find: Inspiration
Location: West Yorkshire, UK
Contact:

Re: CommLinkUSB

Post by danhans42 » July 21st, 2015, 11:24 am

Fantastic work, I have been wanting a USB solution for years :-)

Just have a quick question, Its probably no, but will ask anyway..

I already have a few ATMEGA AT32U4 based boards lying around, they go under the name AT32U4 Pro Micro.. Would it be possible to use one of these in lieu of the Adafruit board? It 5V and 16MHz but unsure if the correct IO pins are broken out or not?

Cheers
♥ PSX - http://psx0.wordpress.com

My collection - SCPH-102/SCPH-7502, Yaroze Modded PSone, PocketStation (Clear), 2x Xplorer Carts, 2x Xplorer Pro, 2x AR Carts (1 with Ezoray), GS Pro 3, ISA Comms Link Card. Various USB serial devices, Gameshark Sharklink, Kentai Eddy, iMode Cable & other bits and bobs.

User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Re: CommLinkUSB

Post by Greg » July 21st, 2015, 12:45 pm

danhans42 wrote:Fantastic work, I have been wanting a USB solution for years :-)

Just have a quick question, Its probably no, but will ask anyway..

I already have a few ATMEGA AT32U4 based boards lying around, they go under the name AT32U4 Pro Micro.. Would it be possible to use one of these in lieu of the Adafruit board? It 5V and 16MHz but unsure if the correct IO pins are broken out or not?

Cheers
Yes it's suppose to work if those following pins are availables:

PE6 ( Use for Led, even if you do not use a led on the pin, make sure it's free )
PB0, PB1, PB2 ( use for Flag: Write, Read, Status)
PD0-PD7 (use for Data D0-D7)

If this is the case you can use the firmware: ADAFRUITU4.hex
If not, you just need 11 I/O Pins, and I will write a firmware for you particular board.
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
danhans42
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 278
Joined: November 28th, 2012, 11:51 pm
IRC: danhans42
PlayStation Model: SCPH-7502
Want to Find: Inspiration
Location: West Yorkshire, UK
Contact:

Re: CommLinkUSB

Post by danhans42 » July 21st, 2015, 8:12 pm

Hi Greg

Thanks for the reply, I believe this is the schematic for the board I have.

Image

Looking at it PE6 isnt used. PB0, PB1 and PB2 are available. PD0 through to PD7 are also available with the exception of PD5 which is wired up as a Tx LED.

It also uses a different bootloader to the boards listed, it detects as an Arduino Micro

Image

Thanks Dan
You do not have the required permissions to view the files attached to this post.
Last edited by danhans42 on July 22nd, 2015, 9:52 am, edited 2 times in total.
♥ PSX - http://psx0.wordpress.com

My collection - SCPH-102/SCPH-7502, Yaroze Modded PSone, PocketStation (Clear), 2x Xplorer Carts, 2x Xplorer Pro, 2x AR Carts (1 with Ezoray), GS Pro 3, ISA Comms Link Card. Various USB serial devices, Gameshark Sharklink, Kentai Eddy, iMode Cable & other bits and bobs.

User avatar
sickle
C Programming Expert
C Programming Expert
Posts: 230
Joined: July 17th, 2013, 9:32 pm
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Re: CommLinkUSB

Post by sickle » July 21st, 2015, 8:29 pm

Greg wrote:...About PSEXE.COM, it does not work, but I already write a new software like PSEXE.COM, name PSEXEU.EXE
Aah, this is what I was getting at - because you're doing pretty specific sequences like send, recv, send, send, recv send and the card will lock up if you get it wrong it's a bit of a pain modifying older software to handle more straightforward serial-style comms.

With Caetla for example, the following rapidly toggles "PC is in control"... I use this to test:

Code: Select all

  
  doByte( 'C' );
  backAck();
  
  doByte( 'L' );
  backAck();
  
  doByte( 02 );
Or this to jump to $BFC00000

Code: Select all

  
  doByte( 'C' );   //Sends byte (strobes pSelect high)
  backAck();      //
  
  doByte( 'L' );
  backAck();
  
  doByte( 0x17 );

  doByte( 0xBF );
  doByte( 0xC0 );
  doByte( 0x00 );
  doByte( 0x00 );
  //Don't need to ack anything since the machine has just reset

Where backAck() reads a byte back a little like this:
(The tables/ack/nAack routines are based on Catflap/X-Killer's routines with the 8x8 table)

Code: Select all

    
    void backAck(){
      
            int in1,in2,in3;
            
            in1 = XpAck1();
            goHigh(); //sets pSelect hi
            
            in2 = XpAck1_N();
            goLow(); //sets pSelect lo
            
            in3 = XpAck1();
            goHigh();
            
            XpAck1_N();
            goLow();
            
            XpAck2_N(); 
            //Fuckit?
            
            returnByte=( ((in1&0x30)<<2) | (((~in2)&0x80)>>2) | ((in2&0x30)>>1) | (((~in3)&0x80)>>5) | ((in3&0x30)>>4) );
    }
(Sending a byte just does the regular goHi(), XpAck1(), goLow(), XPack2() sequence if you're using Catflap terminology)

Meaning you can't get away with just a stream of characters unless every second character was a control character to determine the other pins @ 0x379 & 0x37A and telling it when to read. Kinda like this?

'S' 'C' //Send 'C'
'R' 0 //Read a value
'S' 'L' //Send 'L'
'R' 0 //Read a value
'S' 0x17 //send 0x17 ('jump')
'S' 0xBF
'S' 0xC0
'S' 0x00
'S' 0x00

Or have you made an LPT replacement driver/protocol over USB (you mentioned true USB vs USB->Serial driver)... so for example something like this would be trapped, sent over USB and the board would emulate the DB25 pin states?

__ASM{
mov al,40h
mov dx,0x378
out dx,al
}

'Cause if that were true, then the old PSEXE.COM should work fine...

How does it actually work? >.< heheh

User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Re: CommLinkUSB

Post by Greg » July 22nd, 2015, 7:56 pm

@danhans42
According to the schematic, PD6 is not used, it will be not easy to connect a wire directly to the chip, the better option is to map new ports and rewrite the firmware, I will tell you when it's done.
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Re: CommLinkUSB

Post by Greg » July 22nd, 2015, 8:04 pm

@sicklebrick
I plan to make a prototype of XLinkUSB and do some test this weekend, I will give more details after.
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
danhans42
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 278
Joined: November 28th, 2012, 11:51 pm
IRC: danhans42
PlayStation Model: SCPH-7502
Want to Find: Inspiration
Location: West Yorkshire, UK
Contact:

Re: CommLinkUSB

Post by danhans42 » July 22nd, 2015, 8:37 pm

Thanks Greg.

These boards are very cheap, around £4 so would cut down the cost of making these adaptedlrs quite a bit, as the teensy and adafruit boards are around £17 here in the UK.

I have the other parts in the mail so will be able to test it quite quickly.

Look forward to giving it a whirl.

Thanks
♥ PSX - http://psx0.wordpress.com

My collection - SCPH-102/SCPH-7502, Yaroze Modded PSone, PocketStation (Clear), 2x Xplorer Carts, 2x Xplorer Pro, 2x AR Carts (1 with Ezoray), GS Pro 3, ISA Comms Link Card. Various USB serial devices, Gameshark Sharklink, Kentai Eddy, iMode Cable & other bits and bobs.

User avatar
sickle
C Programming Expert
C Programming Expert
Posts: 230
Joined: July 17th, 2013, 9:32 pm
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Re: CommLinkUSB

Post by sickle » July 23rd, 2015, 8:12 pm

Greg wrote:@sicklebrick
I plan to make a prototype of XLinkUSB and do some test this weekend, I will give more details after.
Awesome, can't wait!

User avatar
danhans42
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 278
Joined: November 28th, 2012, 11:51 pm
IRC: danhans42
PlayStation Model: SCPH-7502
Want to Find: Inspiration
Location: West Yorkshire, UK
Contact:

Re: CommLinkUSB

Post by danhans42 » July 23rd, 2015, 11:06 pm

I'd love a decent dev board hanging off the back of a cart so could do code upload over ethernet or WiFi and doing away with cables altogether. Something like a raspberry pi or Edison board would be cool, would be like a ps1 tool almost :-)

I've been experimenting with an esp8266 board on the serial port for code upload but haven't made much progress thus far.
♥ PSX - http://psx0.wordpress.com

My collection - SCPH-102/SCPH-7502, Yaroze Modded PSone, PocketStation (Clear), 2x Xplorer Carts, 2x Xplorer Pro, 2x AR Carts (1 with Ezoray), GS Pro 3, ISA Comms Link Card. Various USB serial devices, Gameshark Sharklink, Kentai Eddy, iMode Cable & other bits and bobs.

User avatar
Greg
Serious PSXDEV User
Serious PSXDEV User
Posts: 101
Joined: September 9th, 2013, 1:27 am
PlayStation Model: SCPH-7501
Location: Port-au-Prince, HAITI

Re: CommLinkUSB

Post by Greg » July 24th, 2015, 1:59 am

I had a raspberry pi approach, but the need of a Logic Level Converter made me search for a cheaper solution. The PAR/XPLORER are 5v signaling, and the Pi's GPIOs are 3.3v
But use the Pi still could be a cool project.
1 x SCPH-7501, 2 x SCPH-7001, 2 x SCPH-5501
1 x Pro Action Replay with "Dual Rom Mod", ROM 1: Caetla, ROM 2: UNIROM
1 x Xplorer V2 with Caetla
1 x GameShark V2.1
1 x GameShark Pro V3.0
1 x CommLinkUSB
1 x XLinkUSB

User avatar
cybdyn
Cybdyn Systems
Cybdyn Systems
Posts: 405
Joined: January 13th, 2012, 1:56 am
I am a: Embedded Developer (MCU & FPGA)
PlayStation Model: 5502
Location: Belarus (Minsk)

Re: CommLinkUSB

Post by cybdyn » July 25th, 2015, 9:51 am

hmm, we have on psio mcu w/ usb 2.0 and fpga for xfer buffer. so speed is quite fast if aim is to load ps-exe, or excahnge data. we even can play games w. video in games/
ok, it's not cheap way, enad easy to DYI... but idea add some wireless comuniation is interesing)))

for such case like DYI, we unfortunatelly didnt finish usb-expolorer. it uses FTDI chip and few logic ic. and big advantage is direct bus acceess to FTDI chip. so if use some of last version w/ usb 2.0 support like 2232 we can get fast and cheap hw for data exchange.

just my 2 cents

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest