MAMEWorld >> Programming
Index   Flat Mode Flat  

ole
MAME Porter
Reged: 02/09/14
Posts: 19
Send PM
Re: mame 0.163 on ARM32 - raiden2 issue
08/05/15 11:18 PM


I tested 3 other V30 cpu based machines on my ARM box and they seem to be OK (bomblord, rtype2, dynduke).

I briefely looked to raiden2cop.c and tried to dump some info from
raiden2cop_device::execute_8100
During the raiden2 attract mode while the movie-like intro is being played there is almost no difference between the Arm and Intel (still the function is called many times). When the attract mode reaches gameplay section (the ship and shooting is on screen) the amount of differences is much bigger - probably because there's more sprites doing interesting stuff.
Here is the shortened log of the differences:
Movie-intro:
INT call 2912:execute_8100 addr=0x00007300 val=0x00038000 [ra=40 ang=1.570796 amp=114688.000000 cs=1]
ARM call 2912:execute_8100 addr=0x00007300 val=0x00000000 [ra=80 ang=3.141593 amp=114688.000000 cs=1]

INT call 2937:execute_8100 addr=0x00003780 val=0x00000c8e [ra=7e ang=3.092505 amp=32768.000000 cs=1]
ARM call 2937:execute_8100 addr=0x00003780 val=0x00000000 [ra=80 ang=3.141593 amp=32768.000000 cs=1]

INT call 5357:execute_8100 addr=0x00003860 val=0x00006d74 [ra=6e ang=2.699806 amp=32768.000000 cs=1]
ARM call 5357:execute_8100 addr=0x00003860 val=0x00000000 [ra=80 ang=3.141593 amp=32768.000000 cs=1]


It looks on Intel the raw angle varies (0x40, 0x7e, 0x6e) but the same call on ARM fetches raw angle 0x80.

Gameplay-intro:
INT call 7998:execute_8100 addr=0x00003780 val=0xffff4252 [ra=de ang=5.448700 amp=32768.000000 cs=1]
ARM call 7998:execute_8100 addr=0x00003780 val=0xffff4afc [ra=e0 ang=5.497787 amp=32768.000000 cs=1]

INT call 8021:execute_8100 addr=0x00003780 val=0xffff6782 [ra=e6 ang=5.645049 amp=32768.000000 cs=1]
ARM call 8021:execute_8100 addr=0x00003780 val=0xffff71c8 [ra=e8 ang=5.694137 amp=32768.000000 cs=1]

INT call 8211:execute_8100 addr=0x00003780 val=0x0000abea [ra=1e ang=0.736311 amp=32768.000000 cs=1]
ARM call 8211:execute_8100 addr=0x00003780 val=0x0000b504 [ra=20 ang=0.785398 amp=32768.000000 cs=1]

Now the raw angle still differs, but at least they are not stuck on value 0x80. On ARM they are always bigger than Intel by value of 2.
Also these differences only occurr on address from the first RAM region (AM_RANGE(0x00800, 0x0bfff)). Raw angle values from the second ram region (AM_RANGE(0x10000, 0x1efff)) etc. are correct - ie they match the Intel value.
If you'd like (by any chance) to reproduce the log, put the following printout at the end of the function:
printf("execute_8100 addr=0x%08x val=0x%08x [ra=%02x ang=%f amp=%f cs=%i]\n", cop_regs[0] + 16, res, raw_angle, (float) angle, (float) amp, cop_scale );

I don't know whether this is usefull at all. So far it seems to me the lower part of the emulated ram on my ARM box contains incorrect data.

Related to compilation options, I've removed all compilation options specific to ARM while compiling the CPU, but found no difference in the behaviour. I also disabled optimisation to see whether I get different results, but apart from much slower execution of the game's code the result is completely the same as previously (ie. the issue still remains).







Entire thread
Subject Posted by Posted on
* mame 0.163 on ARM32 - raiden2 issue ole 08/04/15 12:38 AM
. * Re: mame 0.163 on ARM32 - raiden2 issue R. Belmont  08/04/15 04:47 PM
. * Re: mame 0.163 on ARM32 - raiden2 issue ole  08/04/15 11:08 PM
. * Re: mame 0.163 on ARM32 - raiden2 issue Haze  08/04/15 11:30 PM
. * Re: mame 0.163 on ARM32 - raiden2 issue ole  08/05/15 11:18 PM
. * Re: mame 0.163 on ARM32 - raiden2 issue Haze  08/07/15 03:44 AM
. * Re: mame 0.163 on ARM32 - raiden2 issue ole  08/07/15 10:32 PM
. * Re: mame 0.163 on ARM32 - raiden2 issue AWJ  08/07/15 02:56 PM
. * Re: mame 0.163 on ARM32 - raiden2 issue ole  08/07/15 10:36 PM
. * Re: mame 0.163 on ARM32 - raiden2 issue FIXED! ole  08/08/15 01:33 AM
. * Re: mame 0.163 on ARM32 - raiden2 issue FIXED! AWJ  08/08/15 03:36 AM
. * Re: mame 0.163 on ARM32 - raiden2 issue FIXED! ole  08/09/15 01:04 AM
. * Re: mame 0.163 on ARM32 - raiden2 issue Haze  08/04/15 01:11 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 28 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2761