Beispiel #1
0
 public void ApplySystemBusPoke(int addr, byte value)
 {
     if (addr < 0x2000)
     {
         ram[(addr & 0x7FF)] = value;
     }
     else if (addr < 0x4000)
     {
         ppu.WriteReg(addr, value);
     }
     else if (addr < 0x4020)
     {
         WriteReg(addr, value);
     }
     else if (addr < 0x6000)
     {
         //let's ignore pokes to EXP until someone asks for it. there's really almost no way that could ever be done without the board having a PokeEXP method
     }
     else if (addr < 0x8000)
     {
         Board.WriteWram(addr - 0x6000, value);
     }
     else
     {
         // apply a cheat to non-writable memory
         ApplyCheat(addr, value);
     }
 }
Beispiel #2
0
 private void ApplySystemBusPoke(int addr, byte value)
 {
     if (addr < 0x2000)
     {
         ram[(addr & 0x7FF)] = value;
     }
     else if (addr < 0x4000)
     {
         ppu.WriteReg((addr & 0x07), value);
     }
     else if (addr < 0x4020)
     {
         WriteReg(addr, value);
     }
     else
     {
         ApplyGameGenie(addr, value, null);                 //Apply a cheat to the remaining regions since they have no direct access, this may not be the best way to handle this situation
     }
 }
Beispiel #3
0
 public void ApplySystemBusPoke(int addr, byte value)
 {
     if (addr < 0x2000)
     {
         ram[(addr & 0x7FF)] = value;
     }
     else if (addr < 0x4000)
     {
         ppu.WriteReg(addr, value);
     }
     else if (addr < 0x4020)
     {
         WriteReg(addr, value);
     }
     else
     {
         // apply a cheat to non-writable memory
         ApplyCheat(addr, value, null);
     }
 }