libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
112 stars 60 forks source link

Compilation failed on ARM (raspberry) #2

Closed frthery closed 9 years ago

frthery commented 9 years ago

Hi,

I am trying to compile uae on my raspberry pi, during compilation following error occurs:

gcc -fPIC -Ofast -DCPUEMU_0 -DCPUEMU_11 -DCPUEMU_12 -DCPUEMU_20 -DCPUEMU_21 -DCP UEMU_22 -DFPUEMU -DUNALIGNED_PROFITABLE -DAMAX -DAGA -DAUTOCONFIG -DFILESYS -DS UPPORT_THREADS -DFDI2RAW -DDEBUGGER -DSAVESTATE -DENFORCER -DACTION_REPLAY -DXA RCADE -DCPUEMU_31 -DCPUEMU_32 -DCPUEMU_33 -DMMUEMU -DFULLMMU -DDRIVESOUND -DRET RO=1 -std=gnu99 -I./../sources/src -I./../sources/src/include -I../sources/src /od-retro -I../sources/utils -c -o ../sources/src/newcpu.o ../sources/src/newcpu .c In file included from ./../sources/src/include/events.h:17:0, from ../sources/src/newcpu.c:20: ../sources/src/newcpu.c: In function ‘m68k_run_2pf’: ./../sources/src/machdep/rpt.h:38:5: error: impossible constraint in ‘asm’ Makefile:104: recipe for target '../sources/src/newcpu.o' failed make: *\ [../sources/src/newcpu.o] Error 1

Is there a way to solved this ?

Thanks.

r-type commented 9 years ago

Ok ARM linux should take the generic rpt.h. not the x86 Linux one. I 'll look at . Btw this port is old and should be redone. And picasso96 not working too.

r-type commented 9 years ago

BTW can you try again to see if it works now.

inactive123 commented 9 years ago

BTW r-type - on the subject of redone ports -

https://github.com/r-type/hatari/commits/master

can we move this one over to the libretro organization and replace the current one with it? Does it work?

r-type commented 9 years ago

Yes for hatari ,it works for me on linux/android , Lordashram tell me that it works on windows too, so yeah we can move it , do you want i transfer it to libretro?

inactive123 commented 9 years ago

Yeah please transfer it.

vanfanel commented 9 years ago

I've tried UAE core on ARM too (Cubieboard2, Rpi) right now and still it won't build, same error on build.

As for Hatari core, it works on ARM (Cubie2. Rpi) but it's set to run at 50HZ in libretro.c. I've change it to 60HZ as I'm emulating an NTSC AtariST, and I use an NTSC TOS ROM, but then audio is broken. I also tried to adjust audio sample rate accordingly (60/50 * 44100), and audio is still scratchy and broken. So, what other adjustments should I do to the core so it runs smoothly at 60HZ with an NTSC TOS?

r-type commented 9 years ago

For uae , can you tell me what marco is predefinded for arm gcc , i use __arm__ , and like you said it's seem to failed as you fall in the asm define.

For hatari we can open an issue when SP will move it to libretro. Btw , we have to do like libretro-test , change the rate envolve a SET_SYSTEM_AV_INFO

if (last_rate != last_sample_rate && last_rate != 0.0f) // If audio rate changes, go through SET_SYSTEM_AV_INFO.
ret = environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &info);
else // If only aspect changed, take the simpler path.
ret = environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &info.geometry);
logging.log(RETRO_LOG_INFO, "SET_SYSTEM_AV_INFO/SET_GEOMETRY = %u.\n", ret);
frthery commented 9 years ago

Hi, i don't know if this can help you, but i have extracted this from the makefile of genesis core (https://github.com/libretro/Genesis-Plus-GX/blob/master/Makefile.libretro):

else ifneq (,$(findstring armv,$(platform))) TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN PLATFORM_DEFINES := -DHAVE_ZLIB CC = gcc ifneq (,$(findstring cortexa8,$(platform))) PLATFORM_DEFINES += -marm -mcpu=cortex-a8 else ifneq (,$(findstring cortexa9,$(platform))) PLATFORM_DEFINES += -marm -mcpu=cortex-a9 endif PLATFORM_DEFINES += -marm ifneq (,$(findstring neon,$(platform))) PLATFORM_DEFINES += -mfpu=neon HAVE_NEON = 1 endif ifneq (,$(findstring softfloat,$(platform))) PLATFORM_DEFINES += -mfloat-abi=softfp else ifneq (,$(findstring hardfloat,$(platform))) PLATFORM_DEFINES += -mfloat-abi=hard endif PLATFORM_DEFINES += -DARM

Thanks for your support.

r-type commented 9 years ago

Can you try build again and post result ?

frthery commented 9 years ago

Thanks, i am doing this ASAP and giving you the result.

vanfanel commented 9 years ago

It builds here with the latest fix, r-type. However, it's very slow on CubieBoard2, and unusable on Rpi. Any hopes for optimization?

frthery commented 9 years ago

Yes, build just finished here, you rocks! Thanks for your feedback vanfanel.

vanfanel commented 9 years ago

@frthery: no problem! But it's VERY slow on the Pi, here at least. How does it do for you and on what overclocking settings? @r-type: should disabling MMU, AGA, etc... speed up things?

r-type commented 9 years ago

maybe you can try but honestly , i think the rpi can't handle the uae cpu core. like in hatari (with optimized setting ,and low res 320*2400 ) i only get 43fps .

frthery commented 9 years ago

@vanfanel: Hi, so i have tested the core, i can access the gui, but when i am launching a game nothing appends (black screen). I have tested Rick Dangerous and BuggyBoy, kick.rom is into retroarch folder. I wanted to test the core because i can't get uae4All working (it seems that there is a problem with my crt monitor, with hdmi it should works i suppose). For information, i am using an emulationstation image (2.3).

@r-type: if you want you can close the issue, Thanks for the fix.

r-type commented 9 years ago

Ok i will close , as compilation works . but for your black screen , have you .uaerc file in current dir ? (edit the one in cfg/ dir and put in the current dir) I 've tested on a rpi , compile and load fine ,i ve tested ik+ and load fine but as Vanfanel stated , i only get 15 fps on rpi. maybe we can optimize a little but as i only get 43 fps in hatari with uae cpu , i think we cant get something usable with uae cpu ( and hack to use cyclone cpu has no sense since  uaeall allready does)