joymon - R/W/X-capable monitor over the controller port
-
socram Verified
- Curious PSXDEV User
- Posts: 17
- Joined: Mar 01, 2021
- I am a: Programmer
- PlayStation Model: SCPH-102
- Location: Valencia, Spain
- Contact:
joymon - R/W/X-capable monitor over the controller port
So debugging some quirky behaviour in tonyhax, and the classic process of copying the executable to a USB, then loading onto a PS2, running uLaunchELF, then copying onto the PS1 memory card, then booting the console, was getting old really fast.
A sensible person would've probably used something like a PS1 fat with a SIOCONS cable, to boot executables straight into the console's RAM. But I have no fat PS1, and I'm no sensible person
So first idea was "hey, maybe I could do something with an Arduino". Did it, much like what ackerman did (except I was unaware of his project), and then "hey, how far can I simplify this?". And this is what I ended up with.
That ominous "M" (for "monitor") is a small, 1KB monitor code written in pure assembly. It that talks over the controller ports, and it needs no Arduino or any special part. All you need is a regular, off-the-shelf 3V USB-UART adapter, a controller cable, and a singular 1N4148 diode.
Since it can be launched from either a CD-R or FreePSXBoot, this project is thus fully capable of working on either a fat PS1, a slim PSone, and highly likely also every PS2 console. It works also at a very snappy 115200 bps, so you get a total of 11.5KB/s of throughput for loading binaries on the console's RAM.
The computer-side part of things is a very small Python library which is capable of reading, writing and executing from arbitrary memory locations, and load and execute PS-X EXE files. The protocol is really simple, so it can be implemented also in any other language you can prefer.
Available at: https://github.com/socram8888/joymon
A sensible person would've probably used something like a PS1 fat with a SIOCONS cable, to boot executables straight into the console's RAM. But I have no fat PS1, and I'm no sensible person
So first idea was "hey, maybe I could do something with an Arduino". Did it, much like what ackerman did (except I was unaware of his project), and then "hey, how far can I simplify this?". And this is what I ended up with.
That ominous "M" (for "monitor") is a small, 1KB monitor code written in pure assembly. It that talks over the controller ports, and it needs no Arduino or any special part. All you need is a regular, off-the-shelf 3V USB-UART adapter, a controller cable, and a singular 1N4148 diode.
Since it can be launched from either a CD-R or FreePSXBoot, this project is thus fully capable of working on either a fat PS1, a slim PSone, and highly likely also every PS2 console. It works also at a very snappy 115200 bps, so you get a total of 11.5KB/s of throughput for loading binaries on the console's RAM.
The computer-side part of things is a very small Python library which is capable of reading, writing and executing from arbitrary memory locations, and load and execute PS-X EXE files. The protocol is really simple, so it can be implemented also in any other language you can prefer.
Available at: https://github.com/socram8888/joymon
You do not have the required permissions to view the files attached to this post.
Last edited by socram on December 6th, 2022, 12:53 pm, edited 2 times in total.
Nice simple beautiful design. I guess a lot of people are much too focused on transferring the Data through the DATA pin, and won't consider to use any of the other pins instead.
Last edited by nocash on December 6th, 2022, 9:39 am, edited 1 time in total.
-
socram Verified
- Curious PSXDEV User
- Posts: 17
- Joined: Mar 01, 2021
- I am a: Programmer
- PlayStation Model: SCPH-102
- Location: Valencia, Spain
- Contact:
Available here: https://github.com/socram8888/joymon. It's still quite rough, but does work.
-
Shendo Verified
- C Programming Expert
- Posts: 250
- Joined: Mar 21, 2012
- I am a: Programmer
- Motto: Never settle
- PlayStation Model: SCPH-7502
- Discord: ShendoXT
- Location: Croatia, EU
This is awesome. While it's not that hard to add a serial port to PSOne, not having to open it makes this so much more awesome. Great job
If you attach ESP8266 to it you could even get PSOne to Internet through the controller port
If you attach ESP8266 to it you could even get PSOne to Internet through the controller port
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.
-
Shadow Verified
- Admin / PSXDEV
- Posts: 2670
- Joined: Dec 31, 2012
- PlayStation Model: H2000/5502
- Discord: Shadow^PSXDEV
No need to drill anything. Just use Bluetooth or WiFi RS232.
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.
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.
- masterg0r0
- Active PSXDEV User
- Posts: 61
- Joined: Jul 18, 2021
- I am a: Programmer
- Motto: Everything is hackable 100%!
- PlayStation Model: 1002+7502
- Location: United Kingdom
That looks epic. I'm going to try this out for myself.
Testing
Congratulations socram on the project.
Regarding the serial usb converter, is a specific model of FTDI chip required, with line inversion, or similar, or does any of them work?
Regarding the serial usb converter, is a specific model of FTDI chip required, with line inversion, or similar, or does any of them work?
- masterg0r0
- Active PSXDEV User
- Posts: 61
- Joined: Jul 18, 2021
- I am a: Programmer
- Motto: Everything is hackable 100%!
- PlayStation Model: 1002+7502
- Location: United Kingdom
Do fake FT232RL chips work? It's just that I've got a few of them.
Testing
-
socram Verified
- Curious PSXDEV User
- Posts: 17
- Joined: Mar 01, 2021
- I am a: Programmer
- PlayStation Model: SCPH-102
- Location: Valencia, Spain
- Contact:
No line inversion required - regular UART with 3.3V for logical 1 and 0V for logical 0. The outputs are actually inverted but that's something that's taken care of in software by the monitor software by re-inverting them before sending/after receiving via the I/O pins.
Should do, yes. I'm using the cheapest USB UART I could get based on a CH340G.masterg0r0 wrote: ↑December 10th, 2022, 4:59 am Do fake FT232RL chips work? It's just that I've got a few of them.
-
Verified
- Extreme PSXDEV User
- Posts: 221
- Joined: Oct 21, 2021
- I am a: Programmer, Gamer
- PlayStation Model: SCPH-1000
- Location: USA
- Contact:
I read that the fake chips don't work well on Linux, only on Windows. Is this the case with Joymon?socram wrote: ↑December 11th, 2022, 6:55 amNo line inversion required - regular UART with 3.3V for logical 1 and 0V for logical 0. The outputs are actually inverted but that's something that's taken care of in software by the monitor software by re-inverting them before sending/after receiving via the I/O pins.
Should do, yes. I'm using the cheapest USB UART I could get based on a CH340G.masterg0r0 wrote: ↑December 10th, 2022, 4:59 am Do fake FT232RL chips work? It's just that I've got a few of them.
Did you try faster transfer rates, too? Ackerman mentioned reaching "71680 bps" on the SPI data lone (=144360 bps on the SPI clock line). So the upper limit might be near 144360 bps, or perhaps faster when removing the 100pF capacitors in the console.
-
socram Verified
- Curious PSXDEV User
- Posts: 17
- Joined: Mar 01, 2021
- I am a: Programmer
- PlayStation Model: SCPH-102
- Location: Valencia, Spain
- Contact:
I really did not try any other speed, other than 115200.
I settled from the very beginning on 115200 because:
- It's a very commonly used speed which every USB UART device supports
- Leaving enough leeway for processing - 115200bps leaves 294 instructions between each byte for further processing, like checksumming transmissions (which I am implementing in another branch)
- It's reasonably fast
Who is online
Users browsing this forum: No registered users and 4 guests