Previous 15994 Revisions Next

r4119 Monday 12th January, 2009 at 16:16:35 UTC by Dirk Best
[ENTERPRISE] Changed to explicitly use the WD1770
[src/mess/drivers]enterp.c

src/mess/drivers/enterp.c
r4118r4119
5454#define MEM_RAM_7            ((unsigned int)0x0fb)
5555
5656
57/* state of the wd177x irq/drq lines */
57/* state of the wd1770 irq/drq lines */
5858static UINT8 exdos_card_value = 0;
5959
6060/* The Page index for each 16k page is programmed into
r4118r4119
247247    FLOPPY/EXDOS
248248***************************************************************************/
249249
250static WD17XX_CALLBACK( enterp_wd177x_callback )
250static WD17XX_CALLBACK( enterp_wd1770_callback )
251251{
252252   switch (state)
253253   {
r4118r4119
260260
261261
262262/* bit 0 - ??
263   bit 1 - IRQ from WD1772
263   bit 1 - IRQ from WD177
264264   bit 2 - ??
265265   bit 3 - ??
266266   bit 4 - ??
267267   bit 5 - ??
268268   bit 6 - Disk change signal from disk drive
269   bit 7 - DRQ from WD1772
269   bit 7 - DRQ from WD177
270270*/
271271static READ8_HANDLER( exdos_card_r )
272272{
r4118r4119
285285*/
286286static WRITE8_HANDLER( exdos_card_w )
287287{
288   const device_config *fdc = devtag_get_device(space->machine, WD177X, "wd177x");
288   const device_config *fdc = devtag_get_device(space->machine, WD1770, "wd1770");
289289
290290   /* drive */
291291   if (BIT(data, 0)) wd17xx_set_drive(fdc, 0);
r4118r4119
314314
315315static ADDRESS_MAP_START( enterprise_io, ADDRESS_SPACE_IO, 8 )
316316   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)
318318   AM_RANGE(0x18, 0x18) AM_MIRROR(0x04) AM_READWRITE(exdos_card_r, exdos_card_w)
319319   AM_RANGE(0x80, 0x8f) AM_WRITE(Nick_reg_w)
320320   AM_RANGE(0xa0, 0xbf) AM_READWRITE(Dave_reg_r, Dave_reg_w)
r4118r4119
483483   Dave_sh_start
484484};
485485
486static const wd17xx_interface enterp_wd17xx_interface = { enterp_wd177x_callback, NULL };
486static const wd17xx_interface enterp_wd1770_interface = { enterp_wd1770_callback, NULL };
487487
488488/* 4 MHz clock, although it can be changed to 8 MHz! */
489489static MACHINE_DRIVER_START( ep128 )
r4118r4119
515515   MDRV_SOUND_CONFIG(dave_custom_sound)
516516   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
517517
518   MDRV_WD177X_ADD("wd177x", enterp_wd17xx_interface )
518   MDRV_WD1770_ADD("wd1770", enterp_wd1770_interface )
519519MACHINE_DRIVER_END
520520
521521ROM_START( ep128 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team