mirror of
https://github.com/holub/mame
synced 2025-05-21 05:08:54 +03:00
[Z80DMA] Added placeholders for interrupt callback and Z80 daisy chain functions. Mario was broken even before this update.
This commit is contained in:
parent
f3bacac990
commit
3ef9cb7919
@ -12,8 +12,9 @@
|
||||
- Only memory to memory is tested!
|
||||
|
||||
TODO:
|
||||
- implement missing features
|
||||
- refactor according to new memory system
|
||||
- implement interrupt support (not used in dkong3 and mario)
|
||||
- implement missing features
|
||||
- implement more asserts
|
||||
- implement a INPUT_LINE_BUSREQ for Z80. As a workaround,
|
||||
HALT is used. This implies burst mode.
|
||||
@ -23,6 +24,7 @@
|
||||
#include "driver.h"
|
||||
#include "memconv.h"
|
||||
#include "z80dma.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
|
||||
#define VERBOSE 0
|
||||
|
||||
@ -412,9 +414,30 @@ WRITE8_DEVICE_HANDLER( z80dma_rdy_w)
|
||||
timer_call_after_resynch((void *) device, param, z80dma_rdy_write_callback);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
/* device interface */
|
||||
/***************************************************************************
|
||||
DAISY CHAIN INTERFACE
|
||||
***************************************************************************/
|
||||
|
||||
static int z80dma_irq_state(const device_config *device)
|
||||
{
|
||||
int state = 0;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
static int z80dma_irq_ack(const device_config *device)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void z80dma_irq_reti(const device_config *device)
|
||||
{
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE INTERFACE
|
||||
***************************************************************************/
|
||||
|
||||
static DEVICE_START( z80dma )
|
||||
{
|
||||
@ -483,6 +506,9 @@ DEVICE_GET_INFO( z80dma )
|
||||
case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(z80dma);break;
|
||||
case DEVINFO_FCT_STOP: /* Nothing */ break;
|
||||
case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(z80dma);break;
|
||||
case DEVINFO_FCT_IRQ_STATE: info->f = (genf *)z80dma_irq_state; break;
|
||||
case DEVINFO_FCT_IRQ_ACK: info->f = (genf *)z80dma_irq_ack; break;
|
||||
case DEVINFO_FCT_IRQ_RETI: info->f = (genf *)z80dma_irq_reti; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case DEVINFO_STR_NAME: info->s = "Z80DMA"; break;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**********************************************************************
|
||||
|
||||
8257 DMA interface and emulation
|
||||
Z80 DMA interface and emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
@ -29,7 +29,7 @@ struct _z80dma_interface
|
||||
write8_device_func portB_write;
|
||||
|
||||
/* interrupt callback - not implemented */
|
||||
/* void (*irqcb)(int state); */
|
||||
void (*irq_cb)(const device_config *device, int state);
|
||||
};
|
||||
|
||||
/* device interface */
|
||||
|
@ -343,7 +343,8 @@ static const z80dma_interface dk3_dma =
|
||||
|
||||
dk_dma_read_byte,
|
||||
dk_dma_write_byte,
|
||||
0, 0, 0, 0
|
||||
0, 0, 0, 0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const dma8257_interface dk_dma =
|
||||
|
@ -110,7 +110,8 @@ static const z80dma_interface mario_dma =
|
||||
|
||||
mario_dma_read_byte,
|
||||
mario_dma_write_byte,
|
||||
0, 0, 0, 0
|
||||
0, 0, 0, 0,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*************************************
|
||||
|
Loading…
Reference in New Issue
Block a user