Posts: 4
Threads: 1
Joined: Oct 2016
Reputation:
0
10-19-2016, 05:19 PM
Hi.
I want to recompile mgba and add auto-load gba rom from directorie inside the vpk file.
Why?
To make bubbles of gba games directly in the live area.
I need help to find the load rom section in the code and compile it.
Thanks.
Posts: 809
Threads: 14
Joined: Apr 2015
Reputation:
34
Pronouns: she/they
I was thinking of making something like a forwarder for this now that we know how to load argument strings back out, but I haven't gotten around to it yet.
Anyway, what you want to do is replace the call to mGUIRunloop in platform/psp2/main.c with a call to mGUIRun with the filename. Take a look at how the Wii version does it in platform/wii/main.c
Posts: 4
Threads: 1
Joined: Oct 2016
Reputation:
0
10-19-2016, 09:18 PM
(This post was last modified: 10-19-2016, 09:54 PM by shim80.)
"mGUIRunloop"?
Are you sure it is not "GBAGUIRunner"?
I see "font, "cache0:" (main.c psp2, 71th line).
I need to replace it with "font, "/nameoftherom.gba""?
"/" (main.c Wii, 162th line) is the root directorie of the app folder?
Howto compile it? (PSDK3v3 don't work, and cmake don't find vitasdk...)
Posts: 809
Threads: 14
Joined: Apr 2015
Reputation:
34
Pronouns: she/they
That "/" is the initial folder, not a filename. You can't change it that way. (I should know, I wrote it.)
To compile it, make a build directory at the root of the source code, cd into it and do VITASDK=[path to SDK] cmake .. -DCMAKE_TOOLCHAIN_FILE=../src/platform/psp2/CMakeToolchain.vitasdk.
Posts: 4
Threads: 1
Joined: Oct 2016
Reputation:
0
"CMake Error at CMakeLists.txt:2 (project):
The CMAKE_C_COMPILER:
c:/vitasdk/bin/arm-vita-eabi-gcc
is not a full path to an existing compiler tool."
?
Posts: 809
Threads: 14
Joined: Apr 2015
Reputation:
34
Pronouns: she/they
is your Vita SDK in C:\vitasdk? Looking at this, I think there's a bug in my toolchain file that's not expecting it to be run on Windows, so I might need to fix that.
Posts: 809
Threads: 14
Joined: Apr 2015
Reputation:
34
Pronouns: she/they
I use macOS, but Linux generally works fine too. A LiveUSB might work if you have enough RAM to download the prebuilt (LiveUSB boots don't write the files back to the USB stick, but instead store them in RAM), but I should really fix that bug.
Posts: 809
Threads: 14
Joined: Apr 2015
Reputation:
34
Pronouns: she/they
The bug might be fixed now, so please try again with a newer master.