Previous 15994 Revisions Next

r7695 Sunday 4th April, 2010 at 14:11:59 UTC by Angelo Salese
Added boundary checks for MVN and MVP opcodes in the G65816 CPU core, fixes booting in Iso Zuri Ritou Hen
[src/emu/cpu/g65816]g65816.c g65816op.h

src/emu/cpu/g65816/g65816.c
r7694r7695
2020/*
2121
2222Changes:
23    1.01 (2010-04-04):
24        Angelo Salese
25        - Added boundary checks for MVP and MVN in M mode.
26
2327    1.00 (2008-11-27):
2428        R. Belmont
2529        - Reworked for modern MAME
r7694r7695
2933            - Removed unneccessary checks from MVP and MVN
3034
3135    0.93 (2003-07-05):
32            Angelo Salese <lordkale@libero.it>
36            Angelo Salese
3337            - Fixed the BCD conversion when using the Decimal Flag in ADC and SBC.
3438            - Removed the two conversion tables for ADC and SBC as they aren't
3539              needed anymore.
src/emu/cpu/g65816/g65816op.h
r7694r7695
11151115         REGISTER_X = MAKE_UINT_8(REGISTER_X+1);                        \
11161116         REGISTER_Y = MAKE_UINT_8(REGISTER_Y+1);                        \
11171117         REGISTER_A--;                        \
1118         REGISTER_A &= 0xff; \
11181119         if ((REGISTER_A&0xff) != 0xff) \
11191120         {\
11201121            REGISTER_PC -= 3; \
r7694r7695
11221123         else \
11231124         { \
11241125            REGISTER_B -= 0x100;\
1126            REGISTER_B &= 0xff00; \
11251127            if ((REGISTER_B & 0xff00) != 0xff00)\
11261128            {           \
11271129               REGISTER_PC -= 3;\
r7694r7695
11371139         REGISTER_X = MAKE_UINT_16(REGISTER_X+1);                        \
11381140         REGISTER_Y = MAKE_UINT_16(REGISTER_Y+1);                        \
11391141         REGISTER_A--;                        \
1142         REGISTER_A &= 0xff; \
11401143         if ((REGISTER_A&0xff) != 0xff) \
11411144         {\
11421145            REGISTER_PC -= 3; \
r7694r7695
11441147         else \
11451148         { \
11461149            REGISTER_B -= 0x100;\
1150            REGISTER_B &= 0xff00; \
11471151            if ((REGISTER_B & 0xff00) != 0xff00)\
11481152            {           \
11491153               REGISTER_PC -= 3;\
r7694r7695
11971201         REGISTER_X = MAKE_UINT_8(REGISTER_X-1);                        \
11981202         REGISTER_Y = MAKE_UINT_8(REGISTER_Y-1);                        \
11991203         REGISTER_A--;                        \
1204         REGISTER_A &= 0xff; \
12001205         if ((REGISTER_A&0xff) != 0xff) \
12011206         {\
12021207            REGISTER_PC -= 3; \
r7694r7695
12041209         else \
12051210         { \
12061211            REGISTER_B -= 0x100;\
1212            REGISTER_B &= 0xff00; \
12071213            if ((REGISTER_B & 0xff00) != 0xff00)\
12081214            {           \
12091215               REGISTER_PC -= 3;\
r7694r7695
12191225         REGISTER_X = MAKE_UINT_16(REGISTER_X-1);                        \
12201226         REGISTER_Y = MAKE_UINT_16(REGISTER_Y-1);                        \
12211227         REGISTER_A--;                        \
1228         REGISTER_A &= 0xff; \
12221229         if ((REGISTER_A&0xff) != 0xff) \
12231230         {\
12241231            REGISTER_PC -= 3; \
r7694r7695
12261233         else \
12271234         { \
12281235            REGISTER_B -= 0x100;\
1236            REGISTER_B &= 0xff00; \
12291237            if ((REGISTER_B & 0xff00) != 0xff00)\
12301238            {           \
12311239               REGISTER_PC -= 3;\

Previous 15994 Revisions Next


© 1998-2018 The MESS Team