floppy re calibration not getting irq6

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ITchimp
Member
Member
Posts: 134
Joined: Sat Aug 18, 2018 8:44 pm

floppy re calibration not getting irq6

Post by ITchimp »

In the init_floppy routine, trying to re-calibrate... I am using the first drive...
so I send the cmd and drive # to the FDC, got stuck in the infinite loop that is
supposed to exit upon irq6 interrupt... what could go wrong here?
nullplan
Member
Member
Posts: 1790
Joined: Wed Aug 30, 2017 8:24 am

Re: floppy re calibration not getting irq6

Post by nullplan »

ITchimp wrote:what could go wrong here?
Anything that can go wrong with IRQs normally: IRQ not enabled in the sender, IRQ masked in the PIC/APIC, interrupt flag not set, IDTR points to Nirvana, IDT gate for the interrupt is garbled. Try to exclude some of these possibilities (e.g. if IDTR was set wrong, then no other interrupt would work, either).
Carpe diem!
ITchimp
Member
Member
Posts: 134
Joined: Sat Aug 18, 2018 8:44 pm

Re: floppy re calibration not getting irq6

Post by ITchimp »

I have made a few checks. eflag's irq enable bit is on...
also the previous times the interrupt and irq routine works... (as I reset FDC by
writing a zero to DOR)...
any suggestions??
My code snippet below, I got stuck in the while loop

Code: Select all

int st0, cy1;
    floppy_motor(1);
    print("start the timer \n");
    //magic();
    //exec(run_floppy_timer);
    
    int i=0;
    for (i=0;i<10;i++){
        floppy_write_cmd(RECALIBERATE); // 7
        floppy_write_cmd(1); // select first drive
        //irq6 = 1;
        //sti();
        while(irq6);
Post Reply