
ProjectPSX – A C# coded emulator of the original Playstation - eatonphil
https://github.com/BluestormDNA/ProjectPSX
======
rvz
> ProjectPSX dosn't use any external dependency and uses rather simplistic C#
> code.

Very impressive. This makes it more interesting to see how the drawing code
and the controls were implemented in addition to the possibility of it being
cross-platform if it using .NET Core.

~~~
cosarara
It uses System.Windows.Forms and friends. It is a Windows app.

~~~
btown
[https://www.mono-project.com/docs/gui/winforms/](https://www.mono-
project.com/docs/gui/winforms/) might allow this to be ported easily though.

~~~
xmichael999
winforms on mono never really worked, and hasn't been updated in about 12
years [https://github.com/mono/winforms](https://github.com/mono/winforms)

------
gwbas1c
As a day-to-day C# developer, I'm curious about a few things:

\- Do you ever find that the Garbage Collector causes noticeable pausing in
the emulator?

\- Did you do this with 100% managed memory, or do you need to use unsafe code
/ real pointers?

(Apologies that I didn't read the source code.)

~~~
BluestormDNA
Hello There, I'm the owner of this repo. So nice that has ended here somehow.
Gonna answer the upper quests...

\- Do you ever find that the Garbage Collector causes noticeable pausing in
the emulator?

The GC dosn't cause noticeable pausing on my setup. Even tho it could allocate
less.

\- Did you do this with 100% managed memory, or do you need to use unsafe code
/ real pointers?

In fact it was done without unsafe code or pointers till some of the latest
commits. Where i switched to unsafe because performance reasons. On my setup
that was arround 10 fps more.

~~~
jmkni
Incredible work, congrats!

------
numlock86
This is great. It would be almost perfect if it didn't rely on WinForms (1)
and was built on .NET core from the ground up. Anyway, great project I will
keep checking out.

(1) instead it could be a runtime that just gives you an interface to the
frame buffer somehow and it's up to the integrator to use WinForms/WPF/Qt etc.

~~~
BluestormDNA
That's a very nice idea. I went with WinForms as it was the "stupid easy way"
infact on the first i just updated a PictureBox.

There was a time when i had a SDL multiplatform branch but it was noticeably
slower so i didn't put much effort on it and it ended deleted.

I mainly focused on the core PSX things and not much on the program itself
like the emulator window itself...

~~~
lostgame
>> I mainly focused on the core PSX things and not much on the program itself
like the emulator window itself...

As you should. Core functionality always comes first. UI can always be messed
about with after, when it 'just works'.

Also, fantastic work, here! :)

------
voctor
And one in Java:
[https://github.com/kilograham/jpsx](https://github.com/kilograham/jpsx)

~~~
totallynotcool
Having a problem finding the "one line" version. Mind directly linking to it?

[https://github.com/kilograham/jpsx/tree/master/src](https://github.com/kilograham/jpsx/tree/master/src)

~~~
penagwin
I think you miss read his comment

------
pjmlp
Great job! We need more such examples in managed languages.

------
michannne
Very, very cool. Good job! I remember tackling emulating the 6502 was a crazy
learning experience, but I did that in C++, but definitely there is value in
emulating something this complex in C#. Did you choose emulation because it
was interesting or it just seemed to provide the best learning environment for
what you were looking for? And have you ever dabbled in PSP emulation? I tried
my hands years ago and still have a PSP sitting around with some homebrew I
made.

------
mattlondon
This is great! I've often wondered how emulators are actually written - I
understand the theory but it was great to see this, and the linked other
emulators this person has also worked on (chip8, gameboy etc).

Super nice and simple to read - e.g. cpu.cs has the thing that does the actual
"MUL" and "MOV" etc op codes. Nice :-)

Thanks :-)

------
mastrsushi
I'd avoid a name like ProjectPSX to be more distinct from the 100 other PSX
emu projects.

PSX.NET or PSX# would be good.

~~~
BluestormDNA
Ey, those are real cool names. The name itself was chosen because i already
had a ProjectDMG (Gameboy emulator)... I may go with PSX.net when net core 3.0
goes out...

~~~
mastrsushi
They may sound cool but they aren't original lol. Open source C# projects like
Paint.NET often take on that convention.

This might sound weird, but make sure .NET is capitalized otherwise people
might mistake your project for a website.

------
mscasts
Very cool work, good job!

------
lightedman
No external dependencies? So this thing includes the BIOS?

