A poorly-written implementation of playstation serial upload capability via psxserial / unirom / etc. This checks nothing, will gladly send your grandmother through the serial port, and will fail with a whimper.
- Interpreter: python3.6
- OS: macOS, linux, windows
- Hardware: pl2303 (configured for 3.3v) and a 3-wire GND/TXD/RXD interface to PSX serial port
- PSX-side receiver: psxserial (hitmen), unirom (sicklebrick)
python3 pypsxserial.py PSX-EXE.exe /dev/cu.usbserial
(substitute your serial port at the end, e.g. '/dev/ttyUSB0' under linux or e.g. 'COM1' under windows).
for best results with macOS, use the '/dev/cu.usbserialxyz' style port instead of '/dev/tty.usbserial'. programmed pause at end to ensure trashy pl2303 driver extension doesn't smash this crashy kernel
- send an 0x63 to start
- check the psx gives us something. (psxserial gives me 0x62, unirom gives 0x99?)
- slurp full 2048 byte header from .exe, send that through in one chunk.
- rewind, send three chunks of 4 bytes from the .exe:
- 16-20 = PC start address
- 24-28 = write location?
- 28-32 = size minus header
- send through the .exe in 2048 byte chunks, skipping the header.
- send through a single 2048 byte chunk full of 0xff
- close port