summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2012-11-23 19:10:57 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2012-11-23 19:10:57 +0000
commit592df02da85adcc7aa1f78263e7e4f7995d5abd6 (patch)
tree7826d2a8c9b97b5c38582f61a8dc2580c716497d /src
parentf3e99935315049d2da7a0f357130f38132ea31bf (diff)
Check-point for upd71071, nw
Diffstat (limited to 'src')
-rw-r--r--src/mess/drivers/fmtowns.c5
-rw-r--r--src/mess/drivers/pc88va.c5
-rw-r--r--src/mess/machine/upd71071.c31
-rw-r--r--src/mess/machine/upd71071.h7
4 files changed, 46 insertions, 2 deletions
diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c
index 156a67389c3..30c8b59e0a7 100644
--- a/src/mess/drivers/fmtowns.c
+++ b/src/mess/drivers/fmtowns.c
@@ -2603,8 +2603,11 @@ static const upd71071_intf towns_dma_config =
{
"maincpu",
4000000,
+ DEVCB_NULL,
+ DEVCB_NULL,
{ towns_fdc_dma_r, towns_scsi_dma_r, 0, towns_cdrom_dma_r },
- { towns_fdc_dma_w, towns_scsi_dma_w, 0, 0 }
+ { towns_fdc_dma_w, towns_scsi_dma_w, 0, 0 },
+ { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }
};
static const ym3438_interface ym3438_intf =
diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c
index 75cb99c8870..6d6bc0e6046 100644
--- a/src/mess/drivers/pc88va.c
+++ b/src/mess/drivers/pc88va.c
@@ -1728,8 +1728,11 @@ static const upd71071_intf pc88va_dma_config =
{
"maincpu",
8000000,
+ DEVCB_NULL,
+ DEVCB_NULL,
{ 0, 0, m_fdc_dma_r, 0 },
- { 0, 0, m_fdc_dma_w, 0 }
+ { 0, 0, m_fdc_dma_w, 0 },
+ { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }
};
FLOPPY_FORMATS_MEMBER( pc88va_state::floppy_formats )
diff --git a/src/mess/machine/upd71071.c b/src/mess/machine/upd71071.c
index 46cadb4fa35..b18c3f3b4d4 100644
--- a/src/mess/machine/upd71071.c
+++ b/src/mess/machine/upd71071.c
@@ -108,6 +108,11 @@ struct upd71071_t
int transfer_size[4];
int base;
const upd71071_intf* intf;
+ devcb_resolved_write_line m_out_hreq_func;
+ devcb_resolved_write_line m_out_eop_func;
+ devcb_resolved_write_line m_out_dack_func[4];
+ int m_hreq;
+ int m_eop;
};
INLINE upd71071_t *get_safe_token(device_t *device)
@@ -242,9 +247,12 @@ static DEVICE_START(upd71071)
int x;
dmac->intf = (const upd71071_intf*)device->static_config();
+ dmac->m_out_hreq_func.resolve(dmac->intf->m_out_hreq_cb, *device);
+ dmac->m_out_eop_func.resolve(dmac->intf->m_out_eop_cb, *device);
for(x=0;x<4;x++)
{
dmac->timer[x] = device->machine().scheduler().timer_alloc(FUNC(dma_transfer_timer), (void*)device);
+ dmac->m_out_dack_func[x].resolve(dmac->intf->m_out_dack_cb[x], *device);
}
dmac->selected_channel = 0;
}
@@ -447,3 +455,26 @@ void upd71071_device::device_start()
}
+void set_hreq( device_t *device, int state)
+{
+ upd71071_t* dmac = get_safe_token(device);
+
+ if (dmac->m_hreq != state)
+ {
+ dmac->m_out_hreq_func(state);
+
+ dmac->m_hreq = state;
+ }
+}
+
+void set_eop( device_t *device, int state)
+{
+ upd71071_t* dmac = get_safe_token(device);
+
+ if (dmac->m_eop != state)
+ {
+ dmac->m_out_eop_func(state);
+
+ dmac->m_eop = state;
+ }
+}
diff --git a/src/mess/machine/upd71071.h b/src/mess/machine/upd71071.h
index 9638c001af6..0a68e09f4a6 100644
--- a/src/mess/machine/upd71071.h
+++ b/src/mess/machine/upd71071.h
@@ -7,8 +7,11 @@ struct upd71071_intf
{
const char* cputag;
int clock;
+ devcb_write_line m_out_hreq_cb;
+ devcb_write_line m_out_eop_cb;
UINT16 (*dma_read[4])(running_machine &machine);
void (*dma_write[4])(running_machine &machine, UINT16 data);
+ devcb_write_line m_out_dack_cb[4];
};
int upd71071_dmarq(device_t* device,int state,int channel);
@@ -40,4 +43,8 @@ extern const device_type UPD71071;
DECLARE_READ8_DEVICE_HANDLER(upd71071_r);
DECLARE_WRITE8_DEVICE_HANDLER(upd71071_w);
+void set_hreq( device_t *device, int state);
+void set_eop( device_t *device, int state);
+
+
#endif /*UPD71071_H_*/