View Single Post
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#6
Well you were right.. the xmame-sdl source has assembly code built into it that is architecture specific. I was able to port one of the functions so that it continued compiling but now it's run into a huge one. More specifically it doesn't like:

M_DAD(BC);
M_DAD(DE);
M_DAD(HL);
M_DAD(SP);

In the file ./xmame-0.106/src/cpu/i8085/i8085.c

Someone who is better at assembly might be able to port this function to either C.. or an Assembly equivalent in ARMEL ...

As an example the original fix was in ./xmame-0.106/src/unix/osinline.h:
original
Code:
#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;
}
#endif
Fixed:
Code:
INLINE int _vec_mult(int x, int y)
{
        int res_hi, res_lo;

        __asm__ __volatile__
                ("smull\t%1,%0,%2,%3"
                 : "=r"(res_hi), "=r"(res_lo)
                 : "r"(x), "r"(y)
                );

        return res_hi;
}
(I found it online.. I barely can write decent apps in C.. I don't know Jack about assembly).

That removed the x86 specific calls and worked great.. but I have no idea what to do with that other file.

And trying to have apt build it for me doesn't work at all.. just errors that it's unable to find a file and happily takes up 8.0GB of space if you run it a couple times in a row.

Sorry dude!! I tried.

There are three different deb's it seems that provide the xmame virtual package.. xmame-x, xmame-svga or xmame-sdl... is there some specific reason you wanted the SDL? Not that I think the other two would work.. but just curious.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post: