Quote:
Originally Posted by Mrs Beanbag
i did see a talk about tool-assisted speed runs at EMFcamp that explained how people sort of cheat the game by exploiting the random number sequence and it did set me wondering about techniques to thwart this sort of thing. Using, for instance, beam position XOR onto the State value might make things a little harder to predict. At least on real hardware... or might make it highly dependent on exactly which emulator is being used!
|
This is the kind of thing i use in my random routine, as follows :
Code:
move.l seed,d0
move.w $dff006,d2
swap d2
move.b $bfe801,d2
lsl.w #8,d2
move.b $bfd800,d2
add.l d2,d0
mulu.l #$59fa769f,d2:d0
add.l d2,d0
addi.l #$4a5be021,d0
ror.l #6,d0
move.l d0,seed
On real hardware it passes all randomness tests ; for me it's even good enough for cryptographic uses (but i don't want to go into this discussion again !).