Mercurial > repos > blastem
comparison cdd_mcu.c @ 2078:c534a3199020
Fix CDD int cycle calculation
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 01 Feb 2022 01:07:42 -0800 |
parents | 3f29e2726522 |
children | 5a2b759f6b2d |
comparison
equal
deleted
inserted
replaced
2077:c3241eff3c3a | 2078:c534a3199020 |
---|---|
484 } else { | 484 } else { |
485 gate_array[ga_index] = (value << 8) | (gate_array[ga_index] & 0x00FF); | 485 gate_array[ga_index] = (value << 8) | (gate_array[ga_index] & 0x00FF); |
486 } | 486 } |
487 if (context->current_status_nibble == 7) { | 487 if (context->current_status_nibble == 7) { |
488 context->int_pending = 1; | 488 context->int_pending = 1; |
489 context->next_int_cycle = cd_block_to_mclks(cycle + SECTOR_CLOCKS); | 489 context->next_int_cycle = cd_block_to_mclks(context->cycle + SECTOR_CLOCKS); |
490 } | 490 } |
491 context->current_status_nibble++; | 491 context->current_status_nibble++; |
492 context->last_nibble_cycle = context->cycle; | 492 context->last_nibble_cycle = context->cycle; |
493 next_nibble = context->cycle + NIBBLE_CLOCKS; | 493 next_nibble = context->cycle + NIBBLE_CLOCKS; |
494 } | 494 } |
542 void cdd_hock_disabled(cdd_mcu *context) | 542 void cdd_hock_disabled(cdd_mcu *context) |
543 { | 543 { |
544 context->last_subcode_cycle = CYCLE_NEVER; | 544 context->last_subcode_cycle = CYCLE_NEVER; |
545 context->next_int_cycle = CYCLE_NEVER; | 545 context->next_int_cycle = CYCLE_NEVER; |
546 context->last_nibble_cycle = CYCLE_NEVER; | 546 context->last_nibble_cycle = CYCLE_NEVER; |
547 context->last_byte_cycle = CYCLE_NEVER; | |
547 context->current_status_nibble = -1; | 548 context->current_status_nibble = -1; |
548 context->current_cmd_nibble = -1; | 549 context->current_cmd_nibble = -1; |
549 } | 550 } |
550 | 551 |
551 void cdd_mcu_adjust_cycle(cdd_mcu *context, uint32_t deduction) | 552 void cdd_mcu_adjust_cycle(cdd_mcu *context, uint32_t deduction) |