src/mess/drivers/ht68k.c
| r6564 | r6565 | |
| 20 | 20 | AM_RANGE(0x00000000, 0x0007ffff) AM_RAM AM_BASE(&ht68k_ram) // 512 KB RAM / ROM at boot |
| 21 | 21 | //AM_RANGE(0x00080000, 0x000fffff) // Expansion |
| 22 | 22 | //AM_RANGE(0x00d80000, 0x00d8ffff) // Printer |
| 23 | | AM_RANGE(0x00e00000, 0x00e00003) AM_MIRROR(0x7fffc) AM_DEVREADWRITE8("wd1770", wd17xx_r, wd17xx_w, 0xff) // FDC WD1770 |
| 23 | AM_RANGE(0x00e00000, 0x00e00007) AM_MIRROR(0xfff8) AM_DEVREADWRITE8("wd1770", wd17xx_r, wd17xx_w, 0x00ff) // FDC WD1770 |
| 24 | 24 | AM_RANGE(0x00e80000, 0x00e800ff) AM_MIRROR(0xff00) AM_DEVREADWRITE8( "duart68681", duart68681_r, duart68681_w, 0xff ) |
| 25 | 25 | AM_RANGE(0x00f00000, 0x00f07fff) AM_ROM AM_MIRROR(0xf8000) AM_REGION("user1",0) |
| 26 | 26 | ADDRESS_MAP_END |
| r6564 | r6565 | |
| 56 | 56 | return 0; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | static void duart_output(const device_config *device, UINT8 data) |
| 60 | { |
| 61 | const device_config *fdc = devtag_get_device(device->machine, "wd1770"); |
| 62 | wd17xx_set_side(fdc,BIT(data,3) ? 0 : 1); |
| 63 | if (BIT(data,4)) { |
| 64 | wd17xx_set_drive(fdc,0); |
| 65 | } else if (BIT(data,5)) { |
| 66 | wd17xx_set_drive(fdc,1); |
| 67 | } else if (BIT(data,6)) { |
| 68 | wd17xx_set_drive(fdc,2); |
| 69 | } else if (BIT(data,7)) { |
| 70 | wd17xx_set_drive(fdc,3); |
| 71 | } |
| 72 | } |
| 73 | |
| 59 | 74 | static WRITE8_DEVICE_HANDLER( ht68k_kbd_put ) |
| 60 | 75 | { |
| 61 | 76 | duart68681_rx_data(devtag_get_device(device->machine, "duart68681"), 1, data); |
| r6564 | r6565 | |
| 71 | 86 | duart_irq_handler, |
| 72 | 87 | duart_tx, |
| 73 | 88 | duart_input, |
| 74 | | NULL |
| 89 | duart_output |
| 75 | 90 | }; |
| 76 | 91 | |
| 92 | static WRITE_LINE_DEVICE_HANDLER( ht68k_fdc_intrq_w ) |
| 93 | { |
| 94 | //cputag_set_input_line_and_vector(device->machine, "maincpu", M68K_IRQ_4, HOLD_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 95 | } |
| 96 | |
| 97 | static const wd17xx_interface ht68k_wd17xx_interface = |
| 98 | { |
| 99 | DEVCB_LINE(ht68k_fdc_intrq_w), |
| 100 | DEVCB_NULL, |
| 101 | {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3} |
| 102 | }; |
| 103 | |
| 77 | 104 | static const floppy_config ht68k_floppy_config = |
| 78 | 105 | { |
| 79 | 106 | DEVCB_NULL, |
| r6564 | r6565 | |
| 98 | 125 | MDRV_GENERIC_TERMINAL_ADD(TERMINAL_TAG,ht68k_terminal_intf) |
| 99 | 126 | |
| 100 | 127 | MDRV_DUART68681_ADD( "duart68681", XTAL_8MHz / 2, ht68k_duart68681_config ) |
| 101 | | MDRV_WD1770_ADD("wd1770", default_wd17xx_interface_2_drives ) |
| 102 | | MDRV_FLOPPY_2_DRIVES_ADD(ht68k_floppy_config) |
| 128 | MDRV_WD1770_ADD("wd1770", ht68k_wd17xx_interface ) |
| 129 | MDRV_FLOPPY_4_DRIVES_ADD(ht68k_floppy_config) |
| 103 | 130 | MACHINE_DRIVER_END |
| 104 | 131 | |
| 105 | 132 | /* ROM definition */ |