Mercurial > repos > blastem
comparison psg.c @ 1451:9c65819afec3
Fix operator precedence in psg serialize/deserialize
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 29 Aug 2017 19:42:44 -0700 |
parents | 4e5797b3935a |
children | ce1f93be0104 |
comparison
equal
deleted
inserted
replaced
1450:08bc099a622f | 1451:9c65819afec3 |
---|---|
172 context->lsfr = load_int16(buf); | 172 context->lsfr = load_int16(buf); |
173 load_buffer16(buf, context->counter_load, 4); | 173 load_buffer16(buf, context->counter_load, 4); |
174 load_buffer16(buf, context->counters, 4); | 174 load_buffer16(buf, context->counters, 4); |
175 load_buffer8(buf, context->volume, 4); | 175 load_buffer8(buf, context->volume, 4); |
176 uint8_t output_state = load_int8(buf); | 176 uint8_t output_state = load_int8(buf); |
177 context->output_state[0] = output_state & 8 >> 3; | 177 context->output_state[0] = output_state >> 3 & 1; |
178 context->output_state[1] = output_state & 4 >> 2; | 178 context->output_state[1] = output_state >> 2 & 1; |
179 context->output_state[2] = output_state & 2 >> 1; | 179 context->output_state[2] = output_state >> 1 & 1; |
180 context->output_state[3] = output_state & 1; | 180 context->output_state[3] = output_state & 1; |
181 context->noise_use_tone = output_state & 0x10 >> 4; | 181 context->noise_use_tone = output_state >> 4 & 1; |
182 context->noise_type = load_int8(buf); | 182 context->noise_type = load_int8(buf); |
183 context->latch = load_int8(buf); | 183 context->latch = load_int8(buf); |
184 context->cycles = load_int32(buf); | 184 context->cycles = load_int32(buf); |
185 } | 185 } |