Skip to content

Commit 9822248

Browse files
committed
Implemented 1/3 chance RNG for use in guessing which cycle NMI triggered on
1 parent c54beb9 commit 9822248

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/util/core.asm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ generateNextPseudorandomNumber:
244244
inx
245245
dey
246246
bne @updateNextByteInSeed
247+
lda #$00
248+
adc oneThirdPRNG
249+
cmp #$03
250+
bne @not3
251+
lda #$00
252+
@not3: sta oneThirdPRNG
247253
rts
248254

249255
; canon is initializeOAM

0 commit comments

Comments
 (0)