Menu

#1901 1551 drive won't read disk images if (re)enabled at runtime

v3.x
open
nobody
None
Drives
2023-06-23
2023-06-22
Durandal
No

In xplus4, starting the emulator with the 1551 enable works fine.
But either switching drive type and then selecting 1551 again from the GUI, or starting with no drive enabled and then selecting 1551 emulation will cause the drive to be unable to access any disk image attached to it.

Discussion

  • gpz

    gpz - 2023-06-22

    generally switching drive types at runtime seems to not work correctly

     
  • Olaf Seibert

    Olaf Seibert - 2023-06-23

    From some earlier 1551 bug I still have this local patch in my tree. I can't remember why, exactly :-) But from the looks of it, it was more relevant to changing the drive type away from 1551. Could you try anyway? I'm tempted to commit it since it feels like it's correct :)

    Index: drive/tcbm/glue1551.c
    ===================================================================
    --- drive/tcbm/glue1551.c       (revision 44101)
    +++ drive/tcbm/glue1551.c       (working copy)
    @@ -161,8 +161,10 @@
     void glue1551_reset(diskunit_context_t *drv)
     {
         alarm_unset(glue1551[drv->mynumber].timer_alarm);
    -    alarm_set(glue1551[drv->mynumber].timer_alarm,
    +    if (drv->type == DRIVE_TYPE_1551) {
    +        alarm_set(glue1551[drv->mynumber].timer_alarm,
                   *(drv->clk_ptr) + GLUE1551_ALARM_TICKS_OFF);
    +    }
         glue1551[drv->mynumber].irq_line = 0;
    
         drv->drives[0]->led_status = 1;
    
     
    • Durandal

      Durandal - 2023-06-23

      Doesn't seem to make any difference

       
  • gpz

    gpz - 2023-06-23

    @rhialto perhaps something similar must be done for the other drives (VIAs?) too?

     
  • Olaf Seibert

    Olaf Seibert - 2023-06-23

    Ah the patch was for https://sourceforge.net/p/vice-emu/bugs/1764/ . None of the different patches there has been applied.

     

Log in to post a comment.