• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

Author Topic: New game ported - Roadfighter  (Read 5792 times)

thaloi (OP)

  • Posts: 3
New game ported - Roadfighter
« on: October 28, 2016, 05:34:37 am »
I have just finished porting a remake of RoadFighter to the GCW0.

See here for original game: http://www2.braingames.getput.com/roadf/
(the original website is down as of oct-2016)
You can find a copy of the git repo here(not my patched version): https://github.com/ptitSeb/roadfighter

The following changes were made to make the game run:

1. Add X-OD-NeedsDownscaling=true to the desktop file
2. Remap the fire button from Y to A button
3. Convert ogg files to wav.

The resulting OPK is rather large because the music files are big. The original games use vorbis OGG files, but the game crashes with "Illegal instruction". I suppose the problem is in the libvorbis library. Some issue with cross compilation to MIPS. Also SDL MP3 files are not supported on the GCW0 so I had to use WAV files.

The OPK can be downloaded here: http://www.mediafire.com/file/zifq9z0on7kqzr8/roadfighter.opk

UPDATE: new OPK with ogg files. (smaller file size) https://www.mediafire.com/?he4a2tmhffg59i5


Enjoy!
« Last Edit: November 17, 2016, 04:22:40 am by thaloi »

congusbongus

  • Posts: 80
    • congusbongusgames
Re: New game ported - Roadfighter
« Reply #1 on: October 28, 2016, 06:31:21 am »
The game is using SDL_mixer to load and play .ogg music, which works fine on GCW0. Are you sure it's not some other problem?

thaloi (OP)

  • Posts: 3
Re: New game ported - Roadfighter
« Reply #2 on: October 28, 2016, 06:42:31 am »
What I can determine is that is crashes in Mix_LoadWAV(), which is inside SDL. I'll do some more debugging when I have time.

Swarmadd

  • Posts: 18
Re: New game ported - Roadfighter
« Reply #3 on: October 28, 2016, 01:33:20 pm »
I don't do coding, but maybe this ogg problem is the same I had with Temper here. It concerned a problematic libogg, then gameblabla bundled tremor into the emulator and it fixed it.
Trying to contribute ^^
« Last Edit: October 28, 2016, 01:37:53 pm by Swarmadd »

Senor Quack

  • Posts: 225
Re: New game ported - Roadfighter
« Reply #4 on: October 29, 2016, 06:48:23 am »
The resulting OPK is rather large because the music files are big. The original games use vorbis OGG files, but the game crashes with "Illegal instruction". I suppose the problem is in the libvorbis library. Some issue with cross compilation to MIPS. Also SDL MP3 files are not supported on the GCW0 so I had to use WAV files.

Hi, I ran 'ogginfo' command on the original OGG files and on some of them, it said the following error multiple times:
'Negative or zero granulepos (-1) on Vorbis stream outside of headers. This file was created by a buggy encoder'

So, I issued the following UNIX command to rewrite the OGG files' metadata, but preserving the original quality by not re-compressing the audio:
for i in *.ogg; do ffmpeg -i $i -c:a copy fixed_oggs/$i ; done

'ogginfo' utility no longer reports any errors. Note that to run this fix youtself on a UNIX system, you must install the 'ffmpeg' package.  But you don't have to, as I have included a .7z containing the new OGGs if you want to try them out, I'm curious if they fix the problem. I didn't include the .WAV files, so don't forget to copy those over too.  Fixed oggs: https://drive.google.com/open?id=0B5tSn03yRsHvTWUtS2pSV2l1cDA
« Last Edit: October 29, 2016, 06:53:53 am by Senor Quack »

mth

  • Posts: 319
Re: New game ported - Roadfighter
« Reply #5 on: October 29, 2016, 02:07:18 pm »
I don't do coding, but maybe this ogg problem is the same I had with Temper here. It concerned a problematic libogg, then gameblabla bundled tremor into the emulator and it fixed it.
Trying to contribute ^^

Tremor is already available in the GCW Zero rootfs as "libvorbisidec.so" (the "idec" stands for "integer decoder").

congusbongus

  • Posts: 80
    • congusbongusgames
Re: New game ported - Roadfighter
« Reply #6 on: October 30, 2016, 08:11:20 am »

'ogginfo' utility no longer reports any errors. Note that to run this fix youtself on a UNIX system, you must install the 'ffmpeg' package.  But you don't have to, as I have included a .7z containing the new OGGs if you want to try them out, I'm curious if they fix the problem. I didn't include the .WAV files, so don't forget to copy those over too.  Fixed oggs: https://drive.google.com/open?id=0B5tSn03yRsHvTWUtS2pSV2l1cDA

Nice; you should send the fix upstream to https://github.com/ptitSeb/roadfighter too

thaloi (OP)

  • Posts: 3
Re: New game ported - Roadfighter
« Reply #7 on: November 17, 2016, 04:19:52 am »
Thank you all for your suggestions.

What worked was linking against the fixed point version of the libvorbis library. The fixed oggs didn't help but I included them in the new package (better than broken oggs  ;) )

Here is the link to the new version:

https://www.mediafire.com/?he4a2tmhffg59i5

Cheers.

 

Post a new topic
Post a new topic