Release Cannonball - The Enhanced C++ Outrun Engine


Updated the version with the latest v0.121 code.

The attract mode as a smarter AI, and there is a new View mode. Use Left Shoulder to switch from Standard view to High view and to In Car view :)

0.2.0.20

  • Based on v0.121 of official version
  • New "View mode" (standard, high, in car), switch with Left Shoulder
  • New attract mode AI, the demo mode driver is smarter
 
For porting to raspberry pi:


Keep in mind, that this doesn't use the graphics hardware and the pi has a weaker and older arm cpu. It wouldn't surprise me if that is the problem.


In terms of cpu power the pi will be a lot slower.
 
So huge !!!

Btw did you ask for the sound and effects volumes ? Was playing with a headphone, and i really wished to be able to diminish motor noise ;^) .
 
For porting to raspberry pi:


Keep in mind, that this doesn't use the graphics hardware and the pi has a weaker and older arm cpu. It wouldn't surprise me if that is the problem.


In terms of cpu power the pi will be a lot slower.
With my frameskip code, it should be playable on the pi.

So huge !!!

Btw did you ask for the sound and effects volumes ? Was playing with a headphone, and i really wished to be able to diminish motor noise ;^) .
Oops, no I forgot. I'll message the author tomorow :)
 
The Raspberry Pi has a weak CPU, but you can run the game in 320x244 video mode and then have the GPU scale to whatever physical resolution your monitor uses, by using my dispmanx (native Rpi 2D graphics API) backend :

https://github.com/vanfanel/SDL12-kms-dispmanx

So, for me, it's fullspeed, with no stuttering at all, at 30FPS. As soon as I can merge ptitSeb's optimizations again, I'll make a proper release.

ptitSeb: Have you done any additional optimizations over December version? I'm specially interested in the scaling code optimizations you may have done.
 
Last edited by a moderator:
The Raspberry Pi has a weak CPU, but you can run the game in 320x244 video mode and then have the GPU scale to whatever physical resolution your monitor uses, by using my dispmanx (native Rpi 2D graphics API) backend :

https://github.com/vanfanel/SDL12-kms-dispmanx

So, for me, it's fullspeed, with no stuttering at all, at 30FPS. As soon as I can merge ptitSeb's optimizations again, I'll make a proper release.

ptitSeb: Have you done any additional optimizations over December version? I'm specially interested in the scaling code optimizations you may have done.
I haven't added optimization, but I added autoframeskip, so no more stutering :) . I'll put a diff in here, based on the latest git version (that added different view that are cool too).

Here is the diff, wich I cleaned from C4A and Pandora specifics control. Hope it works: pandora3.txt

PS:  From the last analysis I did on this one, the main bottleneck (on the Pandora at least), is the conversion between the Game FB that is a big buffer with indexed color (on a 4096 palette that is 4096*2 to handle higlight and shadows) to the RGB(A) SDL Buffer. I think the Palette grabbing per pixel kills the cache... And I haven't found an easy way to do this calculation on the fly, because of the shadow/highlight...
 

Attachments

  • pandora3.txt
    26.5 KB · Views: 254
Last edited by a moderator:
New update on the repo. I finaly ported latest version with the Continuous mode (you play all the level without choosing left or right).

The other new thing is the OpenGL mode. For the Pandora, I ported it to GLES, and I used the Texture Streaming extension of the SGX chip. This extension is quite experimental in fact (the driver calls itself "Example Bufferclass Device (SW)" on a Gigahertz model).

Note that I need the "bc_cat" driver that doesn't seems to be installed in default driver, so you'll need a non-default driver (using Notaz SGX Driver PND) to install another one (maybe the driver will be installed by default with a future firmware?). Note that the game will fallback to not using the extension if the driver is not present, but the speed will not be good (there is warning at the start).

On a Gigahertz model, using 4.03.00.02 drivers, I got very good result, using HiRes and 60fps, the gameplay was smooth.

On a CC, with the 4.00.1414 (I think, the one before the default), it worked, but a bit too slow for HiRes & 60 fps. With the 4.03 series, the game start but hang after a few seconds...

Also, note that changing Video settings reset the video, but the bc_cat driver is not reinitialized properly, thus the Texture Streaming ins disabled, so save your settings and quit than relaunch to have Streaming Acceleration again.

Long story short, it is experimental, but may be promising (for other emus or video streaming), but I would like some feedback to see if it works on many Pandora or just mine before investing more time in this.

For the curious, here is the current diff (warning, it's quite ugly): 

0.2.1.21

  • Based on v0.122 of official version
  • New Continuous mode
  • New GLES Experimental mode, with Texture Streaming (work best on Gigahertz model with non-default driver)
 

Attachments

  • streaming.tar.gz
    12.6 KB · Views: 212
Last edited by a moderator:
I'll try this ASAP

OT: maybe, do you know why everything I compile with codeblocks that require "libiconv" always searches for it in /usr/lib ? even if LD_LIBRARY_PATH is set and ALL the others libs are found where I set them to be found ?! this is making me crazy... it's the fourth program that I can't release because of this issue
 
I'll try this ASAP


OT: maybe, do you know why everything I compile with codeblocks that require "libiconv" always searches for it in /usr/lib ? even if LD_LIBRARY_PATH is set and ALL the others libs are found where I set them to be found ?! this is making me crazy... it's the fourth program that I can't release because of this issue
Strange. Did you try to recompile libiconv yourself? (I have to finish that v2 of codeblocks, no libiconv issue with my current version).
 
No, i can't.

I'm not sure rom patching is now necessary.

=======================================================================================
PND             : /media/SD32/pandora/menu/cannonball.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/SD32/pandora/appdata/cannonball
APPDD_FSTYPE    : vfat
PND_CPUSPEED    : <unset>
EXENAME         : cannonball.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/cannonball"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/SD32/pandora/appdata/cannonball=rw+nolwh":"/mnt/pnd/cannonball=rr" none "/mnt/utmp/cannonball"
[sUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application ( cannonball.sh  ) ----------
--------------------------------------------------------------
Setting PATH to /mnt/utmp/cannonball:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
./cannonball.sh: line 140: [: too many arguments
omapsdl: opened tslib touchscreen
omapsdl: in_evdev: found "keypad" with 84 events (type 00100013)
omapsdl: in_evdev: found "gpio-keys" with 16 events (type 00000023)
omapsdl: skip /dev/input/event5 as ts
omapsdl: found 3 evdev device(s).
omapsdl: detected 800x480 'lcd' (0) screen attached to fb 1 and overlay 1
epr-10383b.117 has incorrect checksum.
Expected: 10a2014a Found: 28a5e93e
epr-10380b.133 has incorrect checksum.
Expected: 1f6cadad Found: 90e6ecec
epr-10382b.118 has incorrect checksum.
Expected: c4c3fa1a Found: e227af3c
opr-10188.71 has incorrect checksum.
Expected: bad30ad9 Found: 37598616
fbdev: switching to 796x448@32
fbdev: /dev/fb1: 796x448@32
fbdev initialized.
xenv: X vendor: The X.Org Foundation, rel: 10707000, display: :0.0, protocol ver: 11.0
xenv: display is 800x480
cannot open rom: opr-10188.71f
[sUCCESS]--- Starting the application ( cannonball.sh  ) ----------
[ START ]--- Restoring the frame buffer status ----------
[sUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[sUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/cannonball': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[sUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[sUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 1
 
 
No, i can't.

I'm not sure rom patching is now necessary.

=======================================================================================


PND             : /media/SD32/pandora/menu/cannonball.pnd


PND_FSTYPE      : Squashfs


APPDATADIR      : /media/SD32/pandora/appdata/cannonball


APPDD_FSTYPE    : vfat


PND_CPUSPEED    : <unset>


EXENAME         : cannonball.sh


ARGUMENTS       : <unset>


=======================================================================================


[ START ]--- Mount the PND ----------


Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/cannonball"


Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/SD32/pandora/appdata/cannonball=rw+nolwh":"/mnt/pnd/cannonball=rr" none "/mnt/utmp/cannonball"


[sUCCESS]--- Mount the PND ----------


[ START ]--- Starting the application ( cannonball.sh  ) ----------


--------------------------------------------------------------


Setting PATH to /mnt/utmp/cannonball:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games


./cannonball.sh: line 140: [: too many arguments


omapsdl: opened tslib touchscreen


omapsdl: in_evdev: found "keypad" with 84 events (type 00100013)


omapsdl: in_evdev: found "gpio-keys" with 16 events (type 00000023)


omapsdl: skip /dev/input/event5 as ts


omapsdl: found 3 evdev device(s).


omapsdl: detected 800x480 'lcd' (0) screen attached to fb 1 and overlay 1


epr-10383b.117 has incorrect checksum.


Expected: 10a2014a Found: 28a5e93e


epr-10380b.133 has incorrect checksum.


Expected: 1f6cadad Found: 90e6ecec


epr-10382b.118 has incorrect checksum.


Expected: c4c3fa1a Found: e227af3c


opr-10188.71 has incorrect checksum.


Expected: bad30ad9 Found: 37598616


fbdev: switching to 796x448@32


fbdev: /dev/fb1: 796x448@32


fbdev initialized.


xenv: X vendor: The X.Org Foundation, rel: 10707000, display: :0.0, protocol ver: 11.0


xenv: display is 800x480


cannot open rom: opr-10188.71f


[sUCCESS]--- Starting the application ( cannonball.sh  ) ----------


[ START ]--- Restoring the frame buffer status ----------


[sUCCESS]--- Restoring the frame buffer status ----------


[ START ]--- uMount the PND ----------


[ START ]--- Waiting the Union to be available ----------


[sUCCESS]--- Waiting the Union to be available ----------


auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device


rmdir: failed to remove `/mnt/utmp/cannonball': Device or resource busy


[ START ]--- Waiting the PND mount dir to be free ----------


[sUCCESS]--- Waiting the PND mount dir to be free ----------


cleanup done


[sUCCESS]--- uMount the PND ----------


=======================================================================================


Return code is : 1
Ok, I checked the code. The roms must be unpatched now.

For the PCM patch fix, only "opr-10188.71" should be patched, and the new name is "opr-10188.71f" (with a crc of 0x37598616).
 
But aren't the "fixed samples" supposed to fix the PCM, therefore making patching not necessary ?
 
Back
Top