phoboslab / wipeout-rewrite

2.63k stars 208 forks source link

Add SDL1.2 software backend for older platforms [Request] #21

Open arczi84 opened 1 year ago

arczi84 commented 1 year ago

like above

phoboslab commented 1 year ago

Not against it, just asking: what platforms are those, that have support from SDL1.2 but not SDL2.x?

dilworks commented 1 year ago

Not against it, just asking: what platforms are those, that have support from SDL1.2 but not SDL2.x?

The most obvious one would be Windows 9x.

EXL commented 1 year ago

It would be cool to have a simple software render together with SDL1.2 support but it's probably hard to implement.

>@phoboslab: Not against it, just asking: what platforms are those, that have support from SDL1.2 but not SDL2.x?

Various old platforms, such as MotoMAGX and EZX phones on Linux, N-gage on Symbian. Trying to run Wipeout using the pcsx4all emulator on a MotoMAGX phone:

https://youtu.be/TJLPbUxXoSc?t=84

Sorry for the poor video quality this was almost 15 years ago. With SDL1.2 and a software renderer it will be possible to port Wipeout to such ancient but interesting platforms.

Anyway, thank you for this great project, the https://phoboslab.org/wipegame/ page has always impressed me!

fifteenhex commented 1 year ago

The main reason for SDL1.2 seems to be old machines that don't have GL that SDL2 wants? If so please take a look at DirectFB2: https://github.com/directfb2/DirectFB2. DFB2 can run SDL2 on top of the old fbdev or raw DRM/KMS.

gameblabla commented 1 year ago

It would be useful for Opendingux-like platforms like the RS-97, RS-90, Arcade Mini... which don't have any GPU but do have SDL 1.2 available, complete with a KMSDRM backend. See here

That said, it would be more useful if the software renderer gets further (But a simple SDL 1.2 backport with GL and Software renderer as is would do)

arczi84 commented 9 months ago

Hello, thanks for making software render! I've started to work on SDL1.2 implementation and as i'm SDL1 guy I've stucked with black window screen. Here's my fork: https://github.com/arczi84/wipeout-sdl1

I'm unsure if my platform_prepare_frame() conversion is correct: https://github.com/arczi84/wipeout-sdl1/blob/ca3f2ef2d030f7924ff19ac5198bf807b2f78483/src/platform_sdl.c#L325

Any help would be appreciated in making official SDL1.2 support.

arczi84 commented 9 months ago

Got it working but appears that it's only wireframes at the moment?

gameblabla commented 9 months ago

It's only wireframe if you use the software renderer, which is normal and expected as it's not actually complete. Only OpenGL is fully implemented which is something you can still add to your SDL1 backend i suppose.

arczi84 commented 9 months ago

Yes, this is what I am working on right now.

arczi84 commented 9 months ago

My SDL1 + GL LEGACY render on PC seem to work :) obraz

arczi84 commented 9 months ago

Not sure why audio is noisy. Does it have to be float? SDL1 doesn't support AUDIO_F32.

arczi84 commented 9 months ago

Ok, converted floats to uint32_t and sounds are fine now.

arczi84 commented 9 months ago

obraz On AmigaOS!

arczi84 commented 8 months ago

Gfx looks right now, music and sounds too (had to use uint32 instead of float because no AUDIO_F32 in SDL1). But still in game much noise, ambient sounds still in float maybe?

arczi84 commented 8 months ago

obraz

arczi84 commented 8 months ago

Sound fixed. SDL 1.2 + GL on Amiga (emulated). https://www.youtube.com/watch?v=3JHCYEJNaCg