PCSX ReARMed on Pandaboard


danboid

Member
Joined
Jan 21, 2006
Messages
252
Hi notaz and all those interested in ARM emulation stuff (thats you reading this too, no doubt)!


I originally created this same thread over on the GP2X forums which is where notaz's contact page still says he prefers to be contacted by but a member of said forums has informed me I'm much more likely to catch his attention on the Pandora forums hence this thread.


TI recently released their updated SGX xorg drivers for Ubuntu 12.04 (armhf) on the Pandaboard and so I went on the hunt for apps that may be able to make good use of the Open GL ES 2 and NEON features of my Pandaboard. As far as emus are concerned, it would seem that PCSX ReARMed is one of the best I might hope to get running on my Panda but I'm having probs in getting it running.


I have tried pcsxr from the Ubuntu Precise repos and that does work but its slow as hell - maybe quarter speed (at best) and thats when I enable the 'performance' CPU governor. I have not tried any OGLES video plugins with pcsxr - I don't even know if there are any that might work for Pandaboard users?


AFAIK pcsxr won't have any of the ARM specific optimizations present in pcsx rearmed and I know my Panda can do much better as I also have a Xperia Play and I get (very close to) full speed PSX emulation on that via FPse and the Xperia only has a single core CPU for a start.


Anyway, I have downloaded the latest PCSX reARMed git code and I can get it to compile if I configure it with --enable-neon and then I edit config.mak and change softfp to hard for the -mfloat-abi options but when I try to run strider2.bin for example I get:


0x53e05 has LSB set (hundreds of times over)


Loading memory card ./.pcsx/memcards/card1.mcd


Loading memory card ./.pcsx/memcards/card2.mcd


filter opendir: No such file or directory


frontend/common/readpng.c: failed to open: /home/dan/src/pcsx_rearmed/skin/font.png


frontend/common/readpng.c: failed to open: /home/dan/src/pcsx_rearmed/skin/selector.png


menu_load_config: failed to open: ./.pcsx/pcsx.cfg


frontend/common/readpng.c: failed to open: /home/dan/src/pcsx_rearmed/skin/background.png


plugin: plugins/builtin_gpu


plugin: plugins/builtin_spu


plugin: plugins/builtin_pad


plugin: plugins/builtin_pad


Plugins loaded.


Loaded CD Image: /home/dan/src/pcsx_rearmed/../../psx/strider2.bin[+toc].


Track 01 (DATA) - Start 00:02:00, Length 43:23:31


Home directory /home/dan not ours.


Audio open error: Invalid argument


CD-ROM Label: STRIDER HIRYU2


CD-ROM ID: SLPS02621


ari64_reset


0x59bcd has LSB set (again, hundreds of times)


-> 0x0 1.3


sudo: /usr/pandora/scripts/op_lcdrate.sh: command not found


Illegal instruction (core dumped)


So it looks to me like if you compile with NEON support enabled atm it presumes you are running on Pandora hence depends upon certain Pandora specific scripts. If I copy the required scripts to the correct locations may I get pcsx rearmed to work or could you potentially make a few changes to the codebase so that Pandaboard users can run PCSX reARMed too please notaz?


Thanks!


Dan


PS I'm also keen to try mupen64plus-arm on the Pandaboard but I can't find the source anywhere, git repo doesn't work etc so if anyone has any hints for that I'd be grateful too but maybe that requires a thread to itself?
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
I suggest you wait until I do next pandora release (a few weeks, maybe sooner), I'm in process of making the code more generic, so it should benefit you.


About GLES graphics, unfortunately the GLES conversion is not very good and compatibility is poor. It also tends to trigger SGX driver bugs. There is NEON renderer available though, but your GPU will be unused and the game will be rendered in it's native resolution.

0x53e05 has LSB set (hundreds of times over)
This should not happen with current code, could you compile with debug (make DEBUG=1), place a breakpoint on this message (libpcsxcore/new_dynarec/pcsxmem.c) and get a backtrace?
 

danboid

Member
Joined
Jan 21, 2006
Messages
252
Glad to hear you're making PCSX rearmed more generic - there'll be lots of RPi users hoping to run PCSX rearmed soon too of course!


Of course I'll get you a bt but can you explain exactly how you want me to create this breakpoint?


Thanks!
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
You could do something like



Code:
diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c

index 0464021..2931f89 100644

--- a/libpcsxcore/new_dynarec/pcsxmem.c

+++ b/libpcsxcore/new_dynarec/pcsxmem.c

@@ -28,8 +28,10 @@ static u32 mem_unmwtab[(1+2+4) * 0x1000 / 4];

 static void map_item(u32 *out, const void *h, u32 flag)

 {

	    u32 hv = (u32)h;

-	   if (hv & 1)

-			   fprintf(stderr, "%p has LSB set\n", h);

+	   if (hv & 1) {

+			   fprintf(stderr, "FATAL: %p has LSB set\n", h);

+			   *(int *)0 = 1;

+	   }

	    *out = (hv >> 1) | (flag << 31);

 }

and just run it under gdb.
 

danboid

Member
Joined
Jan 21, 2006
Messages
252
gdb pcsx


GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04


Copyright © 2012 Free Software Foundation, Inc.


License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>


This is free software: you are free to change and redistribute it.


There is NO WARRANTY, to the extent permitted by law. Type "show copying"


and "show warranty" for details.


This GDB was configured as "arm-linux-gnueabihf".


For bug reporting instructions, please see:


<http://bugs.launchpad.net/gdb-linaro/>...


Reading symbols from /home/dan/src/pcsx_rearmed/pcsx...done.


(gdb) run -cdfile strider2.bin


Starting program: /home/dan/src/pcsx_rearmed/pcsx -cdfile strider2.bin


[Thread debugging using libthread_db enabled]


Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".


Running PCSX Version 1.9 (Jul 21 2012).


Init new dynarec


FATAL: 0x996c5 has LSB set


Program received signal SIGSEGV, Segmentation fault.


0x00099696 in map_item (out=0x2a7d68, h=0x996c5, flag=1) at libpcsxcore/new_dynarec/pcsxmem.c:33


33 *(int *)0 = 1;


(gdb) bt


#0 0x00099696 in map_item (out=0x2a7d68, h=0x996c5, flag=1) at libpcsxcore/new_dynarec/pcsxmem.c:33


#1 0x0009a938 in new_dyna_pcsx_mem_init () at libpcsxcore/new_dynarec/pcsxmem.c:346


#2 0x0009b60a in ari64_init () at libpcsxcore/new_dynarec/emu_if.c:265


#3 0x0003e104 in psxInit () at libpcsxcore/r3000a.c:47


#4 0x000368d8 in EmuInit () at libpcsxcore/psxcommon.c:34


#5 0x000e02a0 in SysInit () at frontend/main.c:443


#6 0x000e0070 in main (argc=3, argv=0xbefff5d4) at frontend/main.c:363
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
Hmh, 0x996c5 is supposed to be a function pointer, so it should be aligned. Are you compiling it in thumb mode or something? If so, don't do that, if not, I need to see pcsx.map that the build generates.
 

danboid

Member
Joined
Jan 21, 2006
Messages
252
Thumb mode? Not intentionally - I've explained exactly what steps I've been taking to get it to build and so for that bt it was exactly the same but with debug mode turned on and the breakpoint added.


This forum wouldn't seem to let me attach the pcsx.map file no matter how I compress or package it (why? Its less than 30k when compressed?) so I've pasted it over at github:


https://gist.github.com/3160283
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
Well I thought maybe you know more, Ubuntu could have some flags preconfigured on gcc itself. What does gcc -v show?


I don't have hardfloat toolchain (even if I did, I don't have suitable rootfs for running), so maybe you could try linking it statically (add -static to LDFLAGS in Makefile) and upload the pcsx binary somewhere? That unaligned pointer is a mystery to me, and I don't see anything wrong in the mapfile.
 

danboid

Member
Joined
Jan 21, 2006
Messages
252
gcc -v


Using built-in specs.


COLLECT_GCC=gcc


COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper


Target: arm-linux-gnueabihf


Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf


Thread model: posix


gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)


So it looks like thumb mode is enabled by default under Ubuntu 12.04 armhf gcc


Now that you can see what flags are enabled by default here, maybe you can recommend a few alterations before I try building it again and uploading the binary? I presume you'd want debug turned on and no breakpoint right?
 

danboid

Member
Joined
Jan 21, 2006
Messages
252
Notaz:


As for you not having access to a armhf rootfs, have you not already ordered yourself an Rpi? They should be giving you one for free really, top ARM dev that you are!


Raspbian is based on Debian Wheezy armhf and the FAQ says it should run on ARM devices other than the RPi so I'd expect it may install on both the Pand devices?


http://www.raspbian....y_Pi_systems.3F


The problem there for both Pandora and Pandaboard would be getting the SGX driver working as I've not heard of anyone successfully getting the SGX driver working under a non-Ubuntu OS such as Debian on the Pandaboard although I'll admit I've not tried myself yet.
 
Last edited by a moderator:

danboid

Member
Joined
Jan 21, 2006
Messages
252
Hi notaz!


Yes, I will try building head soon but its very late now and I've only just seen your message as I've come here to report that I've already got full speed (minus sound, which isn't working on this binary) PCSX reARMed running thanks to a build someone linked to on the RPi forums, which maybe you've already seen?


http://www.raspberry...hp?f=35&t=13349


:)
 
Last edited by a moderator:

danboid

Member
Joined
Jan 21, 2006
Messages
252
Hi notaz!


I tried checking out HEAD with this command:



Code:
git clone -b HEAD git://notaz.gp2x.de/~notaz/pcsx_rearmed.git



and it pulls a branch but I get this error too:





Code:
warning: Remote branch HEAD not found in upstream origin, using HEAD instead


So maybe I've got that command wrong? When I run its configure script it onlys gets as far as:


please install zlib/libz-dev


Both of which are installed so this is the point where I and the person who compiled it for RPi start deleting and replacing big chunks out of the configure script which is what I'm going to do now to try get (sdl) sound working.


If I am checking out the correct branch with that command then I'll detail all the changes I need to make to the configure script to get it to build if you want?
 
Last edited by a moderator:

danboid

Member
Joined
Jan 21, 2006
Messages
252
I have changed my config.mak to look like this:



Code:
CC = gcc

CXX = g++

AS = as

CFLAGS += -O3 -mfloat-abi=hard -mfpu=vfp -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -mno-thumb

ASFLAGS += -mfloat-abi=hard -mfpu=vfp --defsym HAVE_ARMV7=1

LDFLAGS +=

MAIN_LDLIBS += -ldl -lm

PLUGIN_CFLAGS += -fPIC


ARCH = arm

PLATFORM = generic

BUILTIN_GPU = unai

SOUND_DRIVERS = sdl

PLUGINS = plugins/spunull/spunull.so plugins/dfxvideo/gpu_peops.so plugins/gpu_unai/gpu_unai.so

HAVE_ARMV7 = 1

HAVE_TSLIB = 0

USE_DYNAREC = 1



and I have tried building with and without the -mno-thumb CFLAG but still build always fails like this:





Code:
gcc -Wall -ggdb -Ifrontend -ffast-math -I/usr/include -I/usr/include/SDL -O2 -DNDEBUG -O3 -mfloat-abi=hard -mfpu=vfp -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -mno-thumb -c -o libpcsxcore/new_dynarec/pcsxmem.o libpcsxcore/new_dynarec/pcsxmem.c

libpcsxcore/new_dynarec/pcsxmem.c:18:2: error: #error the dynarec does not have Thumb support, please remove -mthumb

make: *** [libpcsxcore/new_dynarec/pcsxmem.o] Error 1


You'll see I've gone for cortex-a8 for -mcpu and -mtune because the configure file mentions those as supported but my Panda has a cortex-a9 so should I use that instead? Do you think it'd make any difference?


EDIT


Also, I may need to use -mfpu=vfpv3-d16 which is what gcc -v tells me is default?
 
Last edited by a moderator:

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
I tried checking out HEAD with this command:



Code:
git clone -b HEAD git://notaz.gp2x.de/~notaz/pcsx_rearmed.git



and it pulls a branch but I get this error too:





Code:
warning: Remote branch HEAD not found in upstream origin, using HEAD instead
well HEAD usually refers to very last commit, not a branch, so git clone git://... should have been enough.



So maybe I've got that command wrong? When I run its configure script it onlys gets as far as:



please install zlib/libz-dev
can you try this again and post config.log somewhere?



Both of which are installed so this is the point where I and the person who compiled it for RPi start deleting and replacing big chunks out of the configure script which is what I'm going to do now to try get (sdl) sound working.



If I am checking out the correct branch with that command then I'll detail all the changes I need to make to the configure script to get it to build if you want?
Yeah, although I don't think removing chunks from configure is the right thing to do.



I have changed my config.mak to look like this:





Code:
...

BUILTIN_GPU = unai
That should be neon, did you pass --enable-neon?



and I have tried building with and without the -mno-thumb CFLAG but still build always fails like this:





Code:
gcc -Wall -ggdb -Ifrontend -ffast-math -I/usr/include -I/usr/include/SDL -O2 -DNDEBUG -O3 -mfloat-abi=hard -mfpu=vfp -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -mno-thumb -c -o libpcsxcore/new_dynarec/pcsxmem.o libpcsxcore/new_dynarec/pcsxmem.c

libpcsxcore/new_dynarec/pcsxmem.c:18:2: error: #error the dynarec does not have Thumb support, please remove -mthumb

make: *** [libpcsxcore/new_dynarec/pcsxmem.o] Error 1
This sucks, we have to find a way to disable thumb on your compiler, it seems -mno-thumb doesn't work :(

You'll see I've gone for cortex-a8 for -mcpu and -mtune because the configure file mentions those as supported but my Panda has a cortex-a9 so should I use that instead? Do you think it'd make any difference?
cortex-a9 should be better for you, although difference won't be huge.

Also, I may need to use -mfpu=vfpv3-d16 which is what gcc -v tells me is default?
It should be -mfpu=neon on your board, it defaults to vfpv3-d16 to support armv6 I guess.
 

danboid

Member
Joined
Jan 21, 2006
Messages
252
Hi notaz!


I've just done a fresh pull of pcsx and looking at config.log (when I was just getting the error 'please install zlib/libz-dev' from running configure) it said:



Code:
gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb /tmp/pcsx-conf--31675-.c -o /tmp/pcsx-conf--31675- -ldl -lm -lz

In file included from /usr/include/zconf.h:354:0,

				 from /usr/include/zlib.h:34,

				 from /tmp/pcsx-conf--31675-.c:1:

/usr/include/zlibdefs.h:6:39: fatal error: sys/types.h: No such file or directory

compilation terminated.



My burgeoning Linux newbie beginners luck semi-psychic powers then kicked in and told me that the command to fix this problem was to run:





Code:
sudo apt-get install gcc-multilib g++-multilib



and whaddya know the psi powers came through and that fixed the running of your configure script although the script as it stands doesn't successfully detect that I'm running a armhf distro and so I should be using -mfloat-abi=hard right? This is what configure gave me:





Code:
./configure --enable-neon

./configure: 336: [: yes: unexpected operator

Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]

./configure: 350: [: yes: unexpected operator

architecture	    arm

platform		    generic

built-in GPU	    neon

sound drivers	    oss alsa

plugins			 gpu_gles.so gpu_unai.so gpu_peops.so spunull.so

C compiler		  gcc

C compiler flags	 -mfpu=neon -mfloat-abi=softfp -mno-thumb

libraries		   -lasound -lpng  -ldl -lm -lz

linker flags	   

enable dynarec	  yes

ARMv7 optimizations yes

enable ARM NEON	 yes

tslib support	   no



make output and config.log:





Code:
dan@pandamiga:~/src/pcsx_rearmed$ make

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/cdriso.o libpcsxcore/cdriso.c

libpcsxcore/cdriso.c: In function ‘playthread’:

libpcsxcore/cdriso.c:190:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c: In function ‘ISOreadTrack’:

libpcsxcore/cdriso.c:1368:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c: In function ‘ISOopen’:

libpcsxcore/cdriso.c:1212:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c: In function ‘parsemds’:

libpcsxcore/cdriso.c:632:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:642:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:648:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:654:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:683:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:688:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:694:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:700:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c: In function ‘handlepbp’:

libpcsxcore/cdriso.c:756:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:792:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:810:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:813:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c:818:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/cdriso.c: In function ‘cdread_sub_mixed’:

libpcsxcore/cdriso.c:1014:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -Wno-pointer-sign   -c -o libpcsxcore/cdrom.o libpcsxcore/cdrom.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/cheat.o libpcsxcore/cheat.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/debug.o libpcsxcore/debug.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/decode_xa.o libpcsxcore/decode_xa.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/disr3000a.o libpcsxcore/disr3000a.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/mdec.o libpcsxcore/mdec.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -Wno-pointer-sign -Wno-nonnull   -c -o libpcsxcore/misc.o libpcsxcore/misc.c

libpcsxcore/misc.c: In function ‘Load’:

libpcsxcore/misc.c:429:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/misc.c:435:11: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/misc.c:449:11: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/misc.c:452:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/misc.c:453:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/misc.c:461:14: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/misc.c:467:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/misc.c: In function ‘PSXGetFileType’:

libpcsxcore/misc.c:392:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/plugins.o libpcsxcore/plugins.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/ppf.o libpcsxcore/ppf.c

libpcsxcore/ppf.c: In function ‘LoadSBI’:

libpcsxcore/ppf.c:354:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:356:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:357:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c: In function ‘BuildPPFCache’:

libpcsxcore/ppf.c:215:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:238:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:243:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:269:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:274:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:301:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:304:25: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/ppf.c:307:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -Wno-nonnull   -c -o libpcsxcore/psxbios.o libpcsxcore/psxbios.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/psxcommon.o libpcsxcore/psxcommon.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/psxcounters.o libpcsxcore/psxcounters.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/psxdma.o libpcsxcore/psxdma.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/psxhle.o libpcsxcore/psxhle.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/psxhw.o libpcsxcore/psxhw.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/psxinterpreter.o libpcsxcore/psxinterpreter.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/psxmem.o libpcsxcore/psxmem.c

libpcsxcore/psxmem.c: In function ‘psxMemReset’:

libpcsxcore/psxmem.c:139:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/r3000a.o libpcsxcore/r3000a.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/sio.o libpcsxcore/sio.c

libpcsxcore/sio.c: In function ‘LoadMcd’:

libpcsxcore/sio.c:430:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

libpcsxcore/sio.c:445:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/socket.o libpcsxcore/socket.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/spu.o libpcsxcore/spu.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -fno-strict-aliasing   -c -o libpcsxcore/gte.o libpcsxcore/gte.c

gcc -c -o libpcsxcore/gte_nf.o libpcsxcore/gte.c -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -fno-strict-aliasing -DFLAGLESS

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/gte_divider.o libpcsxcore/gte_divider.c

as -mfpu=neon -mfloat-abi=softfp --defsym HAVE_ARMV7=1  -o libpcsxcore/gte_arm.o libpcsxcore/gte_arm.s

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -c libpcsxcore/gte_neon.S -o libpcsxcore/gte_neon.o

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -Wno-all -Wno-pointer-sign   -c -o libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/new_dynarec.c

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb -c libpcsxcore/new_dynarec/linkage_arm.S -o libpcsxcore/new_dynarec/linkage_arm.o

gcc -Wall -ggdb -Ifrontend -ffast-math -O2 -DNDEBUG -mfpu=neon -mfloat-abi=softfp -mno-thumb   -c -o libpcsxcore/new_dynarec/pcsxmem.o libpcsxcore/new_dynarec/pcsxmem.c

libpcsxcore/new_dynarec/pcsxmem.c:18:2: error: #error the dynarec does not have Thumb support, please remove -mthumb

make: *** [libpcsxcore/new_dynarec/pcsxmem.o] Error 1

dan@pandamiga:~/src/pcsx_rearmed$ cat config.log

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114- -ldl -lm -lz

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb -c /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114-.o

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114- -lpng -ldl -lm -lz

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114- -lpng -ldl -lm -lz

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114- -lpng -ldl -lm -lz -lasound

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114- -lasound -lpng -ldl -lm -lz -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT

/tmp/ccmuhjqW.o: In function `main':

pcsx-conf--32114-.c:(.text+0xc): undefined reference to `SDL_OpenAudio'

collect2: ld returned 1 exit status

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb -c /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114-.o

/tmp/pcsx-conf--32114-.c:1:21: fatal error: tslib.h: No such file or directory

compilation terminated.

gcc -mfpu=neon -mfloat-abi=softfp -mno-thumb -c /tmp/pcsx-conf--32114-.c -o /tmp/pcsx-conf--32114-.o
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
ok finally got around setting up ubuntu armhf chroot and hopefully fixed all the issues. -mfloat-abi= does not need to be specified for that compiler at all, it's already built in. You should get best results if you update to latest git and do:


CFLAGS='-mcpu=cortex-a9 -mtune=cortex-a9' ./configure --enable-neon
 
Last edited by a moderator:

danboid

Member
Joined
Jan 21, 2006
Messages
252
Success!


PCSX reARMed now compiles and runs with sound on Pandaboard! Thanks very much to notaz for going to the trouble of installing Ubuntu armhf (on his Pandora?) to fix my build issues, although I did have to make a couple of small changes and there is a bug that needs to be fixed too.


After pulling the source, I ran './configure --enable-neon' then I edited config.mak to add the -mcpu=cortex-a9 -mtune=cortex-a9 CFLAGS and I also deleted alsa and oss so I just had:



Code:
SOUND_DRIVERS = sdl


because if you are running Pulseaudio compiling in the alsa and oss support breaks the sound for pcsx - its the same with any SDL app. There may be no need for this if you could specify which sound driver pcsx uses at startup but this doesn't seem to be an option.


I did notice that configure enables both HAVE_ARMV6 and HAVE_ARMV7 - do I really need both or just HAVE_ARMV7?


The only other change required to build on Panda is to change -lGLES_CM to -lGLESv1_CM in plugins/gpu-gles/Makefile so that the GLES plugin will build and link OK.


The problem now is the control settings get rewritten every time you start the program. PCSX seems to add the default controls onto your previously saved ones which stops your saved settings from working and means I have to set up my controller every time I run pcsx.


Thanks again, great work notaz!
 
Last edited by a moderator:

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
After pulling the source, I ran './configure --enable-neon' then I edited config.mak to add the -mcpu=cortex-a9 -mtune=cortex-a9 CFLAGS
You could've used what I wrote in my last post and no config.mak editing would be needed..

I also deleted alsa and oss so I just had:



Code:
SOUND_DRIVERS = sdl
There is --sound-drivers=sdl for that..

because if you are running Pulseaudio compiling in the alsa and oss support breaks the sound for pcsx - its the same with any SDL app.
That's lame, isn't one of the points of PulseAudio to accept streams from any API, like alsa and oss?

I did notice that configure enables both HAVE_ARMV6 and HAVE_ARMV7 - do I really need both or just HAVE_ARMV7?
both

The only other change required to build on Panda is to change -lGLES_CM to -lGLESv1_CM in plugins/gpu-gles/Makefile so that the GLES plugin will build and link OK.
That's annoying too, SGX drivers only come with GLES_CM, but I guess Ubuntu changed it to GLES_CMv1 to better match Android or something..

The problem now is the control settings get rewritten every time you start the program. PCSX seems to add the default controls onto your previously saved ones which stops your saved settings from working and means I have to set up my controller every time I run pcsx.
Hmh..
 
Last edited by a moderator:

danboid

Member
Joined
Jan 21, 2006
Messages
252
Couple more probs / questions for notaz:


I've not been able to make pcsx full screen - I have tried setting options / display / scaler to fullscreen but that doesn't work


BIOSs - I have copied a BIOS to my ~/.pcsx/bios dir and made sure its readable but still HLE is the only option. Is that the correct dir?
 
Top