Skip to content

Commit

Permalink
More opcodes, windows, later levels of DKC show bgs and sprites, paro…
Browse files Browse the repository at this point in the history
…dius sprites don't disappear anymore
  • Loading branch information
friol committed Apr 4, 2024
1 parent 31aa9d5 commit dc7665c
Show file tree
Hide file tree
Showing 11 changed files with 1,059 additions and 32 deletions.
2 changes: 1 addition & 1 deletion audioSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DWORD CALLBACK StreamProc(HSTREAM handle, float* buffer, DWORD length, void* use
return length;
}

float nsamplesAva = avsize;
float nsamplesAva = (float)avsize;
//glbTheLogger.logMsg("samples available:"+std::to_string(avsize));
//glbTheLogger.logMsg("audio inc:"+std::to_string((*paudioInc)));

Expand Down
28 changes: 28 additions & 0 deletions cpu5a22.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6632,6 +6632,34 @@ int cpu5a22::stepOne()
cycles = cycAdder + 6;
break;
}
case 0x81:
{
// STA (dp,X)
int cycAdder = 0;
unsigned int addr = getDirectPageIndirectX();

pMMU->write8(addr, regA_lo);
if (regP.getAccuMemSize() == 0)
{
pMMU->write8(addr + 1, regA_hi);
cycAdder += 1;
}

if (regD & 0xff) cycAdder += 1;

regPC += 2;
cycles = cycAdder + 6;
break;
}
case 0x42:
{
// WDM
// TODO checkint

regPC += 2;
cycles = 2;
break;
}
default:
{
// unknown opcode
Expand Down
2 changes: 2 additions & 0 deletions debugger5a22.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ static const debugInfoRec debugInstrData[] =
{0xfd,3,"SBC param0,X",Absolute16,false,false,true}, // validatedF
{0xfe,3,"INC param0,X",Absolute16,false,false ,true}, // validatedF
{0xff,4,"SBC param0,X",AbsoluteLong,false,false,true}, // validatedF
{0x81,2,"STA (param0,X)",Immediate8,false,false,true}, // validatedF
{0x42,2,"WDM",Immediate8,false,false,true}, // validatedF
};

debugger5a22::debugger5a22()
Expand Down
Loading

0 comments on commit dc7665c

Please sign in to comment.