Previous 15994 Revisions Next

r6565 Monday 7th December, 2009 at 09:14:20 UTC by Miodrag Milanović
[HT68K] Floppy connected, K-OS boots
[src/mess/drivers]ht68k.c

src/mess/drivers/ht68k.c
r6564r6565
2020   AM_RANGE(0x00000000, 0x0007ffff) AM_RAM AM_BASE(&ht68k_ram) // 512 KB RAM / ROM at boot
2121   //AM_RANGE(0x00080000, 0x000fffff) // Expansion
2222   //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
2424   AM_RANGE(0x00e80000, 0x00e800ff) AM_MIRROR(0xff00) AM_DEVREADWRITE8( "duart68681", duart68681_r, duart68681_w, 0xff )
2525   AM_RANGE(0x00f00000, 0x00f07fff) AM_ROM AM_MIRROR(0xf8000) AM_REGION("user1",0)
2626ADDRESS_MAP_END
r6564r6565
5656   return 0;
5757}
5858
59static 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
5974static WRITE8_DEVICE_HANDLER( ht68k_kbd_put )
6075{
6176   duart68681_rx_data(devtag_get_device(device->machine, "duart68681"), 1, data);
r6564r6565
7186   duart_irq_handler,
7287   duart_tx,
7388   duart_input,
74   NULL
89   duart_output
7590};
7691
92static 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
97static 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
77104static const floppy_config ht68k_floppy_config =
78105{
79106   DEVCB_NULL,
r6564r6565
98125   MDRV_GENERIC_TERMINAL_ADD(TERMINAL_TAG,ht68k_terminal_intf)   
99126
100127   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)
103130MACHINE_DRIVER_END
104131
105132/* ROM definition */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team