r/psx • u/nukluer_karpuz • 2d ago
PSone plays video from an SD card through controller port
A Raspberry Pi Pico 2 plugged into controller port 2 reads video from an SD card and streams it to a homebrew player on a modded PSone. The port only moves about 23 KB/s, so the video is heavily compressed (around 350 bytes per black & white frame, 15 fps).
7
u/nukluer_karpuz 2d ago edited 2d ago
Code, wiring and disc images if anyone wants: https://github.com/alp0809/ps1-sd-video-player
Edit : If you want to see the full video explaining how the system works: https://youtu.be/Tz3f0jy09XI
6
u/Helpmetoo 2d ago
I know you can just stream the video from a CD like a normal cutscene, but I always wondered if one could compressed the video into a series of polygons and pixel commands for the GPU, especially for something like bad apple, and get 60fps, streaming that off the CD instead of using the MDEC
2
u/nukluer_karpuz 2d ago
When I think about it, it seems possible, but it’s a challenge.
The first problem I can think of is that streaming from the CD port is a problem in itself. Maybe removing the drive and putting an MCU there that acts like a CD reader but sends the data might work. Optical drive emulators like the PicoStation already do something similar.
Or you could burn a new disc for every video. That might work, and it would work even better with MDEC-based decoding. It might even hit 640×480 at 60 fps or more, but that’s a project of its own.
3
u/lndianJoe 2d ago
Why from the controller and not from the memory card port?
6
u/nukluer_karpuz 2d ago
The memory card slot is wired to the same bus as the controller port, so it's the same thing. I didn't have a spare memory card connector, so I had to make my own plug, and that was much easier for the controller port.
2
u/lndianJoe 2d ago
TIL !
6
u/Marteicos 2d ago
That is why PS1 multitaps can read memory cards with its plug only going to the controller port.
The PS2 taps have the memory card piece.
6
u/benryves 2d ago
And, in the other direction, it allowed memory cards to read controller inputs (some multi-page third-party cards used this to let you choose which page was selected via a button combination on the controller).
3
u/Marteicos 2d ago
Exactly! Had a 8 page card with 3 leds, some games had issues saving on it.
Select+R1 for next page, Select+L1 for previous page.
When the combo was pressed, the 3 leds would blink together while changing pages before assuming a pattern to indicate the page.
Later I had a Net Perfect card, it would change pages using a software disc.
More recently got one of those newer cards with sd card that accepts inputs when plugged on PS1.
2
u/Helpmetoo 2d ago
I heard that plan was for there to be 4 ports on the front all of the same kind, and you could put the controller or memory card into any of them, hence they are wired the same and on the same bus. Something about not reliably being able to address the right thing, so they just chose to segregate the 2 and 2.
2
u/ILovePotassium 2d ago
Any chance You could use both ports at the same time and double it to 46kb/s?
9
u/nukluer_karpuz 2d ago
There’s only one clock inside the PS1 or PSone, so it talks to one port at a time. Two Picos, one per port, would take turns at the same total speed, about 23 KB/s at stock.
The DATA and ACK lines are also shared, so they might cause problems too.2
u/Maestro_gaylover 2d ago
parallel would be the fastest but this is psone so you have to solder alot
1
u/nukluer_karpuz 2d ago
Yes, it would be way faster, but using the controller port is more interesting :D
2
2
u/Androxilogin 2d ago
Pretty cool to see. Is there a filesize limit and does it have sound?
3
u/nukluer_karpuz 2d ago
The file size limit is basically your SD card, though on FAT32 a single file can't be bigger than 4 GB. I tested it with a 32 GB card. Sound is technically possible, but I didn't test it and didn't write the code for it.
But in theory you could also swap in a music CD while it plays, like some PS1 games let you do, and it would start playing that song.
2
u/Androxilogin 2d ago
Oh, that's a neat idea. Linking the sound to audio CD queues like oldschool slides.
2
u/CountryFriedToast 2d ago
i'm happy someone has finally done this. I was thinking about making a network adapter using an esp32 or something
1
34
u/yangchow 2d ago
"Playing Bad Apple on anything with a screen" is the weeb version of "running Doom on anything that has a processor"