1185 to bgklink
git-svn-id: https://svn.code.sf.net/p/vbam/code/branches/bgk-link@1186 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
0fd97d915f
commit
6b18cf174f
|
@ -2698,7 +2698,7 @@ static insnfunc_t armInsnTable[4096] = {
|
|||
arm0D0,arm0D1,arm0D2,arm0D3,arm0D4,arm0D5,arm0D6,arm0D7, // 0D0
|
||||
arm0D0,arm0D9,arm0D2,arm0DB,arm0D4,arm0DD,arm0D6,arm0DF, // 0D8
|
||||
arm0E0,arm0E1,arm0E2,arm0E3,arm0E4,arm0E5,arm0E6,arm0E7, // 0E0
|
||||
arm0E0,arm0E9,arm0E2,arm_UI,arm0E4,arm_UI,arm0E6,arm_UI, // 0E8
|
||||
arm0E0,arm0E9,arm0E2,arm0CB,arm0E4,arm_UI,arm0E6,arm_UI, // 0E8
|
||||
arm0F0,arm0F1,arm0F2,arm0F3,arm0F4,arm0F5,arm0F6,arm0F7, // 0F0
|
||||
arm0F0,arm0F9,arm0F2,arm_UI,arm0F4,arm0DD,arm0F6,arm0DF, // 0F8
|
||||
|
||||
|
|
|
@ -283,11 +283,12 @@ unreadable:
|
|||
if(cpuDmaHack) {
|
||||
value = cpuDmaLast & 0xFFFF;
|
||||
} else {
|
||||
if(armState) {
|
||||
value = CPUReadHalfWordQuick(reg[15].I + (address & 2));
|
||||
} else {
|
||||
value = CPUReadHalfWordQuick(reg[15].I);
|
||||
}
|
||||
if(armState) {
|
||||
value = CPUReadMemoryQuick(reg[15].I);
|
||||
} else {
|
||||
value = CPUReadHalfWordQuick(reg[15].I) |
|
||||
CPUReadHalfWordQuick(reg[15].I) << 16;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
@ -307,9 +308,21 @@ unreadable:
|
|||
|
||||
static inline u16 CPUReadHalfWordSigned(u32 address)
|
||||
{
|
||||
u32 oldAddress = address;
|
||||
if(address & 1) {
|
||||
address &= ~0x01;
|
||||
}
|
||||
u16 value = CPUReadHalfWord(address);
|
||||
if((address & 1))
|
||||
if((oldAddress & 1))
|
||||
{
|
||||
value = (s8)value;
|
||||
#ifdef GBA_LOGGING
|
||||
if(systemVerbose & VERBOSE_UNALIGNED_MEMORY) {
|
||||
log("Unaligned signed halfword read from: %08x at %08x (%08x)\n", oldAddress, armMode ?
|
||||
armNextPC - 4 : armNextPC - 2, value);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -385,11 +398,12 @@ unreadable:
|
|||
if(cpuDmaHack) {
|
||||
return cpuDmaLast & 0xFF;
|
||||
} else {
|
||||
if(armState) {
|
||||
return CPUReadByteQuick(reg[15].I+(address & 3));
|
||||
} else {
|
||||
return CPUReadByteQuick(reg[15].I+(address & 1));
|
||||
}
|
||||
if(armState) {
|
||||
return CPUReadMemoryQuick(reg[15].I);
|
||||
} else {
|
||||
return CPUReadHalfWordQuick(reg[15].I) |
|
||||
CPUReadHalfWordQuick(reg[15].I) << 16;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue