Live data from Hacker News

ProjectPSX – A C# coded emulator of the original Playstation

github.com

31–40 of 62 posts

Re: ProjectPSX – A C# coded emulator of the original Playstation

#31

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.

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...

Re: ProjectPSX – A C# coded emulator of the original Playstation

#32
post #7

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.)

I skimmed the code a little and did a few Github searches on it and it looks like the only unsafe blocks of code are in the core data bus. It's not entirely clear why it was done that way, as the CPU itself is using managed arrays to represent memory. Perhaps it was necessary for speed, as it seems primarily concerned with loading the executables that are to be emulated. Otherwise, everything looks statically allocat…

A rather useful pattern in C# is to load a blob into a byte array, then inside unsafe code, typecast it to a pointer to well-defined struct.

There's also managed ways to do that, but they are slower and involve copying memory.

Re: ProjectPSX – A C# coded emulator of the original Playstation

#33
post #4

> 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.

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

Re: ProjectPSX – A C# coded emulator of the original Playstation

#35
post #23

Earlier quoted context omitted.

> We'll probably see something new on that front soon MS has no interest in this space [0]. Your best bet at this moment is Electron or other open source alternates like eto forms. [0] - Scott hunter's .net rocks podcast. The related commentary is past 30 mins from beginning of the show - https://www.dotnetrocks.com/?show=1634

That is outdated. They were running a developer survey about that I bet our outcries are getting too loud in Redmond. Similar to those of us not bothering with Core until key frameworks got ported. https://devblogs.microsoft.com/dotnet/calling-all-net-deskto...

They made a survey but that doesn’t mean they will listen to the feedback.

Re: ProjectPSX – A C# coded emulator of the original Playstation

#36
post #23

Earlier quoted context omitted.

That is outdated. They were running a developer survey about that I bet our outcries are getting too loud in Redmond. Similar to those of us not bothering with Core until key frameworks got ported. https://devblogs.microsoft.com/dotnet/calling-all-net-deskto...

They made a survey but that doesn’t mean they will listen to the feedback.

Windows Forms, WPF, C++/CLI, EF 6, .NET Native, WinUI kind of prove that they do, even if it takes a while to actually pay attention.

Even in regards to WCF, I am not sure if they won't be forced to provide some gRPC migration path, when some Fortune 500 start to complain rather loudly.

Re: ProjectPSX – A C# coded emulator of the original Playstation

#37

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.

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...

Re: ProjectPSX – A C# coded emulator of the original Playstation

#38
post #4

> 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.

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

https://www.mono-project.com/docs/gui/winforms/ might allow this to be ported easily though.

Re: ProjectPSX – A C# coded emulator of the original Playstation

#39

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.

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...

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.

Re: ProjectPSX – A C# coded emulator of the original Playstation

#40

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.

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...

>> 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! :)

Post reply on HN