h4mu / rott94

Rise of the Triad source port to SDL2, Android and WinRT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to have music?

vanfanel opened this issue · comments

Hi there, Tamas!

I have discovered your ROTT SDL2 port, and it runs great on the Raspberry Pi thanks to being an excellent SDL2 port, so it gets "free" hardware fullscreen scaling via GLES2 renderer in SDL2. Good! :D

However, I miss ROTT's trademark cheesy music. I see no mention on the README.md or original docs, and looking at the code I don't see any OPL emulation or support for OGGs. etc.
Is this planned somehow?

Thanks!

Hi Manuel,

Thanks for the kind words, I'm glad you like it. The music is working for me, do other apps have sound, do you have the volume settings correct? Are you running the game in a folder you have write access to? I checked the source code (dukemusc.c) and instead of playing the music from buffers the music is saved to MIDI files before being loaded and played with SDL_Mixer. According to the documentation SDL Mixer can play OGG files too if you want to change the player code in ROTT.

@h4mu I got it to work, it's a matter of building SDL2_Mixer with Timidity support and that's it, music plays thru SDL2_Mixer midi :)

Is there a way to make the game work at the original 320x240 resolution instead of 640x480 that's using now? I tried to set iGLOBAL_SCREENWIDTH adn iGLOBAL_SCREENHEIGHT to 320 and 240 respectively, but it's still hi-res.
320x240 would be necessary for low-cpu machines like the Raspberry PI, where I ultimately want to have ROTT SDL2.

EDIT: Found it, passing RESOLUTION 320x200 works. However, doesn't ROTT originally work in MODE-X mode? 320x240 at ~60Hz vsync rate. That would be way better suited for modern displays, which are ~60Hz, than 320x200 ~70Hz. (Maybe I'm wrong on this one and ROTT was a 320x200@70Hz typical DOS game... )
Is there a way to specify framerate or, better yet, run in uncapped fps mode so it syncs to the monitor's vertical refresh rate?

I'd think it used Mode-X (hence the filename modexlib.c for the rendering code) but yes the height does seem to be set at 200 px. It doesn't matter much with SDL2 though as we're just rendering to a texture that gets scaled to the screen by the hardware. The screen updates are called directly from the game loop so perhaps you can add some delays in there or try to enable vertical blank in drirc or in the appropriate environment variable.

I didn't think RPi would have performance problems with it since its original hardware requirements were 386DX 40 MHz CPU :) It runs fine on my 1 GHz Allwinner A13 tablet but its screen doesn't have a big resolution.

@h4mu : Thing is, what's the intended framerate of this game? DOS Doom for example is 35FPS... Is ROTT the same? Can it be "convinced" to run at a different framerate?

I don't know, sorry.