Ejemplo n.º 1
0
 def write(self, address, value):
     if address < 0x8000:
         MapperBase.write(self, address, value)
         return
     
     if not ((value&128) == 0):
         # reset buffer
         self.regBufferCounter = 0
         self.regBuffer = 0
         # reset register
         if self.getRegNumber(address) == 0:
             self.prgSwitchingArea = 1
             self.prgSwitchingSize = 1
     else:
         # Continue buffering:
         self.regBuffer = (self.regBuffer & (0xFF-(1<<self.regBufferCounter))) | ((value&1)<<self.regBufferCounter)
         self.regBufferCounter += 1
         if self.regBufferCounter == 5:
             self.setReg(self.getRegNumber(address), self.regBuffer)
             #reset buffer
             self.regBufferCounter = 0
             self.regBuffer = 0
Ejemplo n.º 2
0
 def write(self, address, value):
     MapperBase.write(self, address, value)