summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-06-08 06:24:21 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-06-08 06:24:21 +0000
commitef0a31ca13fd0598fd9d694d5bc0bee0a0f23f3b (patch)
tree218ccdde1d5bd32fcc015ca18dce4cf845db0d76
parentce83de86a8c88053081d9f5cb8c6b83baf606fb9 (diff)
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, June 07, 2009 9:54 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] "Regularize" some interfaces in MAME Hi mamedev, This patch adjusts the code in a few places to be more regular in it object approach. It recognizes five idioms. 1. device_configs should be passed const. dsp56k.h took a non-const device_config for no particular reason, necessitating casting where used. A few other places cast to non-const, in most cases unnecessarily. 2. running_machines should be passed non-const. A few places used const in different ways on running_machines, instead of the idiomatic non-const running_machine. 3. Eliminate passing running_machine explicitly where it can be computed. esrip.c, m37710.c, sfbonus.c had cases where the machine could easily be eliminated. 4. Pass the object machine/config first. In some cases this makes the interface object oriented, in some cases it simply makes it more idiomatic with the rest of MAME. 5. Prefer (screen, bitmap, cliprect) to (machine, bitmap, cliprect). Fully implementing this would be a large patch, this patch simply does it for the one core 'device', tms9928a.c.
-rw-r--r--.gitattributes1
-rw-r--r--src/emu/cpu/arm7/arm7.c2
-rw-r--r--src/emu/cpu/arm7/arm7core.c2
-rw-r--r--src/emu/cpu/dsp56k/dsp56k.h6
-rw-r--r--src/emu/cpu/dsp56k/dsp56mem.c6
-rw-r--r--src/emu/cpu/esrip/esrip.c6
-rw-r--r--src/emu/cpu/m37710/m37710.c4
-rw-r--r--src/emu/cpu/pdp1/tx0.c6
-rw-r--r--src/emu/machine/i2cmem.c4
-rw-r--r--src/emu/video.c4
-rw-r--r--src/emu/video/tms9928a.c116
-rw-r--r--src/mame/drivers/plygonet.c48
-rw-r--r--src/mame/drivers/sfbonus.c4
-rw-r--r--src/mame/drivers/vcombat.c8
-rw-r--r--src/mame/includes/wiping.h16
-rw-r--r--src/mame/machine/archimds.c4
-rw-r--r--src/mame/machine/pcecommn.c2
-rw-r--r--src/mame/machine/scramble.c4
-rw-r--r--src/mame/machine/seicop.c8
-rw-r--r--src/mame/machine/zs01.c6
-rw-r--r--src/mame/video/dc.c4
-rw-r--r--src/mame/video/ninjakd2.c10
-rw-r--r--src/mame/video/tx1.c17
23 files changed, 160 insertions, 128 deletions
diff --git a/.gitattributes b/.gitattributes
index 26d1d0ffbf6..0cb12395c4c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2555,6 +2555,7 @@ src/mame/includes/vsnes.h svneol=native#text/plain
src/mame/includes/warpwarp.h svneol=native#text/plain
src/mame/includes/wc90.h svneol=native#text/plain
src/mame/includes/williams.h svneol=native#text/plain
+src/mame/includes/wiping.h svneol=native#text/plain
src/mame/includes/wrally.h svneol=native#text/plain
src/mame/includes/wwfwfest.h svneol=native#text/plain
src/mame/includes/xmen.h svneol=native#text/plain
diff --git a/src/emu/cpu/arm7/arm7.c b/src/emu/cpu/arm7/arm7.c
index b1113898a14..3287b5f4ee0 100644
--- a/src/emu/cpu/arm7/arm7.c
+++ b/src/emu/cpu/arm7/arm7.c
@@ -86,7 +86,7 @@ static CPU_INIT( arm7 )
arm_state *cpustate = get_safe_token(device);
// must call core
- arm7_core_init("arm7", device);
+ arm7_core_init(device, "arm7");
cpustate->irq_callback = irqcallback;
cpustate->device = device;
diff --git a/src/emu/cpu/arm7/arm7core.c b/src/emu/cpu/arm7/arm7core.c
index 089f1705bc1..4a25be4debf 100644
--- a/src/emu/cpu/arm7/arm7core.c
+++ b/src/emu/cpu/arm7/arm7core.c
@@ -507,7 +507,7 @@ static int storeDec(arm_state *cpustate, UINT32 pat, UINT32 rbv)
***************************************************************************/
// CPU INIT
-static void arm7_core_init(const char *cpuname, const device_config *device)
+static void arm7_core_init(const device_config *device, const char *cpuname)
{
arm_state *cpustate = get_safe_token(device);
diff --git a/src/emu/cpu/dsp56k/dsp56k.h b/src/emu/cpu/dsp56k/dsp56k.h
index ca637f201b7..bf0dd85cb91 100644
--- a/src/emu/cpu/dsp56k/dsp56k.h
+++ b/src/emu/cpu/dsp56k/dsp56k.h
@@ -243,9 +243,9 @@ typedef struct
PUBLIC FUNCTIONS
***************************************************************************/
-void dsp56k_host_interface_write(device_config* device, UINT8 offset, UINT8 data);
-UINT8 dsp56k_host_interface_read(device_config* device, UINT8 offset);
+void dsp56k_host_interface_write(const device_config* device, UINT8 offset, UINT8 data);
+UINT8 dsp56k_host_interface_read(const device_config* device, UINT8 offset);
-UINT16 dsp56k_get_peripheral_memory(device_config* device, UINT16 addr);
+UINT16 dsp56k_get_peripheral_memory(const device_config* device, UINT16 addr);
#endif /* __DSP56K_H__ */
diff --git a/src/emu/cpu/dsp56k/dsp56mem.c b/src/emu/cpu/dsp56k/dsp56mem.c
index fac1b2f89ed..440f7543642 100644
--- a/src/emu/cpu/dsp56k/dsp56mem.c
+++ b/src/emu/cpu/dsp56k/dsp56mem.c
@@ -610,7 +610,7 @@ static void dsp56k_host_interface_reset(dsp56k_core* cpustate)
/* These two functions are exposed to the outside world */
/* They represent the host side of the dsp56k's host interface */
-void dsp56k_host_interface_write(device_config* device, UINT8 offset, UINT8 data)
+void dsp56k_host_interface_write(const device_config* device, UINT8 offset, UINT8 data)
{
dsp56k_core* cpustate = get_safe_token(device);
@@ -706,7 +706,7 @@ void dsp56k_host_interface_write(device_config* device, UINT8 offset, UINT8 data
}
}
-UINT8 dsp56k_host_interface_read(device_config* device, UINT8 offset)
+UINT8 dsp56k_host_interface_read(const device_config* device, UINT8 offset)
{
dsp56k_core* cpustate = get_safe_token(device);
@@ -934,7 +934,7 @@ static void dsp56k_io_reset(dsp56k_core* cpustate)
/* MISC*/
-UINT16 dsp56k_get_peripheral_memory(device_config* device, UINT16 addr)
+UINT16 dsp56k_get_peripheral_memory(const device_config* device, UINT16 addr)
{
// TODO // THIS COMES BACK dsp56k_core* cpustate = get_safe_token(device);
return dsp56k_peripheral_ram[A2O(addr)];
diff --git a/src/emu/cpu/esrip/esrip.c b/src/emu/cpu/esrip/esrip.c
index c28286ed929..c4fc697a166 100644
--- a/src/emu/cpu/esrip/esrip.c
+++ b/src/emu/cpu/esrip/esrip.c
@@ -368,7 +368,7 @@ static int get_lbrm(esrip_state *cpustate)
return (val >> sel) & 1;
}
-INLINE int check_jmp(esrip_state *cpustate, running_machine *machine, UINT8 jmp_ctrl)
+INLINE int check_jmp(esrip_state *cpustate, UINT8 jmp_ctrl)
{
int ret = 0;
@@ -382,7 +382,7 @@ INLINE int check_jmp(esrip_state *cpustate, running_machine *machine, UINT8 jmp_
/* T3 */ case 6: ret = BIT(cpustate->t, 2); break;
/* T4 */ case 1: ret = BIT(cpustate->t, 3); break;
/* /LBRM */ case 5: ret = !get_lbrm(cpustate); break;
- /* /HBLANK */ case 3: ret = !get_hblank(machine); break;
+ /* /HBLANK */ case 3: ret = !get_hblank(cpustate->device->machine); break;
/* JMP */ case 7: ret = 0; break;
}
@@ -1762,7 +1762,7 @@ static CPU_EXECUTE( esrip )
if ((((cpustate->l5 >> 3) & 0x1f) & 0x18) != 0x18)
{
- if ( check_jmp(cpustate, device->machine, (cpustate->l5 >> 3) & 0x1f) )
+ if ( check_jmp(cpustate, (cpustate->l5 >> 3) & 0x1f) )
next_pc = cpustate->l1;
else
next_pc = cpustate->pc + 1;
diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c
index eef145d2640..6bad5319737 100644
--- a/src/emu/cpu/m37710/m37710.c
+++ b/src/emu/cpu/m37710/m37710.c
@@ -303,7 +303,7 @@ static void m37710_external_tick(m37710i_cpu_struct *cpustate, int timer, int st
}
}
-static void m37710_recalc_timer(m37710i_cpu_struct *cpustate, running_machine *machine, int timer)
+static void m37710_recalc_timer(m37710i_cpu_struct *cpustate, int timer)
{
int tval;
static const int tcr[8] = { 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d };
@@ -505,7 +505,7 @@ static void m37710_internal_w(m37710i_cpu_struct *cpustate, int offset, UINT8 da
if ((data & (1<<i)) && !(cpustate->m37710_regs[offset] & (1<<i)))
{
cpustate->m37710_regs[offset] |= (1<<i);
- m37710_recalc_timer(cpustate, cpustate->device->machine, i);
+ m37710_recalc_timer(cpustate, i);
}
}
diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c
index 14251fa8a3c..83e3568c5d4 100644
--- a/src/emu/cpu/pdp1/tx0.c
+++ b/src/emu/cpu/pdp1/tx0.c
@@ -127,7 +127,7 @@ static void tx0_write(tx0_state *cpustate, offs_t address, int data)
;
}
-static void tx0_init_common(int is_64kw, const device_config *device, cpu_irq_callback irqcallback)
+static void tx0_init_common(const device_config *device, cpu_irq_callback irqcallback, int is_64kw)
{
tx0_state *cpustate = get_safe_token(device);
@@ -143,12 +143,12 @@ static void tx0_init_common(int is_64kw, const device_config *device, cpu_irq_ca
static CPU_INIT( tx0_64kw )
{
- tx0_init_common(1, device, irqcallback);
+ tx0_init_common(device, irqcallback, 1);
}
static CPU_INIT( tx0_8kw)
{
- tx0_init_common(0, device, irqcallback);
+ tx0_init_common(device, irqcallback, 0);
}
static CPU_RESET( tx0 )
diff --git a/src/emu/machine/i2cmem.c b/src/emu/machine/i2cmem.c
index 8450ed311ca..cc72ee8b268 100644
--- a/src/emu/machine/i2cmem.c
+++ b/src/emu/machine/i2cmem.c
@@ -406,7 +406,7 @@ int i2cmem_read( running_machine *machine, int chip, int line )
return 0;
}
-static void nvram_handler_i2cmem( int chip, running_machine *machine, mame_file *file, int read_or_write )
+static void nvram_handler_i2cmem( running_machine *machine, mame_file *file, int read_or_write, int chip )
{
struct i2cmem_chip *c;
@@ -428,4 +428,4 @@ static void nvram_handler_i2cmem( int chip, running_machine *machine, mame_file
}
}
-NVRAM_HANDLER( i2cmem_0 ) { nvram_handler_i2cmem( 0, machine, file, read_or_write ); }
+NVRAM_HANDLER( i2cmem_0 ) { nvram_handler_i2cmem( machine, file, read_or_write, 0 ); }
diff --git a/src/emu/video.c b/src/emu/video.c
index aefd99440ef..fba4efc98ce 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -1343,7 +1343,7 @@ DEVICE_GET_INFO( video_screen )
static TIMER_CALLBACK( vblank_begin_callback )
{
int i;
- device_config *screen = (device_config *)ptr;
+ const device_config *screen = (const device_config *)ptr;
screen_state *state = get_safe_token(screen);
/* reset the starting VBLANK time */
@@ -1363,7 +1363,7 @@ static TIMER_CALLBACK( vblank_begin_callback )
/* if no VBLANK period, call the VBLANK end callback immedietely, otherwise reset the timer */
if (state->vblank_period == 0)
- vblank_end_callback(machine, screen, 0);
+ vblank_end_callback(machine, ptr, 0);
else
timer_adjust_oneshot(state->vblank_end_timer, video_screen_get_time_until_vblank_end(screen), 0);
}
diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c
index 615f2d982e3..ee292dbefc2 100644
--- a/src/emu/video/tms9928a.c
+++ b/src/emu/video/tms9928a.c
@@ -100,17 +100,17 @@ static const rgb_t TMS9928A_palette[16] =
/*
** Forward declarations of internal functions.
*/
-static void draw_mode0 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
-static void draw_mode1 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
-static void draw_mode2 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
-static void draw_mode12 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
-static void draw_mode3 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
-static void draw_mode23 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
-static void draw_modebogus (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
-static void draw_sprites (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_mode0 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_mode1 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_mode2 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_mode12 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_mode3 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_mode23 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_modebogus (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
+static void draw_sprites (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect);
static void change_register (running_machine *machine, int reg, UINT8 data);
-static void (*const ModeHandlers[])(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) = {
+static void (*const ModeHandlers[])(const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) = {
draw_mode0, draw_mode1, draw_mode2, draw_mode12,
draw_mode3, draw_modebogus, draw_mode23,
draw_modebogus };
@@ -403,7 +403,7 @@ VIDEO_UPDATE( tms9928a )
bitmap_fill(bitmap, cliprect, screen->machine->pens[BackColour]);
else
{
- (*ModeHandlers[TMS_MODE])(screen->machine, tms.tmpbmp, cliprect);
+ (*ModeHandlers[TMS_MODE])(screen, tms.tmpbmp, cliprect);
copybitmap(bitmap, tms.tmpbmp, 0, 0, LEFT_BORDER, TOP_BORDER, cliprect);
{
@@ -421,9 +421,9 @@ VIDEO_UPDATE( tms9928a )
bitmap_fill (bitmap, &rt, BackColour);
rt.min_x = LEFT_BORDER+256; rt.max_x = LEFT_BORDER+256+RIGHT_BORDER-1;
bitmap_fill (bitmap, &rt, BackColour);
- }
+ }
if (TMS_SPRITES_ENABLED)
- draw_sprites(screen->machine, bitmap, cliprect);
+ draw_sprites(screen, bitmap, cliprect);
}
return 0;
@@ -449,13 +449,15 @@ int TMS9928A_interrupt(running_machine *machine) {
return b;
}
-static void draw_mode1 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_mode1 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
int pattern,x,y,yy,xx,name,charcode;
UINT8 fg,bg,*patternptr;
- rectangle rt;
+ rectangle rt;
+ const pen_t *pens;
- fg = machine->pens[tms.Regs[7] / 16];
- bg = machine->pens[tms.Regs[7] & 15];
+ pens = screen->machine->pens;
+ fg = pens[tms.Regs[7] / 16];
+ bg = pens[tms.Regs[7] & 15];
/* colours at sides must be reset */
rt.min_y = 0; rt.max_y = 191;
@@ -482,13 +484,15 @@ static void draw_mode1 (running_machine *machine, bitmap_t *bitmap, const rectan
}
}
-static void draw_mode12 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_mode12 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
int pattern,x,y,yy,xx,name,charcode;
UINT8 fg,bg,*patternptr;
- rectangle rt;
+ const pen_t *pens;
+ rectangle rt;
- fg = machine->pens[tms.Regs[7] / 16];
- bg = machine->pens[tms.Regs[7] & 15];
+ pens = screen->machine->pens;
+ fg = pens[tms.Regs[7] / 16];
+ bg = pens[tms.Regs[7] & 15];
/* colours at sides must be reset */
rt.min_y = 0; rt.max_y = 191;
@@ -515,10 +519,12 @@ static void draw_mode12 (running_machine *machine, bitmap_t *bitmap, const recta
}
}
-static void draw_mode0 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_mode0 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
int pattern,x,y,yy,xx,name,charcode,colour;
UINT8 fg,bg,*patternptr;
+ const pen_t *pens;
+ pens = screen->machine->pens;
name = 0;
for (y=0;y<24;y++) {
for (x=0;x<32;x++) {
@@ -526,8 +532,8 @@ static void draw_mode0 (running_machine *machine, bitmap_t *bitmap, const rectan
name++;
patternptr = tms.vMem + tms.pattern + charcode*8;
colour = tms.vMem[tms.colour+charcode/8];
- fg = machine->pens[colour / 16];
- bg = machine->pens[colour & 15];
+ fg = pens[colour / 16];
+ bg = pens[colour & 15];
for (yy=0;yy<8;yy++) {
pattern=*patternptr++;
for (xx=0;xx<8;xx++) {
@@ -539,11 +545,13 @@ static void draw_mode0 (running_machine *machine, bitmap_t *bitmap, const rectan
}
}
-static void draw_mode2 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_mode2 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
int colour,name,x,y,yy,pattern,xx,charcode;
UINT8 fg,bg;
+ const pen_t *pens;
UINT8 *colourptr,*patternptr;
+ pens = screen->machine->pens;
name = 0;
for (y=0;y<24;y++) {
for (x=0;x<32;x++) {
@@ -556,8 +564,8 @@ static void draw_mode2 (running_machine *machine, bitmap_t *bitmap, const rectan
for (yy=0;yy<8;yy++) {
pattern = *patternptr++;
colour = *colourptr++;
- fg = machine->pens[colour / 16];
- bg = machine->pens[colour & 15];
+ fg = pens[colour / 16];
+ bg = pens[colour & 15];
for (xx=0;xx<8;xx++) {
*BITMAP_ADDR16(bitmap, y*8+yy, x*8+xx) = (pattern & 0x80) ? fg : bg;
pattern *= 2;
@@ -567,10 +575,12 @@ static void draw_mode2 (running_machine *machine, bitmap_t *bitmap, const rectan
}
}
-static void draw_mode3 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_mode3 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
int x,y,yy,yyy,name,charcode;
UINT8 fg,bg,*patternptr;
+ const pen_t *pens;
+ pens = screen->machine->pens;
name = 0;
for (y=0;y<24;y++) {
for (x=0;x<32;x++) {
@@ -578,8 +588,8 @@ static void draw_mode3 (running_machine *machine, bitmap_t *bitmap, const rectan
name++;
patternptr = tms.vMem+tms.pattern+charcode*8+(y&3)*2;
for (yy=0;yy<2;yy++) {
- fg = machine->pens[(*patternptr / 16)];
- bg = machine->pens[((*patternptr++) & 15)];
+ fg = pens[(*patternptr / 16)];
+ bg = pens[((*patternptr++) & 15)];
for (yyy=0;yyy<4;yyy++) {
*BITMAP_ADDR16(bitmap, y*8+yy*4+yyy, x*8+0) = fg;
*BITMAP_ADDR16(bitmap, y*8+yy*4+yyy, x*8+1) = fg;
@@ -595,10 +605,12 @@ static void draw_mode3 (running_machine *machine, bitmap_t *bitmap, const rectan
}
}
-static void draw_mode23 (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_mode23 (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
int x,y,yy,yyy,name,charcode;
UINT8 fg,bg,*patternptr;
+ const pen_t *pens;
+ pens = screen->machine->pens;
name = 0;
for (y=0;y<24;y++) {
for (x=0;x<32;x++) {
@@ -607,8 +619,8 @@ static void draw_mode23 (running_machine *machine, bitmap_t *bitmap, const recta
patternptr = tms.vMem + tms.pattern +
((charcode+(y&3)*2+(y/8)*256)&tms.patternmask)*8;
for (yy=0;yy<2;yy++) {
- fg = machine->pens[(*patternptr / 16)];
- bg = machine->pens[((*patternptr++) & 15)];
+ fg = pens[(*patternptr / 16)];
+ bg = pens[((*patternptr++) & 15)];
for (yyy=0;yyy<4;yyy++) {
*BITMAP_ADDR16(bitmap, y*8+yy*4+yyy, x*8+0) = fg;
*BITMAP_ADDR16(bitmap, y*8+yy*4+yyy, x*8+1) = fg;
@@ -624,12 +636,14 @@ static void draw_mode23 (running_machine *machine, bitmap_t *bitmap, const recta
}
}
-static void draw_modebogus (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_modebogus (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
UINT8 fg,bg;
int x,y,n,xx;
+ const pen_t *pens;
- fg = machine->pens[tms.Regs[7] / 16];
- bg = machine->pens[tms.Regs[7] & 15];
+ pens = screen->machine->pens;
+ fg = pens[tms.Regs[7] / 16];
+ bg = pens[tms.Regs[7] & 15];
for (y=0;y<192;y++) {
xx=0;
@@ -651,12 +665,14 @@ static void draw_modebogus (running_machine *machine, bitmap_t *bitmap, const re
**
** This code should be optimized. One day.
*/
-static void draw_sprites (running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) {
+static void draw_sprites (const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect) {
UINT8 *attributeptr,*patternptr,c;
int p,x,y,size,i,j,large,yy,xx,limit[192],
illegalsprite,illegalspriteline;
UINT16 line,line2;
+ const pen_t *pens;
+ pens = screen->machine->pens;
attributeptr = tms.vMem + tms.spriteattribute;
size = (tms.Regs[1] & 2) ? 16 : 8;
large = (int)(tms.Regs[1] & 1);
@@ -710,10 +726,10 @@ static void draw_sprites (running_machine *machine, bitmap_t *bitmap, const rect
}
if (c && ! (tms.dBackMem[yy*256+xx] & 0x02))
{
- tms.dBackMem[yy*256+xx] |= 0x02;
- if (bitmap)
- *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = machine->pens[c];
- }
+ tms.dBackMem[yy*256+xx] |= 0x02;
+ if (bitmap)
+ *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = pens[c];
+ }
}
}
line *= 2;
@@ -747,12 +763,12 @@ static void draw_sprites (running_machine *machine, bitmap_t *bitmap, const rect
} else {
tms.dBackMem[yy*256+xx] = 0x01;
}
- if (c && ! (tms.dBackMem[yy*256+xx] & 0x02))
- {
- tms.dBackMem[yy*256+xx] |= 0x02;
+ if (c && ! (tms.dBackMem[yy*256+xx] & 0x02))
+ {
+ tms.dBackMem[yy*256+xx] |= 0x02;
if (bitmap)
- *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = machine->pens[c];
- }
+ *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = pens[c];
+ }
}
if (((xx+1) >=0) && ((xx+1) < 256)) {
if (tms.dBackMem[yy*256+xx+1]) {
@@ -760,12 +776,12 @@ static void draw_sprites (running_machine *machine, bitmap_t *bitmap, const rect
} else {
tms.dBackMem[yy*256+xx+1] = 0x01;
}
- if (c && ! (tms.dBackMem[yy*256+xx+1] & 0x02))
- {
- tms.dBackMem[yy*256+xx+1] |= 0x02;
+ if (c && ! (tms.dBackMem[yy*256+xx+1] & 0x02))
+ {
+ tms.dBackMem[yy*256+xx+1] |= 0x02;
if (bitmap)
- *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx+1) = machine->pens[c];
- }
+ *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx+1) = pens[c];
+ }
}
}
line *= 2;
diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c
index 5ce38bd2c29..f3f6df44fb6 100644
--- a/src/mame/drivers/plygonet.c
+++ b/src/mame/drivers/plygonet.c
@@ -230,7 +230,7 @@ static READ32_HANDLER( dsp_host_interface_r )
if (mem_mask == 0x0000ff00) { hi_addr++; } /* Low byte */
if (mem_mask == 0xff000000) {} /* High byte */
- value = dsp56k_host_interface_read((device_config*)cputag_get_cpu(space->machine, "dsp"), hi_addr);
+ value = dsp56k_host_interface_read(cputag_get_cpu(space->machine, "dsp"), hi_addr);
if (mem_mask == 0x0000ff00) { value <<= 8; }
if (mem_mask == 0xff000000) { value <<= 24; }
@@ -299,7 +299,7 @@ static WRITE32_HANDLER( dsp_host_interface_w )
if (mem_mask == 0xff000000) { hi_data = (data & 0xff000000) >> 24; }
logerror("write (host-side) %08x %08x %08x (HI %04x)\n", offset, mem_mask, data, hi_addr);
- dsp56k_host_interface_write((device_config*)cputag_get_cpu(space->machine, "dsp"), hi_addr, hi_data);
+ dsp56k_host_interface_write(cputag_get_cpu(space->machine, "dsp"), hi_addr, hi_data);
}
@@ -375,7 +375,7 @@ enum { BANK_GROUP_A, BANK_GROUP_B, INVALID_BANK_GROUP };
static UINT8 dsp56k_bank_group(const device_config* cpu)
{
- UINT16 portC = dsp56k_get_peripheral_memory((device_config*)cpu, 0xffe3);
+ UINT16 portC = dsp56k_get_peripheral_memory(cpu, 0xffe3);
/* If bank group B is on, it overrides bank group A */
if (portC & 0x0002)
@@ -388,7 +388,7 @@ static UINT8 dsp56k_bank_group(const device_config* cpu)
static UINT8 dsp56k_bank_num(const device_config* cpu, UINT8 bank_group)
{
- UINT16 portC = dsp56k_get_peripheral_memory((device_config*)cpu, 0xffe3);
+ UINT16 portC = dsp56k_get_peripheral_memory(cpu, 0xffe3);
if (bank_group == BANK_GROUP_A)
{
@@ -413,8 +413,8 @@ static UINT8 dsp56k_bank_num(const device_config* cpu, UINT8 bank_group)
/* BANK HANDLERS */
static READ16_HANDLER( dsp56k_ram_bank00_read )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank00_size * 8) + (bank_num * dsp56k_bank00_size);
return dsp56k_bank00_ram[driver_bank_offset + offset];
@@ -422,8 +422,8 @@ static READ16_HANDLER( dsp56k_ram_bank00_read )
static WRITE16_HANDLER( dsp56k_ram_bank00_write )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank00_size * 8) + (bank_num * dsp56k_bank00_size);
COMBINE_DATA(&dsp56k_bank00_ram[driver_bank_offset + offset]);
@@ -432,8 +432,8 @@ static WRITE16_HANDLER( dsp56k_ram_bank00_write )
static READ16_HANDLER( dsp56k_ram_bank01_read )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank01_size * 8) + (bank_num * dsp56k_bank01_size);
return dsp56k_bank01_ram[driver_bank_offset + offset];
@@ -441,8 +441,8 @@ static READ16_HANDLER( dsp56k_ram_bank01_read )
static WRITE16_HANDLER( dsp56k_ram_bank01_write )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank01_size * 8) + (bank_num * dsp56k_bank01_size);
COMBINE_DATA(&dsp56k_bank01_ram[driver_bank_offset + offset]);
@@ -454,8 +454,8 @@ static WRITE16_HANDLER( dsp56k_ram_bank01_write )
static READ16_HANDLER( dsp56k_ram_bank02_read )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank02_size * 8) + (bank_num * dsp56k_bank02_size);
return dsp56k_bank02_ram[driver_bank_offset + offset];
@@ -463,8 +463,8 @@ static READ16_HANDLER( dsp56k_ram_bank02_read )
static WRITE16_HANDLER( dsp56k_ram_bank02_write )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank02_size * 8) + (bank_num * dsp56k_bank02_size);
COMBINE_DATA(&dsp56k_bank02_ram[driver_bank_offset + offset]);
@@ -473,8 +473,8 @@ static WRITE16_HANDLER( dsp56k_ram_bank02_write )
static READ16_HANDLER( dsp56k_shared_ram_read )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_shared_ram_16_size * 8) + (bank_num * dsp56k_shared_ram_16_size);
return dsp56k_shared_ram_16[driver_bank_offset + offset];
@@ -482,8 +482,8 @@ static READ16_HANDLER( dsp56k_shared_ram_read )
static WRITE16_HANDLER( dsp56k_shared_ram_write )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_shared_ram_16_size * 8) + (bank_num * dsp56k_shared_ram_16_size);
COMBINE_DATA(&dsp56k_shared_ram_16[driver_bank_offset + offset]);
@@ -501,8 +501,8 @@ static WRITE16_HANDLER( dsp56k_shared_ram_write )
static READ16_HANDLER( dsp56k_ram_bank04_read )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank04_size * 8) + (bank_num * dsp56k_bank04_size);
return dsp56k_bank04_ram[driver_bank_offset + offset];
@@ -510,8 +510,8 @@ static READ16_HANDLER( dsp56k_ram_bank04_read )
static WRITE16_HANDLER( dsp56k_ram_bank04_write )
{
- UINT8 en_group = dsp56k_bank_group((device_config*)space->cpu);
- UINT8 bank_num = dsp56k_bank_num((device_config*)space->cpu, en_group);
+ UINT8 en_group = dsp56k_bank_group(space->cpu);
+ UINT8 bank_num = dsp56k_bank_num(space->cpu, en_group);
UINT32 driver_bank_offset = (en_group * dsp56k_bank04_size * 8) + (bank_num * dsp56k_bank04_size);
COMBINE_DATA(&dsp56k_bank04_ram[driver_bank_offset + offset]);
diff --git a/src/mame/drivers/sfbonus.c b/src/mame/drivers/sfbonus.c
index c5d9f597388..1dcb7896c39 100644
--- a/src/mame/drivers/sfbonus.c
+++ b/src/mame/drivers/sfbonus.c
@@ -458,7 +458,7 @@ static VIDEO_START(sfbonus)
}
-static void sfbonus_draw_reel_layer(running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect, const device_config *screen, int catagory)
+static void sfbonus_draw_reel_layer(const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect, int catagory)
{
int zz;
int i;
@@ -612,7 +612,7 @@ static VIDEO_UPDATE(sfbonus)
bitmap_fill(temp_reel_bitmap,cliprect,screen->machine->pens[0]);
/* render reels to bitmap */
- sfbonus_draw_reel_layer(screen->machine,temp_reel_bitmap,cliprect, screen, 0);
+ sfbonus_draw_reel_layer(screen,temp_reel_bitmap,cliprect,0);
{
int y,x;
diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c
index cd21c971e22..98814434926 100644
--- a/src/mame/drivers/vcombat.c
+++ b/src/mame/drivers/vcombat.c
@@ -189,13 +189,13 @@ static READ16_HANDLER( control_3_r )
return (input_port_read(space->machine, "IN2") << 8);
}
-static void wiggle_i860_common(int n, UINT16 data, const device_config *device)
+static void wiggle_i860_common(const device_config *device, UINT16 data)
{
int bus_hold = (data & 0x03) == 0x03;
int reset = data & 0x10;
- assert(n >= 0 && n < 2);
if (!device)
return;
+
if (bus_hold)
{
fprintf(stderr, "M0 asserting bus HOLD to i860 %s\n", device->tag);
@@ -218,12 +218,12 @@ static void wiggle_i860_common(int n, UINT16 data, const device_config *device)
static WRITE16_HANDLER( wiggle_i860p0_pins_w )
{
- wiggle_i860_common(0, data, cputag_get_cpu(space->machine, "vid_0"));
+ wiggle_i860_common(cputag_get_cpu(space->machine, "vid_0"), data);
}
static WRITE16_HANDLER( wiggle_i860p1_pins_w )
{
- wiggle_i860_common(1, data, cputag_get_cpu(space->machine, "vid_1"));
+ wiggle_i860_common(cputag_get_cpu(space->machine, "vid_1"), data);
}
static READ16_HANDLER( main_irqiack_r )
diff --git a/src/mame/includes/wiping.h b/src/mame/includes/wiping.h
new file mode 100644
index 00000000000..451f451a93e
--- /dev/null
+++ b/src/mame/includes/wiping.h
@@ -0,0 +1,16 @@
+/*----------- defined in audio/wiping.c -----------*/
+
+extern UINT8 *wiping_soundregs;
+
+DEVICE_GET_INFO( wiping_sound );
+#define SOUND_WIPING DEVICE_GET_INFO_NAME(wiping_sound)
+
+WRITE8_HANDLER( wiping_sound_w );
+
+
+/*----------- defined in video/wiping.c -----------*/
+
+WRITE8_HANDLER( wiping_flipscreen_w );
+PALETTE_INIT( wiping );
+VIDEO_UPDATE( wiping );
+
diff --git a/src/mame/machine/archimds.c b/src/mame/machine/archimds.c
index 64ee42565ad..e1162731e66 100644
--- a/src/mame/machine/archimds.c
+++ b/src/mame/machine/archimds.c
@@ -314,7 +314,7 @@ static void latch_timer_cnt(int tmr)
READ32_HANDLER(ioc_r)
{
#ifdef MESS
- device_config *fdc = (device_config*)devtag_get_device(space->machine, "wd1772");
+ const device_config *fdc = (const device_config *)devtag_get_device(space->machine, "wd1772");
#endif
if (offset >= 0x80000 && offset < 0xc0000)
{
@@ -364,7 +364,7 @@ READ32_HANDLER(ioc_r)
WRITE32_HANDLER(ioc_w)
{
#ifdef MESS
- device_config *fdc = (device_config*)devtag_get_device(space->machine, "wd1772");
+ const device_config *fdc = (const device_config *)devtag_get_device(space->machine, "wd1772");
#endif
if (offset >= 0x80000 && offset < 0xc0000)
{
diff --git a/src/mame/machine/pcecommn.c b/src/mame/machine/pcecommn.c
index f911218bd5f..ce5ed006420 100644
--- a/src/mame/machine/pcecommn.c
+++ b/src/mame/machine/pcecommn.c
@@ -29,7 +29,7 @@ MACHINE_RESET( pce ) {
/* todo: how many input ports does the PCE have? */
WRITE8_HANDLER ( pce_joystick_w )
{
- h6280io_set_buffer((device_config*)space->cpu, data);
+ h6280io_set_buffer(space->cpu, data);
/* bump counter on a low-to-high transition of bit 1 */
if((!joystick_data_select) && (data & JOY_CLOCK))
{
diff --git a/src/mame/machine/scramble.c b/src/mame/machine/scramble.c
index f1fa0e5eaf6..ce6a9a99961 100644
--- a/src/mame/machine/scramble.c
+++ b/src/mame/machine/scramble.c
@@ -120,9 +120,9 @@ static READ8_HANDLER( cavelon_banksw_r )
cavelon_banksw(space->machine);
if ((offset >= 0x0100) && (offset <= 0x0103))
- return ppi8255_r((device_config*)devtag_get_device(space->machine, "ppi8255_0"), offset - 0x0100);
+ return ppi8255_r(devtag_get_device(space->machine, "ppi8255_0"), offset - 0x0100);
else if ((offset >= 0x0200) && (offset <= 0x0203))
- return ppi8255_r((device_config*)devtag_get_device(space->machine, "ppi8255_1"), offset - 0x0200);
+ return ppi8255_r(devtag_get_device(space->machine, "ppi8255_1"), offset - 0x0200);
return 0xff;
}
diff --git a/src/mame/machine/seicop.c b/src/mame/machine/seicop.c
index daab5c649ec..d766a5231be 100644
--- a/src/mame/machine/seicop.c
+++ b/src/mame/machine/seicop.c
@@ -73,7 +73,7 @@ static UINT16 cop_clearfill_lasttrigger = 0;
static UINT16 copd2_offs = 0;
-static void copd2_set_tableoffset(UINT16 data, running_machine *machine)
+static void copd2_set_tableoffset(running_machine *machine, UINT16 data)
{
logerror("mcu_offs %04x\n", data);
copd2_offs = data;
@@ -122,7 +122,7 @@ static void copd2_set_tableoffset(UINT16 data, running_machine *machine)
}
-static void copd2_set_tabledata(UINT16 data, running_machine *machine)
+static void copd2_set_tabledata(running_machine *machine, UINT16 data)
{
copd2_table[copd2_offs] = data;
logerror("mcu_data %04x\n", data);
@@ -1153,8 +1153,8 @@ static WRITE16_HANDLER( generic_cop_w )
case (0x024/2): { prot_bcd[2] = protection_bcd_jsr(cop_mcu_ram[offset]); break; }
/* Command tables for 0x500 / 0x502 commands */
- case (0x032/2): { copd2_set_tabledata(data, space->machine); break; }
- case (0x034/2): { copd2_set_tableoffset(data, space->machine); break; }
+ case (0x032/2): { copd2_set_tabledata(space->machine, data); break; }
+ case (0x034/2): { copd2_set_tableoffset(space->machine, data); break; }
case (0x038/2): { cop_438 = data; break; }
case (0x03a/2): { cop_43a = data; break; }
case (0x03c/2): { cop_43c = data; break; }
diff --git a/src/mame/machine/zs01.c b/src/mame/machine/zs01.c
index 7699e6b6e20..b5f2cd20bbc 100644
--- a/src/mame/machine/zs01.c
+++ b/src/mame/machine/zs01.c
@@ -664,7 +664,7 @@ int zs01_sda_read( running_machine *machine, int chip )
return c->sdar;
}
-static void nvram_handler_zs01( int chip, running_machine *machine, mame_file *file, int read_or_write )
+static void nvram_handler_zs01( running_machine *machine, mame_file *file, int read_or_write, int chip )
{
struct zs01_chip *c;
@@ -686,5 +686,5 @@ static void nvram_handler_zs01( int chip, running_machine *machine, mame_file *f
}
}
-NVRAM_HANDLER( zs01_0 ) { nvram_handler_zs01( 0, machine, file, read_or_write ); }
-NVRAM_HANDLER( zs01_1 ) { nvram_handler_zs01( 1, machine, file, read_or_write ); }
+NVRAM_HANDLER( zs01_0 ) { nvram_handler_zs01( machine, file, read_or_write, 0 ); }
+NVRAM_HANDLER( zs01_1 ) { nvram_handler_zs01( machine, file, read_or_write, 1 ); }
diff --git a/src/mame/video/dc.c b/src/mame/video/dc.c
index 05555886677..aed94434a5e 100644
--- a/src/mame/video/dc.c
+++ b/src/mame/video/dc.c
@@ -47,7 +47,7 @@ static emu_timer *endofrender_timer_video;
static int scanline;
static bitmap_t *fakeframebuffer_bitmap;
-static void testdrawscreen(const running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect);
+static void testdrawscreen(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect);
typedef struct texinfo {
UINT32 address, vqbase;
@@ -1854,7 +1854,7 @@ static void render_tri(bitmap_t *bitmap, texinfo *ti, const vert *v)
render_tri_sorted(bitmap, ti, v+i0, v+i1, v+i2);
}
-static void testdrawscreen(const running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect)
+static void testdrawscreen(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect)
{
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
int cs,rs,ns;
diff --git a/src/mame/video/ninjakd2.c b/src/mame/video/ninjakd2.c
index 21b14608a3b..113f1911cfe 100644
--- a/src/mame/video/ninjakd2.c
+++ b/src/mame/video/ninjakd2.c
@@ -90,7 +90,7 @@ static TILEMAP_MAPPER( omegaf_bg_scan )
return (col & 0x0f) | ((row & 0x1f) << 4) | ((col & 0x70) << 5);
}
-static void robokid_get_bg_tile_info(running_machine* const machine, tile_data* const tileinfo, tilemap_memory_index const tile_index, int const gfxnum, const UINT8* const videoram)
+static void robokid_get_bg_tile_info(running_machine* machine, tile_data* const tileinfo, tilemap_memory_index const tile_index, int const gfxnum, const UINT8* const videoram)
{
int const lo = videoram[(tile_index << 1)];
int const hi = videoram[(tile_index << 1) | 1];
@@ -127,7 +127,7 @@ static TILE_GET_INFO( robokid_get_bg2_tile_info )
*
*************************************/
-static void videoram_alloc(running_machine* const machine, int const size)
+static void videoram_alloc(running_machine* machine, int const size)
{
if (size)
{
@@ -355,7 +355,7 @@ WRITE8_HANDLER( ninjakd2_sprite_overdraw_w )
*
*************************************/
-static void draw_sprites(running_machine* const machine, bitmap_t* const bitmap)
+static void draw_sprites(running_machine* machine, bitmap_t* bitmap)
{
const gfx_element* const gfx = machine->gfx[1];
int const big_xshift = robokid_sprites ? 1 : 0;
@@ -451,7 +451,7 @@ static int stencil_omegaf( UINT16 pal ) { return( TRUE ); }
// This is very hackish.
// (Is there a possibility that software can't select it but hardware can?)
-static void erase_sprites(running_machine* const machine, bitmap_t* const bitmap, const rectangle* const cliprect)
+static void erase_sprites(running_machine* machine, bitmap_t* bitmap, const rectangle* cliprect)
{
// if sprite overdraw is disabled, clear the sprite framebuffer
if (!next_sprite_overdraw_enabled)
@@ -473,7 +473,7 @@ static void erase_sprites(running_machine* const machine, bitmap_t* const bitmap
}
-static void update_sprites(running_machine* const machine)
+static void update_sprites(running_machine* machine)
{
erase_sprites(machine, sp_bitmap, 0);
draw_sprites(machine, sp_bitmap);
diff --git a/src/mame/video/tx1.c b/src/mame/video/tx1.c
index 9de94aed717..9d8906390e2 100644
--- a/src/mame/video/tx1.c
+++ b/src/mame/video/tx1.c
@@ -338,11 +338,10 @@ static void tx1_draw_char(running_machine *machine, UINT8 *bitmap)
pix[NUM][3][0] = prom_a[0]; pix[NUM][3][1] = prom_b[0]; pix[NUM][3][2] = prom_c[0]; \
}
-INLINE void tx1_draw_road_pixel(int screen, UINT8 *bmpaddr,
+INLINE void tx1_draw_road_pixel(running_machine *machine, int screen, UINT8 *bmpaddr,
UINT8 apix[3], UINT8 bpix[3], UINT32 pixnuma, UINT32 pixnumb,
UINT8 stl, UINT8 sld, UINT8 selb,
- UINT8 bnk, UINT8 rorev, UINT8 eb, UINT8 r, UINT8 delr,
- running_machine *machine)
+ UINT8 bnk, UINT8 rorev, UINT8 eb, UINT8 r, UINT8 delr)
{
UINT8 a0 = BIT(apix[0], pixnuma);
UINT8 a1 = BIT(apix[1], pixnuma);
@@ -784,10 +783,10 @@ static void tx1_draw_road(running_machine *machine, UINT8 *bitmap)
else
b = 3;
- tx1_draw_road_pixel(0, bmpaddr,
+ tx1_draw_road_pixel(machine, 0, bmpaddr,
&pix[0][a][0], &pix[1][b][0],
pixnum0, pixnum1,
- stl, sld, selb, bnkls, rorevls, ebls, rl, delrl, machine);
+ stl, sld, selb, bnkls, rorevls, ebls, rl, delrl);
}
else
*(bmpaddr) = (bnkls << 6) | (rl << 5);
@@ -806,10 +805,10 @@ static void tx1_draw_road(running_machine *machine, UINT8 *bitmap)
else
b = 3;
- tx1_draw_road_pixel(1, bmpaddr,
+ tx1_draw_road_pixel(machine, 1, bmpaddr,
&pix[0][a][0], &pix[1][b][0],
pixnum0, pixnum1,
- stl, sld, selb, bnkcs, rorevcs, ebcs, rc, delrc, machine);
+ stl, sld, selb, bnkcs, rorevcs, ebcs, rc, delrc);
}
else
*(bmpaddr + 256) = (bnkcs << 6) | (rc << 5);
@@ -828,10 +827,10 @@ static void tx1_draw_road(running_machine *machine, UINT8 *bitmap)
else
b = 3;
- tx1_draw_road_pixel(2, bmpaddr,
+ tx1_draw_road_pixel(machine, 2, bmpaddr,
&pix[0][a][0], &pix[1][b][0],
pixnum0, pixnum1,
- stl, sld, selb, bnkrs, rorevrs, ebrs, rr, delrr, machine);
+ stl, sld, selb, bnkrs, rorevrs, ebrs, rr, delrr);
}
else
*(bmpaddr + 512) = (bnkrs << 6) | (rr << 5);