lax $dc04 // load CIA1 timer lo to A and X eor ($02, x) // EOR w/ {addr}. Randomish vector from previous list X position
Which approach would you take, or have taken in the past?
; get pseudo-random number ; won't trash x, y ; out: a - number in the range [$00..$ff] .ifdef NTSC_VERSION getrandom: eor Artefacts+$0655 .else getrandom: eor Artefacts+$0653 .endif inc getrandom+$01 rts
Oh, and about eor ($02,x) in your approach, do you initialise $02/3? Because if not, you really do not want to accidentally read things like certain IO registers and trigger creative bugs. =)
No init done, I didn't think (know) that simply reading something from memory (or IO) would alter the state of anything else, I always thought that a read is a read and that's it. What examples of this would there be?