mirror of
https://github.com/libretro/Mu.git
synced 2026-09-23 23:25:04 +00:00
Ok, ARM blobs seem to be compiling
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -21,8 +21,8 @@
|
||||
/tools/palm/muExpansionDriver/muExpDriver
|
||||
/tools/palm/muExpansionDriver/muExpDriver-sections.s
|
||||
/tools/palm/muExpansionDriver/muExpDriver-sections.ld
|
||||
/tools/palm/muExpansionDriver/asmSrcs/*.L68
|
||||
/tools/palm/muExpansionDriver/asmSrcs/*.S68
|
||||
/tools/palm/muExpansionDriver/armExit
|
||||
/tools/palm/muExpansionDriver/armCall68k
|
||||
/tools/desktop/build-BufferGraphViewer-*
|
||||
/tools/desktop/build-MakePalmIcon-*
|
||||
/tools/desktop/export16BitImageProperly/convert
|
||||
@@ -1,5 +0,0 @@
|
||||
LDR R4, 1
|
||||
MOV R5, R1
|
||||
MOV R6, R2
|
||||
MOV R7, R3
|
||||
HYPERCALL
|
||||
@@ -1,2 +0,0 @@
|
||||
LDR R4, 0
|
||||
HYPERCALL
|
||||
26
tools/palm/muExpansionDriver/armSrc/armCall68k.c
Normal file
26
tools/palm/muExpansionDriver/armSrc/armCall68k.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <Standalone.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
STANDALONE_CODE_RESOURCE_ID(1);
|
||||
|
||||
|
||||
void start(void){
|
||||
register uint32_t r1 asm("r1");
|
||||
register uint32_t r2 asm("r2");
|
||||
register uint32_t r3 asm("r3");
|
||||
register uint32_t r4 asm("r4");
|
||||
register uint32_t r5 asm("r5");
|
||||
register uint32_t r6 asm("r6");
|
||||
register uint32_t r7 asm("r7");
|
||||
|
||||
r4 = 1;
|
||||
r5 = r1;
|
||||
r6 = r2;
|
||||
r7 = r3;
|
||||
|
||||
/*hypercall*/
|
||||
asm(".long 0xF7BBBBBB");
|
||||
/*return value of the 68k call is put in r0 by the PceNativeCall implementation*/
|
||||
}
|
||||
16
tools/palm/muExpansionDriver/armSrc/armExit.c
Normal file
16
tools/palm/muExpansionDriver/armSrc/armExit.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <Standalone.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
STANDALONE_CODE_RESOURCE_ID(0);
|
||||
|
||||
|
||||
void start(void){
|
||||
register uint32_t r4 asm("r4");
|
||||
|
||||
r4 = 0;
|
||||
|
||||
/*hypercall*/
|
||||
asm(".long 0xF7BBBBBB");
|
||||
}
|
||||
1
tools/palm/muExpansionDriver/armSrc/readme.txt
Normal file
1
tools/palm/muExpansionDriver/armSrc/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
These are standalone code resources compiled in ARM mode, no global variables or accessing 68k code is allowed.
|
||||
@@ -1,5 +1 @@
|
||||
This project can't use global variables, its executed without being launched so writing to globals will corrupt the currently running application, reading will just retrieve random numbers or crash because of invalid access.
|
||||
|
||||
*.func files are binary blobs containing ASM code to perform sensitive functions:
|
||||
armCall68k.func is ARM asm that sets up a path back to 68k code without ending ARM execution
|
||||
armExit.func is ARM asm that terminates ARM execution
|
||||
|
||||
@@ -7,7 +7,7 @@ cd $DIR
|
||||
APPNAME="MuExpDriver"
|
||||
|
||||
if [ "$1" = "clean" ]; then
|
||||
rm -rf *.o *.a $APPNAME $APPNAME.prc *.bin
|
||||
rm -rf *.o *.a $APPNAME ./armExit ./armCall68k $APPNAME.prc *.bin
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -18,6 +18,10 @@ if [ "$1" = "debug" ]; then
|
||||
CFLAGS="$CFLAGS -DDEBUG -g"
|
||||
fi
|
||||
|
||||
arm-palmos-gcc $CFLAGS -c ./armSrc/armExit.c -o ./armSrc/armExit.o
|
||||
arm-palmos-gcc $CFLAGS -c ./armSrc/armCall68k.c -o ./armSrc/armCall68k.o
|
||||
arm-palmos-gcc -nostartfiles -o ./armExit ./armSrc/armExit.o
|
||||
arm-palmos-gcc -nostartfiles -o ./armCall68k ./armSrc/armCall68k.o
|
||||
for I in "${FILES[@]}"; do
|
||||
m68k-palmos-gcc $CFLAGS -c $I.c -o $I.o
|
||||
done
|
||||
@@ -29,4 +33,4 @@ if type "MakePalmIcon" &> /dev/null; then
|
||||
fi
|
||||
|
||||
pilrc $APPNAME.rcp
|
||||
build-prc $APPNAME.def $APPNAME *.bin
|
||||
build-prc $APPNAME.def $APPNAME ./armExit ./armCall68k *.bin
|
||||
|
||||
Reference in New Issue
Block a user