Previous 15994 Revisions Next

r9418 Wednesday 20th October, 2010 at 11:47:52 UTC by Curt Coder
[V1050] Fixed floppy interrupt signal handling.
[src/mess/drivers]v1050.c

src/mess/drivers/v1050.c
r9417r9418
7272    6502    - Synertek SY6502A CPU
7373    4164    - NEC D4164-2 64Kx1 Dynamic RAM
7474    9016    - AMD AM9016EPC 16Kx1 Dynamic RAM
75    8214    - NEC ?PB8214C Priority Interrupt Control Unit
75    8214    - NEC uPB8214C Priority Interrupt Control Unit
7676    8255A   - NEC D8255AC-5 Programmable Peripheral Interface
7777    8251A   - NEC D8251AC Programmable Communication Interface
7878    WD1793  - Mitsubishi MB8877 Floppy Disc Controller
r9417r9418
9595
9696    TODO:
9797
98    - ?
99        Device 'u76': warning - attempt to direct-map address 00001FFD in program space
100        Device 'u76': warning - attempt to direct-map address 00001FFE in program space
101        Device 'u76': warning - attempt to direct-map address 00001FFF in program space
102
10398    - write to banked RAM at 0x0000-0x1fff when ROM is active
10499    - real keyboard w/i8049
105100    - keyboard beeper
r9417r9418
124119#include "sound/discrete.h"
125120#include "devices/messram.h"
126121
127INLINE running_device *get_floppy_image(running_machine *machine, int drive)
128{
129   return floppy_get_device(machine, drive);
130}
131
132122void v1050_set_int(running_machine *machine, UINT8 mask, int state)
133123{
134124   v1050_state *driver_state = machine->driver_data<v1050_state>();
r9417r9418
811801   wd17xx_set_side(state->mb8877, BIT(data, 4));
812802
813803   /* floppy motor */
814   floppy_mon_w(get_floppy_image(device->machine, 0), BIT(data, 6));
815   floppy_mon_w(get_floppy_image(device->machine, 1), BIT(data, 6));
816   floppy_drive_set_ready_state(get_floppy_image(device->machine, 0), f_motor_on, 1);
817   floppy_drive_set_ready_state(get_floppy_image(device->machine, 1), f_motor_on, 1);
804   floppy_mon_w(floppy_get_device(device->machine, 0), BIT(data, 6));
805   floppy_mon_w(floppy_get_device(device->machine, 1), BIT(data, 6));
806   floppy_drive_set_ready_state(floppy_get_device(device->machine, 0), f_motor_on, 1);
807   floppy_drive_set_ready_state(floppy_get_device(device->machine, 1), f_motor_on, 1);
818808
819809   /* density select */
820810   wd17xx_dden_w(state->mb8877, BIT(data, 7));
r9417r9418
881871   /* floppy interrupt enable */
882872   state->f_int_enb = BIT(data, 1);
883873
874   if (!state->f_int_enb)
875   {
876      v1050_set_int(device->machine, INT_FLOPPY, 0);
877      cputag_set_input_line(device->machine, Z80_TAG, INPUT_LINE_NMI, CLEAR_LINE);
878   }
879
884880   /* baud select */
885881   if (baud_sel != state->baud_sel)
886882   {
r9417r9418
10551051   v1050_state *driver_state = device->machine->driver_data<v1050_state>();
10561052
10571053   if (driver_state->f_int_enb)
1054   {
10581055      v1050_set_int(device->machine, INT_FLOPPY, state);
1056   }
1057   else
10591058   {
10601059      v1050_set_int(device->machine, INT_FLOPPY, 0);
1061      cputag_set_input_line(device->machine, Z80_TAG, INPUT_LINE_NMI, CLEAR_LINE);
10621060   }
10631061}
10641062
r9417r9418
10671065   v1050_state *driver_state = device->machine->driver_data<v1050_state>();
10681066
10691067   if (driver_state->f_int_enb)
1068   {
10701069      cputag_set_input_line(device->machine, Z80_TAG, INPUT_LINE_NMI, state);
1070   }
10711071   else
10721072   {
1073      v1050_set_int(device->machine, INT_FLOPPY, 0);
10741073      cputag_set_input_line(device->machine, Z80_TAG, INPUT_LINE_NMI, CLEAR_LINE);
10751074   }
10761075}
r9417r9418
10801079   DEVCB_NULL,
10811080   DEVCB_LINE(v1050_mb8877_intrq_w),
10821081   DEVCB_LINE(v1050_mb8877_drq_w),
1083   {FLOPPY_0,FLOPPY_1,NULL,NULL}
1082   { FLOPPY_0, FLOPPY_1, NULL, NULL }
10841083};
10851084
10861085/* Machine Initialization */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team