Release Final Burn Alpha ported to Pandora (FAQ in first post)


Here's an example of one of the compile lines, with all the flags etc.

g++ -march=armv7-a -mtune=cortex-a8 -fsigned-char -DBUILD_SDL -DLSB_FIRST -DEMU_C68K -fomit-frame-pointer -O2 -w -mfpu=neon -mfloat-abi=softfp -finline -fsigned-char -I.. -I. -I../.. -Isrc/burner -Isrc/burner/sdl -Isrc/burn/drv -Isrc/burn/snd -Isrc/burn/devices -Isrc/burn -Isrc/intf/video/sdl -Isrc/intf/video -Isrc/intf/perfcount -Isrc/intf/input/sdl -Isrc/intf/input -Isrc/intf/cd -Isrc/intf/audio/sdl -Isrc/intf/audio -Isrc/intf -I../sdl -Isrc/cpu -Isrc/cpu/z80 -Isrc/cpu/sh2 -Isrc/cpu/s2650 -Isrc/cpu/nec -Isrc/cpu/m6809 -Isrc/cpu/m6805 -Isrc/cpu/m6800 -Isrc/cpu/m6502 -Isrc/cpu/m68k -Isrc/cpu/konami -Isrc/cpu/i8039 -Isrc/cpu/hd6309 -Isrc/cpu/h6280 -Isrc/cpu/arm7 -Isrc/cpu/arm -Isrc/burn/drv/toaplan -Isrc/burn/drv/taito -Isrc/burn/drv/snes -Isrc/burn/drv/sega -Isrc/burn/drv/pst90s -Isrc/burn/drv/psikyo -Isrc/burn/drv/pre90s -Isrc/burn/drv/pgm -Isrc/burn/drv/neogeo -Isrc/burn/drv/megadrive -Isrc/burn/drv/konami -Isrc/burn/drv/irem -Isrc/burn/drv/galaxian -Isrc/burn/drv/dataeast -Isrc/burn/drv/cps3 -Isrc/burn/drv/cave -Isrc/burn/drv/capcom -Isrc/cpu/cyclone -Isrc/cpu/drz80 -Isrc/burner/win32 -Isrc/intf/video/scalers -Isrc -Isrc/cpu/davez80 -Isrc/burn/drv/pce -c /media/DATA/source/FBA-Pandora/src/burn/drv/pst90s/d_aerofgt.cpp -o .objs/src/burn/drv/pst90s/d_aerofgt.o
 
ok it seems to be building for me in code::blocks now, that's good ... :)   I'll come back in an hour...
 
Last edited by a moderator:
If you get any segfaults in the release build process use O2 rather than O3, seems g++ for arm still has some bugs.


I'm playing around with a couple of ideas too so hopefully between us we can crack it.
 
Btw, I haven't compiled FBA release version from scratch for a while and when I did I noticed it didn't run properly.  The issue is with zet.cpp in the cpu directory.  The optimisations break this object so after a full compile delete the zet.o and rebuild it without -o2 and re-link and everything should be fine.

Will try and find the cause at some point.
 
Right, new version in repo with new sound code.

I've changed it so the emulation timing is now driven by the sound.  The original fba2x code assumed the sound callback could be synced to the enulation by aligning the sample size, however sdl gives you whatever sample size it sees fit (eg at 44100 it sets a sampe size of 2048 even though one emulation frame is only 735 samples), managed to deal with this but had to alter the frameskip code to ensure that the sound was never left waiting and this caused a loss in performance.

I've built some tolerance into the frameskip to bring performance up without corrupting the sound but it is pretty hacky.  Have a play with the new repo version and let me know whether it is better or not.

I've attached the amended src files in case anyone want to improve on it.

Dave


fba-snd-src.zip
 

Attachments

  • fba-snd-src.zip
    10.3 KB · Views: 189
Version 1.0.9.0 doesn't work for me. The emulator crashes when trying to start a game. Here's "/tmp/pndrun_fba-dave18.out"...

=======================================================================================
PND : /media/PANDORA32A/pandora/apps/fba.pnd
PND_FSTYPE : Squashfs
APPDATADIR : /media/PANDORA32A/pandora/appdata/fba-dave18
APPDD_FSTYPE : vfat
PND_CPUSPEED : <unset>
EXENAME : capex.sh
ARGUMENTS : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/fba-dave18"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/PANDORA32A/pandora/appdata/fba-dave18=rw+nolwh":"/mnt/pnd/fba-dave18=rr" none "/mnt/utmp/fba-dave18"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application (capex.sh ) ----------
ERROR: ld.so: object './libSDL-1.2.so.0' from LD_PRELOAD cannot be preloaded: ignored.
CAPEX frontend for FBA2X
v0.1 by JYCET
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
fbdev: switching to 400x240@16
fbdev: /dev/fb1: 400x240@16
fbdev initialized.
xenv: X vendor: The X.Org Foundation, rel: 10704000, display: :0.0, protocol ver: 11.0
xenv: display is 800x480
ecriture capex.cfg debut
ecriture capex.cfg fin
lecture fichier zipname.fba
[---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------writing fir:
Default (Slightly blurred)
filter change to default
ERROR: ld.so: object './libSDL-1.2.so.0' from LD_PRELOAD cannot be preloaded: ignored.
./fba: /usr/lib/libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found (required by ./fba)
writing fir:
Default (Slightly blurred)
fba.sh: line 59: can't create /proc/pandora/cpu_mhz_max: Permission denied
fba.sh: line 65: can't create /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Permission denied
open /dev/tty: No such device or address
[SUCCESS]--- Starting the application (capex.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/fba-dave18': 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 : 3
Tried with a fresh appdata directory. Same error.
 
Looks like a newer lib required as I built with the new codeblocks pnd. I'll upload again and post here when done.
 
Code:
=======================================================================================
fba.sh: line 59: can't create /proc/pandora/cpu_mhz_max: Permission denied
fba.sh: line 65: can't create /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Permission denied
Don't mess with those files directly, run "sudo -n /usr/pandora/scripts/op_cpuspeed.sh 800" or similar.
 
New version up, tested on vanilla pandora and works.

Changed the script to be more system friendly when setting cpu speed.
 
Does this provide any speed improvements?

It's been quite a while since I used FBA and one of the games I wanted it for ChaseHQ ran a bit slowly.

If someone can remind me which ROMset this uses I'll dig it out and give it a spin.
 
Did you go back to FBA version 0.2.97.21? That's a least what it says when starting a game and Demon Front is no longer working.

EDIT: Just tested MS3 side by side (I have 2 Pandoras). Sound is much better. Pause seems to be broken, can't resume (maybe related to the old version).
 
Last edited by a moderator:
I can also confirm the issue with pause being broken. I think its actually crashing since I can't bring up the Home menu by pressing the Pandora button and have to shut it off via the power switch. Also, it would be nice if an option to switch between using the D-Pad/Nub as input.
 
Last edited by a moderator:
I can also confirm the issue with pause being broken. I think its actually crashing since I can't bring up the Home menu by pressing the Pandora button and have to shut it off via the power switch.
Yep same issue here.

ChaseHQ still has really bad stuttering sound and plays quite stuttery :(
 
Crap, must have built an older version accidently, time for a rebuild after I double check the source.

I think I need better frameskip code for games like Chase HQ, syncing to timing to the sound has reduced the framerate of some games.
 
Crap, must have built an older version accidently, time for a rebuild after I double check the source.


I think I need better frameskip code for games like Chase HQ, syncing to timing to the sound has reduced the framerate of some games.

Best frameskip code I've ever come up with was to run all the video output code in a separate low-priority thread, and then in the emulation thread sleep in a loop while waiting for sound sync. The net effect was that if there was not enough CPU time available to render both the emulation and the video, the video would automatically drop frames (because the emulation thread would not give up CPU time for the video to run) while the emulation continued uninterrupted. Worked a treat when running my emulators on older PCs.

D.
 
(Rebuilding)


Hmm, currently the emulator calls a frame with a parameter that controls whether the rendering routines are executed meaning that skipped frames take a lot less cycles. The code simply waits until the actual time to produce frames is less than or equal to the target time and if so calls a rendered frame.


You thread based solution sounds neat but it sounds as if each frame would try to execute the rendering code resulting in a greatef number of skipped frames, but maybe this could be worked around.
 
(Rebuilding)


Hmm, currently the emulator calls a frame with a parameter that controls whether the rendering routines are executed meaning that skipped frames take a lot less cycles. The code simply waits until the actual time to produce frames is less than or equal to the target time and if so calls a rendered frame.

Yes, that's actually the method I used for FMN, and it does work quite well assuming that an accurate timer can be relied upon. The thread system requires no timers, as you sync to sound.

You thread based solution sounds neat but it sounds as if each frame would try to execute the rendering code resulting in a greatef number of skipped frames, but maybe this could be worked around.

The thread based system only attempts to render when there are available CPU cycles (ie, when the emulation is sleeping waiting for sound sync). If there are no free cycles, the video thread remains suspended. As you're only rendering video during the emulation thread's idle time, you get as much emulation time as you need. I generally tend to sleep at least 1ms per frame so that some video gets rendered, but that's up to you.


I'd recommend it, but for one thing - it usually requires quite a restructuring of your source if you haven't built with that system in mind from the beginning.


D.
 
As each driver contains both video and other emulation I think it would be too big a task to restructure the code. Shame as it does sound a neat solution.
 
Just gave this a try and it looks great.  Just one thing I noticed is that games seem to always be stretched to a 16:9 ratio (even if scaling is off).  Is there any way to preserve the 4:3 ratio of games?
 
Last edited by a moderator:
Back
Top