thegrimreaper
Certified Guru
Hello everybody,
I'm trying to help Franxis continue the great work he's done porting Mame to the GP32. I've been trying to get the vector graphics engine working for the Atari emulator, so that games such as Asteroids, Battle Zone, Lunar Lander and (most desirable of all) Star Wars will be playable on Game Park's little wonder machine.
I've downloaded the original 0.34 version of the msdos source code and I'm trying to port the source code to work with Franxis' 1.2.2 version of the GP32 ARM source code. The problem I'm having is in the file "src\msods\osinline.h" which has an assembly routine written for msdos that now needs to be converted to work with the ARM cpu. I don't know anything about assembly code, but from what I've researched on the web it seems that you need to know what you're doing to make changes to this un-readable language. Anyway, here's the code that is failing to compile...
#define vec_mult _vec_mult
INLINE int _vec_mult(int x, int y)
{
int result;
__asm (
"movl %1 , %0 ; "
"imull %2 ; " /* do the multiply */
"movl %%edx , %%eax ; "
: "=&a" (result) /* the result has to go in eax */
: "mr" (x), /* x and y can be regs or mem */
"mr" (y)
: "%edx", "%cc" /* clobbers edx and flags */
);
return result;
}
And the compilation error I'm getting is...
src/gp32/osinline.h:17: error: unknown register name `%edx' in `asm'
Please help me guys, I'm sure there's lots of people out there that would love to play the original Star Wars etc. on their GP32.
I'm trying to help Franxis continue the great work he's done porting Mame to the GP32. I've been trying to get the vector graphics engine working for the Atari emulator, so that games such as Asteroids, Battle Zone, Lunar Lander and (most desirable of all) Star Wars will be playable on Game Park's little wonder machine.
I've downloaded the original 0.34 version of the msdos source code and I'm trying to port the source code to work with Franxis' 1.2.2 version of the GP32 ARM source code. The problem I'm having is in the file "src\msods\osinline.h" which has an assembly routine written for msdos that now needs to be converted to work with the ARM cpu. I don't know anything about assembly code, but from what I've researched on the web it seems that you need to know what you're doing to make changes to this un-readable language. Anyway, here's the code that is failing to compile...
#define vec_mult _vec_mult
INLINE int _vec_mult(int x, int y)
{
int result;
__asm (
"movl %1 , %0 ; "
"imull %2 ; " /* do the multiply */
"movl %%edx , %%eax ; "
: "=&a" (result) /* the result has to go in eax */
: "mr" (x), /* x and y can be regs or mem */
"mr" (y)
: "%edx", "%cc" /* clobbers edx and flags */
);
return result;
}
And the compilation error I'm getting is...
src/gp32/osinline.h:17: error: unknown register name `%edx' in `asm'
Please help me guys, I'm sure there's lots of people out there that would love to play the original Star Wars etc. on their GP32.