Skip to content

[WIP] Add RP2040 support#101

Open
JPZV wants to merge 2 commits intokalymos:PSNee-8.7.0from
JPZV:PSNee-8.7.0
Open

[WIP] Add RP2040 support#101
JPZV wants to merge 2 commits intokalymos:PSNee-8.7.0from
JPZV:PSNee-8.7.0

Conversation

@JPZV
Copy link
Copy Markdown

@JPZV JPZV commented Mar 18, 2026

Description

This add support for the RP2040, which also adds support to many dev-boards like the Raspberry Pi Pico (official dev board) and many many many Chinese clones. There are some of them at the same size of a ATTiny85 dev-board and extremely cheap too, but with the powerhouse of multiples Arduino Uno

Changes

To the moment, I just added the MCU defines. No main code was touched except for the main() function because I'm using the default "Arduino" bootloader for the RP2040. I mimicked the AVR functions with some from the Pico SDK. I'm not sure if there would be any issue with timing but, if there could be, then we could use PIO.

Testings

I used the WeAct studio dev-board (full size dev-board, almost the same as the official one) and the RP2040-Zero (micro size dev-board, just like a ATTiny85 dev-board). For the console, I used the SCPH-9001 with PU-23 (1-674-987-51). I also plan to use some PM-41 but I'm waiting for the disc drive replacement.

Compiling

Beside from Arduino (core), you also need to have the arduino-pico boards installed. Then, for the board, you have to select Raspberry Pi Pico (2040) even if you're using a Chinese clone available from the list. The rest you have to leave it with the default values.

If you're using Visual Studio Code, then you can use this arduino.json:

{
    "sketch": "PSNee/PSNee.ino",
    "configuration": "flash=2097152_0,freq=200,opt=Small,os=none,profile=Disabled,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,ipbtstack=ipv4only,uploadmethod=default",
    "board": "rp2040:rp2040:rpipico",
    "output": "./.build"
}

Pinout

The used pins are from 4 to 11 (both included), wired as below:

Usage GPIO
DATA GPIO4
WFCK GPIO5
SQCK GPIO6
SUBQ GPIO7
AX GPIO8
DX GPIO9
AY GPIO10
Switch GPIO11

Testing results

For now I've tested the boot up sequence. I managed to display the PS logo with the SCEA banner, then followed with a black screen (not sure if this was because an issue with PSNee, with my console, or with the disc itself, I'm still digging about that). Though it was a 50/50 for now, as the first boot-up it seems to skip the PSNee and just went right into the Memory Card manager (as if the lid was open), but after pressing the Reset button (the small button of the PS Fat) it went directly into the PS Logo.

I have to do further testing with another disc and check if this was an isolated error or if I have to improve the bootloader

TODO list

  • Implement BIOS Patching (Pinout is defined, but not tested)
  • Test selecting exact board model instead of using SCPH-XXXX
  • Test with PM-41
  • Get almost 100% of fidelity just like with the Arduino Uno/ATmega328P

JPZV added 2 commits March 16, 2026 00:55
Otherwise the Debug_Log wouldn't never be called. Because the while is the last operation, this should affect any performance (maybe except if PSNEE_DEBUG_SERIAL_MONITOR is enabled)
@kalymos
Copy link
Copy Markdown
Owner

kalymos commented Mar 18, 2026

Hello,

I'm also interested in developing a specific version of PsNee for Pico devices, with support for PIO functions for input/output management. This will allow for much cleaner behavior at the BIOS patch level.

PIO support will require a significant modification of the algorithms, making the version incompatible with the standard one. Therefore, I was thinking of creating a dedicated directory for this version.

I also envisioned enabling mode configuration after compilation and injection.

And the last thing I really wanted was to be able to compile everything under different operating systems, using a unified method.

But for now, I need to finish debugging version 8.7 (there's not much left to do, but the devil is in the details). Once that's done, I can create the new directory with a clean codebase.

In the meantime, I hope I haven't discouraged you, and I hope we can collaborate on this project.

@JPZV
Copy link
Copy Markdown
Author

JPZV commented Mar 19, 2026

That is actually good news!!! Before doing this I searched about running PSNee on a RP2040, but the only project was from three years ago (?) and it was left away, that's why I tried to do it myself as I'm repairing a junk of PSX console (one SCPH-9001 and many PSOnes tho) and I have a bunch of RP2040-based devices from other projects.

Right now I don't have the right tools for debugging, but I'll try to help as many as possible.

And the last thing I really wanted was to be able to compile everything under different operating systems, using a unified method.

You could use Docker. Maybe a Linux based image with Arduino-cli and a bash script for setting the needed flags (MCU, Motherboard, BIOS patching, etc). The only issue is that it seems you cannot connect to a serial device within Docker on MacOS, but at least it should work on Linux and Windows (in theory)

@nmanzi
Copy link
Copy Markdown

nmanzi commented Mar 19, 2026

Hey, I’ve taken a crack at this myself - might be helpful here. Happy to assist if needed.
https://github.com/nmanzi/PsNeePIO

@kalymos
Copy link
Copy Markdown
Owner

kalymos commented Mar 19, 2026

For portability, we could consider using Arduino with the board manager https://github.com/earlephilhower/arduino-pico. I haven't tested this solution extensively yet, but apparently the implementation works reasonably well.

Since you might be interested in getting your hands dirty, I'm considering putting all the BIOS patch functions in the PSNee file and keeping only three main files: PSNee, MCU, and settings. I was also thinking of renaming the branch to V9, as it's no longer very similar to V8. Please feel free to share your thoughts, because after digging around on my own, I'm starting to lose track of what's going on;)

@sukibaby
Copy link
Copy Markdown

sukibaby commented Mar 19, 2026

For portability, we could consider using Arduino with the board manager https://github.com/earlephilhower/arduino-pico. I haven't tested this solution extensively yet, but apparently the implementation works reasonably well.

In another project I've used the above mentioned https://github.com/earlephilhower/arduino-pico and it works very well and is stable. I definitely support using the Arduino board manager!

I found PsNeePIO recently to use some RP2040 before I had more Arudino to use. The UART stuff it advertised wasn't working when I tried it, so I disabled the UART option and then it worked as normal. With a few small edits, it could also be built on Raspberry Pi Pico rather than RP2040-Zero.

I took out those RP2040 when I received ATtinyx5 in the mail, so I'm not using that setup anymore, but I think supporting arduino-pico via board manager is a great goal :)

@kalymos
Copy link
Copy Markdown
Owner

kalymos commented Apr 19, 2026

I just pushed V9 to master.

With the current code structure, I think it will be much easier to do a high-quality port (I think I'll set aside the ARV architecture a bit because I'm reaching the limits of what we can get out of it, so I won't be making any major contributions in that area).

I have a few questions for anyone interested: How do you envision structuring this? What repository should we use? Should I create a new one, or is someone motivated to tackle this for the next few years? ;) Also, if we create a new one, we need to find a catchy name for it; I suggest Playstation System Nee Extended Experience, P.S.N.E.E ;)

@kalymos
Copy link
Copy Markdown
Owner

kalymos commented Apr 20, 2026

Nop, Playstation System Nee Extended Experience Recursive Project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants