phoboslab / wipeout-rewrite

2.6k stars 198 forks source link

Nokia N-Gage port #107

Closed mupfdev closed 7 months ago

mupfdev commented 7 months ago

Heya!

I am currently working on a port for the Nokia N-Gage. Are you interested in a PR if I can get it running?

Since I'm relying on a very old toolchain, I have to make the entire code C89-compatible. This is very portable and should also work for the other platforms, but you would have to give up the conveniences of C99.

Just so I know how much I need to pay attention to compatibility with the currently supported platforms.

If this is not desired, I will simply stay on my fork.

Best regards, Michael

phoboslab commented 7 months ago

Very cool! But I'm sorry to say that I don't want to give up the niceties of C99. My main goal here was to make it run on modern hardware.

I'll happily add a link to your fork in the readme!

mupfdev commented 7 months ago

Perfect. :)

mupfdev commented 7 months ago

One last question, since the N-Gage has no FPU like the PSX, I would like to use the fixed math of the original source code. What do I have to pay attention to?

And are you on Discord? I'm sure I have one or two more detailed questions.

phoboslab commented 7 months ago

Instead of working on top of this rewrite, maybe you're better off starting with the original source leak and pulling over some things from here. The whole fixed point to float conversion runs really deep. The physics of the ships and weapons are especially convoluted, using different precisions for different things. But now, there's also a lot of float usage in the sound code, timing, rendering and other parts of the game.

I'm sure you could build a general soft-float abstraction that is fast enough for all the physics (not a lot of compute needed here), but sound mixing and rendering probably have to be changed back to proper ints again for performance reasons.

And are you on Discord? I'm sure I have one or two more detailed questions.

I much prefer async communication. So either here, or via mail.

mupfdev commented 6 months ago

Not sure yet whether I wanna enter this world of pain or not. I think I'll finish it first - as a proof of concept, so to speak.

mupfdev commented 6 months ago

I have it working, at least for a few seconds in the emulator. Still a lot of debugging ahead.

However, since I'm using the software renderer, everything is displayed as wireframes. Is this intentional?

phoboslab commented 6 months ago

Amazing. Would love to see some screenshots or photos :]

Yes, the software renderer is only wireframe. It's just a proof of concept, to see if the renderer abstraction really allows multiple backends. (rel: https://twitter.com/phoboslab/status/1691916934638649719)

Since the very same question came up in another issue (https://github.com/phoboslab/wipeout-rewrite/issues/21#issuecomment-1858924258), I guess I should put this in the readme. Or flesh out the sw renderer...

mupfdev commented 6 months ago

Here you go. :)

image-29

mupfdev commented 6 months ago

The problem is that the emulator does not care about memory restrictions etc.

I haven't managed to get it to work on real hardware (yet).