o add mmio to trigger cart irq
o add snes irq handlers o add inline printf asm
This commit is contained in:
@@ -35,6 +35,12 @@ void CMMIO::mmio_write(unsigned addr, uint8 data) {
|
||||
fprintf(stderr,"%c",data);
|
||||
fflush(stderr);
|
||||
}
|
||||
if (addr == 0x3001){
|
||||
fprintf(stderr,"Trigger IRQ\n");
|
||||
fflush(stderr);
|
||||
cpu.triggerIRQ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CMMIO::CMMIO() {
|
||||
|
||||
@@ -23,6 +23,10 @@ void sCPU::power() {
|
||||
reset();
|
||||
}
|
||||
|
||||
void sCPU::triggerIRQ() {
|
||||
status.irq_pending = true;
|
||||
}
|
||||
|
||||
void sCPU::reset() {
|
||||
CPU::reset();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class sCPU : public CPU {
|
||||
class sCPU : public CPU {
|
||||
public:
|
||||
void enter();
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
bool hdma_mode; //0 = init, 1 = run
|
||||
DmaState dma_state;
|
||||
|
||||
//MMIO
|
||||
//MMIO
|
||||
|
||||
//$2181-$2183
|
||||
uint32 wram_addr;
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
|
||||
void power();
|
||||
void reset();
|
||||
void triggerIRQ();
|
||||
|
||||
sCPU();
|
||||
~sCPU();
|
||||
|
||||
Reference in New Issue
Block a user