src/mess/drivers/v1050.c
| r9417 | r9418 | |
| 72 | 72 | 6502 - Synertek SY6502A CPU |
| 73 | 73 | 4164 - NEC D4164-2 64Kx1 Dynamic RAM |
| 74 | 74 | 9016 - AMD AM9016EPC 16Kx1 Dynamic RAM |
| 75 | | 8214 - NEC ?PB8214C Priority Interrupt Control Unit |
| 75 | 8214 - NEC uPB8214C Priority Interrupt Control Unit |
| 76 | 76 | 8255A - NEC D8255AC-5 Programmable Peripheral Interface |
| 77 | 77 | 8251A - NEC D8251AC Programmable Communication Interface |
| 78 | 78 | WD1793 - Mitsubishi MB8877 Floppy Disc Controller |
| r9417 | r9418 | |
| 95 | 95 | |
| 96 | 96 | TODO: |
| 97 | 97 | |
| 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 | | |
| 103 | 98 | - write to banked RAM at 0x0000-0x1fff when ROM is active |
| 104 | 99 | - real keyboard w/i8049 |
| 105 | 100 | - keyboard beeper |
| r9417 | r9418 | |
| 124 | 119 | #include "sound/discrete.h" |
| 125 | 120 | #include "devices/messram.h" |
| 126 | 121 | |
| 127 | | INLINE running_device *get_floppy_image(running_machine *machine, int drive) |
| 128 | | { |
| 129 | | return floppy_get_device(machine, drive); |
| 130 | | } |
| 131 | | |
| 132 | 122 | void v1050_set_int(running_machine *machine, UINT8 mask, int state) |
| 133 | 123 | { |
| 134 | 124 | v1050_state *driver_state = machine->driver_data<v1050_state>(); |
| r9417 | r9418 | |
| 811 | 801 | wd17xx_set_side(state->mb8877, BIT(data, 4)); |
| 812 | 802 | |
| 813 | 803 | /* 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); |
| 818 | 808 | |
| 819 | 809 | /* density select */ |
| 820 | 810 | wd17xx_dden_w(state->mb8877, BIT(data, 7)); |
| r9417 | r9418 | |
| 881 | 871 | /* floppy interrupt enable */ |
| 882 | 872 | state->f_int_enb = BIT(data, 1); |
| 883 | 873 | |
| 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 | |
| 884 | 880 | /* baud select */ |
| 885 | 881 | if (baud_sel != state->baud_sel) |
| 886 | 882 | { |
| r9417 | r9418 | |
| 1055 | 1051 | v1050_state *driver_state = device->machine->driver_data<v1050_state>(); |
| 1056 | 1052 | |
| 1057 | 1053 | if (driver_state->f_int_enb) |
| 1054 | { |
| 1058 | 1055 | v1050_set_int(device->machine, INT_FLOPPY, state); |
| 1056 | } |
| 1057 | else |
| 1059 | 1058 | { |
| 1060 | 1059 | v1050_set_int(device->machine, INT_FLOPPY, 0); |
| 1061 | | cputag_set_input_line(device->machine, Z80_TAG, INPUT_LINE_NMI, CLEAR_LINE); |
| 1062 | 1060 | } |
| 1063 | 1061 | } |
| 1064 | 1062 | |
| r9417 | r9418 | |
| 1067 | 1065 | v1050_state *driver_state = device->machine->driver_data<v1050_state>(); |
| 1068 | 1066 | |
| 1069 | 1067 | if (driver_state->f_int_enb) |
| 1068 | { |
| 1070 | 1069 | cputag_set_input_line(device->machine, Z80_TAG, INPUT_LINE_NMI, state); |
| 1070 | } |
| 1071 | 1071 | else |
| 1072 | 1072 | { |
| 1073 | | v1050_set_int(device->machine, INT_FLOPPY, 0); |
| 1074 | 1073 | cputag_set_input_line(device->machine, Z80_TAG, INPUT_LINE_NMI, CLEAR_LINE); |
| 1075 | 1074 | } |
| 1076 | 1075 | } |
| r9417 | r9418 | |
| 1080 | 1079 | DEVCB_NULL, |
| 1081 | 1080 | DEVCB_LINE(v1050_mb8877_intrq_w), |
| 1082 | 1081 | DEVCB_LINE(v1050_mb8877_drq_w), |
| 1083 | | {FLOPPY_0,FLOPPY_1,NULL,NULL} |
| 1082 | { FLOPPY_0, FLOPPY_1, NULL, NULL } |
| 1084 | 1083 | }; |
| 1085 | 1084 | |
| 1086 | 1085 | /* Machine Initialization */ |