I just cleaned up the code a bit, but it should work the same as my last commit, it seems there are problems with pointer codes, and maybe Dolphin doesn't really support it? I still get errors with the MP2 codes, Dolphin showed a twi not supported error. I need someone to check over all my code in case my code is flawed.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@867 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2008-10-14 17:43:56 +00:00
parent 5157e69211
commit b75d63131c
1 changed files with 166 additions and 166 deletions

View File

@ -270,10 +270,10 @@ void RunActionReplayCode(const ARCode &code, bool nowIsBootup) {
// skip these weird init lines // skip these weird init lines
if (iter == code.ops.begin() && cmd == 1) continue; if (iter == code.ops.begin() && cmd == 1) continue;
// 0x4WXXXXXXX codes switch(z)
if(z == 0x00) // Check the value Z in 0xZWXXXXXXX {
case 0x00: // Ram write (and fill)
{ {
// Ram write (and fill), this is for codes 0x00XXXXXXX - 0x07XXXXXXX
if(w < 0x8) // Check the value W in 0xZWXXXXXXX if(w < 0x8) // Check the value W in 0xZWXXXXXXX
{ {
u32 new_addr = (addr | 0x80000000); u32 new_addr = (addr | 0x80000000);
@ -305,15 +305,12 @@ void RunActionReplayCode(const ARCode &code, bool nowIsBootup) {
} }
default: break; // TODO(Omega): maybe add a PanicAlert here? default: break; // TODO(Omega): maybe add a PanicAlert here?
} }
}
continue; continue;
} }
} case 0x04: // Write to pointer
// 0x4WXXXXXXX codes
if(z == 0x4) // Check the value Z in 0xZWXXXXXXX
{ {
// Write to pointer, this is for codes 0x40XXXXXXX - 0x44XXXXXXX if(w < 0x8)
if(w < 0x8) // Check the value W in 0xZWXXXXXXX
{ {
u32 new_addr = (addr | 0x80000000); u32 new_addr = (addr | 0x80000000);
switch ((new_addr >> 25) & 0x03) switch ((new_addr >> 25) & 0x03)
@ -345,10 +342,11 @@ void RunActionReplayCode(const ARCode &code, bool nowIsBootup) {
} }
default: break; // TODO(Omega): maybe add a PanicAlert here? default: break; // TODO(Omega): maybe add a PanicAlert here?
} }
}
continue; continue;
} }
} default:
{
switch (cmd & 0xFE) switch (cmd & 0xFE)
{ {
case 0x80: // Byte add case 0x80: // Byte add
@ -444,3 +442,5 @@ void RunActionReplayCode(const ARCode &code, bool nowIsBootup) {
} }
} }
} }
}
}