Page 1 of 1

Adding PIO to a PSOne

Posted: January 24th, 2014, 11:13 pm
by danhans42
I have an AR cart with a broken connector that otherwise worked fine. Anyone any ideas on how easy it would be to wire this into a PSOne internally?

Most of the data and address signals used are available on the BIOS ROM like the VCD internal cards used. I did give this a go a few years ago and never got it working.

Image

Also the PIO pinout

Image

Anyone ever tried this?

Re: Adding PIO to a PSOne

Posted: January 25th, 2014, 12:58 pm
by Shadow
That's the BIOS address and data lines. If you solder your Action Replay to that and you're just asking for trouble.
The parallel port goes directly to the CPU. Look at the schematics.

Re: Adding PIO to a PSOne

Posted: January 25th, 2014, 6:39 pm
by danhans42
That is the way the VCD cards for the PSone and 900x series work and to they manage to pump video, so can't see why an AR cart would be any more problematic

Re: Adding PIO to a PSOne

Posted: January 26th, 2014, 12:12 am
by TriMesh
I haven't tried it on a PSone - but this works OK on a SCPH-900x series machine, so I can't see why it wouldn't work correctly on the PSone, too.

On the PU-23, the other signals you need (like the expansion bus chip select) are brought out to test points, so it's a fairly simple soldering job. Although it worked OK with direct wire connections, the signal integrity was better with some damping resistors in the lines (about 47R worked best for me, but this would obviously vary based on the sort of cable you were using).

Oh, and incidentally, although the block diagram in the SCPH-550x manual shows the expansion port as being connected to the main data bus, it isn't - it actually goes to the same sub bus that the boot ROM / Audio DSP and CD controller are on.

Re: Adding PIO to a PSOne

Posted: January 26th, 2014, 11:34 am
by Shadow
TriMesh wrote:Oh, and incidentally, although the block diagram in the SCPH-550x manual shows the expansion port as being connected to the main data bus, it isn't - it actually goes to the same sub bus that the boot ROM / Audio DSP and CD controller are on.
Well that's a bit annoying.

Re: Adding PIO to a PSOne

Posted: January 26th, 2014, 1:34 pm
by TriMesh
Shadow wrote:
TriMesh wrote:Oh, and incidentally, although the block diagram in the SCPH-550x manual shows the expansion port as being connected to the main data bus, it isn't - it actually goes to the same sub bus that the boot ROM / Audio DSP and CD controller are on.
Well that's a bit annoying.
The actual schematic is correct, and shows the port being wired to SD[0..15] and SA[0..23] - I suspect that whoever did the block diagram just missed off the connection to the sub bus. In fact, it's basically impossible to connect anything to the main 32bit bus since only one bit of the address bus (A2) is brought out to a pin, since that's all the GPU needs.

This is the same thing that makes any further expansion of the memory basically impossible - even if you stick more chips on the board you have no access to the address bus except via the DRAM address lines - and they are inactive for accesses outside the 8MB block that is assigned to RAM. There is a second RAS line on the controller, but the only way I could activate it was by changing the memory mode register - and the only mode I could find that it worked in was mapped as 2MB (RAS0) / 2MB (RAS1) / 4MB illegal (page fault) - so this would only give you a total of 4MB of RAM.

Re: Adding PIO to a PSOne

Posted: January 28th, 2014, 3:26 am
by danhans42
I'll give this a go at the weekend. Just fancied giving it a try then when your psx USB tool gets sorted I might have a smaller machine to try it on too.

Re: Adding PIO to a PSOne

Posted: February 28th, 2014, 10:49 am
by mrhaboobi
danhans42 wrote:I have an AR cart with a broken connector that otherwise worked fine. Anyone any ideas on how easy it would be to wire this into a PSOne internally?

Most of the data and address signals used are available on the BIOS ROM like the VCD internal cards used. I did give this a go a few years ago and never got it working.

Image

Also the PIO pinout

Image

Anyone ever tried this?
Could you document in a post how you added USB to your PSONE to allow serial connection via USB :)

Re: Adding PIO to a PSOne

Posted: February 28th, 2014, 11:26 am
by Greg

Re: Adding PIO to a PSOne

Posted: March 4th, 2014, 10:36 am
by mrhaboobi
cheers, thats what i was looking for, now if only there was a suitable mini usb version :)

Re: Adding PIO to a PSOne

Posted: March 4th, 2014, 7:17 pm
by Greg

Re: Adding PIO to a PSOne

Posted: December 18th, 2019, 12:50 pm
by asmblur
Necroposting to say that this won't work as-is on the PSOne. The BIOS prior to PSOne contains code that is responsible for executing the PIO port's ROM(the AR ROM). That's gone as of the PSOne. You'd need to replace the BIOS with flash and hack the PSOne ROM to add code for comparable entry points for the PIO. It's not as bad as it might sound but it's not simple by any means. In addition to the 32 pins of the BIOS chip you need to get the CS0# signal and possibly a few others that are found on the PIO port, depending on the cart.

Re: Adding PIO to a PSOne

Posted: January 8th, 2020, 12:56 am
by Shadow
You can add a parallel port to the PSone, but it's very tricky. All the test points and solder points are there.

Re: Adding PIO to a PSOne

Posted: January 9th, 2020, 7:42 am
by danhans42
asmblur wrote: December 18th, 2019, 12:50 pm Necroposting to say that this won't work as-is on the PSOne. The BIOS prior to PSOne contains code that is responsible for executing the PIO port's ROM(the AR ROM). That's gone as of the PSOne. You'd need to replace the BIOS with flash and hack the PSOne ROM to add code for comparable entry points for the PIO. It's not as bad as it might sound but it's not simple by any means. In addition to the 32 pins of the BIOS chip you need to get the CS0# signal and possibly a few others that are found on the PIO port, depending on the cart.
How did you come to that conclusion? We had internal VCD carts for the PSone that actually boot without any modifications or a flash bios. Also, I and some others have successfully wired a flashrom and used that without issue.

I traced out most (if not all) the testpoints for the BIOS, the link is on here somwhere.

Re: Adding PIO to a PSOne

Posted: February 18th, 2020, 10:54 am
by asmblur
danhans42 wrote: January 9th, 2020, 7:42 am
How did you come to that conclusion? We had internal VCD carts for the PSone that actually boot without any modifications or a flash bios. Also, I and some others have successfully wired a flashrom and used that without issue.

I traced out most (if not all) the testpoints for the BIOS, the link is on here somwhere.
In the long long ago, when I went by the name "Herben" and life was looking better for us all, I did a lot of reversing and coding on PS1 and PS2. This included the PS1 parts of the PS2 BIOS as well as the PSOne(the official "PSOne" white console thing, not the generic sense it's used to refer to what was being called "PSX" at that time and is now called "PlayStation 1").

The following is verbose not to be condescending, just for completeness. If you've traced out the PIO signals then I assume you know at least the basics of what's involved so many details are more for the benefit of others.

You're right that the pins for the PIO port remain on the CPU, have test points and AFAIK they're fully functional. The problem is that Sony removed the 2 "entry points" from the BIOS code. The 2 functions that checked the PIO port for "Licensed by Sony Computer Entertainment Inc."(IIRC that was the license string) were removed from the BIOS so it doesn't matter even if you have a fully operational PIO port, it's not going to be used. You could of course patch the BIOS to add those functions back and call them in the appropriate places(just after the BIOS code has configured the SBUS and caches for the "reset"(my name for it due to when it gets called) entry point and just before starting the "shell"(the iconic startup application that anybody who's ever witnessed a PS1 being turned on would recognize from the sound if not the image and includes the Memory Card manager/CD audio player screens) in the case of the "boot"(my name, same reasons as "reset") entry point. Patching the BIOS would require replacing the "boot ROM"("BIOS") mask ROM IC on the PSOne of course. Since the boot ROM, PIO and a few other things all share the SBUS and only have unique /CS(chip select) signals(/CS0 for PIO, /CS2 for boot ROM), SBUS /RD, /WR, A0-A19, D0-D7(no D8-15 but nobody uses 16-bit accesses for anything but the SPU anyway, AFAIK) are all common to PIO and boot ROM so using some form of wiring to attach your flash memory or whatever you use for a boot "ROM" would provide all those common signals and you'd only be missing A20-A23(as desired), /CS0 for PIO and maybe /SYSRST or whatever it was called and maybe the "8V"(usually ~7.5-7.8V). AFAIK only 3rd party hardware makes use of any other signals like the I2S signals for CDDA. I only know of "PSIO" and 1 other unofficial project that's still a WIP in fact. So you shouldn't need anything else in most cases.

TL;DR cuz the BIOS lacks support for the PIO. Makes sense since they dropped support for the port itself starting with the SCPH-900x and PSOne was a major overhaul anyway so a good time to introduce such a change in system operation. The 900x likely only still had support in the BIOS because they didn't want to have to test for incompatibilities with existing software and peripherals. The PS1 BIOS(including the one in the PS2 for PS1 mode) continued to include the setup for the CS0/PIO device mapping at memory address 0x1F000000 as before but in PS2 they reduced the size to something like 0x20 bytes long or something like that, IIRC. I'm not 100% sure but IIRC there is not actually any physical representation of /CS0 on the IOP within the PS2 anyway, even if there was support for PIO in the BIOS in the first place. I could be wrong about that and would appreciate it if someone let me know if that's the case.

Re: Adding PIO to a PSOne

Posted: February 18th, 2020, 11:04 am
by asmblur
Oh, a couple notes. "8V" is used by Action Replay and such to produce +5V(usually with a regulator but some cheap clones use diode "hack" to achieve that instead). So while "3V"(usually 3.3V-3.5V but IIRC they call it "3V") is often used to power the EEPROM/flash IC and some other hardware on some PIO cards, they frequently also need the "8V" as well. Just a heads-up for anyone looking to add a minimal connection for AR and such.