Lines Matching refs:state
50 static uint16_t lfsr_step(uint16_t state, int count) in lfsr_step() argument
52 state &= 0x7fff; in lfsr_step()
54 state = ((state >> 1) | in lfsr_step()
55 ((((state >> 0) ^ (state >> 1)) & 1) << 14)) & 0x7fff; in lfsr_step()
57 return state; in lfsr_step()
84 uint16_t state; in scramble() local
89 state = brom_scrambler_seeds[0]; in scramble()
100 state = default_scrambler_seeds[page % seedmod]; in scramble()
104 state = lfsr_step(state, 15); in scramble()
108 data[i] ^= state; in scramble()
109 state = lfsr_step(state, 8); in scramble()