コード例 #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);
     }
 }
コード例 #2
0
ファイル: Core.cs プロジェクト: stuff2600/RAEmus
 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
     }
 }
コード例 #3
0
ファイル: NES.Core.cs プロジェクト: red031000/tpp-BizHawk2
 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);
     }
 }