diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index d2051a19c..bf111e5cb 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -3897,13 +3897,16 @@ void FASTCALL _MMU_ARM7_write16(u32 adr, u16 val) case 0x20 : val = 0; break; - case 0x30 : - val = 0; + case 0x30: //Z1 + //used for pressure calculation - must be nonzero or else some softwares will think the stylus is up. + if(nds.isTouch) val = 2048; + else val = 0; break; - case 0x40 : - val = 0; + case 0x40: //Z2 + //used for pressure calculation. we dont support pressure calculation so just return something. + val = 2048; break; - case 0x50 : + case 0x50: if(spicnt & 0x800) { if(partie) diff --git a/desmume/src/bios.cpp b/desmume/src/bios.cpp index f37af78ab..a20dccead 100644 --- a/desmume/src/bios.cpp +++ b/desmume/src/bios.cpp @@ -256,6 +256,7 @@ TEMPLATE u32 intrWaitARM() //if(!noDiscard) // intrFlag &= cpu->newIrqFlags; + MMU.reg_IME[PROCNUM] = 1; _MMU_write32(0x04000208, 1); // set IME=1 if (intrFlag)