src/mess/drivers/enterp.c
| r4118 | r4119 | |
| 54 | 54 | #define MEM_RAM_7 ((unsigned int)0x0fb) |
| 55 | 55 | |
| 56 | 56 | |
| 57 | | /* state of the wd177x irq/drq lines */ |
| 57 | /* state of the wd1770 irq/drq lines */ |
| 58 | 58 | static UINT8 exdos_card_value = 0; |
| 59 | 59 | |
| 60 | 60 | /* The Page index for each 16k page is programmed into |
| r4118 | r4119 | |
| 247 | 247 | FLOPPY/EXDOS |
| 248 | 248 | ***************************************************************************/ |
| 249 | 249 | |
| 250 | | static WD17XX_CALLBACK( enterp_wd177x_callback ) |
| 250 | static WD17XX_CALLBACK( enterp_wd1770_callback ) |
| 251 | 251 | { |
| 252 | 252 | switch (state) |
| 253 | 253 | { |
| r4118 | r4119 | |
| 260 | 260 | |
| 261 | 261 | |
| 262 | 262 | /* bit 0 - ?? |
| 263 | | bit 1 - IRQ from WD1772 |
| 263 | bit 1 - IRQ from WD177 |
| 264 | 264 | bit 2 - ?? |
| 265 | 265 | bit 3 - ?? |
| 266 | 266 | bit 4 - ?? |
| 267 | 267 | bit 5 - ?? |
| 268 | 268 | bit 6 - Disk change signal from disk drive |
| 269 | | bit 7 - DRQ from WD1772 |
| 269 | bit 7 - DRQ from WD177 |
| 270 | 270 | */ |
| 271 | 271 | static READ8_HANDLER( exdos_card_r ) |
| 272 | 272 | { |
| r4118 | r4119 | |
| 285 | 285 | */ |
| 286 | 286 | static WRITE8_HANDLER( exdos_card_w ) |
| 287 | 287 | { |
| 288 | | const device_config *fdc = devtag_get_device(space->machine, WD177X, "wd177x"); |
| 288 | const device_config *fdc = devtag_get_device(space->machine, WD1770, "wd1770"); |
| 289 | 289 | |
| 290 | 290 | /* drive */ |
| 291 | 291 | if (BIT(data, 0)) wd17xx_set_drive(fdc, 0); |
| r4118 | r4119 | |
| 314 | 314 | |
| 315 | 315 | static ADDRESS_MAP_START( enterprise_io, ADDRESS_SPACE_IO, 8 ) |
| 316 | 316 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 317 | | AM_RANGE(0x10, 0x13) AM_MIRROR(0x04) AM_DEVREADWRITE(WD177X, "wd177x", wd17xx_r, wd17xx_w) |
| 317 | AM_RANGE(0x10, 0x13) AM_MIRROR(0x04) AM_DEVREADWRITE(WD1770, "wd1770", wd17xx_r, wd17xx_w) |
| 318 | 318 | AM_RANGE(0x18, 0x18) AM_MIRROR(0x04) AM_READWRITE(exdos_card_r, exdos_card_w) |
| 319 | 319 | AM_RANGE(0x80, 0x8f) AM_WRITE(Nick_reg_w) |
| 320 | 320 | AM_RANGE(0xa0, 0xbf) AM_READWRITE(Dave_reg_r, Dave_reg_w) |
| r4118 | r4119 | |
| 483 | 483 | Dave_sh_start |
| 484 | 484 | }; |
| 485 | 485 | |
| 486 | | static const wd17xx_interface enterp_wd17xx_interface = { enterp_wd177x_callback, NULL }; |
| 486 | static const wd17xx_interface enterp_wd1770_interface = { enterp_wd1770_callback, NULL }; |
| 487 | 487 | |
| 488 | 488 | /* 4 MHz clock, although it can be changed to 8 MHz! */ |
| 489 | 489 | static MACHINE_DRIVER_START( ep128 ) |
| r4118 | r4119 | |
| 515 | 515 | MDRV_SOUND_CONFIG(dave_custom_sound) |
| 516 | 516 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 517 | 517 | |
| 518 | | MDRV_WD177X_ADD("wd177x", enterp_wd17xx_interface ) |
| 518 | MDRV_WD1770_ADD("wd1770", enterp_wd1770_interface ) |
| 519 | 519 | MACHINE_DRIVER_END |
| 520 | 520 | |
| 521 | 521 | ROM_START( ep128 ) |