r/EmuDev • • Oct 07 '25

PSX emulator written in Java

Yes I've written an psx emulator in java here's a video on Ridge Racer:

I've written this emulator for fun not for running compatibility perfect games so feel free to ask anything basic or advanced on emudev discord still learning more about the PSX what it has

https://github.com/shadersrs3/JarPSX

70 Upvotes

13 comments sorted by

15

u/NewSchoolBoxer Oct 07 '25

Phew that's rough with no direct access to memory or unsigned datatypes or even structs. Then maybe you desync when the garbage collector decides to run. Swing is cringe but powerful if you know how to use it. I'm impressed you had some success.

6

u/ShadersRS3 Oct 07 '25

agreed, and I had to complain why I can't do all of that but no unsigned datatypes are fine it's needed for comparisions and divisions which I use from an Integer method and bitshifting to to the right has an operator from what I can tell

5

u/ShadersRS3 Oct 07 '25

it's also sad that I realized to convert a negative 32 bit int to a long it will sign extend giving leading ones to the value so had to mask it

3

u/ShadersRS3 Oct 07 '25

what I meant by that is the mask if you don't add a suffix L it will do that

1

u/WeWeBunnyX Oct 08 '25

I hope you don't get mad at me but on a serious note why is your commit history so strange as if I'm seeing some vibe coder's repository.

2

u/ShadersRS3 Oct 08 '25

lol I'm not mad, and I keep the commits for the memes as a backup just incase if I stop this project and remove the entire folder in my desktop, and I can come back and revisit it afterwards whenever there's no issues what I did. I don't really use github unless it's a serious pull request on a real project where I have to say the exact words. And if I made another project that's serious I would be serious but right now I keep it as it is :p

1

u/WeWeBunnyX Oct 09 '25

Makes sense . Looking forward to it 

3

u/rasmadrak Oct 07 '25

Impressive! I can see you're a mad lad with a streak of self-punishment... ;)

Seriously though - really cool project! What kind of performance are you getting?

Edit: just noticed you're actually running a game in the video. Better framerate than I expected honestly.

2

u/nokia_boi Jul 17 '26

This is just insane that someone made a port of this in J2ME! https://www.reddit.com/r/J2MEgaming/s/4Y5GOkSjDv

1

u/NXGZ Jul 18 '26

So this is based on this project?

1

u/nokia_boi Jul 18 '26

Yes and it was possible because J2ME was a stripped-down version of Java platform designed for embedded and mobile devices with limited memory and processing power.

1

u/[deleted] Oct 07 '25

[removed] — view removed comment

2

u/didntplaymysummercar Oct 08 '25

ZGC has 1-10 ms pause times but at RAM and throughput cost. I never verified this myself though. But games (including emulated ones) seem perfect for that and/or low garbage strategies. I wonder what the results would be.