summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-01-14 05:32:21 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-01-14 05:32:21 +0000
commit200b0a0159dc73e31cf71f39173d0907f14e6625 (patch)
tree32db7ed5362cc0bce35f4a3588270b79f051265b /src
parent406980156dce9f32790e311abf92043c4b91a5ee (diff)
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, January 03, 2009 10:20 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] static/const/include fixes Hi mamedev, Here's my aperiodic code cleanup patch for MAME, adding static/const and adjusting header files. In a few places I went a bit further. 1. arm7core.[ch],segas24.[ch]: Rewrote some abuses of the HANDLER macros to use _func types instead. 2. m37710: Removed some long dead state save functions. 3. spc700: Removed the interface declarations and functions. Most of it is handled by CPU_GET_INFO, some of it was no longer implemented, and since pointerization it wasn't possible to call it externally anyhow. 4. segac2: I removed the palette variables aliasing the megadrive ones and just used the megadrive ones directly. 5. snes: All the obc1_, DSP1_, DSP2_ exports were made static. I'd avoided doing this previously for fear it might break MESS, but after auditing I'm fairly certain this shouldn't cause problems. ~aa
Diffstat (limited to 'src')
-rw-r--r--src/emu/cpu/arm7/arm7core.c6
-rw-r--r--src/emu/cpu/arm7/arm7core.h6
-rw-r--r--src/emu/cpu/esrip/esrip.c2
-rw-r--r--src/emu/cpu/h83002/h8_8.c2
-rw-r--r--src/emu/cpu/m37710/m37710.c12
-rw-r--r--src/emu/cpu/m37710/m37710cm.h9
-rw-r--r--src/emu/cpu/mcs51/mcs51dasm.c2
-rw-r--r--src/emu/cpu/sm8500/sm8500.c6
-rw-r--r--src/emu/cpu/spc700/spc700.c99
-rw-r--r--src/emu/machine/f3853.c2
-rw-r--r--src/emu/sound/okim6295.c2
-rw-r--r--src/mame/audio/snes.c4
-rw-r--r--src/mame/drivers/bbusters.c2
-rw-r--r--src/mame/drivers/bingoc.c4
-rw-r--r--src/mame/drivers/brasil.c6
-rw-r--r--src/mame/drivers/caswin.c4
-rw-r--r--src/mame/drivers/cb2001.c4
-rw-r--r--src/mame/drivers/deshoros.c4
-rw-r--r--src/mame/drivers/esripsys.c10
-rw-r--r--src/mame/drivers/gal3.c4
-rw-r--r--src/mame/drivers/galpani3.c28
-rw-r--r--src/mame/drivers/goldstar.c6
-rw-r--r--src/mame/drivers/igs009.c16
-rw-r--r--src/mame/drivers/ilpag.c4
-rw-r--r--src/mame/drivers/janshi.c4
-rw-r--r--src/mame/drivers/jantotsu.c4
-rw-r--r--src/mame/drivers/jchan.c1
-rw-r--r--src/mame/drivers/luckgrln.c2
-rw-r--r--src/mame/drivers/megadriv.h1
-rw-r--r--src/mame/drivers/mil4000.c4
-rw-r--r--src/mame/drivers/mpoker.c4
-rw-r--r--src/mame/drivers/neogeo.c2
-rw-r--r--src/mame/drivers/parentj.c4
-rw-r--r--src/mame/drivers/pastelg.c2
-rw-r--r--src/mame/drivers/plygonet.c2
-rw-r--r--src/mame/drivers/qix.c6
-rw-r--r--src/mame/drivers/queen.c4
-rw-r--r--src/mame/drivers/re900.c4
-rw-r--r--src/mame/drivers/segac2.c34
-rw-r--r--src/mame/drivers/sfkick.c4
-rw-r--r--src/mame/drivers/skylncr.c17
-rw-r--r--src/mame/drivers/spool99.c4
-rw-r--r--src/mame/drivers/stv.c2
-rw-r--r--src/mame/includes/segas24.h4
-rw-r--r--src/mame/includes/snes.h10
-rw-r--r--src/mame/includes/stv.h2
-rw-r--r--src/mame/includes/suprnova.h10
-rw-r--r--src/mame/includes/tmnt.h1
-rw-r--r--src/mame/includes/wrally.h3
-rw-r--r--src/mame/machine/kaneko16.c6
-rw-r--r--src/mame/machine/segas24.c4
-rw-r--r--src/mame/machine/snesdsp1.c8
-rw-r--r--src/mame/machine/snesdsp2.c48
-rw-r--r--src/mame/machine/snesobc1.c12
-rw-r--r--src/mame/video/goldstar.c4
-rw-r--r--src/mame/video/hyprduel.c1
-rw-r--r--src/mame/video/metro.c1
-rw-r--r--src/mame/video/stvvdp1.c3
-rw-r--r--src/mame/video/stvvdp2.c22
-rw-r--r--src/mame/video/suprnova.c3
60 files changed, 180 insertions, 311 deletions
diff --git a/src/emu/cpu/arm7/arm7core.c b/src/emu/cpu/arm7/arm7core.c
index 84519f65b4e..32d2b0d17ef 100644
--- a/src/emu/cpu/arm7/arm7core.c
+++ b/src/emu/cpu/arm7/arm7core.c
@@ -117,9 +117,9 @@ INLINE UINT8 arm7_cpu_read8(arm_state *cpustate, offs_t addr);
/* Static Vars */
// Note: for multi-cpu implementation, this approach won't work w/o modification
-WRITE32_HANDLER((*arm7_coproc_do_callback)); // holder for the co processor Data Operations Callback func.
-READ32_HANDLER((*arm7_coproc_rt_r_callback)); // holder for the co processor Register Transfer Read Callback func.
-WRITE32_HANDLER((*arm7_coproc_rt_w_callback)); // holder for the co processor Register Transfer Write Callback Callback func.
+write32_space_func arm7_coproc_do_callback; // holder for the co processor Data Operations Callback func.
+read32_space_func arm7_coproc_rt_r_callback; // holder for the co processor Register Transfer Read Callback func.
+write32_space_func arm7_coproc_rt_w_callback; // holder for the co processor Register Transfer Write Callback Callback func.
// holder for the co processor Data Transfer Read & Write Callback funcs
void (*arm7_coproc_dt_r_callback)(arm_state *cpustate, UINT32 insn, UINT32 *prn, UINT32 (*read32)(arm_state *cpustate, UINT32 addr));
void (*arm7_coproc_dt_w_callback)(arm_state *cpustate, UINT32 insn, UINT32 *prn, void (*write32)(arm_state *cpustate, UINT32 addr, UINT32 data));
diff --git a/src/emu/cpu/arm7/arm7core.h b/src/emu/cpu/arm7/arm7core.h
index 62ba92aed0e..b500804e621 100644
--- a/src/emu/cpu/arm7/arm7core.h
+++ b/src/emu/cpu/arm7/arm7core.h
@@ -403,9 +403,9 @@ enum
#define SET_REGISTER(state, reg, val) SetRegister(state, reg, val)
#define ARM7_CHECKIRQ arm7_check_irq_state(cpustate)
-extern WRITE32_HANDLER((*arm7_coproc_do_callback));
-extern READ32_HANDLER((*arm7_coproc_rt_r_callback));
-extern WRITE32_HANDLER((*arm7_coproc_rt_w_callback));
+extern write32_space_func arm7_coproc_do_callback;
+extern read32_space_func arm7_coproc_rt_r_callback;
+extern write32_space_func arm7_coproc_rt_w_callback;
extern void (*arm7_coproc_dt_r_callback)(arm_state *cpustate, UINT32 insn, UINT32* prn, UINT32 (*read32)(arm_state *cpustate, UINT32 addr));
extern void (*arm7_coproc_dt_w_callback)(arm_state *cpustate, UINT32 insn, UINT32* prn, void (*write32)(arm_state *cpustate, UINT32 addr, UINT32 data));
diff --git a/src/emu/cpu/esrip/esrip.c b/src/emu/cpu/esrip/esrip.c
index bb3e68c7061..b271c7b01b9 100644
--- a/src/emu/cpu/esrip/esrip.c
+++ b/src/emu/cpu/esrip/esrip.c
@@ -1939,7 +1939,7 @@ static CPU_DISASSEMBLE( esrip )
* set_info
**************************************************************************/
-CPU_SET_INFO( esrip )
+static CPU_SET_INFO( esrip )
{
esrip_state *cpustate = device->token;
diff --git a/src/emu/cpu/h83002/h8_8.c b/src/emu/cpu/h83002/h8_8.c
index 09834958d13..5df281e7c62 100644
--- a/src/emu/cpu/h83002/h8_8.c
+++ b/src/emu/cpu/h83002/h8_8.c
@@ -73,7 +73,7 @@ static CPU_DISASSEMBLE(h8)
return h8_disasm(buffer, pc, oprom, opram, 0xffff);
}
-void h8_300_InterruptRequest(h83xx_state *h8, UINT8 source)
+static void h8_300_InterruptRequest(h83xx_state *h8, UINT8 source)
{
if(source>31)
{
diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c
index 66090c067ae..012289ce5c2 100644
--- a/src/emu/cpu/m37710/m37710.c
+++ b/src/emu/cpu/m37710/m37710.c
@@ -841,7 +841,7 @@ static CPU_RESET( m37710 )
}
/* Exit and clean up */
-CPU_EXIT( m37710 )
+static CPU_EXIT( m37710 )
{
/* nothing to do yet */
}
@@ -888,16 +888,6 @@ static void m37710_set_reg(m37710i_cpu_struct *cpustate, int regnum, unsigned va
FTABLE_SET_REG(cpustate, regnum, value);
}
-/* Load a CPU state */
-void m37710_state_load(void *file)
-{
-}
-
-/* Save the current CPU state */
-void m37710_state_save(void *file)
-{
-}
-
/* Set an interrupt line */
static void m37710_set_irq_line(m37710i_cpu_struct *cpustate, int line, int state)
{
diff --git a/src/emu/cpu/m37710/m37710cm.h b/src/emu/cpu/m37710/m37710cm.h
index f31b7a680cc..c76091d41fa 100644
--- a/src/emu/cpu/m37710/m37710cm.h
+++ b/src/emu/cpu/m37710/m37710cm.h
@@ -21,15 +21,6 @@
/* ================================= MAME ================================= */
/* ======================================================================== */
-/* Clean up after the emulation core - Not used in this core - */
-CPU_EXIT( m37710 );
-
-/* Save the current CPU state to disk */
-void m37710_state_save(void *file);
-
-/* Load a CPU state from disk */
-void m37710_state_load(void *file);
-
#undef M37710_CALL_DEBUGGER
#define M37710_CALL_DEBUGGER(x) debugger_instruction_hook(cpustate->device, x)
diff --git a/src/emu/cpu/mcs51/mcs51dasm.c b/src/emu/cpu/mcs51/mcs51dasm.c
index 5ab6360e126..814e5613509 100644
--- a/src/emu/cpu/mcs51/mcs51dasm.c
+++ b/src/emu/cpu/mcs51/mcs51dasm.c
@@ -55,7 +55,7 @@ enum
//SFR Names
-static struct {
+static const struct {
int feature;
int addr;
const char *name;
diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c
index 9e010859eed..023f577a6c7 100644
--- a/src/emu/cpu/sm8500/sm8500.c
+++ b/src/emu/cpu/sm8500/sm8500.c
@@ -59,11 +59,11 @@ static const UINT8 sm8500_b2w[8] = {
0, 8, 2, 10, 4, 12, 6, 14
};
-UINT8 sm85cpu_mem_readbyte( sm8500_state *cpustate, UINT32 offset ) {
+static UINT8 sm85cpu_mem_readbyte( sm8500_state *cpustate, UINT32 offset ) {
return ( offset < 0x10 ) ? cpustate->register_base[offset] : memory_read_byte_8be( cpustate->program, offset );
}
-void sm85cpu_mem_writebyte( sm8500_state *cpustate, UINT32 offset, UINT8 data ) {
+static void sm85cpu_mem_writebyte( sm8500_state *cpustate, UINT32 offset, UINT8 data ) {
if ( offset < 0x10 ) {
cpustate->register_base[offset] = data;
} else {
@@ -267,7 +267,7 @@ static CPU_BURN( sm8500 )
}
}
-unsigned sm8500_get_reg( sm8500_state *cpustate, int regnum )
+static unsigned sm8500_get_reg( sm8500_state *cpustate, int regnum )
{
switch( regnum )
{
diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c
index 2f286b290a4..91c41e5e3dd 100644
--- a/src/emu/cpu/spc700/spc700.c
+++ b/src/emu/cpu/spc700/spc700.c
@@ -259,63 +259,6 @@ INLINE int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
/* ======================================================================== */
-/* ============================= INTERFACE API ============================ */
-/* ======================================================================== */
-
-/* This is the interface, not the implementation. Please call the */
-/* implementation APIs below. */
-
-
-CPU_INIT( spc700 );
-
-/* Pulse the RESET pin on the CPU */
-CPU_RESET( spc700 );
-
-/* Set the RESET line on the CPU */
-void spc700_set_reset_line(spc700i_cpu *cpustate, int state, void* param);
-
-/* Clean up after the emulation core - Not used in this core - */
-CPU_EXIT( spc700 );
-
-/* Get the current Program Counter */
-unsigned spc700_get_pc(spc700i_cpu *cpustate);
-
-/* Set the current Program Counter */
-void spc700_set_pc(spc700i_cpu *cpustate,unsigned val);
-
-/* Get the current Stack Pointer */
-unsigned spc700_get_sp(spc700i_cpu *cpustate);
-
-/* Set the current Stack Pointer */
-void spc700_set_sp(spc700i_cpu *cpustate,unsigned val);
-
-/* Get a register from the core */
-unsigned spc700_get_reg(spc700i_cpu *cpustate,int regnum);
-
-/* Set a register in the core */
-void spc700_set_reg(spc700i_cpu *cpustate,int regnum, unsigned val);
-
-/* Note about NMI:
- * NMI is a one-shot trigger. In order to trigger NMI again, you must
- * clear NMI and then assert it again.
- */
-void spc700_set_nmi_line(spc700i_cpu *cpustate,int state);
-
-/* Assert or clear the IRQ pin */
-void spc700_set_irq_line(spc700i_cpu *cpustate,int line, int state);
-
-/* Set the callback that will be called when an interrupt is serviced */
-void spc700_set_irq_callback(spc700i_cpu *cpustate,cpu_irq_callback callback);
-
-/* Get a formatted string representing a register and its contents */
-const char *spc700_info(spc700i_cpu *cpustate,void *context, int regnum);
-
-
-/* Pulse the SO (Set Overflow) pin on the CPU */
-void spc700_pulse_so(spc700i_cpu *cpustate);
-
-
-/* ======================================================================== */
/* ============================ UTILITY MACROS ============================ */
/* ======================================================================== */
@@ -1299,7 +1242,7 @@ INLINE void SET_FLAG_I(spc700i_cpu *cpustate, uint value)
/* ================================= API ================================== */
/* ======================================================================== */
-CPU_INIT( spc700 )
+static CPU_INIT( spc700 )
{
spc700i_cpu *cpustate = device->token;
@@ -1309,7 +1252,7 @@ CPU_INIT( spc700 )
}
-CPU_RESET( spc700 )
+static CPU_RESET( spc700 )
{
spc700i_cpu *cpustate = device->token;
@@ -1330,38 +1273,14 @@ CPU_RESET( spc700 )
}
/* Exit and clean up */
-CPU_EXIT( spc700 )
+static CPU_EXIT( spc700 )
{
/* nothing to do yet */
}
-/* Get the current Program Counter */
-unsigned spc700_get_pc(spc700i_cpu *cpustate)
-{
- return REG_PC;
-}
-
-/* Set the Program Counter */
-void spc700_set_pc(spc700i_cpu *cpustate,unsigned val)
-{
- JUMP(cpustate, val);
-}
-
-/* Get the current Stack Pointer */
-unsigned spc700_get_sp(spc700i_cpu *cpustate)
-{
- return REG_S + STACK_PAGE;
-}
-
-/* Set the Stack Pointer */
-void spc700_set_sp(spc700i_cpu *cpustate,unsigned val)
-{
- REG_S = MAKE_UINT_8(val);
-}
-
/* Assert or clear the NMI line of the CPU */
-void spc700_set_nmi_line(spc700i_cpu *cpustate,int state)
+static void spc700_set_nmi_line(spc700i_cpu *cpustate,int state)
{
#if !SPC700_OPTIMIZE_SNES
if(state == CLEAR_LINE)
@@ -1378,7 +1297,7 @@ void spc700_set_nmi_line(spc700i_cpu *cpustate,int state)
}
/* Assert or clear the IRQ line of the CPU */
-void spc700_set_irq_line(spc700i_cpu *cpustate,int line, int state)
+static void spc700_set_irq_line(spc700i_cpu *cpustate,int line, int state)
{
#if !SPC700_OPTIMIZE_SNES
LINE_IRQ = (state != CLEAR_LINE) ? IRQ_SET : IRQ_CLEAR;
@@ -1386,18 +1305,12 @@ void spc700_set_irq_line(spc700i_cpu *cpustate,int line, int state)
#endif /* SPC700_OPTIMIZE_SNES */
}
-/* Set the callback that is called when servicing an interrupt */
-void spc700_set_irq_callback(spc700i_cpu *cpustate,cpu_irq_callback callback)
-{
- INT_ACK = callback;
-}
-
#include "spc700ds.h"
//int dump_flag = 0;
/* Execute instructions for <clocks> cycles */
-CPU_EXECUTE( spc700 )
+static CPU_EXECUTE( spc700 )
{
spc700i_cpu *cpustate = device->token;
diff --git a/src/emu/machine/f3853.c b/src/emu/machine/f3853.c
index b8edd4b97af..b89c95ae6a2 100644
--- a/src/emu/machine/f3853.c
+++ b/src/emu/machine/f3853.c
@@ -210,7 +210,7 @@ static DEVICE_RESET( f3853 )
}
-DEVICE_SET_INFO( f3853 )
+static DEVICE_SET_INFO( f3853 )
{
switch ( state )
{
diff --git a/src/emu/sound/okim6295.c b/src/emu/sound/okim6295.c
index a4253c46fef..29197def1af 100644
--- a/src/emu/sound/okim6295.c
+++ b/src/emu/sound/okim6295.c
@@ -63,7 +63,7 @@ static int diff_lookup[49*16];
/* volume lookup table. The manual lists only 9 steps, ~3dB per step. Given the dB values,
that seems to map to a 5-bit volume control. What happens for steps after the 9th is not
known, we arbitrarily assign a "1" to all those steps. */
-static int volume_table[16] =
+static const int volume_table[16] =
{
0x20, // 0 dB
0x16, // -3.2 dB
diff --git a/src/mame/audio/snes.c b/src/mame/audio/snes.c
index 2fe13dd23f0..41aa37ae0cd 100644
--- a/src/mame/audio/snes.c
+++ b/src/mame/audio/snes.c
@@ -200,7 +200,7 @@ static int AdvanceEnvelope /* Run envelope step & retn ENVX*/
/***** DSP_Reset *****/
-void DSP_Reset /* Reset emulated DSP */
+static void DSP_Reset /* Reset emulated DSP */
( void )
{
int i;
@@ -235,7 +235,7 @@ DSPregs[ 0x5C ] = 0;
/***** DSP_Update *****/
-void DSP_Update /* Mix one sample of audio */
+static void DSP_Update /* Mix one sample of audio */
(
short * sound_ptr /* Pointer to mix audio into */
)
diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c
index 93f783dd54f..a335f1b8605 100644
--- a/src/mame/drivers/bbusters.c
+++ b/src/mame/drivers/bbusters.c
@@ -649,7 +649,7 @@ static const ym2610_interface ym2610_config =
/******************************************************************************/
// default eeprom with reasonable calibration for MAME
-unsigned char bbusters_default_eeprom[128] = {
+static const unsigned char bbusters_default_eeprom[128] = {
/*y*/ /*y*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0xEE, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xFE, 0x00,
diff --git a/src/mame/drivers/bingoc.c b/src/mame/drivers/bingoc.c
index 35cfe79e321..63b251ee82b 100644
--- a/src/mame/drivers/bingoc.c
+++ b/src/mame/drivers/bingoc.c
@@ -35,12 +35,12 @@ SOUND : YM2151 uPD7759C
#define SOUND_TEST 0
-VIDEO_START(bingoc)
+static VIDEO_START(bingoc)
{
}
-VIDEO_UPDATE(bingoc)
+static VIDEO_UPDATE(bingoc)
{
return 0;
}
diff --git a/src/mame/drivers/brasil.c b/src/mame/drivers/brasil.c
index 9fc94dc68d0..73943363384 100644
--- a/src/mame/drivers/brasil.c
+++ b/src/mame/drivers/brasil.c
@@ -29,12 +29,12 @@ TODO:
static UINT16 *blit_ram;
-VIDEO_START(brasil)
+static VIDEO_START(brasil)
{
}
-VIDEO_UPDATE(brasil)
+static VIDEO_UPDATE(brasil)
{
int x,y,count;
@@ -64,7 +64,7 @@ VIDEO_UPDATE(brasil)
return 0;
}
-VIDEO_UPDATE(vidpokr2)
+static VIDEO_UPDATE(vidpokr2)
{
int x,y,count;
diff --git a/src/mame/drivers/caswin.c b/src/mame/drivers/caswin.c
index 8100da86493..95c5381e3ba 100644
--- a/src/mame/drivers/caswin.c
+++ b/src/mame/drivers/caswin.c
@@ -31,12 +31,12 @@ static TILE_GET_INFO( get_sc0_tile_info )
0);
}
-VIDEO_START(vvillage)
+static VIDEO_START(vvillage)
{
sc0_tilemap = tilemap_create(machine, get_sc0_tile_info,tilemap_scan_rows,8,8,32,32);
}
-VIDEO_UPDATE(vvillage)
+static VIDEO_UPDATE(vvillage)
{
tilemap_draw(bitmap,cliprect,sc0_tilemap,0,0);
return 0;
diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c
index f3b43a89043..042add6616d 100644
--- a/src/mame/drivers/cb2001.c
+++ b/src/mame/drivers/cb2001.c
@@ -126,12 +126,12 @@ e328e 18 c0 xor al,al
*/
-VIDEO_START(cb2001)
+static VIDEO_START(cb2001)
{
}
-VIDEO_UPDATE(cb2001)
+static VIDEO_UPDATE(cb2001)
{
return 0;
}
diff --git a/src/mame/drivers/deshoros.c b/src/mame/drivers/deshoros.c
index 5ae34770001..6664afe39a2 100644
--- a/src/mame/drivers/deshoros.c
+++ b/src/mame/drivers/deshoros.c
@@ -19,7 +19,7 @@ static UINT8 *io_ram;
/*Temporary,to show something on screen...*/
static char led_array[21];
-VIDEO_START( deshoros )
+static VIDEO_START( deshoros )
{
static UINT8 i;
for(i=0;i<20;i++)
@@ -27,7 +27,7 @@ VIDEO_START( deshoros )
led_array[20] = 0;
}
-VIDEO_UPDATE( deshoros )
+static VIDEO_UPDATE( deshoros )
{
popmessage("%s",led_array);
return 0;
diff --git a/src/mame/drivers/esripsys.c b/src/mame/drivers/esripsys.c
index 8c2c7953827..8f5f2b5e65e 100644
--- a/src/mame/drivers/esripsys.c
+++ b/src/mame/drivers/esripsys.c
@@ -239,7 +239,7 @@ static WRITE8_HANDLER( fdt_w )
*
*************************************/
-READ16_DEVICE_HANDLER( fdt_rip_r )
+static READ16_DEVICE_HANDLER( fdt_rip_r )
{
offset = (offset & 0x7ff) << 1;
@@ -249,7 +249,7 @@ READ16_DEVICE_HANDLER( fdt_rip_r )
return (fdt_b[offset] << 8) | fdt_b[offset + 1];
}
-WRITE16_DEVICE_HANDLER( fdt_rip_w )
+static WRITE16_DEVICE_HANDLER( fdt_rip_w )
{
offset = (offset & 0x7ff) << 1;
@@ -276,7 +276,7 @@ WRITE16_DEVICE_HANDLER( fdt_rip_w )
D7 = /FDONE
*/
-UINT8 rip_status_in(running_machine *machine)
+static UINT8 rip_status_in(running_machine *machine)
{
int vpos = video_screen_get_vpos(machine->primary_screen);
UINT8 _vblank = !(vpos >= ESRIPSYS_VBLANK_START);
@@ -465,7 +465,7 @@ static INPUT_CHANGED( coin_interrupt )
*
*************************************/
-INPUT_PORTS_START( turbosub )
+static INPUT_PORTS_START( turbosub )
PORT_START("KEYPAD_A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Keypad 0") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Keypad 1") PORT_CHANGED(keypad_interrupt, 0)
@@ -722,7 +722,7 @@ static NVRAM_HANDLER( esripsys )
memset(cmos_ram, 0x00, CMOS_RAM_SIZE);
}
-static esrip_config rip_config =
+static const esrip_config rip_config =
{
fdt_rip_r,
fdt_rip_w,
diff --git a/src/mame/drivers/gal3.c b/src/mame/drivers/gal3.c
index fbcd650df7b..bf9a0118c97 100644
--- a/src/mame/drivers/gal3.c
+++ b/src/mame/drivers/gal3.c
@@ -70,12 +70,12 @@ better notes (complete chip lists) for each board still needed
#include "driver.h"
#include "cpu/m68000/m68000.h"
-VIDEO_START(gal3)
+static VIDEO_START(gal3)
{
}
-VIDEO_UPDATE(gal3)
+static VIDEO_UPDATE(gal3)
{
return 0;
}
diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c
index e0c632ebf76..d2fdb7adce8 100644
--- a/src/mame/drivers/galpani3.c
+++ b/src/mame/drivers/galpani3.c
@@ -121,8 +121,6 @@ static INTERRUPT_GEN( galpani3_vblank ) // 2, 3, 5 ?
}
-extern int suprnova_alt_enable_sprites;
-
static VIDEO_START(galpani3)
{
/* so we can use suprnova.c */
@@ -535,7 +533,7 @@ static READ16_HANDLER( galpani3_mcu_status_r )
// might be blitter regs? - there are 3, probably GRAP2 chips
-READ16_HANDLER( galpani3_regs1_r )
+static READ16_HANDLER( galpani3_regs1_r )
{
switch (offset)
{
@@ -560,7 +558,7 @@ READ16_HANDLER( galpani3_regs1_r )
}
-READ16_HANDLER( galpani3_regs2_r )
+static READ16_HANDLER( galpani3_regs2_r )
{
switch (offset)
{
@@ -585,7 +583,7 @@ READ16_HANDLER( galpani3_regs2_r )
}
-READ16_HANDLER( galpani3_regs3_r )
+static READ16_HANDLER( galpani3_regs3_r )
{
switch (offset)
{
@@ -610,11 +608,11 @@ READ16_HANDLER( galpani3_regs3_r )
}
-UINT16 galpani3_regs1_address_regs[0x20];
-UINT16 galpani3_regs2_address_regs[0x20];
-UINT16 galpani3_regs3_address_regs[0x20];
+static UINT16 galpani3_regs1_address_regs[0x20];
+static UINT16 galpani3_regs2_address_regs[0x20];
+static UINT16 galpani3_regs3_address_regs[0x20];
-void gp3_do_rle(UINT32 address, UINT16*framebuffer, UINT8* rledata)
+static void gp3_do_rle(UINT32 address, UINT16*framebuffer, UINT8* rledata)
{
int rle_count = 0;
int normal_count = 0;
@@ -664,13 +662,13 @@ void gp3_do_rle(UINT32 address, UINT16*framebuffer, UINT8* rledata)
}
-WRITE16_HANDLER( galpani3_regs1_address_w )
+static WRITE16_HANDLER( galpani3_regs1_address_w )
{
logerror("galpani3_regs1_address_w %04x\n",data);
COMBINE_DATA(&galpani3_regs1_address_regs[offset]);
}
-WRITE16_HANDLER( galpani3_regs1_go_w )
+static WRITE16_HANDLER( galpani3_regs1_go_w )
{
UINT32 address = galpani3_regs1_address_regs[1]| (galpani3_regs1_address_regs[0]<<16);
UINT8* rledata = memory_region(space->machine,"gfx2");
@@ -680,13 +678,13 @@ WRITE16_HANDLER( galpani3_regs1_go_w )
}
-WRITE16_HANDLER( galpani3_regs2_address_w )
+static WRITE16_HANDLER( galpani3_regs2_address_w )
{
logerror("galpani3_regs2_address_w %04x\n",data);
COMBINE_DATA(&galpani3_regs2_address_regs[offset]);
}
-WRITE16_HANDLER( galpani3_regs2_go_w )
+static WRITE16_HANDLER( galpani3_regs2_go_w )
{
UINT32 address = galpani3_regs2_address_regs[1]| (galpani3_regs2_address_regs[0]<<16);
UINT8* rledata = memory_region(space->machine,"gfx2");
@@ -700,13 +698,13 @@ WRITE16_HANDLER( galpani3_regs2_go_w )
-WRITE16_HANDLER( galpani3_regs3_address_w )
+static WRITE16_HANDLER( galpani3_regs3_address_w )
{
logerror("galpani3_regs3_address_w %04x\n",data);
COMBINE_DATA(&galpani3_regs3_address_regs[offset]);
}
-WRITE16_HANDLER( galpani3_regs3_go_w )
+static WRITE16_HANDLER( galpani3_regs3_go_w )
{
UINT32 address = galpani3_regs3_address_regs[1]| (galpani3_regs3_address_regs[0]<<16);
UINT8* rledata = memory_region(space->machine,"gfx2");
diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c
index c013787037c..685251c9a91 100644
--- a/src/mame/drivers/goldstar.c
+++ b/src/mame/drivers/goldstar.c
@@ -4499,7 +4499,7 @@ static void do_blockswaps(UINT8* ROM)
int A;
UINT8 *buffer;
- static UINT16 cherry_swaptables[32] = {
+ static const UINT16 cherry_swaptables[32] = {
/* to align with goldstar */
0x0800, 0x4000, 0x2800, 0x5800,
0x1800, 0x3000, 0x6800, 0x7000,
@@ -4542,7 +4542,7 @@ static void dump_to_file(running_machine* machine, UINT8* ROM)
#endif
}
-UINT8 decrypt(UINT8 cipherText, UINT16 address)
+static UINT8 decrypt(UINT8 cipherText, UINT16 address)
{
int idx;
UINT8 output;
@@ -4559,7 +4559,7 @@ UINT8 decrypt(UINT8 cipherText, UINT16 address)
return output ^ sbox[idx];
}
-UINT8 chry10_decrypt(UINT8 cipherText)
+static UINT8 chry10_decrypt(UINT8 cipherText)
{
return cipherText ^ (BIT(cipherText, 4) << 3) ^ (BIT(cipherText, 1) << 5) ^ (BIT(cipherText, 6) << 7);
}
diff --git a/src/mame/drivers/igs009.c b/src/mame/drivers/igs009.c
index 61326f31033..5b479f4ee7a 100644
--- a/src/mame/drivers/igs009.c
+++ b/src/mame/drivers/igs009.c
@@ -27,9 +27,9 @@ NVRAM : Battery for main RAM
static tilemap *gp98_reel1_tilemap;
-UINT8 *gp98_reel1_ram;
+static UINT8 *gp98_reel1_ram;
-WRITE8_HANDLER( gp98_reel1_ram_w )
+static WRITE8_HANDLER( gp98_reel1_ram_w )
{
gp98_reel1_ram[offset] = data;
tilemap_mark_tile_dirty(gp98_reel1_tilemap,offset);
@@ -59,9 +59,9 @@ static TILE_GET_INFO( get_gp98_reel1_tile_info )
}
static tilemap *gp98_reel2_tilemap;
-UINT8 *gp98_reel2_ram;
+static UINT8 *gp98_reel2_ram;
-WRITE8_HANDLER( gp98_reel2_ram_w )
+static WRITE8_HANDLER( gp98_reel2_ram_w )
{
gp98_reel2_ram[offset] = data;
tilemap_mark_tile_dirty(gp98_reel2_tilemap,offset);
@@ -91,9 +91,9 @@ static TILE_GET_INFO( get_gp98_reel2_tile_info )
static tilemap *gp98_reel3_tilemap;
-UINT8 *gp98_reel3_ram;
+static UINT8 *gp98_reel3_ram;
-WRITE8_HANDLER( gp98_reel3_ram_w )
+static WRITE8_HANDLER( gp98_reel3_ram_w )
{
gp98_reel3_ram[offset] = data;
tilemap_mark_tile_dirty(gp98_reel3_tilemap,offset);
@@ -123,9 +123,9 @@ static TILE_GET_INFO( get_gp98_reel3_tile_info )
static tilemap *gp98_reel4_tilemap;
-UINT8 *gp98_reel4_ram;
+static UINT8 *gp98_reel4_ram;
-WRITE8_HANDLER( gp98_reel4_ram_w )
+static WRITE8_HANDLER( gp98_reel4_ram_w )
{
gp98_reel4_ram[offset] = data;
tilemap_mark_tile_dirty(gp98_reel4_tilemap,offset);
diff --git a/src/mame/drivers/ilpag.c b/src/mame/drivers/ilpag.c
index 1f2f84cb7b3..ee8f03bddd1 100644
--- a/src/mame/drivers/ilpag.c
+++ b/src/mame/drivers/ilpag.c
@@ -49,12 +49,12 @@ Note
static UINT16 *blit_romaddr,*blit_attr1_ram,*blit_dst_ram_loword,*blit_attr2_ram,*blit_dst_ram_hiword;
static UINT8 *blit_buffer;
-VIDEO_START(ilpag)
+static VIDEO_START(ilpag)
{
blit_buffer = auto_malloc(512*512*4); //just to be sure,number is wrong
}
-VIDEO_UPDATE(ilpag)
+static VIDEO_UPDATE(ilpag)
{
int x,y;
// static int counter = 0;
diff --git a/src/mame/drivers/janshi.c b/src/mame/drivers/janshi.c
index ce371cf67d2..be1295ea3db 100644
--- a/src/mame/drivers/janshi.c
+++ b/src/mame/drivers/janshi.c
@@ -37,12 +37,12 @@ static ADDRESS_MAP_START( mainmap, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_ROM
ADDRESS_MAP_END
-VIDEO_START(janshi)
+static VIDEO_START(janshi)
{
}
-VIDEO_UPDATE(janshi)
+static VIDEO_UPDATE(janshi)
{
return 0;
}
diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c
index 11500511eb2..edb5fc9b449 100644
--- a/src/mame/drivers/jantotsu.c
+++ b/src/mame/drivers/jantotsu.c
@@ -69,7 +69,7 @@ static UINT8 *jan_bitmap_1,*jan_bitmap_2,*jan_bitmap_3,*jan_bitmap_4;
static UINT8 vram_bank,col_bank;
static UINT8 mux_data;
-VIDEO_START(jantotsu)
+static VIDEO_START(jantotsu)
{
jan_bitmap_1 = auto_malloc(0x2000);
jan_bitmap_2 = auto_malloc(0x2000);
@@ -78,7 +78,7 @@ VIDEO_START(jantotsu)
vram_bank = 0;
}
-VIDEO_UPDATE(jantotsu)
+static VIDEO_UPDATE(jantotsu)
{
int x,y,i;
int count;
diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c
index 0ecbc72ffeb..dbdd3225079 100644
--- a/src/mame/drivers/jchan.c
+++ b/src/mame/drivers/jchan.c
@@ -189,7 +189,6 @@ static UINT16* jchan_sprregs_1;
static UINT16 *jchan_spriteram_2;
static UINT16* jchan_sprregs_2;
-extern int suprnova_alt_enable_sprites;
static UINT16 *mainsub_shared_ram;
/***************************************************************************
diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c
index 8e2923e0fb5..1b7030de8fb 100644
--- a/src/mame/drivers/luckgrln.c
+++ b/src/mame/drivers/luckgrln.c
@@ -140,7 +140,7 @@ static MACHINE_DRIVER_START( luckgrln )
MDRV_VIDEO_UPDATE(luckgrln)
MACHINE_DRIVER_END
-DRIVER_INIT( luckgrln )
+static DRIVER_INIT( luckgrln )
{
int i;
UINT8 x,v;
diff --git a/src/mame/drivers/megadriv.h b/src/mame/drivers/megadriv.h
index 31790a176f3..fd6a6b232c4 100644
--- a/src/mame/drivers/megadriv.h
+++ b/src/mame/drivers/megadriv.h
@@ -15,6 +15,7 @@ MACHINE_DRIVER_EXTERN(megadriv);
MACHINE_DRIVER_EXTERN(megadpal);
MACHINE_DRIVER_EXTERN(megdsvp);
MACHINE_DRIVER_EXTERN( genesis_32x );
+MACHINE_DRIVER_EXTERN( genesis_32x_pal );
MACHINE_DRIVER_EXTERN( genesis_scd );
MACHINE_DRIVER_EXTERN( genesis_32x_scd );
diff --git a/src/mame/drivers/mil4000.c b/src/mame/drivers/mil4000.c
index df9ebaabfe6..e10228eefa6 100644
--- a/src/mame/drivers/mil4000.c
+++ b/src/mame/drivers/mil4000.c
@@ -133,7 +133,7 @@ static TILE_GET_INFO( get_sc3_tile_info )
0);
}
-VIDEO_START(mil4000)
+static VIDEO_START(mil4000)
{
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
int i;
@@ -152,7 +152,7 @@ VIDEO_START(mil4000)
tilemap_set_transparent_pen(sc3_tilemap,0);
}
-VIDEO_UPDATE(mil4000)
+static VIDEO_UPDATE(mil4000)
{
tilemap_draw(bitmap,cliprect,sc0_tilemap,0,0);
tilemap_draw(bitmap,cliprect,sc1_tilemap,0,0);
diff --git a/src/mame/drivers/mpoker.c b/src/mame/drivers/mpoker.c
index a6e6b67b7c1..64d88ba279a 100644
--- a/src/mame/drivers/mpoker.c
+++ b/src/mame/drivers/mpoker.c
@@ -10,12 +10,12 @@ Merit Poker?
static UINT8* mpoker_video;
-VIDEO_START(mpoker)
+static VIDEO_START(mpoker)
{
}
-VIDEO_UPDATE(mpoker)
+static VIDEO_UPDATE(mpoker)
{
int y,x;
int count;
diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c
index ec883ebbd66..5c54212c73b 100644
--- a/src/mame/drivers/neogeo.c
+++ b/src/mame/drivers/neogeo.c
@@ -1105,7 +1105,7 @@ ADDRESS_MAP_END
*
*************************************/
-static ym2610_interface ym2610_config =
+static const ym2610_interface ym2610_config =
{
audio_cpu_irq
};
diff --git a/src/mame/drivers/parentj.c b/src/mame/drivers/parentj.c
index 6f5e3997b53..36928472356 100644
--- a/src/mame/drivers/parentj.c
+++ b/src/mame/drivers/parentj.c
@@ -10,13 +10,13 @@
static UINT16* parentj_video;
-VIDEO_START(parentj)
+static VIDEO_START(parentj)
{
}
-VIDEO_UPDATE(parentj)
+static VIDEO_UPDATE(parentj)
{
const gfx_element *gfx = screen->machine->gfx[0];
int count = 0x0c000/2;
diff --git a/src/mame/drivers/pastelg.c b/src/mame/drivers/pastelg.c
index 0fdf854b13f..fc623ed4623 100644
--- a/src/mame/drivers/pastelg.c
+++ b/src/mame/drivers/pastelg.c
@@ -218,7 +218,7 @@ static INPUT_PORTS_START( pastelg )
INPUT_PORTS_END
// stops the game hanging..
-CUSTOM_INPUT( nb1413m3_hackbusyflag_r )
+static CUSTOM_INPUT( nb1413m3_hackbusyflag_r )
{
static int i = 0;
i ^= 1;
diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c
index b55e40686fa..ef4c8d2ae78 100644
--- a/src/mame/drivers/plygonet.c
+++ b/src/mame/drivers/plygonet.c
@@ -309,7 +309,7 @@ static READ32_HANDLER( network_r )
}
-WRITE32_HANDLER( plygonet_palette_w )
+static WRITE32_HANDLER( plygonet_palette_w )
{
int r,g,b;
diff --git a/src/mame/drivers/qix.c b/src/mame/drivers/qix.c
index ccd4c9e6680..855b057e83e 100644
--- a/src/mame/drivers/qix.c
+++ b/src/mame/drivers/qix.c
@@ -1029,7 +1029,7 @@ ROM_END
*************************************/
// 99 means the value is unknown
-static int xor1_table[] =
+static const UINT8 xor1_table[] =
{
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
@@ -1097,7 +1097,7 @@ static int xor1_table[] =
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
};
-static int xor2_table[] =
+static const UINT8 xor2_table[] =
{
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
@@ -1177,7 +1177,7 @@ static int kram3_permut1(int idx, int value)
}
}
-static int kram3_permut2(int tbl_index, int idx, int *xor_table)
+static int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table)
{
int xor = 0;
diff --git a/src/mame/drivers/queen.c b/src/mame/drivers/queen.c
index 6b92d7d1640..dece074bcce 100644
--- a/src/mame/drivers/queen.c
+++ b/src/mame/drivers/queen.c
@@ -19,12 +19,12 @@ ROMs epia BIOS + solid state HD
#include "driver.h"
#include "cpu/i386/i386.h"
-VIDEO_START(queen)
+static VIDEO_START(queen)
{
}
-VIDEO_UPDATE(queen)
+static VIDEO_UPDATE(queen)
{
return 0;
}
diff --git a/src/mame/drivers/re900.c b/src/mame/drivers/re900.c
index 646ebfa595c..f2b5a5c3b30 100644
--- a/src/mame/drivers/re900.c
+++ b/src/mame/drivers/re900.c
@@ -247,7 +247,7 @@ static void vdp_interrupt (running_machine *machine, int state)
* Input ports *
************************/
-INPUT_PORTS_START( re900 )
+static INPUT_PORTS_START( re900 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Operator Key") PORT_TOGGLE PORT_CODE(KEYCODE_0)
@@ -334,7 +334,7 @@ INPUT_PORTS_START( re900 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-INPUT_PORTS_START( bs94 )
+static INPUT_PORTS_START( bs94 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Bet") PORT_CODE(KEYCODE_2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Double") PORT_CODE(KEYCODE_3)
diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c
index 92bc4d357c1..3e69c1a13f7 100644
--- a/src/mame/drivers/segac2.c
+++ b/src/mame/drivers/segac2.c
@@ -247,12 +247,6 @@ static READ16_HANDLER( palette_r )
return paletteram16[offset + palbank * 0x200];
}
-UINT16* megadrive_vdp_palette_lookup_segac2;
-UINT16* megadrive_vdp_palette_lookup_sprite_segac2;
-UINT16* megadrive_vdp_palette_lookup_shadow_segac2;
-UINT16* megadrive_vdp_palette_lookup_highlight_segac2;
-
-
/* handle writes to the paletteram */
static WRITE16_HANDLER( palette_w )
{
@@ -277,15 +271,15 @@ static WRITE16_HANDLER( palette_w )
/* set the color */
palette_set_color_rgb(space->machine, offset, pal5bit(r), pal5bit(g), pal5bit(b));
- megadrive_vdp_palette_lookup_segac2[offset] = (b) | (g<<5) | (r<<10);
- megadrive_vdp_palette_lookup_sprite_segac2[offset] = (b) | (g<<5) | (r<<10);
+ megadrive_vdp_palette_lookup[offset] = (b) | (g<<5) | (r<<10);
+ megadrive_vdp_palette_lookup_sprite[offset] = (b) | (g<<5) | (r<<10);
tmpr = r>>1;tmpg=g>>1;tmpb=b>>1;
- megadrive_vdp_palette_lookup_shadow_segac2[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
+ megadrive_vdp_palette_lookup_shadow[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
// how is it calculated on c2?
tmpr = tmpr|0x10; tmpg = tmpg|0x10; tmpb = tmpb|0x10;
- megadrive_vdp_palette_lookup_highlight_segac2[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
+ megadrive_vdp_palette_lookup_highlight[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
}
@@ -1347,7 +1341,7 @@ INPUT_PORTS_END
Sound interfaces
******************************************************************************/
-void segac2_irq2_interrupt(running_machine *machine, int state)
+static void segac2_irq2_interrupt(running_machine *machine, int state)
{
//printf("sound irq %d\n", state);
cpu_set_input_line(machine->cpu[0], 2, state ? ASSERT_LINE : CLEAR_LINE);
@@ -1371,24 +1365,18 @@ static const ym3438_interface ym3438_intf =
******************************************************************************/
-VIDEO_START(segac2_new)
+static VIDEO_START(segac2_new)
{
VIDEO_START_CALL(megadriv);
- megadrive_vdp_palette_lookup_segac2 = auto_malloc(0x1000);
- megadrive_vdp_palette_lookup_sprite_segac2 = auto_malloc(0x1000);
- megadrive_vdp_palette_lookup_shadow_segac2 = auto_malloc(0x1000);
- megadrive_vdp_palette_lookup_highlight_segac2 = auto_malloc(0x1000);
-
- megadrive_vdp_palette_lookup = megadrive_vdp_palette_lookup_segac2;
- megadrive_vdp_palette_lookup_sprite = megadrive_vdp_palette_lookup_sprite_segac2;
- megadrive_vdp_palette_lookup_shadow = megadrive_vdp_palette_lookup_shadow_segac2;
- megadrive_vdp_palette_lookup_highlight = megadrive_vdp_palette_lookup_highlight_segac2;
-
+ megadrive_vdp_palette_lookup = auto_malloc(0x1000);
+ megadrive_vdp_palette_lookup_sprite = auto_malloc(0x1000);
+ megadrive_vdp_palette_lookup_shadow = auto_malloc(0x1000);
+ megadrive_vdp_palette_lookup_highlight = auto_malloc(0x1000);
}
-VIDEO_UPDATE(segac2_new)
+static VIDEO_UPDATE(segac2_new)
{
if (!segac2_enable_display)
{
diff --git a/src/mame/drivers/sfkick.c b/src/mame/drivers/sfkick.c
index 188c3ce0ea9..3eb0ffe3942 100644
--- a/src/mame/drivers/sfkick.c
+++ b/src/mame/drivers/sfkick.c
@@ -84,7 +84,7 @@ static READ8_DEVICE_HANDLER( ppi_port_b_r )
return 0xff;
}
-void sfkick_remap_banks(running_machine *machine)
+static void sfkick_remap_banks(running_machine *machine)
{
/* 0000-3ffff */
switch(sfkick_bank_cfg&3)
@@ -417,7 +417,7 @@ static void sfkick_vdp_interrupt(running_machine *machine, int i)
cpu_set_input_line (machine->cpu[0], 0, (i ? HOLD_LINE : CLEAR_LINE));
}
-VIDEO_START( sfkick )
+static VIDEO_START( sfkick )
{
VIDEO_START_CALL(generic_bitmapped);
v9938_init (machine, 0, machine->primary_screen, tmpbitmap, MODEL_V9938, 0x80000, sfkick_vdp_interrupt);
diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c
index 7b2ba7ccd87..f7f06a6cbc5 100644
--- a/src/mame/drivers/skylncr.c
+++ b/src/mame/drivers/skylncr.c
@@ -160,50 +160,49 @@ static VIDEO_UPDATE( skylncr )
return 0;
}
-
-WRITE8_HANDLER( reeltiles_1_w )
+static WRITE8_HANDLER( reeltiles_1_w )
{
reeltiles_1_ram[offset] = data;
tilemap_mark_tile_dirty(reel_1_tilemap, offset);
}
-WRITE8_HANDLER( reeltiles_2_w )
+static WRITE8_HANDLER( reeltiles_2_w )
{
reeltiles_2_ram[offset] = data;
tilemap_mark_tile_dirty(reel_2_tilemap, offset);
}
-WRITE8_HANDLER( reeltiles_3_w )
+static WRITE8_HANDLER( reeltiles_3_w )
{
reeltiles_3_ram[offset] = data;
tilemap_mark_tile_dirty(reel_3_tilemap, offset);
}
-WRITE8_HANDLER( reeltiles_4_w )
+static WRITE8_HANDLER( reeltiles_4_w )
{
reeltiles_4_ram[offset] = data;
tilemap_mark_tile_dirty(reel_4_tilemap, offset);
}
-WRITE8_HANDLER( reeltileshigh_1_w )
+static WRITE8_HANDLER( reeltileshigh_1_w )
{
reeltileshigh_1_ram[offset] = data;
tilemap_mark_tile_dirty(reel_1_tilemap, offset);
}
-WRITE8_HANDLER( reeltileshigh_2_w )
+static WRITE8_HANDLER( reeltileshigh_2_w )
{
reeltileshigh_2_ram[offset] = data;
tilemap_mark_tile_dirty(reel_2_tilemap, offset);
}
-WRITE8_HANDLER( reeltileshigh_3_w )
+static WRITE8_HANDLER( reeltileshigh_3_w )
{
reeltileshigh_3_ram[offset] = data;
tilemap_mark_tile_dirty(reel_3_tilemap, offset);
}
-WRITE8_HANDLER( reeltileshigh_4_w )
+static WRITE8_HANDLER( reeltileshigh_4_w )
{
reeltileshigh_4_ram[offset] = data;
tilemap_mark_tile_dirty(reel_4_tilemap, offset);
diff --git a/src/mame/drivers/spool99.c b/src/mame/drivers/spool99.c
index 9fcf2fa53c8..efecb6b0eb8 100644
--- a/src/mame/drivers/spool99.c
+++ b/src/mame/drivers/spool99.c
@@ -107,12 +107,12 @@ static TILE_GET_INFO( get_spool99_tile_info )
0);
}
-VIDEO_START(spool99)
+static VIDEO_START(spool99)
{
sc0_tilemap = tilemap_create(machine, get_spool99_tile_info,tilemap_scan_rows,8,8,64,32);
}
-VIDEO_UPDATE(spool99)
+static VIDEO_UPDATE(spool99)
{
tilemap_draw(bitmap,cliprect,sc0_tilemap,0,0);
return 0;
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c
index 86e1a25aeda..f3184fd4abb 100644
--- a/src/mame/drivers/stv.c
+++ b/src/mame/drivers/stv.c
@@ -222,7 +222,7 @@ static INT32 scu_size_0, /* Transfer DMA size lv 0*/
scu_size_1, /* lv 1*/
scu_size_2; /* lv 2*/
-struct
+static struct
{
UINT8 vblank_out;
UINT8 vblank_in;
diff --git a/src/mame/includes/segas24.h b/src/mame/includes/segas24.h
index c15903ce005..ce9b10f88b7 100644
--- a/src/mame/includes/segas24.h
+++ b/src/mame/includes/segas24.h
@@ -14,8 +14,8 @@ WRITE16_HANDLER( system24temp_sys16_shared_ram_w );
void system24temp_sys16_io_set_callbacks(UINT8 (*io_r)(running_machine *machine, int port),
void (*io_w)(running_machine *machine, int port, UINT8 data),
void (*cnt_w)(const address_space *space, UINT8 data),
- READ16_HANDLER ((*iod_r)),
- WRITE16_HANDLER((*iod_w)));
+ read16_space_func iod_r,
+ write16_space_func iod_w);
READ16_HANDLER ( system24temp_sys16_io_r );
WRITE16_HANDLER( system24temp_sys16_io_w );
READ32_HANDLER ( system24temp_sys16_io_dword_r );
diff --git a/src/mame/includes/snes.h b/src/mame/includes/snes.h
index ada3a66f170..f1073e2d52f 100644
--- a/src/mame/includes/snes.h
+++ b/src/mame/includes/snes.h
@@ -553,16 +553,6 @@ typedef struct /* Source directory entry */
/* All other writes should store the value in the addressed register as
expected. */
-/*========== PROCEDURES ==========*/
-
-void DSP_Reset /* Reset emulated DSP */
- ( void );
-
-void DSP_Update /* Mix one sample of audio */
- (
- short * sound_ptr /* Pointer to mix audio into */
- );
-
/*----------- defined in video/snes.c -----------*/
extern struct SNES_PPU_STRUCT snes_ppu;
diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h
index 8e0d915a462..b86f6a85f88 100644
--- a/src/mame/includes/stv.h
+++ b/src/mame/includes/stv.h
@@ -81,6 +81,8 @@ extern UINT32* stv_vdp2_regs;
extern UINT32* stv_vdp2_vram;
extern UINT32* stv_vdp2_cram;
+UINT8 stv_get_vblank(running_machine *machine);
+
WRITE32_HANDLER ( stv_vdp2_vram_w );
READ32_HANDLER ( stv_vdp2_vram_r );
diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h
index 1f0a0e7c110..e04327cfd36 100644
--- a/src/mame/includes/suprnova.h
+++ b/src/mame/includes/suprnova.h
@@ -9,12 +9,14 @@ extern int skns_v3t_somedirty,skns_v3t_4bpp_somedirty;
/*----------- defined in video/suprnova.c -----------*/
+extern int suprnova_alt_enable_sprites;
+
void skns_sprite_kludge(int x, int y);
void skns_draw_sprites(
-running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect,
-UINT32* spriteram_source, size_t spriteram_size,
-UINT8* gfx_source, size_t gfx_length,
-UINT32* sprite_regs );
+ running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect,
+ UINT32* spriteram_source, size_t spriteram_size,
+ UINT8* gfx_source, size_t gfx_length,
+ UINT32* sprite_regs );
WRITE32_HANDLER ( skns_tilemapA_w );
WRITE32_HANDLER ( skns_tilemapB_w );
diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h
index e77d7f704c2..e568c20c58f 100644
--- a/src/mame/includes/tmnt.h
+++ b/src/mame/includes/tmnt.h
@@ -7,6 +7,7 @@ WRITE16_HANDLER( lgtnfght_0a0018_w );
WRITE16_HANDLER( blswhstl_700300_w );
READ16_HANDLER( glfgreat_rom_r );
WRITE16_HANDLER( glfgreat_122000_w );
+WRITE16_HANDLER( ssriders_eeprom_w );
WRITE16_HANDLER( ssriders_1c0300_w );
WRITE16_HANDLER( prmrsocr_122000_w );
WRITE16_HANDLER( tmnt_priority_w );
diff --git a/src/mame/includes/wrally.h b/src/mame/includes/wrally.h
index 3385cea7830..601c9d33199 100644
--- a/src/mame/includes/wrally.h
+++ b/src/mame/includes/wrally.h
@@ -1,8 +1,5 @@
/*----------- defined in machine/wrally.c -----------*/
-DRIVER_INIT( wrally );
-MACHINE_RESET( wrally );
-
WRITE16_HANDLER( wrally_vram_w );
WRITE16_HANDLER( wrally_flipscreen_w );
WRITE16_HANDLER( OKIM6295_bankswitch_w );
diff --git a/src/mame/machine/kaneko16.c b/src/mame/machine/kaneko16.c
index f3179e69265..89f62422d40 100644
--- a/src/mame/machine/kaneko16.c
+++ b/src/mame/machine/kaneko16.c
@@ -330,7 +330,7 @@ static void calc3_mcu_run(running_machine *machine)
case 0x00ff:
{
- static UINT16 shogwarr_snip_[] = {
+ static const UINT16 shogwarr_snip_[] = {
0x48E7,0xFFFE, // movem.l D0-D7/A0-A6, -(A7)
0x3039,0x00A8,0x0000, // move.w $a80000.l, D0
@@ -567,7 +567,7 @@ TODO: look at this one since this remark is only driver-based.
*/
-static UINT8 toybox_mcu_decryption_table[0x100] = {
+static const UINT8 toybox_mcu_decryption_table[0x100] = {
0x7b,0x82,0xf0,0xbc,0x7f,0x1d,0xa2,0xc5,0x2a,0xfa,0x55,0xee,0x1a,0xd0,0x59,0x76,
0x5e,0x75,0x79,0x16,0xa5,0xf6,0x84,0xed,0x0f,0x2e,0xf2,0x36,0x61,0xac,0xcd,0xab,
0x01,0x3b,0x01,0x87,0x73,0xab,0xce,0x5d,0xd4,0x1d,0x68,0x2a,0x35,0xea,0x13,0x27,
@@ -587,7 +587,7 @@ static UINT8 toybox_mcu_decryption_table[0x100] = {
};
-static UINT8 toybox_mcu_decryption_table_alt[0x100] = {
+static const UINT8 toybox_mcu_decryption_table_alt[0x100] = {
0x26,0x17,0xb9,0xcf,0x1a,0xf5,0x14,0x1e,0x0c,0x35,0xb3,0x66,0xa0,0x17,0xe9,0xe4,
0x90,0xf6,0xd5,0x35,0xac,0x95,0x49,0x43,0x64,0x0c,0x03,0x75,0x4d,0xda,0xb6,0xdf,
0x06,0xcf,0x83,0x9e,0x35,0x2c,0x71,0x2a,0xab,0xcc,0x65,0xd4,0x1f,0xb0,0x88,0x3c,
diff --git a/src/mame/machine/segas24.c b/src/mame/machine/segas24.c
index 7796eb59cce..9549a3b4989 100644
--- a/src/mame/machine/segas24.c
+++ b/src/mame/machine/segas24.c
@@ -34,8 +34,8 @@ static UINT8 system24temp_sys16_io_cnt, system24temp_sys16_io_dir;
void system24temp_sys16_io_set_callbacks(UINT8 (*io_r)(running_machine *machine, int port),
void (*io_w)(running_machine *machine, int port, UINT8 data),
void (*cnt_w)(const address_space *space, UINT8 data),
- READ16_HANDLER ((*iod_r)),
- WRITE16_HANDLER((*iod_w)))
+ read16_space_func iod_r,
+ write16_space_func iod_w)
{
system24temp_sys16_io_io_r = io_r;
system24temp_sys16_io_io_w = io_w;
diff --git a/src/mame/machine/snesdsp1.c b/src/mame/machine/snesdsp1.c
index 93775af4a01..438f239f96c 100644
--- a/src/mame/machine/snesdsp1.c
+++ b/src/mame/machine/snesdsp1.c
@@ -121,7 +121,7 @@ static INT16 shiftR(INT16 C, INT16 E);
//////////////////////////////////////////////////////////////////
-UINT8 DSP1_getSr(void)
+static UINT8 DSP1_getSr(void)
{
mSrLowByteAccess = ~mSrLowByteAccess;
if (mSrLowByteAccess)
@@ -136,7 +136,7 @@ UINT8 DSP1_getSr(void)
//////////////////////////////////////////////////////////////////
-UINT8 DSP1_getDr(void)
+static UINT8 DSP1_getDr(void)
{
UINT8 oDr;
@@ -146,14 +146,14 @@ UINT8 DSP1_getDr(void)
//////////////////////////////////////////////////////////////////
-void DSP1_setDr(UINT8 iDr)
+static void DSP1_setDr(UINT8 iDr)
{
DSP1_fsmStep(0, &iDr);
}
//////////////////////////////////////////////////////////////////
-void DSP1_reset(running_machine *machine)
+static void DSP1_reset(running_machine *machine)
{
UINT32 i;
UINT8 *dspin = memory_region(machine, "user6");
diff --git a/src/mame/machine/snesdsp2.c b/src/mame/machine/snesdsp2.c
index 6ebfaadcba6..209a3cb199e 100644
--- a/src/mame/machine/snesdsp2.c
+++ b/src/mame/machine/snesdsp2.c
@@ -10,28 +10,28 @@
***************************************************************************/
-int DSP2_waiting_for_command = 0;
-int DSP2_command = 0;
-int DSP2_in_count = 0, DSP2_in_index = 0;
-int DSP2_out_count = 0, DSP2_out_index = 0;
-
-UINT8 DSP2_parameters[512] = {0};
-UINT8 DSP2_output[512] = {0};
-
-UINT8 DSP2_op05transparent = 0;
-int DSP2_op05haslen = 0;
-int DSP2_op05len = 0;
-int DSP2_op06haslen = 0;
-int DSP2_op06len = 0;
-UINT16 DSP2_op09word1 = 0;
-UINT16 DSP2_op09word2 = 0;
-int DSP2_op0dhaslen = 0;
-int DSP2_op0doutlen = 0;
-int DSP2_op0dinlen = 0;
+static int DSP2_waiting_for_command = 0;
+static int DSP2_command = 0;
+static int DSP2_in_count = 0, DSP2_in_index = 0;
+static int DSP2_out_count = 0, DSP2_out_index = 0;
+
+static UINT8 DSP2_parameters[512] = {0};
+static UINT8 DSP2_output[512] = {0};
+
+static UINT8 DSP2_op05transparent = 0;
+static int DSP2_op05haslen = 0;
+static int DSP2_op05len = 0;
+static int DSP2_op06haslen = 0;
+static int DSP2_op06len = 0;
+static UINT16 DSP2_op09word1 = 0;
+static UINT16 DSP2_op09word2 = 0;
+static int DSP2_op0dhaslen = 0;
+static int DSP2_op0doutlen = 0;
+static int DSP2_op0dinlen = 0;
//convert bitmap to bitplane tile
-void DSP2_op01( void )
+static void DSP2_op01( void )
{
//op01 size is always 32 bytes input and output
//the hardware does strange things if you vary the size
@@ -89,13 +89,13 @@ void DSP2_op01( void )
}
//set transparent color
-void DSP2_op03( void )
+static void DSP2_op03( void )
{
DSP2_op05transparent = DSP2_parameters[0];
}
//replace bitmap using transparent color
-void DSP2_op05( void )
+static void DSP2_op05( void )
{
UINT8 color;
// Overlay bitmap with transparency.
@@ -170,7 +170,7 @@ void DSP2_op09( void )
}
//scale bitmap
-void DSP2_op0d( void )
+static void DSP2_op0d( void )
{
// Bit accurate hardware algorithm - uses fixed point math
// This should match the DSP2 Op0D output exactly
@@ -239,7 +239,7 @@ void DSP2_reset( void )
DSP2_op0dinlen = 0;
}
-UINT8 DSP2_read( void )
+static UINT8 DSP2_read( void )
{
UINT8 r = 0xff;
if (DSP2_out_count)
@@ -252,7 +252,7 @@ UINT8 DSP2_read( void )
return r;
}
-void DSP2_write(UINT8 data)
+static void DSP2_write(UINT8 data)
{
if(DSP2_waiting_for_command)
{
diff --git a/src/mame/machine/snesobc1.c b/src/mame/machine/snesobc1.c
index c7f1076f03b..438cc5309bb 100644
--- a/src/mame/machine/snesobc1.c
+++ b/src/mame/machine/snesobc1.c
@@ -12,11 +12,11 @@
#include "includes/snes.h"
-int obc1_address;
-int obc1_offset;
-int obc1_shift;
+static int obc1_address;
+static int obc1_offset;
+static int obc1_shift;
-READ8_HANDLER( obc1_read )
+static READ8_HANDLER( obc1_read )
{
UINT16 address = offset & 0x1fff;
UINT8 value;
@@ -52,7 +52,7 @@ READ8_HANDLER( obc1_read )
}
-WRITE8_HANDLER( obc1_write )
+static WRITE8_HANDLER( obc1_write )
{
UINT16 address = offset & 0x1fff;
UINT8 temp;
@@ -98,7 +98,7 @@ WRITE8_HANDLER( obc1_write )
}
}
-void obc1_init( void )
+static void obc1_init( void )
{
obc1_offset = (snes_ram[0x1ff5] & 0x01) ? 0x1800 : 0x1c00;
obc1_address = (snes_ram[0x1ff6] & 0x7f);
diff --git a/src/mame/video/goldstar.c b/src/mame/video/goldstar.c
index b6015de8a94..f8a68dcd223 100644
--- a/src/mame/video/goldstar.c
+++ b/src/mame/video/goldstar.c
@@ -10,8 +10,8 @@
-UINT8 *goldstar_video1, *goldstar_video2, *goldstar_video3;
-size_t goldstar_video_size;
+//UINT8 *goldstar_video1, *goldstar_video2, *goldstar_video3;
+//size_t goldstar_video_size;
UINT8 *goldstar_reel1_scroll, *goldstar_reel2_scroll, *goldstar_reel3_scroll;
static int bgcolor;
diff --git a/src/mame/video/hyprduel.c b/src/mame/video/hyprduel.c
index 5b8390cf2e9..ef223d19c45 100644
--- a/src/mame/video/hyprduel.c
+++ b/src/mame/video/hyprduel.c
@@ -408,7 +408,6 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
int i, pri;
static const int primask[4] = { 0x0000, 0xff00, 0xff00|0xf0f0, 0xff00|0xf0f0|0xcccc };
- UINT8 dirty = 0;
for (i=0; i<0x20; i++)
{
diff --git a/src/mame/video/metro.c b/src/mame/video/metro.c
index 9a372a8d49a..643dae6d6cc 100644
--- a/src/mame/video/metro.c
+++ b/src/mame/video/metro.c
@@ -615,7 +615,6 @@ void metro_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectan
UINT16 *src;
int inc;
- UINT8 dirty = 0;
if (sprites == 0)
return;
diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c
index 2ded01f4691..64fd39fe654 100644
--- a/src/mame/video/stvvdp1.c
+++ b/src/mame/video/stvvdp1.c
@@ -25,7 +25,6 @@ static int vdp1_sprite_log = 0;
UINT32 *stv_vdp1_vram;
static UINT32 *stv_vdp1_regs;
UINT8* stv_vdp1_gfx_decode;
-extern UINT8 get_vblank(running_machine *machine);
static UINT16 *stv_framebuffer[2];
static UINT16 **stv_framebuffer_draw_lines;
@@ -294,7 +293,7 @@ WRITE32_HANDLER( stv_vdp1_regs_w )
else
{
if ( vdp1_sprite_log ) logerror( "VDP1: Access to register TVMR = %1X\n", STV_VDP1_TVMR );
- if ( STV_VDP1_VBE && get_vblank(space->machine) )
+ if ( STV_VDP1_VBE && stv_get_vblank(space->machine) )
{
stv_vdp1_clear_framebuffer_on_next_frame = 1;
}
diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c
index 4ce7b9a3303..87ae1097d12 100644
--- a/src/mame/video/stvvdp2.c
+++ b/src/mame/video/stvvdp2.c
@@ -112,17 +112,17 @@ UINT32* stv_vdp2_vram;
static UINT8* stv_vdp2_gfx_decode;
static int stv_vdp2_render_rbg0;
-int stv_hblank,stv_vblank,stv_odd;
-int horz_res,vert_res;
+int stv_hblank,stv_vblank;
+static int stv_odd;
+static int horz_res,vert_res;
UINT32* stv_vdp2_cram;
static void stv_vdp2_dynamic_res_change(running_machine *machine);
-UINT8 get_vblank(running_machine *machine);
-UINT8 get_hblank(running_machine *machine);
-int get_vblank_duration(running_machine *machine);
+static UINT8 get_hblank(running_machine *machine);
+static int get_vblank_duration(running_machine *machine);
//int get_hblank_duration(running_machine *machine); //<- when we know that...
-UINT8 get_odd_bit(running_machine *machine);
+static UINT8 get_odd_bit(running_machine *machine);
static void refresh_palette_data(running_machine *machine);
static int stv_vdp2_window_process(int x,int y);
@@ -5265,7 +5265,7 @@ WRITE32_HANDLER ( stv_vdp2_regs_w )
}
}
-UINT8 get_hblank(running_machine *machine)
+static UINT8 get_hblank(running_machine *machine)
{
static int cur_h;
@@ -5281,7 +5281,7 @@ UINT8 get_hblank(running_machine *machine)
//int get_hblank_duration(running_machine *machine)
//...
-UINT8 get_vblank(running_machine *machine)
+UINT8 stv_get_vblank(running_machine *machine)
{
static int cur_v;
rectangle visarea = *video_screen_get_visible_area(machine->primary_screen);
@@ -5294,7 +5294,7 @@ UINT8 get_vblank(running_machine *machine)
}
/*some vblank lines measurements (according to Charles MacDonald)*/
-int get_vblank_duration(running_machine *machine)
+static int get_vblank_duration(running_machine *machine)
{
if(STV_VDP2_HRES & 4)
{
@@ -5316,7 +5316,7 @@ int get_vblank_duration(running_machine *machine)
return 0;
}
-UINT8 get_odd_bit(running_machine *machine)
+static UINT8 get_odd_bit(running_machine *machine)
{
static int cur_v;
cur_v = video_screen_get_vpos(machine->primary_screen);
@@ -5339,7 +5339,7 @@ READ32_HANDLER ( stv_vdp2_regs_r )
case 0x4/4:
{
/*Screen Status Register*/
- stv_vblank = get_vblank(space->machine);
+ stv_vblank = stv_get_vblank(space->machine);
stv_hblank = get_hblank(space->machine);
stv_odd = get_odd_bit(space->machine);
diff --git a/src/mame/video/suprnova.c b/src/mame/video/suprnova.c
index bddac0a0657..19d661ab2f0 100644
--- a/src/mame/video/suprnova.c
+++ b/src/mame/video/suprnova.c
@@ -127,7 +127,8 @@ static UINT8 bright_v3_b_trans = 0x00, bright_v3_g_trans = 0x00, bright_v3_r_tra
// This ignores the alpha values atm.
static int spc_changed=0, v3_changed=0, palette_updated=0;
-int suprnova_alt_enable_background, suprnova_alt_enable_sprites;
+static int suprnova_alt_enable_background;
+int suprnova_alt_enable_sprites;
WRITE32_HANDLER ( skns_pal_regs_w )
{