1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Release Cannonball - The Enhanced C++ Outrun Engine

Discussion in 'Software Releases' started by ptitSeb, Dec 12, 2012.

  1. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    I ported this cool project to the Pandora : a complete rewrite of Outrun in C++, based on retro engeenering the 68000 & z80 assembly roms !

    The blog is here, many stuff on Sega early AM2 games and Outrun in here !

    You still need the ROM to run this, as all SFX, GFX, Maps, etc... are still taken from the ROMs. Launch it a first time to creat appdata/cannonbal/roms then populate the folder (there is a txt file to help you).

    Speed is now good. Testing by Linux_SWAT shown that you may need to overclock to 750Mhz to enjoy the full experience with widescreen and sound.

    At 1Ghz, you can enable 60 fps or HiRes. Starting from v0.2.0.18, there is an autoframeskip, so no more stutering sound.

    I have modified a little the source code, first to make it run (if SDL_Init segfault, search for variable or function named connect, and render them "static" so they do not interfere with XWindows !).

    Controls are Pandora-friendly, and can now be setup (new with 0.1.3.07).

    Here are the default:
    DPad : Left/Right (also Up/Down in menu) or Left Nub with Analog control
    B : Accelerate or Up on Right Nub with Analog control
    X : Brake or Down on Right Nub with Analog control
    R Shoulder : Gear (switch to H/L)
    Select to add coins !
    Start to start.

    If you prefer "1" for Start and "5" for Coin à la Mame, just go to setup / control and redifined them to your taste.

    Also: M is Menu (warning, your current game is lost) and P is Pause.

    Enjoy...

    Note that the Cannonall engine correct some bugs of the original code. So, the "arches" on Stage2 are completes for example !

    Some screenshots : preview1.png and preview3.png

    And some more screenshots with Widescreen enabled : 121222-161426.png and 121222-161610.png

    And a screenshot of the new Menu: 121230-201530.png 130121-225829.png

    And a screenshot in HiRes mode: 130121-225851.png

    And an experimental GLES mode (in HiRes and with 50% scanlines): cannonball_1.png . And a video of the tilting

    https://www.youtube.com/embed/0w2shLRMJ0U?feature=oembed

    0.3.0.26
    • Based on v0.3.0 sources, with enhanced widscreen and other improvement
    • Use Fusilli client on the firmware for C4A
    • Imperfect BGM and SFX volume control
    0.2.1.25
    • Updated Fusilli client from Ziz, with fixed cached upload for large cache
    0.2.1.24
    • Using Fusilli client from Ziz, with cached upload
    0.2.1.23
    • Improved a bit Streaming Texture init for GLES mode.
    • Tilt is now parametrable in the Video option menu (GLES mode only)
    0.2.1.22
    • Fixed Streaming Texture init for GLES mode (more speed)
    • Added experimental rotation for GLES mode
    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)
    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
    0.2.0.19
    • This version should be compatible with Slackware
    0.2.0.18
    • menu screen !
    • Hiscores are saved now !
    • keys, sound, video and difficulty can now be setup via menu screen.
    • no files from Rom Rev.A required (but you can your old rom also).
    • remove no_sound version
    0.1.2.06
    • widescreen option. Enabled by default.
    • added more Pandora keys: "select" to insert-coin and "start" to start.
    • optimizations (code and compiler). Fluid at 30 fps. 60 fps almost always fluid on 1GHz.
    0.1.1.05
    • move config.xml to appdata/cannonball/home folder so it can be tweaked (with mousepad)
    • note that even if window mode is selected, Cannonball will run in fullscreen (and windows * 1 is the fastest setting)
    0.1.1.04
    • Remove VSync
    0.1.1.03
    • Some code optimisations, almost full speed on 1GHz
    0.1.1.02
    • Added Nosound executable, for a little speed gain.
    0.1.1.01
    • Initial release
     
    Last edited: Dec 28, 2015
    Tags:
  2. skeezix

    skeezix Certified Guru

    Joined:
    Mar 11, 2003
    Messages:
    8,049
    Surprised its slow! But as you say, early project.


    I love these sorts.. its slow going and tedious work, but pretty fun; I've done it for a couple of obscure games, but I always admired the "CSB4win" project where Dungeon Master and Chaos Strikes Back were rewritten, with a lot of features added.


    jeff
     
  3. ibisum

    ibisum Well-Known Member

    Joined:
    May 6, 2009
    Messages:
    1,135
    wtf, why is it so slow?
     
  4. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,956
    Last edited by a moderator: Dec 12, 2012
  5. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,956
    Tried with the upright rev.B from the 0.147 romset, i have a cannot open rom: epr-10381a.132


    We have to unzip the roms in the folder, or keep it as .zip ?


    --EDIT: tried with a .106; more rom errors.


    Also, your pnd kills thunar: can't click folders and files after that.


    --EDIT2: Ok, had to also add the rev.A roms to the already unzipped rev.B.


    The game started, pushed control (reflex from mame), the OP froze :/.
     
    Last edited by a moderator: Dec 12, 2012
  6. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    Some answers:


    Analog controls: not yet, but I have read it is planned and will be done by the Cannonball dev.


    ROMS: I don't know, I had no problem with my set (MAME PC current version), but I think one file (maybe the one you mentionned) can be found in rev. A romset.


    Stability: Have to check, don't know why it kills thunar, but I did notice some strange behavour, but not all the time, and because I was always recompile to try other things, I assume it was a temporary glitch.. I'll try with not much optim next time.


    Slow: Yes, it is slow. That's a v0.1(.1), the core is not optimised. I haven't looked much yet, but I do want it to be playable, so I will try to optimise the rendering part soon. Also, for this first release, I try all the "simple" things to get more perfs (reduce frame rate of the engine to 30 fps, use Notaz optimized SDL, don't let the Engine do the Scalling)...


    For those who want to look at it, here are the adapated sources (git v0.1.1 with some modif to make it run on the OpenPandora, and with the Pandora buttons)

    cannonbal.zip
     

    Attached Files:

    Last edited by a moderator: Dec 13, 2012
  7. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,956
    Solved my rom pb (see above).


    Whichever button i push, my CC OP freeze TT.
     
  8. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    oh :(


    Let me recompile with less optims maybe (I didn't notice any differences anyway)...


    Try this one : cannonball.pnd. it's compiled with "-O -g" instead of "-O2" (or was it -O4, I don't remember).


    But may be it is because it's rening to slow, and you need to overclock a bit? I am running at 1GHz, not 600MHz. Don't know...
     

    Attached Files:

    Last edited by a moderator: Dec 12, 2012
  9. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    Also, I can try to disable Sound as a temporary measure, to speed up think. It's precompile option, so I will need 2 executable, and 2 menu in the PND... I will try that to see if the speed is good.


    Again, this is just for experimenting (but this the the right section for that I guess)
     
  10. skeezix

    skeezix Certified Guru

    Joined:
    Mar 11, 2003
    Messages:
    8,049
    Disable rendering entirely (add an #if0/#endif wrapper, that sort of easy thing) and see how many fps you get :) If you can get a good fps without rendering, then at least you know where the bottleneck is :)


    jeff

    -g is for debug symbols; if you dont' plan on debugging it, drop the -g.


    Are you putting in the other optims that are handy for pandora?


    You using onboard gcc, or codesourcery or the like?


    A common cflags/cxxflags people use is:


    CFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fno-inline-functions" CXXFLAGS="-DPANDORA -O2 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fno-inline-functions"


    jeff
     
  11. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    Thanks Skeezix.


    I will play with all this... Sound & Rendering, to see where the bootleneck is..


    For CXXFLAGS (cannonball use this one exclusivelly, if I understoed makefiles/cmake correctly)


    I used this


    CXXFLAGS="-O2 -pipe -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp"


    and I change -O2 to a "-O -g" when I want to be safe about optims. I'll drop "-g" for .PND packaging, looks useless for games.


    I will update my optims with your's, I see I missed a few ones...
     
    Last edited by a moderator: Dec 12, 2012
  12. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    Here is a new version of the PND with 2 entries. One with sound (same as above), and one without. It feel smoother without sound... I will now try to optimize things a bit...

    cannonball.pnd
     

    Attached Files:

  13. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,956
    New versions don't freeze my OP ^^. (forgot to check thunar).


    Sound seems only a tiny bit slower.
     
  14. captain_coconut

    captain_coconut Member

    Joined:
    Oct 9, 2008
    Messages:
    132
    Why -fno-inline-functions? Why would this be faster?
     
  15. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    Ok, I added in 1st Post a new PND that is faster. With my overclocked (1GHz) Rebirth, it's almost always fullspeed.


    A few more optims and I'll release it to the repo.
     
  16. COBA.NET

    COBA.NET Still Fresh

    Joined:
    Dec 11, 2012
    Messages:
    5
    Slow on my CC, but much better than previous releases !!!


    Thx !


    A lot !
     
  17. skeezix

    skeezix Certified Guru

    Joined:
    Mar 11, 2003
    Messages:
    8,049
    This is not the set I actually use, but is from the wiki (Ivanovic, I think); I Was at work.. but good enough, better than nothing, and probably pretty good.


    inline is sometimes good, sometimes bad.. depends on a lot of factors; inlining tends to make the binary executable larger, but saves you the cost of function call context shifting.. but sometimes the code becomes larger than the cache and you get a net slowdown.. depends on the platform and the code in question :)


    jeff
     
  18. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    I compile on the Pandora and use a similar cfags/cxxflags. I don't put the -fno-inline-function. Sometimes, I try the -funsafe-math-optimizations but don't find it to get some gain.


    Didn't try here, because Cannonball is essentially a integer app, no float inside.
     
  19. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    Here is the current code for Build 03.


    The modifications I have done are quite messy, espacialy for the Zommed Sprite. I think I will do it over again (it is a taxing procedure anyway, so I have to optimize this one)

    cannonball.zip
     

    Attached Files:

  20. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,746
    Location:
    France, near Lyon
    Hey, look here for some cool pictures and advertising :D .


    Thanks to the Cannonball author !!!
     

Share This Page

Loading...