summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/adsp2100
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-07-02 15:12:58 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-07-02 15:12:58 +0000
commit553ec7f42716c9bcb35d3efb0e3c903a72f640cb (patch)
treee96e8072a24570f3668311a571aa5fffc228b5c1 /src/emu/cpu/adsp2100
parentaf9e6f531faea78f9c7ad4012167567fd1f24af2 (diff)
Some more cases to directly access the state interface instead of using the old
cpu_* macros. Also changed the ADSP21xx callbacks to take a cpu_device.
Diffstat (limited to 'src/emu/cpu/adsp2100')
-rw-r--r--src/emu/cpu/adsp2100/2100ops.c10
-rw-r--r--src/emu/cpu/adsp2100/adsp2100.h9
2 files changed, 9 insertions, 10 deletions
diff --git a/src/emu/cpu/adsp2100/2100ops.c b/src/emu/cpu/adsp2100/2100ops.c
index 287437000ea..43a55824e26 100644
--- a/src/emu/cpu/adsp2100/2100ops.c
+++ b/src/emu/cpu/adsp2100/2100ops.c
@@ -91,7 +91,7 @@ INLINE void update_mstat(adsp2100_state *adsp)
}
if ((adsp->mstat ^ adsp->mstat_prev) & MSTAT_TIMER)
if (adsp->timer_fired != NULL)
- (*adsp->timer_fired)(adsp->device, (adsp->mstat & MSTAT_TIMER) != 0);
+ (*adsp->timer_fired)(*adsp->device, (adsp->mstat & MSTAT_TIMER) != 0);
if (adsp->mstat & MSTAT_STICKYV)
adsp->astat_clear = ~(CFLAG | NFLAG | ZFLAG);
else
@@ -421,8 +421,8 @@ static void wr_ifc(adsp2100_state *adsp, INT32 val)
}
check_irqs(adsp);
}
-static void wr_tx0(adsp2100_state *adsp, INT32 val) { if (adsp->sport_tx_callback) (*adsp->sport_tx_callback)(adsp->device, 0, val); }
-static void wr_tx1(adsp2100_state *adsp, INT32 val) { if (adsp->sport_tx_callback) (*adsp->sport_tx_callback)(adsp->device, 1, val); }
+static void wr_tx0(adsp2100_state *adsp, INT32 val) { if (adsp->sport_tx_callback) (*adsp->sport_tx_callback)(*adsp->device, 0, val); }
+static void wr_tx1(adsp2100_state *adsp, INT32 val) { if (adsp->sport_tx_callback) (*adsp->sport_tx_callback)(*adsp->device, 1, val); }
static void wr_owrctr(adsp2100_state *adsp, INT32 val) { adsp->cntr = val & 0x3fff; }
static void wr_topstack(adsp2100_state *adsp, INT32 val) { pc_stack_push_val(adsp, val & 0x3fff); }
@@ -503,8 +503,8 @@ static INT32 rd_icntl(adsp2100_state *adsp) { return adsp->icntl; }
static INT32 rd_cntr(adsp2100_state *adsp) { return adsp->cntr; }
static INT32 rd_sb(adsp2100_state *adsp) { return adsp->core.sb.s; }
static INT32 rd_px(adsp2100_state *adsp) { return adsp->px; }
-static INT32 rd_rx0(adsp2100_state *adsp) { if (adsp->sport_rx_callback) return (*adsp->sport_rx_callback)(adsp->device, 0); else return 0; }
-static INT32 rd_rx1(adsp2100_state *adsp) { if (adsp->sport_rx_callback) return (*adsp->sport_rx_callback)(adsp->device, 1); else return 0; }
+static INT32 rd_rx0(adsp2100_state *adsp) { if (adsp->sport_rx_callback) return (*adsp->sport_rx_callback)(*adsp->device, 0); else return 0; }
+static INT32 rd_rx1(adsp2100_state *adsp) { if (adsp->sport_rx_callback) return (*adsp->sport_rx_callback)(*adsp->device, 1); else return 0; }
static INT32 rd_stacktop(adsp2100_state *adsp) { return pc_stack_pop_val(adsp); }
#define READ_REG(adsp,grp,reg) ((*rd_reg[grp][reg])(adsp))
diff --git a/src/emu/cpu/adsp2100/adsp2100.h b/src/emu/cpu/adsp2100/adsp2100.h
index d7cb50dd795..f78fd2ca62b 100644
--- a/src/emu/cpu/adsp2100/adsp2100.h
+++ b/src/emu/cpu/adsp2100/adsp2100.h
@@ -17,12 +17,11 @@
***************************************************************************/
/* transmit and receive data callbacks types */
-typedef INT32 (*adsp21xx_rx_func)(running_device *device, int port);
-typedef void (*adsp21xx_tx_func)(running_device *device, int port, INT32 data);
-typedef void (*adsp21xx_timer_func)(running_device *device, int enable);
+typedef INT32 (*adsp21xx_rx_func)(cpu_device &device, int port);
+typedef void (*adsp21xx_tx_func)(cpu_device &device, int port, INT32 data);
+typedef void (*adsp21xx_timer_func)(cpu_device &device, int enable);
-typedef struct _adsp21xx_config adsp21xx_config;
-struct _adsp21xx_config
+struct adsp21xx_config
{
adsp21xx_rx_func rx; /* callback for serial receive */
adsp21xx_tx_func tx; /* callback for serial transmit */