libretro / fuse-libretro

A port of the Fuse Unix Spectrum Emulator to libretro
GNU General Public License v3.0
39 stars 50 forks source link

Portability issues (on PS3) #21

Open inactive123 opened 9 years ago

inactive123 commented 9 years ago

Remaining portability issues (this is explicitly for PS3 now, but other platforms will have even more stripped toolchains so let's please take care of all this 'platform' code in FUSE and make it resemble something far more portable than what it is right now) -

Command line : error: L0039: reference to undefined symbol .getopt_long' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(settings.o)" Command line : error: L0039: reference to undefined symbol.getcwd' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(filesel.o)" Command line : error: L0039: reference to undefined symbol .chdir' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(filesel.o)" Command line : error: L0039: reference to undefined symbol.isatty' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(commandl.o)" fixme:process:GetProcessWorkingSetSize (0xffffffff,0x33fbdc,0x33fbd8): stub settings.c(1) : error: L0039: reference to undefined symbol .getopt_long' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(settings.o)" settings.c(1) : error: L0039: reference to undefined symbol.getopt_long' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(settings.o)" filesel.c(1) : error: L0039: reference to undefined symbol .getcwd' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(filesel.o)" filesel.c(1) : error: L0039: reference to undefined symbol.chdir' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(filesel.o)" commandl.c(1) : error: L0039: reference to undefined symbol `.isatty' in file "Z:\home\squarepusher\libretro-super\retroarch\libretro_ps3.a(commandl.o)"

Libretro cores are really opposed to this kind of non-decoupled, kitchensink-like codebase where it tries to do a lot of internals like file and disk I/O on its own. As you can see, it introduces lots of portability hazards.

Not sure what the best way to go about it would be. Maybe we need some kind of libretro-common-like wrapper for certain emulators that need to do file I/O, signals, TTY, and/or other low-level things like that, except in this libretro-common-like wrapper we then make sure it works for every target we support.

Ezio-PS commented 7 years ago

This core compiles now on PS3 without errors but when you try to load a rom you get only a black screen. (tested with RetroArch 1.6.7)

leiradel commented 7 years ago

@Ezio-PS can I have the game you used to test?

Ezio-PS commented 7 years ago

hi @leiradel Sure! It's Outrun (1987)(US Gold).tap

Could be a big endian issue? Or anything else such as moving some piece of code above or below? do you know if this core works fine on wiiu or wii since they should be other big endian machines?

Recently some cores got working on ps3 thanks to some fix for endian issues such as prosystem (look at https://github.com/libretro/prosystem-libretro/commit/5430fbd8026544eb817398268d29f8806257a5a2 ) or more recently on beetle-ngp (look at https://github.com/libretro/beetle-ngp-libretro/commit/da7014be4a0d563274b637a3709474a86b8811f5 )

Anyway should i test another game?

leiradel commented 7 years ago

Could be a big endian issue?

The original emulator supports Wii, and I believe the core works just fine with that platform too.

Anyway should i test another game?

The ideal thing to do would be to test the game with the Fuse emulator, and if it works, then test with the core.

Ezio-PS commented 7 years ago

I tried other 4 games, both .tap than .z80 format and i always get a black screen.

leiradel commented 7 years ago

I assume they work with the Fuse emulator on a PC. Anyway, it's very hard to guess what could be wrong without being able to debug the core.

Ezio-PS commented 7 years ago

I'll try to debug the core in the next days. Anyway for who doesn't own a ps3, it's possible to test retroarch and the cores on the newer ps3 emulator called rpcs3, available for both windows and linux system. Let you a log once i debug the core, but the only way to know more info i guess it'll be put some printf around where the core freezes.

r-type commented 7 years ago

dit you add CFLAGS += -DWORDS_BIGENDIAN -DMSB_FIRST in ps3 makefile.libretro section?

crystalct commented 4 years ago

@vaguerant, how are you?
I ask your help again... i'm tiring to fix build issues of fuse core and try to start at least one game. Now i complied correctly fuse and solved a couple of issues about statof cfg file at start and then i got a crash like a segmentation fault. It could be a big endian issue... so could you tell me if fuse core is working, or was working in the past, on WiiU?

crystalct commented 4 years ago

Solved!

vaguerant commented 4 years ago

Maybe too late now, but just confirming I was able to load up a game in Fuse on Wii U without issues just now.

crystalct commented 4 years ago

I think this issue can be closed.

Kokokool commented 4 years ago

guys, where can I Find a PS3 SELF FUSE core thats works? RA 1.9.0 Fuse core cant load any game (whether is Z80 or TAP).

Any clues?