Exemple #1
0
    def eggStatus(self):
        ready = readDWord(self.citra, self.eggReady)

        seed0 = readDWord(self.citra, self.eggAddress)
        seed1 = readDWord(self.citra, self.eggAddress + 4)

        return ready, seed1, seed0
Exemple #2
0
    def getCurrentSeed(self):
        index = readDWord(self.citra, self.sfmtIndex)
        pointer = self.sfmtStart if index == 624 else self.sfmtStart + (index * 4)

        seed1 = readDWord(self.citra, pointer)
        seed2 = readDWord(self.citra, pointer + 4)

        return (seed2 << 32) | seed1
Exemple #3
0
 def getWildOffset(self):
     pointer = readDWord(self.citra, 0x880313c) - 0xA1C
     if pointer < 0x8000000 or pointer > 0x8DF0000:
         return 0x8805614
     else:
         pointer = readDWord(self.citra, pointer)
         if pointer < 0x8000000 or pointer > 0x8DF0000:
             return 0x8805614
         else:
             return pointer
 def getWildOffset(self):
     pointer = readDWord(self.citra, 0x880313C) - 0x22C0
     if pointer < 0x8000000 or pointer > 0x8DF0000:
         return 0x8804064 if readDWord(self.citra,
                                       0x8804060) == 0 else 0x8804060
     else:
         pointer = readDWord(self.citra, pointer)
         if pointer < 0x8000000 or pointer > 0x8DF0000:
             return 0x8804064 if readDWord(self.citra,
                                           0x8804060) == 0 else 0x8804060
         else:
             return pointer
Exemple #5
0
    def readInitialSeed(self):
        self.initialSeed = readDWord(self.citra, self.seedAddress)
        self.sfmt = SFMT(self.initialSeed)
        self.currentSeed = self.initialSeed
        self.frameCount = -1

        return self.initialSeed
Exemple #6
0
    def readSOSInitialSeed(self):
        self.sosInitialSeed = readDWord(self.citra, self.sosSeedAddress)
        self.sosSFMT = SFMT(self.sosInitialSeed)
        self.sosCurrentSeed = self.sosInitialSeed
        self.sosFrameCount = -1

        return self.sosInitialSeed
Exemple #7
0
    def updateFrameCount(self):
        # Reseed check
        if readDWord(self.citra, self.seedAddress) != self.initialSeed:
            self.initialSeed = readDWord(self.citra, self.seedAddress)
            self.mt = MT(self.initialSeed)
            self.currentSeed = self.initialSeed
            self.frameCount = -1

        currSeed = self.getCurrentSeed()
        difference = self.frameCount
        count = 0

        while currSeed != self.currentSeed:
            self.currentSeed = self.mt.nextUInt()
            count += 1

            # Probably stuck in an infinite loop
            if count > 1000000:
                return None

        self.frameCount += count
        difference = self.frameCount - difference

        tiny0 = readDWord(self.citra, self.tinyStart)
        tiny1 = readDWord(self.citra, self.tinyStart + 4)
        tiny2 = readDWord(self.citra, self.tinyStart + 8)
        tiny3 = readDWord(self.citra, self.tinyStart + 12)

        save = readDWord(self.citra, self.saveVariable)

        return difference, self.initialSeed, self.currentSeed, self.frameCount, save, tiny3, tiny2, tiny1, tiny0
Exemple #8
0
    def getSOSCurrentSeed(self):
        index = readDWord(self.citra, self.sosSFMTIndex)
        pointer = self.sosSFMTStart if index == 624 else self.sosSFMTStart + (index * 4)
        seed = readDWord(self.citra, pointer)

        return seed