Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PlayBook/BB10 with libretro #1

Merged
merged 2 commits into from
Mar 25, 2013

Conversation

CatalystG
Copy link

Adding support using Makefile.libretro. I may have broken some of the other builds with this, though I'm not sure they built before. The other plugin builds are still looking for config.mk. We don't need to define CC, CCX, AS as they are defined in the NDK.

@inactive123
Copy link

I showed this patch to notaz, and he said the following -

[quote]
the __clear_cache change will break ARM Linux/Android, must be conditional
psxmem.c change looks unnecessary
[/quote]

Perhaps put an extra ifdef around __clear_cache for Blackberry QNX?

@CatalystG
Copy link
Author

True, I had meant to do that but forgot.

The psxmem.c change is a bit of a strange issue. Libraries are mapped starting at 0x7800000 on QNX, so the ram ends up getting mapped up at 0x7a... since it's not fixed but then the code cache seems to try and map around there also and we crash with SIGILL or segfault. Moving the ram back to even 0x77000000 will also get it to work again.

@notaz
Copy link
Collaborator

notaz commented Mar 25, 2013

0x70000000 is bad for some Android devices, 0x77000000 might be too, so I guess we need those psxmem.c ifdefs then.
Ifdef around __clear_cache is absolutely required though.

@inactive123
Copy link

OK, I think it's safe to merge now I guess.

inactive123 added a commit that referenced this pull request Mar 25, 2013
Add support for PlayBook/BB10 with libretro
@inactive123 inactive123 merged commit de42299 into libretro:master Mar 25, 2013
@inactive123
Copy link

Just tried compiling it with notaz' latest changes and I still can't compile it -

[twinaphex@lenovo pcsx_rearmed]$ make -f Makefile.libretro platform=qnx
cc -DBASE_ADDR_FIXED=0 -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fPIC -Wall -ggdb -Iinclude -ffast-math -O2 -DNDEBUG -DFRONTEND_SUPPORTS_RGB565 -DNO_FRONTEND -c -o libpcsxcore/cdriso.o libpcsxcore/cdriso.c
cc1: error: unrecognized command line option "-marm"
cc1: error: unrecognized command line option "-mcpu=cortex-a8"
cc1: error: unrecognized command line option "-mfpu=neon"
cc1: error: unrecognized command line option "-mfloat-abi=softfp"
libpcsxcore/cdriso.c:1: error: bad value (cortex-a8) for -mtune= switch
cc: /home/twinaphex/bbndk-2.1.0/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/cc1 error 1
make: *** [libpcsxcore/cdriso.o] Error 1

@CatalystG
Copy link
Author

If you'd like to build from the command line, you'll have to define CC I think. I built it from the NDK project using this makefile. The NDK defines CC depending on which NDK you have selected. Try CC=qcc -V4.4.2,gcc_ntoarmv7le.

@inactive123
Copy link

Can you define CC and the like from Makefile.libretro instead? That way it could work for both commandline and the 'NDK project'.

I really like to be as much divorced from any IDEs as possible.

@CatalystG
Copy link
Author

The issue I had was that PB and BB10 had different qcc versions so I didn't want to hardcode it. I just tried CC = qcc -Vgcc_ntoarmv7le and it compiled for both so we can do that.

@inactive123
Copy link

Cool.

What you could try with the FBA repo is to get rid of my managed build there, create a new project and this time read from makefile.libretro in pretty much the same way as you did here. You'd also have to add a platform qnx entry in Makefile.libretro.

I think that could make FBA work on QNX (Blackberry 10/Playbook). If this approach works, I could rewrite all my managed builds so far to work like this as it would be far more convenient for me to maintain.

@CatalystG
Copy link
Author

Sure, I'll give it a try.

@inactive123
Copy link

Try out if you can compile it now from the commandline and if it works fine in RetroArch -

269fec1

@notaz
Copy link
Collaborator

notaz commented Mar 25, 2013

You could use CC ?= ... so that it can be overridden by some selected NDK (assuming it sets env var) if desired.

inactive123 pushed a commit that referenced this pull request Apr 9, 2017
inactive123 pushed a commit that referenced this pull request Jan 29, 2019
catch up to libretro repo
@eadmaster eadmaster mentioned this pull request Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants