Skip to content

Commit 7a07343

Browse files
committed
CIA SDR IRC fix for "old" CIAs.
In strange_extra_sdr_flags(), the code for the "old" cia was actually correct for the 4485 subtype. Patch is a mix of the one from Dag Lem and me. https://sourceforge.net/p/vice-emu/bugs/1219/?page=1#d27d/7f92 git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45957 379a1393-f5fb-40a0-bcee-ef074d9b53f7
1 parent a97eb97 commit 7a07343

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vice/src/core/ciacore.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ void ciacore_reset(cia_context_t *cia_context)
690690
static inline void strange_extra_sdr_flags(cia_context_t *cia_context, CLOCK rclk, uint8_t byte)
691691
{
692692
if ((cia_context->sr_bits > 1 && cia_context->sr_bits < 15) ||
693-
(cia_context->sr_bits == 15 && !(cia_context->sdr_delay & (/*CIA_SDR_CNT1 | */CIA_SDR_CNT2)))) {
693+
(cia_context->sr_bits == 15 && !(cia_context->sdr_delay & CIA_SDR_CNT2))) {
694694
schedule_sdr_alarm(cia_context, rclk, CIA_SDR_SET_SDR_IRQ2);
695695
}
696696

@@ -701,9 +701,9 @@ static inline void strange_extra_sdr_flags(cia_context_t *cia_context, CLOCK rcl
701701
uint32_t sdr_delay = cia_context->sdr_delay;
702702
uint32_t cnt_delay = sdr_delay;
703703

704-
if (cia_context->model == CIA_MODEL_6526) {
704+
/* if (cia_context->model == CIA_MODEL_6526_4485) {
705705
cnt_wanted = (CIA_SDR_CNT0 | CIA_SDR_CNT1 | CIA_SDR_CNT2);
706-
} else {
706+
} else */ {
707707
cnt_wanted = ( CIA_SDR_CNT1 | CIA_SDR_CNT2);
708708
}
709709
forceFinish = (cnt_delay & cnt_wanted) != cnt_wanted;

0 commit comments

Comments
 (0)