src/mess/machine/pc8801.c
| r6250 | r6251 | |
| 16 | 16 | ***************************************************************************/ |
| 17 | 17 | |
| 18 | 18 | #include "driver.h" |
| 19 | #include "includes/pc8801.h" |
| 20 | #include "machine/ctronics.h" |
| 19 | 21 | #include "machine/i8255a.h" |
| 20 | | #include "includes/pc8801.h" |
| 21 | 22 | #include "machine/upd1990a.h" |
| 22 | 23 | #include "machine/upd765.h" |
| 23 | 24 | #include "sound/beep.h" |
| r6250 | r6251 | |
| 48 | 49 | { |
| 49 | 50 | pc88_state *state = space->machine->driver_data; |
| 50 | 51 | |
| 52 | /* real time clock */ |
| 51 | 53 | upd1990a_c0_w(state->upd1990a, BIT(data, 0)); |
| 52 | 54 | upd1990a_c1_w(state->upd1990a, BIT(data, 1)); |
| 53 | 55 | upd1990a_c2_w(state->upd1990a, BIT(data, 2)); |
| 54 | 56 | upd1990a_data_w(state->upd1990a, BIT(data, 3)); |
| 55 | 57 | |
| 56 | | /* printer (not yet) */ |
| 58 | /* printer */ |
| 59 | centronics_data_w(state->centronics, 0, data); |
| 60 | |
| 57 | 61 | /* UOP3 (bit 7 -- not yet) */ |
| 58 | 62 | } |
| 59 | 63 | |
| r6250 | r6251 | |
| 143 | 147 | pc88_state *state = space->machine->driver_data; |
| 144 | 148 | const device_config *speaker = devtag_get_device(space->machine, "beep"); |
| 145 | 149 | |
| 150 | /* printer */ |
| 151 | centronics_strobe_w(state->centronics, BIT(data, 0)); |
| 152 | |
| 153 | /* real time clock */ |
| 146 | 154 | upd1990a_stb_w(state->upd1990a, BIT(data, 1)); |
| 147 | 155 | upd1990a_clk_w(state->upd1990a, BIT(data, 2)); |
| 148 | 156 | |
| r6250 | r6251 | |
| 171 | 179 | pc88_state *state = space->machine->driver_data; |
| 172 | 180 | int r; |
| 173 | 181 | |
| 174 | | r = pc8801_is_24KHz ? 0x00 : 0x02; |
| 182 | r = centronics_busy_r(state->centronics); |
| 183 | r |= pc8801_is_24KHz ? 0x00 : 0x02; |
| 175 | 184 | r |= use_5FD ? 0x00 : 0x08; |
| 176 | 185 | r |= state->rtc_data ? 0x10 : 0x00; |
| 177 | 186 | if(video_screen_get_vblank(space->machine->primary_screen)) r|=0x20; |
| r6250 | r6251 | |
| 670 | 679 | |
| 671 | 680 | /* find devices */ |
| 672 | 681 | state->upd1990a = devtag_get_device(machine, UPD1990A_TAG); |
| 682 | state->centronics = devtag_get_device(machine, CENTRONICS_TAG); |
| 673 | 683 | |
| 674 | 684 | /* initialize RTC */ |
| 675 | 685 | upd1990a_cs_w(state->upd1990a, 1); |
src/mess/drivers/pc8801.c
| r6250 | r6251 | |
| 82 | 82 | *****************************************************************************************************/ |
| 83 | 83 | |
| 84 | 84 | #include "driver.h" |
| 85 | #include "includes/pc8801.h" |
| 85 | 86 | #include "cpu/z80/z80.h" |
| 86 | 87 | #include "cpu/v30mz/nec.h" |
| 87 | | #include "sound/beep.h" |
| 88 | #include "devices/flopdrv.h" |
| 89 | #include "machine/ctronics.h" |
| 88 | 90 | #include "machine/i8255a.h" |
| 89 | | #include "includes/pc8801.h" |
| 90 | 91 | #include "machine/upd1990a.h" |
| 91 | 92 | #include "machine/upd765.h" |
| 92 | | #include "devices/flopdrv.h" |
| 93 | 93 | #include "sound/2203intf.h" |
| 94 | #include "sound/beep.h" |
| 94 | 95 | |
| 95 | 96 | static const gfx_layout char_layout_40L_h = |
| 96 | 97 | { |
| r6250 | r6251 | |
| 647 | 648 | |
| 648 | 649 | MDRV_UPD765A_ADD("upd765", pc8801_fdc_interface) |
| 649 | 650 | MDRV_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, pc88_upd1990a_intf) |
| 651 | MDRV_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics) |
| 650 | 652 | |
| 651 | 653 | MDRV_FLOPPY_2_DRIVES_ADD(pc88_floppy_config) |
| 652 | 654 | MACHINE_DRIVER_END |