Mercurial > repos > blastem
comparison blastem.c @ 137:0e7e1ccc0a81
Implemented HV counter
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 30 Dec 2012 22:39:41 -0800 |
parents | 0bdbffa9fe90 |
children | 177ba1a5af9c |
comparison
equal
deleted
inserted
replaced
136:e64554246d11 | 137:0e7e1ccc0a81 |
---|---|
165 if (vdp_port < 4) { | 165 if (vdp_port < 4) { |
166 context->value = vdp_data_port_read(v_context); | 166 context->value = vdp_data_port_read(v_context); |
167 } else if(vdp_port < 8) { | 167 } else if(vdp_port < 8) { |
168 context->value = vdp_control_port_read(v_context); | 168 context->value = vdp_control_port_read(v_context); |
169 } else { | 169 } else { |
170 //TODO: Implement H/V counter | 170 context->value = vdp_hv_counter_read(v_context); |
171 context->value = 0; | 171 //printf("HV Counter: %X at cycle %d\n", context->value, v_context->cycles); |
172 } | 172 } |
173 context->current_cycle = v_context->cycles/MCLKS_PER_68K; | 173 context->current_cycle = v_context->cycles/MCLKS_PER_68K; |
174 } else { | 174 } else { |
175 printf("Illegal read from PSG or test register port %X\n", vdp_port); | 175 printf("Illegal read from PSG or test register port %X\n", vdp_port); |
176 exit(1); | 176 exit(1); |