Datel Comms Link Protocol

BIOS, Controllers, Memory Cards, Serial I/O, Parallel I/O, etc.
Post Reply
User avatar
nocash
Verified
PSX Aficionado
PSX Aficionado
Posts: 553
Joined: Nov 12, 2012
Contact:

Datel Comms Link Protocol

Post by nocash » August 24th, 2016, 2:56 am

I've got some "Action Replay" expansion card last week, and now I am wondering about how the "Comms Link" protocol is working (both the low level transfer signal part, and the higher level transfer protocol with command/packet part).

And ideally it would be nice to be able to connect the thing to a PC parallel port instead of the Comms Link ISA card. The DB25 pinouts are almost parallel port compatible, I think shortcutting the PC's STB output (DB25.pin1) with one of the handshake lines (DB25.pin10 or pin11) should make it possible to send data from PC parallel port to PSX, the opposite direction won't work - but if the protocol doesn't rely on needing to receive data from PSX, then EXE uploads should work fine with "one-directional" transfers... or not?

For the Low Level part, there are some schematics and some documents, it isn't quite clear if DB25.pin10 "/ACK" direction is in PC-to-PSX or PSX-to-PC direction (some docs/schematics say this, and others say that).

For the High Level part, I haven't found anything useful yet. This page http://hitmen.c02.at/files/docs/psx/GS32Comms.htm contains some info, but it's for parallel-port-compatible PAR3's (not for older comms-link-based PAR's), though the higher-level part might be same for PAR and PAR3 (?) but even then, it's looking quite incomplete (says how to upload data, but not how to start/execute code).
And source code... is the Caetla source code covering the official Datel protocol, or does it use some different protocol? Or is there some other Datel Comms Link compatible source code around?

NB my hardware is badged "Equalizer - Even the Odds" without manufacturer name on the case, but the interiors are looking like an official Datel product (the inside of the case reads "Datel England", and the PCB is marked "DATEL REF 1288 SONY SONYPSX2meg", and the chipset is 44pin "DATEL, ASIC1, A8B1944A, 9832", plus a 32pin "SST, 29EE020", plus another 8pin chip which is just a 5V voltage regulator).
I don't know what kind of "PAR" version that is. Maybe PAR2 because it has 256K FLASH? It doesn't seem to be PAR3 (because the DB25 connector uses only the 8bit data lines, and /ACK and BUSY, which probably can't work with PC parallel ports since both pins are INPUTS on PC side).

User avatar
nocash
Verified
PSX Aficionado
PSX Aficionado
Posts: 553
Joined: Nov 12, 2012
Contact:

Post by nocash » August 24th, 2016, 3:36 pm

Okay, I've disassembled the "PAR GameShark 1.99 (US).rom" myself, and the command handler looks very simple: It supports only two commands: Upload/Execute and Upload/Burn flash (whereof, the second isn't upwards compatible with later hardware, so one shouldn't use it, and better use Upload/Execute for flash upgrading). Anyways, sending the two commands from PC does work as so:

Code: Select all

  Repeatedly send 8bit "W", until receiving "R"
  Repeatedly send 8bit "B", until receiving "W"
  Send 8bit command "X" (upload/exec) or "U" (upload/flash), and receive ECHO
  Send 32bit ADDRESS,  and receive ECHO or "BX" (bad command)
  Send 32bit LENGTH,   and receive ECHO
  Send DATA[LENGTH],   and receive ECHO
  Send 16bit CHECKSUM, and receive ECHO
  (for upload/flash and if checksum was good, PSX will now BURN ADDR,LENGTH)
  Send 16bit DUMMY, and receive "OK"/"BC"/"BF" (okay, bad chksum, bad flash)
  (for upload/exec and if checksum was good, PSX will now CALL ADDR)
In PAR 1.99, the command handler is called once immediately by Pre-Boot handler (which is nice since it allows to upload data instantly after reset), and once by Post-Boot handler (which does, thereafter, also seem to launch the GUI, if the Switch is ON).

In PAR 2.0 through 2.4, the same (or similar) command handler is also called by Pre-Boot handler (but, done after relocating some useless stuff to ROM, so it boots up somewhat slower than 1.99). And thereafter... these versions support Mid-Boot hooks (and might also call the command handler in that place, not checked yet).

In PAR 2.41 and up, the first thing done by Pre-Boot handler seems to do some bank-switching, and without knowing how the bank switching works it's impossible to tell if/how/when it's calling the command handler (the bank-switching is said to be a PAR3 feature, which is also said to "not require comms link hardware", so it's quite possible that the command handler is somehow different as in the older comms-link hardware versions).

Oh, and I've also found some older source code for the PAR protocol: http://www.psxdev.net/forum/viewtopic.php?f=60&t=398 (essentially same as shown in the above specs, even including a custom flash burning stub for avoiding the restrictions of the built-in Upload/Burn function).

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests