Mercurial > repos > blastem
comparison lc8951.c @ 2073:c69e42444f96
Fix some cycle adjustment stuff and an off-by one on hte TOCT response
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 31 Jan 2022 00:01:15 -0800 |
parents | f22e04b69272 |
children | bafb757e1cd2 |
comparison
equal
deleted
inserted
replaced
2072:cc13c100b027 | 2073:c69e42444f96 |
---|---|
315 return deci_cycle < dtei_cycle ? deci_cycle : dtei_cycle; | 315 return deci_cycle < dtei_cycle ? deci_cycle : dtei_cycle; |
316 } | 316 } |
317 | 317 |
318 void lc8951_adjust_cycles(lc8951 *context, uint32_t deduction) | 318 void lc8951_adjust_cycles(lc8951 *context, uint32_t deduction) |
319 { | 319 { |
320 printf("CDC deduction of %u cycles @ %u, ", deduction, context->cycle); | |
321 context->cycle -= deduction; | |
320 if (context->decode_end != CYCLE_NEVER) { | 322 if (context->decode_end != CYCLE_NEVER) { |
321 context->decode_end -= deduction; | 323 context->decode_end -= deduction; |
322 } | 324 } |
323 if (context->transfer_end != CYCLE_NEVER) { | 325 if (context->transfer_end != CYCLE_NEVER) { |
324 context->transfer_end -= deduction; | 326 context->transfer_end -= deduction; |
325 } | 327 } |
326 } | 328 printf("cycle is now %u, decode_end %u, transfer_end %u\n", context->cycle, context->decode_end, context->transfer_end); |
329 } |