Previous 15994 Revisions Next

r15352 Tuesday 29th May, 2012 at 20:21:47 UTC by Curt Coder
[WANGPC] Fixed POST floppy error. (nw)

upd765.c: Trigger RDY active during reset interrupt for each drive independently so that 4 consecutive Sense Interrupt commands will return the correct status. [Curt Coder]
[src/mess/drivers]wangpc.c
[src/mess/machine]upd765.c

src/mess/machine/upd765.c
r15351r15352
136136
137137   int command;
138138
139   UINT8         ready_changed;
140
139141   emu_timer *seek_timer;
140142   emu_timer *timer;
141143   int timer_type;
r15351r15352
20552057         /* interrupt pending? */
20562058         if (fdc->upd765_flags & UPD765_INT)
20572059         {
2058            /* yes. Clear int */
2059            upd765_set_int(device, CLEAR_LINE);
2060            /* clear ready changed bit */
2061            fdc->ready_changed &= ~(1 << fdc->drive);
20602062
20612063            /* clear drive seek bits */
20622064            fdc->FDC_main &= ~(1 | 2 | 4 | 8);
r15351r15352
20682070
20692071            /* return result */
20702072            upd765_setup_result_phase(device,2);
2073
2074            if (fdc->ready_changed)
2075            {
2076               fdc->drive++;
2077               fdc->upd765_status[0] = 0xc0 | fdc->drive;
2078            }
2079            else
2080            {
2081               /* Clear int */
2082               upd765_set_int(device, CLEAR_LINE);
2083            }
20712084         }
20722085         else
20732086         {
r15351r15352
22922305
22932306      fdc->upd765_status[0] = 0x080 | 0x040;
22942307
2308      // HACK signal ready changed for all drives
2309      fdc->ready_changed = 0x0f;
2310
22952311      /* for the purpose of pc-xt. If any of the drives have a disk inserted,
22962312        do not set not-ready - need to check with pc_fdc.c whether all drives
22972313        are checked or only the drive selected with the drive select bits?? */
src/mess/drivers/wangpc.c
r15351r15352
1313   TODO:
1414 
1515   - keyboard
16   - upd765.c drive polling (POST expects 4 consecutive Sense Interrupt Status commands to return xx,xx,xx,C3 = ready state changed on drive 3)
1716   - floppy door disturbed interrupt
1817   - floppy door open status
1918   - hard disk

Previous 15994 Revisions Next


© 1998-2018 The MESS Team