diff options
author | Aaron Giles <aaron@aarongiles.com> | 2009-10-03 06:53:27 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2009-10-03 06:53:27 +0000 |
commit | 08a4572e09a30c046bde0025243fc7639f407503 (patch) | |
tree | bf6b90bf6a5add2c48ae5c90fe39a59c80bb4290 | |
parent | 07720725b2a5244915bb9dfbd53638a49e15757a (diff) |
> -----Original Message-----
> From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Wednesday, September 30, 2009 7:56 AM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] More static qualifiers
>
> Hi mamedev,
>
> This patch makes more of MAME static, primarily targeting functions
> exported by header files that are in fact unused outside their own
> file, and the chip emulators in machine/snes.c. It also degenericizes
> some exported names in archimds, bublbobl, and lucky74.
>
> ~aa
86 files changed, 421 insertions, 558 deletions
diff --git a/src/emu/cpu/arm/arm.h b/src/emu/cpu/arm/arm.h index 25b02a771b4..6d88da7dba4 100644 --- a/src/emu/cpu/arm/arm.h +++ b/src/emu/cpu/arm/arm.h @@ -19,8 +19,6 @@ extern CPU_GET_INFO( arm ); #define CPU_ARM CPU_GET_INFO_NAME( arm ) -extern UINT32 arm_disasm(char *pBuf, UINT32 pc, UINT32 opcode); - enum { ARM32_PC=0, diff --git a/src/emu/cpu/arm/armdasm.c b/src/emu/cpu/arm/armdasm.c index bd915b89aa2..50209a6cf6e 100644 --- a/src/emu/cpu/arm/armdasm.c +++ b/src/emu/cpu/arm/armdasm.c @@ -99,7 +99,7 @@ static char *WritePadding( char *pBuf, const char *pBuf0 ) return pBuf; } -UINT32 arm_disasm( char *pBuf, UINT32 pc, UINT32 opcode ) +static UINT32 arm_disasm( char *pBuf, UINT32 pc, UINT32 opcode ) { const char *pBuf0; diff --git a/src/emu/cpu/arm7/arm7core.h b/src/emu/cpu/arm7/arm7core.h index 51607ea64e6..13787d2bcbf 100644 --- a/src/emu/cpu/arm7/arm7core.h +++ b/src/emu/cpu/arm7/arm7core.h @@ -492,9 +492,6 @@ extern write32_device_func arm7_coproc_rt_w_callback; extern void arm7_dt_r_callback(arm_state *cpustate, UINT32 insn, UINT32 *prn, UINT32 (*read32)(arm_state *cpustate, UINT32 addr)); extern void arm7_dt_w_callback(arm_state *cpustate, UINT32 insn, UINT32 *prn, void (*write32)(arm_state *cpustate, UINT32 addr, UINT32 data)); -extern UINT32 arm7_disasm(char *pBuf, UINT32 pc, UINT32 opcode); -extern UINT32 thumb_disasm(char *pBuf, UINT32 pc, UINT16 opcode); - #ifdef UNUSED_DEFINITION extern char *(*arm7_dasm_cop_dt_callback)(arm_state *cpustate, char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); extern char *(*arm7_dasm_cop_rt_callback)(arm_state *cpustate, char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); diff --git a/src/emu/cpu/arm7/arm7dasm.c b/src/emu/cpu/arm7/arm7dasm.c index 5ac93a5f0ad..762fbc8caaa 100644 --- a/src/emu/cpu/arm7/arm7dasm.c +++ b/src/emu/cpu/arm7/arm7dasm.c @@ -198,7 +198,7 @@ static char *WriteBranchAddress( char *pBuf, UINT32 pc, UINT32 opcode ) return pBuf; } /* WriteBranchAddress */ -UINT32 arm7_disasm( char *pBuf, UINT32 pc, UINT32 opcode ) +static UINT32 arm7_disasm( char *pBuf, UINT32 pc, UINT32 opcode ) { const char *pBuf0; @@ -692,7 +692,7 @@ UINT32 arm7_disasm( char *pBuf, UINT32 pc, UINT32 opcode ) return dasmflags | DASMFLAG_SUPPORTED; } -UINT32 thumb_disasm( char *pBuf, UINT32 pc, UINT16 opcode ) +static UINT32 thumb_disasm( char *pBuf, UINT32 pc, UINT16 opcode ) { const char *pBuf0; UINT32 dasmflags = 0; diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c index bda0040d1e8..1f0d1b662a6 100644 --- a/src/emu/cpu/i960/i960.c +++ b/src/emu/cpu/i960/i960.c @@ -1,6 +1,5 @@ #include "debugger.h" #include "i960.h" -#include "i960dis.h" #include <math.h> CPU_DISASSEMBLE( i960 ); diff --git a/src/emu/cpu/i960/i960dis.c b/src/emu/cpu/i960/i960dis.c index 183c662f381..896395641ab 100644 --- a/src/emu/cpu/i960/i960dis.c +++ b/src/emu/cpu/i960/i960dis.c @@ -154,7 +154,7 @@ static char *dis_decode_reg(unsigned long iCode, char* tmpStr,unsigned char cnt) #define READ32(dis,offs) ((dis)->oprom[(offs) + 0] | ((dis)->oprom[(offs) + 1] << 8) | ((dis)->oprom[(offs) + 2] << 16) | ((dis)->oprom[(offs) + 3] << 24)) -char *i960_disassemble(disassemble_t *diss) +static char *i960_disassemble(disassemble_t *diss) { unsigned char op,op2; unsigned char mode, modeh, model; diff --git a/src/emu/cpu/i960/i960dis.h b/src/emu/cpu/i960/i960dis.h index 150ae0e0faf..2c18dd1c64a 100644 --- a/src/emu/cpu/i960/i960dis.h +++ b/src/emu/cpu/i960/i960dis.h @@ -11,6 +11,4 @@ struct _disassemble_t UINT32 disflags; }; -char *i960_disassemble(disassemble_t *diss); - #endif /* __I960DIS_H__ */ diff --git a/src/emu/cpu/sh2/sh2.h b/src/emu/cpu/sh2/sh2.h index f050746eeee..ae75a732082 100644 --- a/src/emu/cpu/sh2/sh2.h +++ b/src/emu/cpu/sh2/sh2.h @@ -77,8 +77,6 @@ READ32_HANDLER( sh2_internal_r ); void sh2_set_ftcsr_read_callback(const device_config *device, void (*callback)(UINT32)); void sh2_set_frt_input(const device_config *device, int state); -extern unsigned DasmSH2( char *dst, unsigned pc, UINT16 opcode ); - /*************************************************************************** COMPILER-SPECIFIC OPTIONS ***************************************************************************/ diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c index 441c03d9eca..d040a539ef9 100644 --- a/src/emu/cpu/sh2/sh2comn.c +++ b/src/emu/cpu/sh2/sh2comn.c @@ -106,7 +106,7 @@ static void sh2_timer_activate(SH2 *sh2) } } -TIMER_CALLBACK( sh2_timer_callback ) +static TIMER_CALLBACK( sh2_timer_callback ) { SH2 *sh2 = (SH2 *)ptr; UINT16 frc; @@ -133,7 +133,7 @@ TIMER_CALLBACK( sh2_timer_callback ) sh2_timer_activate(sh2); } -TIMER_CALLBACK( sh2_dmac_callback ) +static TIMER_CALLBACK( sh2_dmac_callback ) { int dma = param & 1; SH2 *sh2 = (SH2 *)ptr; diff --git a/src/emu/cpu/sh2/sh2comn.h b/src/emu/cpu/sh2/sh2comn.h index ae3ea31b8ce..0ca1b166983 100644 --- a/src/emu/cpu/sh2/sh2comn.h +++ b/src/emu/cpu/sh2/sh2comn.h @@ -173,9 +173,6 @@ typedef struct #endif } SH2; -TIMER_CALLBACK( sh2_timer_callback ); -TIMER_CALLBACK( sh2_dmac_callback ); - void sh2_common_init(SH2 *sh2, const device_config *device, cpu_irq_callback irqcallback); void sh2_recalc_irq(SH2 *sh2); void sh2_set_irq_line(SH2 *sh2, int irqline, int state); diff --git a/src/emu/cpu/sh2/sh2dasm.c b/src/emu/cpu/sh2/sh2dasm.c index b05dca16893..f4d430a5714 100644 --- a/src/emu/cpu/sh2/sh2dasm.c +++ b/src/emu/cpu/sh2/sh2dasm.c @@ -573,7 +573,7 @@ static UINT32 op1111(char *buffer, UINT32 pc, UINT16 opcode) return 0; } -unsigned DasmSH2(char *buffer, unsigned pc, UINT16 opcode) +static unsigned DasmSH2(char *buffer, unsigned pc, UINT16 opcode) { UINT32 flags; diff --git a/src/emu/cpu/sh4/sh4.h b/src/emu/cpu/sh4/sh4.h index fe7c6b1fff7..f1d251504b0 100644 --- a/src/emu/cpu/sh4/sh4.h +++ b/src/emu/cpu/sh4/sh4.h @@ -97,8 +97,6 @@ extern CPU_GET_INFO( sh4 ); WRITE32_HANDLER( sh4_internal_w ); READ32_HANDLER( sh4_internal_r ); -extern unsigned DasmSH4( char *dst, unsigned pc, UINT16 opcode ); - void sh4_set_frt_input(const device_config *device, int state); void sh4_set_irln_input(const device_config *device, int value); void sh4_set_ftcsr_callback(const device_config *device, sh4_ftcsr_callback callback); diff --git a/src/emu/cpu/sh4/sh4dasm.c b/src/emu/cpu/sh4/sh4dasm.c index fb49252ba75..c01fc777cf9 100644 --- a/src/emu/cpu/sh4/sh4dasm.c +++ b/src/emu/cpu/sh4/sh4dasm.c @@ -782,7 +782,7 @@ static UINT32 op1111(char *buffer, UINT32 pc, UINT16 opcode) return 0; } -unsigned DasmSH4(char *buffer, unsigned pc, UINT16 opcode) +static unsigned DasmSH4(char *buffer, unsigned pc, UINT16 opcode) { UINT32 flags; diff --git a/src/emu/cpu/v60/v60.h b/src/emu/cpu/v60/v60.h index c0a1103dc1d..05fc993b924 100644 --- a/src/emu/cpu/v60/v60.h +++ b/src/emu/cpu/v60/v60.h @@ -78,7 +78,6 @@ enum V60_REGMAX }; -extern const char *const v60_reg_names[]; void v60_stall(const device_config *device); CPU_GET_INFO( v60 ); diff --git a/src/emu/cpu/v60/v60d.c b/src/emu/cpu/v60/v60d.c index df7684c171e..86ee907c0ae 100644 --- a/src/emu/cpu/v60/v60d.c +++ b/src/emu/cpu/v60/v60d.c @@ -3,7 +3,7 @@ #include "v60.h" // Register names -const char *const v60_reg_names[69] = { +static const char *const v60_reg_names[69] = { "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R10", "R11", diff --git a/src/emu/cpu/z180/z180.h b/src/emu/cpu/z180/z180.h index 0d154f5c0c4..33cc7c9ec9f 100644 --- a/src/emu/cpu/z180/z180.h +++ b/src/emu/cpu/z180/z180.h @@ -135,9 +135,11 @@ enum #define Z180_INT_ASCI0 8 /* Internal ASCI channel 0 */ #define Z180_INT_ASCI1 9 /* Internal ASCI channel 1 */ +#ifdef UNUSED_DEFINITION /* MMU mapped memory lookup */ extern UINT8 z180_readmem(const device_config *device, offs_t offset); extern void z180_writemem(const device_config *device, offs_t offset, UINT8 data); +#endif extern CPU_GET_INFO( z180 ); #define CPU_Z180 CPU_GET_INFO_NAME( z180 ) diff --git a/src/emu/cpu/z180/z180ops.h b/src/emu/cpu/z180/z180ops.h index fbe6fad497f..f1fdf47694a 100644 --- a/src/emu/cpu/z180/z180ops.h +++ b/src/emu/cpu/z180/z180ops.h @@ -69,22 +69,25 @@ INLINE void z180_mmu(z180_state *cpustate) * Read a byte from given memory location ***************************************************************/ #define RM(cs,addr) memory_read_byte_8le((cs)->program, MMU_REMAP_ADDR(cs,addr)) +#ifdef UNUSED_FUNCTION UINT8 z180_readmem(const device_config *device, offs_t offset) { z180_state *cpustate = get_safe_token(device); return RM(cpustate, offset); } +#endif /*************************************************************** * Write a byte to given memory location ***************************************************************/ #define WM(cs,addr,value) memory_write_byte_8le((cs)->program, MMU_REMAP_ADDR(cs,addr),value) +#ifdef UNUSED_FUNCTION void z180_writemem(const device_config *device, offs_t offset, UINT8 data) { z180_state *cpustate = get_safe_token(device); WM(cpustate, offset, data); } - +#endif /*************************************************************** * Read a word from given memory location diff --git a/src/emu/debug/debugcon.c b/src/emu/debug/debugcon.c index 0bbf6ba476b..9b1162a90f7 100644 --- a/src/emu/debug/debugcon.c +++ b/src/emu/debug/debugcon.c @@ -65,6 +65,14 @@ static debug_command *commandlist; /*************************************************************************** + FUNCTION PROTOTYPES +***************************************************************************/ + +static void debug_console_exit(running_machine *machine); + + + +/*************************************************************************** Initialization and tear down @@ -100,7 +108,7 @@ void debug_console_init(running_machine *machine) system -------------------------------------------------*/ -void debug_console_exit(running_machine *machine) +static void debug_console_exit(running_machine *machine) { /* free allocated memory */ if (console_textbuf) diff --git a/src/emu/debug/debugcon.h b/src/emu/debug/debugcon.h index ab6633df840..9d271fd3b48 100644 --- a/src/emu/debug/debugcon.h +++ b/src/emu/debug/debugcon.h @@ -77,7 +77,6 @@ typedef UINT32 CMDERR; /* initialization */ void debug_console_init(running_machine *machine); -void debug_console_exit(running_machine *machine); /* command handling */ CMDERR debug_console_execute_command(running_machine *machine, const char *command, int echo); diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c index d96d2c6b8e7..2a330766f79 100644 --- a/src/emu/sound/tms5220.c +++ b/src/emu/sound/tms5220.c @@ -1299,7 +1299,7 @@ static DEVICE_RESET( tms5220 ) ***********************************************************************************************/ -TIMER_CALLBACK( io_ready_cb ) +static TIMER_CALLBACK( io_ready_cb ) { tms5220_state *tms = (tms5220_state *) ptr; if (param) diff --git a/src/mame/audio/redbaron.c b/src/mame/audio/redbaron.c index 4e46d5bae21..632bdf3d0d7 100644 --- a/src/mame/audio/redbaron.c +++ b/src/mame/audio/redbaron.c @@ -55,11 +55,13 @@ WRITE8_HANDLER( redbaron_sounds_w ) rb_input_select = data & 1; } +#ifdef UNUSED_FUNCTION WRITE8_DEVICE_HANDLER( redbaron_pokey_w ) { if( latch & 0x20 ) pokey_w(device, offset, data); } +#endif static STREAM_UPDATE( redbaron_sound_update ) { diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c index 60dba3e39e5..dd8504ff48c 100644 --- a/src/mame/audio/scramble.c +++ b/src/mame/audio/scramble.c @@ -94,12 +94,14 @@ WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w ) TTL7474_update(device->machine, 2); } +#ifdef UNUSED_FUNCTION WRITE8_HANDLER( froggrmc_sh_irqtrigger_w ) { /* the complement of bit 0 is connected to the flip-flop's clock */ TTL7474_clock_w(2, ~data & 0x01); TTL7474_update(space->machine, 2); } +#endif static IRQ_CALLBACK(scramble_sh_irq_callback) { diff --git a/src/mame/audio/snes.c b/src/mame/audio/snes.c index f2210eec374..a9adb56ab75 100644 --- a/src/mame/audio/snes.c +++ b/src/mame/audio/snes.c @@ -189,6 +189,8 @@ static int AdvanceEnvelope /* Run envelope step & retn ENVX*/ int v /* Voice to process envelope for*/ ); +static STREAM_UPDATE( snes_sh_update ); + /* Privately shared functions (for internal library use only) */ /***** DSP_Reset *****/ @@ -1179,7 +1181,7 @@ DEVICE_GET_INFO( snes_sound ) } -STREAM_UPDATE( snes_sh_update ) +static STREAM_UPDATE( snes_sh_update ) { int i; short mix[2]; diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c index 10b23ac60d8..e43945ec070 100644 --- a/src/mame/audio/taito_en.c +++ b/src/mame/audio/taito_en.c @@ -17,7 +17,7 @@ static int es_tmp=1; enum { TIMER_SINGLESHOT, TIMER_PULSE }; -READ16_HANDLER(f3_68000_share_r) +static READ16_HANDLER(f3_68000_share_r) { if ((offset&3)==0) return (f3_shared_ram[offset/4]&0xff000000)>>16; if ((offset&3)==1) return (f3_shared_ram[offset/4]&0x00ff0000)>>8; @@ -25,7 +25,7 @@ READ16_HANDLER(f3_68000_share_r) return (f3_shared_ram[offset/4]&0x000000ff)<<8; } -WRITE16_HANDLER(f3_68000_share_w) +static WRITE16_HANDLER(f3_68000_share_w) { if ((offset&3)==0) f3_shared_ram[offset/4]=(f3_shared_ram[offset/4]&0x00ffffff)|((data&0xff00)<<16); else if ((offset&3)==1) f3_shared_ram[offset/4]=(f3_shared_ram[offset/4]&0xff00ffff)|((data&0xff00)<<8); @@ -33,7 +33,7 @@ WRITE16_HANDLER(f3_68000_share_w) else f3_shared_ram[offset/4]=(f3_shared_ram[offset/4]&0xffffff00)|((data&0xff00)>>8); } -WRITE16_HANDLER( f3_es5505_bank_w ) +static WRITE16_HANDLER( f3_es5505_bank_w ) { UINT32 max_banks_this_game=(memory_region_length(space->machine, "ensoniq.0")/0x200000)-1; @@ -50,7 +50,7 @@ WRITE16_HANDLER( f3_es5505_bank_w ) es5505_voice_bank_w(devtag_get_device(space->machine, "ensoniq"),offset,data<<20); } -WRITE16_HANDLER( f3_volume_w ) +static WRITE16_HANDLER( f3_volume_w ) { static UINT16 channel[8],last_l,last_r; static int latch; @@ -84,7 +84,7 @@ void f3_68681_reset(running_machine *machine) timer_68681 = timer_alloc(machine, taito_en_timer_callback, NULL); } -READ16_HANDLER(f3_68681_r) +static READ16_HANDLER(f3_68681_r) { if (offset == 0x05) { @@ -106,7 +106,7 @@ READ16_HANDLER(f3_68681_r) return 0xff; } -WRITE16_HANDLER(f3_68681_w) +static WRITE16_HANDLER(f3_68681_w) { switch (offset) { case 0x04: /* ACR */ @@ -166,7 +166,7 @@ WRITE16_HANDLER(f3_68681_w) } } -READ16_HANDLER(es5510_dsp_r) +static READ16_HANDLER(es5510_dsp_r) { // logerror("%06x: DSP read offset %04x (data is %04x)\n",cpu_get_pc(space->cpu),offset,es5510_dsp_ram[offset]); // if (es_tmp) return es5510_dsp_ram[offset]; @@ -190,7 +190,7 @@ READ16_HANDLER(es5510_dsp_r) return es5510_dsp_ram[offset]; } -WRITE16_HANDLER(es5510_dsp_w) +static WRITE16_HANDLER(es5510_dsp_w) { UINT8 *snd_mem = (UINT8 *)memory_region(space->machine, "ensoniq.0"); diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h index 44f896b09a7..b74f33580f0 100644 --- a/src/mame/audio/taito_en.h +++ b/src/mame/audio/taito_en.h @@ -1,14 +1,6 @@ #include "cpu/m68000/m68000.h" #include "sound/es5506.h" -READ16_HANDLER(f3_68000_share_r); -WRITE16_HANDLER(f3_68000_share_w); -READ16_HANDLER(f3_68681_r); -WRITE16_HANDLER(f3_68681_w); -READ16_HANDLER(es5510_dsp_r); -WRITE16_HANDLER(es5510_dsp_w); -WRITE16_HANDLER(f3_volume_w); -WRITE16_HANDLER(f3_es5505_bank_w); void f3_68681_reset(running_machine *machine); void taito_f3_soundsystem_reset(running_machine *machine); diff --git a/src/mame/drivers/aristmk5.c b/src/mame/drivers/aristmk5.c index 6bc00e50ab4..2adec19afe6 100644 --- a/src/mame/drivers/aristmk5.c +++ b/src/mame/drivers/aristmk5.c @@ -13,12 +13,12 @@ #include "includes/archimds.h" static ADDRESS_MAP_START( aristmk5_map, ADDRESS_SPACE_PROGRAM, 32 ) - AM_RANGE(0x00000000, 0x01ffffff) AM_READWRITE(memc_logical_r, memc_logical_w) - AM_RANGE(0x02000000, 0x02ffffff) AM_RAM AM_BASE(&memc_physmem) /* physical RAM - 16 MB for now, should be 512k for the A310 */ - AM_RANGE(0x03000000, 0x033fffff) AM_READWRITE(ioc_r, ioc_w) - AM_RANGE(0x03400000, 0x035fffff) AM_ROM AM_REGION("maincpu", 0) AM_WRITE(memc_page_w) - AM_RANGE(0x03600000, 0x037fffff) AM_READWRITE(memc_r, memc_w) - AM_RANGE(0x03800000, 0x039fffff) AM_READWRITE(vidc_r, vidc_w) + AM_RANGE(0x00000000, 0x01ffffff) AM_READWRITE(archimedes_memc_logical_r, archimedes_memc_logical_w) + AM_RANGE(0x02000000, 0x02ffffff) AM_RAM AM_BASE(&archimedes_memc_physmem) /* physical RAM - 16 MB for now, should be 512k for the A310 */ + AM_RANGE(0x03000000, 0x033fffff) AM_READWRITE(archimedes_ioc_r, archimedes_ioc_w) + AM_RANGE(0x03400000, 0x035fffff) AM_ROM AM_REGION("maincpu", 0) AM_WRITE(archimedes_memc_page_w) + AM_RANGE(0x03600000, 0x037fffff) AM_READWRITE(archimedes_memc_r, archimedes_memc_w) + AM_RANGE(0x03800000, 0x039fffff) AM_READWRITE(archimedes_vidc_r, archimedes_vidc_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c index f489ffcc829..d374b96a702 100644 --- a/src/mame/drivers/bublbobl.c +++ b/src/mame/drivers/bublbobl.c @@ -286,8 +286,8 @@ static ADDRESS_MAP_START( master_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xdd00, 0xdfff) AM_RAM AM_BASE(&bublbobl_objectram) AM_SIZE(&bublbobl_objectram_size) AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(1) AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE(&paletteram) - AM_RANGE(0xfa00, 0xfa00) AM_READWRITE(sound_status_r, bublbobl_sound_command_w) - AM_RANGE(0xfa03, 0xfa03) AM_WRITE(soundcpu_reset_w) + AM_RANGE(0xfa00, 0xfa00) AM_READWRITE(bublbobl_sound_status_r, bublbobl_sound_command_w) + AM_RANGE(0xfa03, 0xfa03) AM_WRITE(bublbobl_soundcpu_reset_w) AM_RANGE(0xfa80, 0xfa80) AM_WRITE(watchdog_reset_w) AM_RANGE(0xfb40, 0xfb40) AM_WRITE(bublbobl_bankswitch_w) AM_RANGE(0xfc00, 0xffff) AM_RAM AM_BASE(&bublbobl_mcu_sharedram) @@ -303,7 +303,7 @@ static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x8000, 0x8fff) AM_RAM AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ym1", ym2203_r, ym2203_w) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym2", ym3526_r, ym3526_w) - AM_RANGE(0xb000, 0xb000) AM_READWRITE(soundlatch_r, sound_status_w) + AM_RANGE(0xb000, 0xb000) AM_READWRITE(soundlatch_r, bublbobl_sound_status_w) AM_RANGE(0xb001, 0xb001) AM_WRITE(bublbobl_sh_nmi_enable_w) AM_READNOP AM_RANGE(0xb002, 0xb002) AM_WRITE(bublbobl_sh_nmi_disable_w) AM_RANGE(0xe000, 0xffff) AM_ROM // space for diagnostic ROM? @@ -342,8 +342,8 @@ static ADDRESS_MAP_START( bootleg_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xdd00, 0xdfff) AM_RAM AM_BASE(&bublbobl_objectram) AM_SIZE(&bublbobl_objectram_size) AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(1) AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE(&paletteram) - AM_RANGE(0xfa00, 0xfa00) AM_READWRITE(sound_status_r, bublbobl_sound_command_w) - AM_RANGE(0xfa03, 0xfa03) AM_WRITE(soundcpu_reset_w) + AM_RANGE(0xfa00, 0xfa00) AM_READWRITE(bublbobl_sound_status_r, bublbobl_sound_command_w) + AM_RANGE(0xfa03, 0xfa03) AM_WRITE(bublbobl_soundcpu_reset_w) AM_RANGE(0xfa80, 0xfa80) AM_WRITENOP // ??? AM_RANGE(0xfb40, 0xfb40) AM_WRITE(bublbobl_bankswitch_w) AM_RANGE(0xfc00, 0xfcff) AM_RAM @@ -375,7 +375,7 @@ static ADDRESS_MAP_START( tokio_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xfa80, 0xfa80) AM_WRITE(tokio_bankswitch_w) AM_RANGE(0xfb00, 0xfb00) AM_WRITE(tokio_videoctrl_w) AM_RANGE(0xfb80, 0xfb80) AM_WRITE(bublbobl_nmitrigger_w) - AM_RANGE(0xfc00, 0xfc00) AM_READWRITE(sound_status_r, bublbobl_sound_command_w) + AM_RANGE(0xfc00, 0xfc00) AM_READWRITE(bublbobl_sound_status_r, bublbobl_sound_command_w) AM_RANGE(0xfe00, 0xfe00) AM_READ(tokio_mcu_r) AM_WRITENOP // ??? ADDRESS_MAP_END @@ -387,7 +387,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tokio_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x8fff) AM_RAM - AM_RANGE(0x9000, 0x9000) AM_READWRITE(soundlatch_r, sound_status_w) + AM_RANGE(0x9000, 0x9000) AM_READWRITE(soundlatch_r, bublbobl_sound_status_w) AM_RANGE(0x9800, 0x9800) AM_READNOP // ??? AM_RANGE(0xa000, 0xa000) AM_WRITE(bublbobl_sh_nmi_disable_w) AM_RANGE(0xa800, 0xa800) AM_WRITE(bublbobl_sh_nmi_enable_w) diff --git a/src/mame/drivers/cloud9.c b/src/mame/drivers/cloud9.c index 9eba9aee927..899c10cdf0c 100644 --- a/src/mame/drivers/cloud9.c +++ b/src/mame/drivers/cloud9.c @@ -115,8 +115,8 @@ static const UINT8 *syncprom; static UINT8 irq_state; static emu_timer *irq_timer; -int cloud9_vblank_start; -int cloud9_vblank_end; +static int cloud9_vblank_start; +static int cloud9_vblank_end; diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index 4ecec30c26f..b8752aa9c43 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -345,7 +345,7 @@ INTERRUPT_GEN( cps1_interrupt ) static UINT8 *qsound_sharedram1,*qsound_sharedram2; -INTERRUPT_GEN( cps1_qsound_interrupt ) +static INTERRUPT_GEN( cps1_qsound_interrupt ) { cpu_set_input_line(device, 2, HOLD_LINE); } @@ -458,12 +458,12 @@ static NVRAM_HANDLER( pang3 ) } #endif -READ16_HANDLER( cps1_eeprom_port_r ) +static READ16_HANDLER( cps1_eeprom_port_r ) { return eeprom_read_bit(); } -WRITE16_HANDLER( cps1_eeprom_port_w ) +static WRITE16_HANDLER( cps1_eeprom_port_w ) { if (ACCESSING_BITS_0_7) { diff --git a/src/mame/drivers/kyugo.c b/src/mame/drivers/kyugo.c index 7a7a0b3ae27..9cc877532d3 100644 --- a/src/mame/drivers/kyugo.c +++ b/src/mame/drivers/kyugo.c @@ -29,6 +29,7 @@ static UINT8 *shared_ram; +static WRITE8_HANDLER( kyugo_sub_cpu_control_w ); /************************************* @@ -37,7 +38,7 @@ static UINT8 *shared_ram; * *************************************/ -MACHINE_RESET( kyugo ) +static MACHINE_RESET( kyugo ) { const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); // must start with interrupts and sub CPU disabled @@ -46,7 +47,7 @@ MACHINE_RESET( kyugo ) } -WRITE8_HANDLER( kyugo_sub_cpu_control_w ) +static WRITE8_HANDLER( kyugo_sub_cpu_control_w ) { cputag_set_input_line(space->machine, "sub", INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE); } diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c index 7f29cc87f88..6998804adfc 100644 --- a/src/mame/drivers/lucky74.c +++ b/src/mame/drivers/lucky74.c @@ -675,11 +675,11 @@ #include "lucky74.lh" /* from video hardware */ -extern UINT8 *fg_videoram, *fg_colorram, *bg_videoram, *bg_colorram; -WRITE8_HANDLER( fg_videoram_w ); -WRITE8_HANDLER( fg_colorram_w ); -WRITE8_HANDLER( bg_videoram_w ); -WRITE8_HANDLER( bg_colorram_w ); +extern UINT8 *lucky74_fg_videoram, *lucky74_fg_colorram, *lucky74_bg_videoram, *lucky74_bg_colorram; +WRITE8_HANDLER( lucky74_fg_videoram_w ); +WRITE8_HANDLER( lucky74_fg_colorram_w ); +WRITE8_HANDLER( lucky74_bg_videoram_w ); +WRITE8_HANDLER( lucky74_bg_colorram_w ); PALETTE_INIT( lucky74 ); VIDEO_START( lucky74 ); VIDEO_UPDATE( lucky74 ); @@ -821,10 +821,10 @@ static INTERRUPT_GEN( nmi_interrupt ) static ADDRESS_MAP_START( lucky74_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xcfff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* NVRAM */ - AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(fg_videoram_w) AM_BASE(&fg_videoram) /* VRAM1-1 */ - AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(fg_colorram_w) AM_BASE(&fg_colorram) /* VRAM1-2 */ - AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(bg_videoram_w) AM_BASE(&bg_videoram) /* VRAM2-1 */ - AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(bg_colorram_w) AM_BASE(&bg_colorram) /* VRAM2-2 */ + AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(lucky74_fg_videoram_w) AM_BASE(&lucky74_fg_videoram) /* VRAM1-1 */ + AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(lucky74_fg_colorram_w) AM_BASE(&lucky74_fg_colorram) /* VRAM1-2 */ + AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(lucky74_bg_videoram_w) AM_BASE(&lucky74_bg_videoram) /* VRAM2-1 */ + AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(lucky74_bg_colorram_w) AM_BASE(&lucky74_bg_colorram) /* VRAM2-2 */ AM_RANGE(0xf000, 0xf003) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) /* Input Ports 0 & 1 */ AM_RANGE(0xf080, 0xf083) AM_DEVREADWRITE("ppi8255_2", ppi8255_r, ppi8255_w) /* DSW 1, 2 & 3 */ AM_RANGE(0xf0c0, 0xf0c3) AM_DEVREADWRITE("ppi8255_3", ppi8255_r, ppi8255_w) /* DSW 4 */ diff --git a/src/mame/drivers/mpu4.c b/src/mame/drivers/mpu4.c index e5dad309d11..75028b3a087 100644 --- a/src/mame/drivers/mpu4.c +++ b/src/mame/drivers/mpu4.c @@ -311,14 +311,13 @@ static UINT8 lamp_strobe,lamp_strobe2; static UINT8 lamp_data; static UINT8 ay_data; -extern const UINT8 MPU4_chr_lut[72]; static UINT8 MPU4_chr_data[72]; static UINT8 Lamps[128]; /* 128 multiplexed lamps */ static int optic_pattern; /* Lookup table for CHR data */ -const UINT8 MPU4_chr_lut[72]= { 0x00,0x1A,0x04,0x10,0x18,0x0F,0x13,0x1B, +static const UINT8 MPU4_chr_lut[72]= { 0x00,0x1A,0x04,0x10,0x18,0x0F,0x13,0x1B, 0x03,0x07,0x17,0x1D,0x36,0x35,0x2B,0x28, 0x39,0x21,0x22,0x25,0x2C,0x29,0x31,0x34, 0x0A,0x1F,0x06,0x0E,0x1C,0x12,0x1E,0x0D, diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c index 81f7f74a508..94522e28dca 100644 --- a/src/mame/drivers/mpu4drvr.c +++ b/src/mame/drivers/mpu4drvr.c @@ -1379,7 +1379,7 @@ static INTERRUPT_GEN(mpu4_vid_irq) /* machine start (called only once) */ -MACHINE_START( mpu4_vid ) +static MACHINE_START( mpu4_vid ) { mpu4_config_common(machine); @@ -2055,7 +2055,7 @@ ROM_START( mpu4met0 ) ROM_LOAD( "meter-zero.p1", 0x8000, 0x8000, CRC(e74297e5) SHA1(49a2cc85eda14199975ec37a794b685c839d3ab9)) ROM_END -DRIVER_INIT (connect4) +static DRIVER_INIT (connect4) { led_extend=1; } diff --git a/src/mame/drivers/namcoic.c b/src/mame/drivers/namcoic.c index ea98c728072..ba5e5d2677d 100644 --- a/src/mame/drivers/namcoic.c +++ b/src/mame/drivers/namcoic.c @@ -1343,6 +1343,7 @@ WRITE16_HANDLER( namco_rozcontrol16_w ) COMBINE_DATA( &rozcontrol16[offset] ); } /* namco_rozcontrol16_w */ +#ifdef UNUSED_FUNCTION READ16_HANDLER( namco_rozbank16_r ) { return rozbank16[offset]; @@ -1361,6 +1362,7 @@ WRITE16_HANDLER( namco_rozbank16_w ) } } } /* namco_rozbank16_w */ +#endif static void writerozvideo( int offset, UINT16 data ) diff --git a/src/mame/drivers/namcona1.c b/src/mame/drivers/namcona1.c index f3d2577f8bf..87f7348413d 100644 --- a/src/mame/drivers/namcona1.c +++ b/src/mame/drivers/namcona1.c @@ -167,7 +167,7 @@ Notes: static UINT16 *mpBank0, *mpBank1; static int mEnableInterrupts; -int namcona1_gametype; +static int namcona1_gametype; /*************************************************************************/ diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c index c2bcb2d9fd9..c8cb1d2129b 100644 --- a/src/mame/drivers/namconb1.c +++ b/src/mame/drivers/namconb1.c @@ -281,7 +281,6 @@ GFX: Custom 145 ( 80 pin PQFP) #define NB1_NVMEM_SIZE (0x800) static UINT32 *nvmem32; -UINT32 *namconb1_workram32; UINT32 *namconb1_spritebank32; UINT32 *namconb1_tilebank32; static UINT16 *namconb_shareram; diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c index aa97aa434f0..a27978f0314 100644 --- a/src/mame/drivers/namcos22.c +++ b/src/mame/drivers/namcos22.c @@ -2007,7 +2007,7 @@ static const gfx_layout texture_tile_layout = #define XOR(a) WORD2_XOR_BE(a) /* text layer uses a set of 16x16x8bpp tiles defined in RAM */ -const gfx_layout namcos22_cg_layout = +static const gfx_layout namcos22_cg_layout = { 16,16, 0x400, /* 0x3c0 */ diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c index f1afcab600b..da0e04b89ad 100644 --- a/src/mame/drivers/photon2.c +++ b/src/mame/drivers/photon2.c @@ -72,12 +72,12 @@ static const rgb_t spectrum_palette[16] = { }; /* Initialise the palette */ -PALETTE_INIT( spectrum ) +static PALETTE_INIT( spectrum ) { palette_set_colors(machine, 0, spectrum_palette, ARRAY_LENGTH(spectrum_palette)); } -VIDEO_START( spectrum ) +static VIDEO_START( spectrum ) { spectrum_frame_number = 0; spectrum_flash_invert = 0; @@ -94,7 +94,7 @@ INLINE unsigned char get_display_color (unsigned char color, int invert) /* Code to change the FLASH status every 25 frames. Note this must be independent of frame skip etc. */ -VIDEO_EOF( spectrum ) +static VIDEO_EOF( spectrum ) { spectrum_frame_number++; if (spectrum_frame_number >= 25) @@ -109,7 +109,7 @@ INLINE void spectrum_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color) *BITMAP_ADDR16(bitmap, y, x) = (UINT16)color; } -VIDEO_UPDATE( spectrum ) +static VIDEO_UPDATE( spectrum ) { /* for now do a full-refresh */ int x, y, b, scrx, scry; @@ -296,7 +296,7 @@ static MACHINE_RESET( photon2 ) memory_set_bankptr(machine, 1, memory_region(machine, "maincpu")); } -MACHINE_DRIVER_START( photon2 ) +static MACHINE_DRIVER_START( photon2 ) /* basic machine hardware */ MDRV_CPU_ADD("maincpu", Z80, 3500000) /* 3.5 MHz */ MDRV_CPU_PROGRAM_MAP(spectrum_mem) diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c index 8ed1ba10e15..9030aef2a7d 100644 --- a/src/mame/drivers/snk.c +++ b/src/mame/drivers/snk.c @@ -277,24 +277,24 @@ static int sound_status; /*********************************************************************/ // Interrupt handlers common to all SNK triple Z80 games -READ8_HANDLER ( snk_cpuA_nmi_trigger_r ) +static READ8_HANDLER ( snk_cpuA_nmi_trigger_r ) { cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, ASSERT_LINE); return 0xff; } -WRITE8_HANDLER( snk_cpuA_nmi_ack_w ) +static WRITE8_HANDLER( snk_cpuA_nmi_ack_w ) { cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, CLEAR_LINE); } -READ8_HANDLER ( snk_cpuB_nmi_trigger_r ) +static READ8_HANDLER ( snk_cpuB_nmi_trigger_r ) { cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, ASSERT_LINE); return 0xff; } -WRITE8_HANDLER( snk_cpuB_nmi_ack_w ) +static WRITE8_HANDLER( snk_cpuB_nmi_ack_w ) { cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, CLEAR_LINE); } diff --git a/src/mame/includes/archimds.h b/src/mame/includes/archimds.h index a822ecb791f..1e68bd355da 100644 --- a/src/mame/includes/archimds.h +++ b/src/mame/includes/archimds.h @@ -36,7 +36,7 @@ /*----------- defined in machine/archimds.c -----------*/ -extern UINT32 *memc_physmem; +extern UINT32 *archimedes_memc_physmem; void archimedes_init(running_machine *machine); // call at MACHINE_INIT void archimedes_reset(running_machine *machine); // call at MACHINE_RESET @@ -49,14 +49,14 @@ void archimedes_clear_irq_a(running_machine *machine, int mask); void archimedes_clear_irq_b(running_machine *machine, int mask); void archimedes_clear_fiq(running_machine *machine, int mask); -extern READ32_HANDLER(memc_logical_r); -extern WRITE32_HANDLER(memc_logical_w); -extern READ32_HANDLER(memc_r); -extern WRITE32_HANDLER(memc_w); -extern WRITE32_HANDLER(memc_page_w); -extern READ32_HANDLER(ioc_r); -extern WRITE32_HANDLER(ioc_w); -extern READ32_HANDLER(vidc_r); -extern WRITE32_HANDLER(vidc_w); +extern READ32_HANDLER(archimedes_memc_logical_r); +extern WRITE32_HANDLER(archimedes_memc_logical_w); +extern READ32_HANDLER(archimedes_memc_r); +extern WRITE32_HANDLER(archimedes_memc_w); +extern WRITE32_HANDLER(archimedes_memc_page_w); +extern READ32_HANDLER(archimedes_ioc_r); +extern WRITE32_HANDLER(archimedes_ioc_w); +extern READ32_HANDLER(archimedes_vidc_r); +extern WRITE32_HANDLER(archimedes_vidc_w); #endif // _ARCHIMEDES_H_ diff --git a/src/mame/includes/balsente.h b/src/mame/includes/balsente.h index 3d12354abc5..0a3969a0d7a 100644 --- a/src/mame/includes/balsente.h +++ b/src/mame/includes/balsente.h @@ -21,8 +21,6 @@ /*----------- defined in machine/balsente.c -----------*/ extern UINT8 balsente_shooter; -extern UINT8 balsente_shooter_x; -extern UINT8 balsente_shooter_y; extern UINT8 balsente_adc_shift; extern UINT16 *shrike_shared; extern UINT16 *shrike_io; diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h index e4cc2807ff7..73803f228dd 100644 --- a/src/mame/includes/bublbobl.h +++ b/src/mame/includes/bublbobl.h @@ -11,9 +11,9 @@ READ8_HANDLER( tokiob_mcu_r ); WRITE8_HANDLER( bublbobl_sound_command_w ); WRITE8_HANDLER( bublbobl_sh_nmi_disable_w ); WRITE8_HANDLER( bublbobl_sh_nmi_enable_w ); -WRITE8_HANDLER( soundcpu_reset_w ); -WRITE8_HANDLER( sound_status_w ); -READ8_HANDLER( sound_status_r ); +WRITE8_HANDLER( bublbobl_soundcpu_reset_w ); +WRITE8_HANDLER( bublbobl_sound_status_w ); +READ8_HANDLER( bublbobl_sound_status_r ); READ8_HANDLER( boblbobl_ic43_a_r ); WRITE8_HANDLER( boblbobl_ic43_a_w ); READ8_HANDLER( boblbobl_ic43_b_r ); diff --git a/src/mame/includes/bzone.h b/src/mame/includes/bzone.h index cd8964d0fc7..205ce85df6e 100644 --- a/src/mame/includes/bzone.h +++ b/src/mame/includes/bzone.h @@ -22,7 +22,6 @@ MACHINE_DRIVER_EXTERN( bzone_audio ); /*----------- defined in audio/redbaron.c -----------*/ WRITE8_HANDLER( redbaron_sounds_w ); -WRITE8_DEVICE_HANDLER( redbaron_pokey_w ); DEVICE_GET_INFO( redbaron_sound ); #define SOUND_REDBARON DEVICE_GET_INFO_NAME(redbaron_sound) diff --git a/src/mame/includes/cloud9.h b/src/mame/includes/cloud9.h index 104309e656d..ca7c3063aea 100644 --- a/src/mame/includes/cloud9.h +++ b/src/mame/includes/cloud9.h @@ -4,12 +4,6 @@ *************************************************************************/ -/*----------- defined in drivers/cloud9.c -----------*/ - -extern int cloud9_vblank_start; -extern int cloud9_vblank_end; - - /*----------- defined in video/cloud9.c -----------*/ VIDEO_START( cloud9 ); diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h index 2d2f7d96601..245f36cbcbe 100644 --- a/src/mame/includes/cps1.h +++ b/src/mame/includes/cps1.h @@ -8,11 +8,6 @@ ADDRESS_MAP_EXTERN(qsound_sub_map, 8); READ16_HANDLER( qsound_sharedram1_r ); WRITE16_HANDLER( qsound_sharedram1_w ); -READ16_HANDLER( cps1_eeprom_port_r ); -WRITE16_HANDLER( cps1_eeprom_port_w ); - -INTERRUPT_GEN( cps1_qsound_interrupt ); - READ16_HANDLER( cps1_dsw_r ); WRITE16_HANDLER( cps1_coinctrl_w ); INTERRUPT_GEN( cps1_interrupt ); diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h index baeab973c98..fc044e10626 100644 --- a/src/mame/includes/dkong.h +++ b/src/mame/includes/dkong.h @@ -141,7 +141,6 @@ WRITE8_HANDLER( dkong_palettebank_w ); WRITE8_HANDLER( dkong_videoram_w ); PALETTE_INIT( dkong2b ); -PALETTE_INIT( dkong4b ); PALETTE_INIT( radarscp ); PALETTE_INIT( radarsc1 ); PALETTE_INIT( dkong3 ); diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h index 3c351deacf0..a582978133f 100644 --- a/src/mame/includes/galaxold.h +++ b/src/mame/includes/galaxold.h @@ -70,7 +70,6 @@ VIDEO_START( pisces ); VIDEO_START( batman2 ); VIDEO_START( dkongjrm ); VIDEO_START( scrambold ); -VIDEO_START( theend ); VIDEO_START( darkplnt ); VIDEO_START( rescue ); VIDEO_START( minefld ); @@ -95,22 +94,10 @@ VIDEO_UPDATE( dambustr ); WRITE8_HANDLER( galaxold_gfxbank_w ); WRITE8_HANDLER( galaxold_flip_screen_x_w ); WRITE8_HANDLER( galaxold_flip_screen_y_w ); -WRITE8_HANDLER( gteikob2_flip_screen_x_w ); -WRITE8_HANDLER( gteikob2_flip_screen_y_w ); /*----------- defined in machine/galaxold.c -----------*/ -DRIVER_INIT( zigzag ); -DRIVER_INIT( pisces ); -DRIVER_INIT( checkmaj ); -DRIVER_INIT( dingo ); -DRIVER_INIT( dingoe ); -DRIVER_INIT( mooncrsu ); -DRIVER_INIT( mooncrst ); -DRIVER_INIT( mooncrgx ); -DRIVER_INIT( moonqsr ); -DRIVER_INIT( checkman ); DRIVER_INIT( 4in1 ); DRIVER_INIT( ladybugg ); @@ -132,8 +119,6 @@ READ8_HANDLER( scramblb_protection_2_r ); WRITE8_HANDLER( _4in1_bank_w ); CUSTOM_INPUT( _4in1_fake_port_r ); -WRITE8_HANDLER( zigzag_sillyprotection_w ); - INTERRUPT_GEN( hunchbks_vh_interrupt ); @@ -147,15 +132,10 @@ extern const ppi8255_interface mrkougar_ppi_1_intf; DRIVER_INIT( scramble_ppi ); -DRIVER_INIT( scobra ); -DRIVER_INIT( atlantis ); -DRIVER_INIT( scramble ); DRIVER_INIT( stratgyx ); DRIVER_INIT( tazmani2 ); DRIVER_INIT( ckongs ); DRIVER_INIT( mariner ); -DRIVER_INIT( frogger ); -DRIVER_INIT( froggers ); DRIVER_INIT( devilfsh ); DRIVER_INIT( mars ); DRIVER_INIT( hotshock ); @@ -164,10 +144,8 @@ DRIVER_INIT( darkplnt ); DRIVER_INIT( mimonkey ); DRIVER_INIT( mimonsco ); DRIVER_INIT( mimonscr ); -DRIVER_INIT( anteater ); DRIVER_INIT( rescue ); DRIVER_INIT( minefld ); -DRIVER_INIT( losttomb ); DRIVER_INIT( hustler ); DRIVER_INIT( billiard ); DRIVER_INIT( mrkougar ); @@ -200,7 +178,6 @@ READ8_DEVICE_HANDLER( hotshock_soundlatch_r ); WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w ); WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w ); -WRITE8_HANDLER( froggrmc_sh_irqtrigger_w ); WRITE8_HANDLER( hotshock_sh_irqtrigger_w ); MACHINE_DRIVER_EXTERN( ad2083_audio ); diff --git a/src/mame/includes/kaneko16.h b/src/mame/includes/kaneko16.h index e7ae0891389..2fbcb9aaa9f 100644 --- a/src/mame/includes/kaneko16.h +++ b/src/mame/includes/kaneko16.h @@ -130,7 +130,6 @@ extern UINT16* galsnew_fg_pixram; extern UINT16 *galpani2_bg8_0, *galpani2_bg8_1; extern UINT16 *galpani2_palette_0, *galpani2_palette_1; -extern UINT16 *galpani2_bg8_regs_0, *galpani2_bg8_regs_1; extern UINT16 *galpani2_bg8_0_scrollx, *galpani2_bg8_1_scrollx; extern UINT16 *galpani2_bg8_0_scrolly, *galpani2_bg8_1_scrolly; diff --git a/src/mame/includes/kyugo.h b/src/mame/includes/kyugo.h index 5b84349c46d..6bb9719e082 100644 --- a/src/mame/includes/kyugo.h +++ b/src/mame/includes/kyugo.h @@ -4,12 +4,6 @@ ***************************************************************************/ -/*----------- defined in drivers/kyugo.c -----------*/ - -MACHINE_RESET( kyugo ); - -WRITE8_HANDLER( kyugo_sub_cpu_control_w ); - /*----------- defined in video/kyugo.c -----------*/ extern UINT8 *kyugo_fgvideoram; diff --git a/src/mame/includes/mcr.h b/src/mame/includes/mcr.h index aa58a3a75cf..ff66786885b 100644 --- a/src/mame/includes/mcr.h +++ b/src/mame/includes/mcr.h @@ -102,7 +102,6 @@ WRITE8_HANDLER( mcr3_videoram_w ); WRITE8_HANDLER( spyhunt_videoram_w ); WRITE8_HANDLER( spyhunt_alpharam_w ); -VIDEO_START( mcr3 ); VIDEO_START( mcrmono ); VIDEO_START( spyhunt ); diff --git a/src/mame/includes/namcoic.h b/src/mame/includes/namcoic.h index f7dbf86d65a..7077a3d49e8 100644 --- a/src/mame/includes/namcoic.h +++ b/src/mame/includes/namcoic.h @@ -146,8 +146,6 @@ void namco_roz_draw( bitmap_t *bitmap, const rectangle *cliprect, int pri ); READ16_HANDLER( namco_rozcontrol16_r ); WRITE16_HANDLER( namco_rozcontrol16_w ); -READ16_HANDLER( namco_rozbank16_r ); -WRITE16_HANDLER( namco_rozbank16_w ); READ16_HANDLER( namco_rozvideoram16_r ); WRITE16_HANDLER( namco_rozvideoram16_w ); diff --git a/src/mame/includes/namcona1.h b/src/mame/includes/namcona1.h index 5bd0852fa12..83d2ab22d41 100644 --- a/src/mame/includes/namcona1.h +++ b/src/mame/includes/namcona1.h @@ -1,8 +1,3 @@ -/*----------- defined in drivers/namcona1.c -----------*/ - -extern int namcona1_gametype; - - /*----------- defined in video/namcona1.c -----------*/ enum diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 509792b1b2d..8822f1433c1 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -1,6 +1,5 @@ /*----------- defined in drivers/namconb1.c -----------*/ -extern UINT32 *namconb1_workram32; extern UINT32 *namconb1_spritebank32; extern UINT32 *namconb1_tilebank32; diff --git a/src/mame/includes/namcos2.h b/src/mame/includes/namcos2.h index 95a3453ab1e..67b416a5d3f 100644 --- a/src/mame/includes/namcos2.h +++ b/src/mame/includes/namcos2.h @@ -165,7 +165,6 @@ WRITE16_HANDLER( namcos2_68k_serial_comms_ram_w ); READ16_HANDLER( namcos2_68k_serial_comms_ctrl_r ); WRITE16_HANDLER( namcos2_68k_serial_comms_ctrl_w ); -extern UINT16 namcos2_68k_serial_comms_ctrl[]; extern UINT16 *namcos2_68k_serial_comms_ram; /**************************************************************/ @@ -187,10 +186,6 @@ WRITE16_HANDLER( namcos2_68k_key_w ); #define NAMCOS2_C148_SERIRQ 6 /* 0x1cc000 */ #define NAMCOS2_C148_VBLANKIRQ 7 /* 0x1ce000 */ -extern UINT16 namcos2_68k_master_C148[]; -extern UINT16 namcos2_68k_slave_C148[]; -extern UINT16 namcos2_68k_gpu_C148[]; - WRITE16_HANDLER( namcos2_68k_master_C148_w ); READ16_HANDLER( namcos2_68k_master_C148_r ); INTERRUPT_GEN( namcos2_68k_master_vblank ); diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index 34fd9c36ba5..489b74c0b93 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -29,10 +29,6 @@ extern enum namcos22_gametype #define NAMCOS22_PALETTE_SIZE 0x8000 -/*----------- defined in drivers/namcos22.c -----------*/ - -extern const gfx_layout namcos22_cg_layout; - /*----------- defined in video/namcos22.c -----------*/ extern UINT32 *namcos22_cgram; diff --git a/src/mame/includes/segas24.h b/src/mame/includes/segas24.h index ce9b10f88b7..49b8546bf4d 100644 --- a/src/mame/includes/segas24.h +++ b/src/mame/includes/segas24.h @@ -7,10 +7,6 @@ /* New Code */ -extern UINT16 *system24temp_sys16_shared_ram; -READ16_HANDLER( system24temp_sys16_shared_ram_r ); -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), diff --git a/src/mame/includes/snes.h b/src/mame/includes/snes.h index 3aaeb3d1899..ce43639058b 100644 --- a/src/mame/includes/snes.h +++ b/src/mame/includes/snes.h @@ -544,8 +544,6 @@ extern READ8_HANDLER( spc_ipl_r ); extern DEVICE_GET_INFO( snes_sound ); #define SOUND_SNES DEVICE_GET_INFO_NAME( snes_sound ) -extern STREAM_UPDATE( snes_sh_update ); - /* Stuff from OpenSPC 0.3.99 by Brad Martin */ /*========== TYPES ==========*/ diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h index 737bf43fb7b..60047bd700f 100644 --- a/src/mame/includes/snk.h +++ b/src/mame/includes/snk.h @@ -4,15 +4,6 @@ *************************************************************************/ -/*----------- defined in drivers/snk.c -----------*/ - -extern READ8_HANDLER ( snk_cpuA_nmi_trigger_r ); -extern WRITE8_HANDLER( snk_cpuA_nmi_ack_w ); - -extern READ8_HANDLER ( snk_cpuB_nmi_trigger_r ); -extern WRITE8_HANDLER( snk_cpuB_nmi_ack_w ); - - /*----------- defined in video/snk.c -----------*/ extern PALETTE_INIT( tnk3 ); diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index 0e092ebaaa4..255b36f533e 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -56,12 +56,6 @@ void fd1094_driver_init(running_machine *machine, void (*set_decrypted)(running_ /*----------- defined in machine/system16.c -----------*/ -extern UINT16 *sys16_workingram; -extern UINT16 *sys16_workingram2; -extern UINT16 *sys16_extraram; -extern UINT16 *sys16_extraram2; -extern UINT16 *sys16_extraram3; - /* sound */ extern const upd7759_interface sys16_upd7759_interface; @@ -116,7 +110,6 @@ extern int sys16_sh_shadowpal; extern int sys16_MaxShadowColors; /* video driver constants (vary with game) */ -extern int sys16_gr_bitmap_width; extern int sys16_sprxoffset; extern int sys16_bgxoffset; extern int sys16_fgxoffset; @@ -153,12 +146,3 @@ extern UINT16 *sys18_splittab_bg_y; extern UINT16 *sys18_splittab_fg_x; extern UINT16 *sys18_splittab_fg_y; -extern UINT16 *sys16_gr_ver; -extern UINT16 *sys16_gr_hor; -extern UINT16 *sys16_gr_pal; -extern UINT16 *sys16_gr_flip; -extern int sys16_gr_palette; -extern int sys16_gr_palette_default; -extern UINT8 sys16_gr_colorflip[2][4]; -extern UINT16 *sys16_gr_second_road; - diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index 382e0cbd073..63aa29be4b8 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -43,6 +43,5 @@ VIDEO_UPDATE( taitof2_metalb ); VIDEO_UPDATE( taitof2_yesnoj ); WRITE16_HANDLER( taitof2_spritebank_w ); -READ16_HANDLER ( koshien_spritebank_r ); WRITE16_HANDLER( koshien_spritebank_w ); WRITE16_HANDLER( taitof2_sprite_extension_w ); diff --git a/src/mame/machine/archimds.c b/src/mame/machine/archimds.c index bf79377d593..27e3727e87c 100644 --- a/src/mame/machine/archimds.c +++ b/src/mame/machine/archimds.c @@ -37,7 +37,7 @@ static const int page_sizes[4] = { 4096, 8192, 16384, 32768 }; -UINT32 *memc_physmem; +UINT32 *archimedes_memc_physmem; static UINT32 memc_pagesize; static int memc_latchrom; static INT16 memc_pages[(32*1024*1024)/(4096)]; // the logical RAM area is 32 megs, and the smallest page size is 4k @@ -175,7 +175,7 @@ void archimedes_init(running_machine *machine) timer_adjust_oneshot(snd_timer, attotime_never, 0); } -READ32_HANDLER(memc_logical_r) +READ32_HANDLER(archimedes_memc_logical_r) { UINT32 page, poffs; @@ -198,7 +198,7 @@ READ32_HANDLER(memc_logical_r) if (memc_pages[page] != -1) { - return memc_physmem[((memc_pages[page] * page_sizes[memc_pagesize]) + poffs)>>2]; + return archimedes_memc_physmem[((memc_pages[page] * page_sizes[memc_pagesize]) + poffs)>>2]; } else { @@ -209,7 +209,7 @@ READ32_HANDLER(memc_logical_r) return 0; } -WRITE32_HANDLER(memc_logical_w) +WRITE32_HANDLER(archimedes_memc_logical_w) { UINT32 page, poffs; @@ -228,7 +228,7 @@ WRITE32_HANDLER(memc_logical_w) if (memc_pages[page] != -1) { - COMBINE_DATA(&memc_physmem[((memc_pages[page] * page_sizes[memc_pagesize]) + poffs)>>2]); + COMBINE_DATA(&archimedes_memc_physmem[((memc_pages[page] * page_sizes[memc_pagesize]) + poffs)>>2]); } else { @@ -260,7 +260,7 @@ static DIRECT_UPDATE_HANDLER( a310_setopbase ) direct->bytemask = page_sizes[memc_pagesize]-1; direct->bytestart = page * page_sizes[memc_pagesize]; direct->byteend = direct->bytestart + direct->bytemask; - direct->raw = direct->decrypted = (UINT8 *)&memc_physmem[(memc_pages[page] * page_sizes[memc_pagesize])>>2]; + direct->raw = direct->decrypted = (UINT8 *)&archimedes_memc_physmem[(memc_pages[page] * page_sizes[memc_pagesize])>>2]; } return ~0; @@ -314,7 +314,7 @@ static void latch_timer_cnt(int tmr) ioc_timerout[tmr] = ioc_timercnt[tmr] - (UINT32)time; } -READ32_HANDLER(ioc_r) +READ32_HANDLER(archimedes_ioc_r) { #ifdef MESS const device_config *fdc = (const device_config *)devtag_get_device(space->machine, "wd1772"); @@ -364,7 +364,7 @@ READ32_HANDLER(ioc_r) return 0; } -WRITE32_HANDLER(ioc_w) +WRITE32_HANDLER(archimedes_ioc_w) { #ifdef MESS const device_config *fdc = (const device_config *)devtag_get_device(space->machine, "wd1772"); @@ -492,12 +492,12 @@ WRITE32_HANDLER(ioc_w) } } -READ32_HANDLER(vidc_r) +READ32_HANDLER(archimedes_vidc_r) { return 0; } -WRITE32_HANDLER(vidc_w) +WRITE32_HANDLER(archimedes_vidc_w) { UINT32 reg = data>>24; UINT32 val = data & 0xffffff; @@ -557,12 +557,12 @@ WRITE32_HANDLER(vidc_w) } } -READ32_HANDLER(memc_r) +READ32_HANDLER(archimedes_memc_r) { return 0; } -WRITE32_HANDLER(memc_w) +WRITE32_HANDLER(archimedes_memc_w) { // is it a register? if ((data & 0x0fe00000) == 0x03600000) @@ -638,7 +638,7 @@ The physical page is encoded differently depending on the page size : 1 being bit 6 */ -WRITE32_HANDLER(memc_page_w) +WRITE32_HANDLER(archimedes_memc_page_w) { UINT32 log, phys, memc, perms; diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c index 77f476bf6e0..1a555b5dad7 100644 --- a/src/mame/machine/balsente.c +++ b/src/mame/machine/balsente.c @@ -24,8 +24,8 @@ static void update_grudge_steering(running_machine *machine); /* global data */ UINT8 balsente_shooter; -UINT8 balsente_shooter_x; -UINT8 balsente_shooter_y; +static UINT8 balsente_shooter_x; +static UINT8 balsente_shooter_y; UINT8 balsente_adc_shift; UINT16 *shrike_shared; UINT16 *shrike_io; diff --git a/src/mame/machine/bublbobl.c b/src/mame/machine/bublbobl.c index 229b2027d6b..91019c84f2b 100644 --- a/src/mame/machine/bublbobl.c +++ b/src/mame/machine/bublbobl.c @@ -119,17 +119,17 @@ WRITE8_HANDLER( bublbobl_sh_nmi_enable_w ) } } -WRITE8_HANDLER(soundcpu_reset_w) +WRITE8_HANDLER( bublbobl_soundcpu_reset_w ) { cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, data ? ASSERT_LINE : CLEAR_LINE); } -READ8_HANDLER( sound_status_r ) +READ8_HANDLER( bublbobl_sound_status_r ) { return sound_status; } -WRITE8_HANDLER( sound_status_w ) +WRITE8_HANDLER( bublbobl_sound_status_w ) { sound_status = data; } diff --git a/src/mame/machine/cx4data.c b/src/mame/machine/cx4data.c index 65b343dcd34..2d3cd8f3914 100644 --- a/src/mame/machine/cx4data.c +++ b/src/mame/machine/cx4data.c @@ -8,7 +8,7 @@ ***************************************************************************/ -const UINT8 CX4_immediate_data[48] = +static const UINT8 CX4_immediate_data[48] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x80, 0xff, 0xff, 0x7f, @@ -16,7 +16,7 @@ const UINT8 CX4_immediate_data[48] = 0x00, 0x00, 0x01, 0xff, 0xff, 0xfe, 0x00, 0x01, 0x00, 0xff, 0xfe, 0x00 }; -const UINT16 CX4_wave_data[40] = +static const UINT16 CX4_wave_data[40] = { 0x0000, 0x0002, 0x0004, 0x0006, 0x0008, 0x000a, 0x000c, 0x000e, 0x0200, 0x0202, 0x0204, 0x0206, 0x0208, 0x020a, 0x020c, 0x020e, @@ -25,7 +25,7 @@ const UINT16 CX4_wave_data[40] = 0x0800, 0x0802, 0x0804, 0x0806, 0x0808, 0x080a, 0x080c, 0x080e }; -const UINT32 CX4_sin_table[256] = +static const UINT32 CX4_sin_table[256] = { 0x000000, 0x000324, 0x000648, 0x00096c, 0x000c8f, 0x000fb2, 0x0012d5, 0x0015f6, 0x001917, 0x001c37, 0x001f56, 0x002273, 0x002590, 0x0028aa, 0x002bc4, 0x002edb, @@ -61,7 +61,7 @@ const UINT32 CX4_sin_table[256] = 0xff013b, 0xff00f1, 0xff00b1, 0xff007b, 0xff004e, 0xff002c, 0xff0013, 0xff0004 }; -const INT16 CX4_SinTable[512] = +static const INT16 CX4_SinTable[512] = { 0, 402, 804, 1206, 1607, 2009, 2410, 2811, 3211, 3611, 4011, 4409, 4808, 5205, 5602, 5997, @@ -129,7 +129,7 @@ const INT16 CX4_SinTable[512] = -3211, -2811, -2410, -2009, -1607, -1206, -804, -402 }; -const INT16 CX4_CosTable[512] = +static const INT16 CX4_CosTable[512] = { 32767, 32765, 32758, 32745, 32728, 32706, 32679, 32647, 32610, 32568, 32521, 32469, 32413, 32351, 32285, 32214, diff --git a/src/mame/machine/cx4fn.c b/src/mame/machine/cx4fn.c index 8cb6cba001b..7ddc2cb950f 100644 --- a/src/mame/machine/cx4fn.c +++ b/src/mame/machine/cx4fn.c @@ -17,7 +17,7 @@ #define PI 3.1415926535897932384626433832795 //Wireframe Helpers -void CX4_C4TransfWireFrame(void) +static void CX4_C4TransfWireFrame(void) { cx4.c4x = (double)cx4.C4WFXVal; cx4.c4y = (double)cx4.C4WFYVal; @@ -43,7 +43,7 @@ void CX4_C4TransfWireFrame(void) cx4.C4WFYVal = (INT16)(cx4.c4y * cx4.C4WFScale / (0x90 * (cx4.c4z + 0x95)) * 0x95); } -void CX4_C4CalcWireFrame(void) +static void CX4_C4CalcWireFrame(void) { cx4.C4WFXVal = cx4.C4WFX2Val - cx4.C4WFXVal; cx4.C4WFYVal = cx4.C4WFY2Val - cx4.C4WFYVal; @@ -66,7 +66,7 @@ void CX4_C4CalcWireFrame(void) } } -void CX4_C4TransfWireFrame2(void) +static void CX4_C4TransfWireFrame2(void) { cx4.c4x = (double)cx4.C4WFXVal; cx4.c4y = (double)cx4.C4WFYVal; @@ -92,7 +92,7 @@ void CX4_C4TransfWireFrame2(void) cx4.C4WFYVal = (INT16)(cx4.c4y * cx4.C4WFScale / 0x100); } -void CX4_C4DrawWireFrame(running_machine *machine) +static void CX4_C4DrawWireFrame(running_machine *machine) { UINT32 line = CX4_readl(0x1f80); UINT32 point1, point2; @@ -144,7 +144,7 @@ void CX4_C4DrawWireFrame(running_machine *machine) } } -void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT16 Z2, UINT8 Color) +static void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT16 Z2, UINT8 Color) { INT32 i; @@ -199,7 +199,7 @@ void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT16 Z2, } } -void CX4_C4DoScaleRotate(int row_padding) +static void CX4_C4DoScaleRotate(int row_padding) { INT16 A, B, C, D; INT32 x, y; diff --git a/src/mame/machine/cx4oam.c b/src/mame/machine/cx4oam.c index 8fd4225b7a6..6d0ae4ce0b0 100644 --- a/src/mame/machine/cx4oam.c +++ b/src/mame/machine/cx4oam.c @@ -9,7 +9,7 @@ ***************************************************************************/ //Build OAM -void CX4_op00_00(running_machine *machine) +static void CX4_op00_00(running_machine *machine) { INT32 i; @@ -126,13 +126,13 @@ void CX4_op00_00(running_machine *machine) } //Scale and Rotate -void CX4_op00_03() +static void CX4_op00_03(void) { CX4_C4DoScaleRotate(0); } //Transform Lines -void CX4_op00_05(running_machine *machine) +static void CX4_op00_05(running_machine *machine) { INT32 i; UINT32 ptr = 0, ptr2 = 0; @@ -178,19 +178,19 @@ void CX4_op00_05(running_machine *machine) } //Scale and Rotate -void CX4_op00_07() +static void CX4_op00_07(void) { CX4_C4DoScaleRotate(64); } //Draw Wireframe -void CX4_op00_08(running_machine *machine) +static void CX4_op00_08(running_machine *machine) { CX4_C4DrawWireFrame(machine); } //Disintegrate -void CX4_op00_0b(running_machine *machine) +static void CX4_op00_0b(running_machine *machine) { UINT8 width, height; UINT32 startx, starty; @@ -240,7 +240,7 @@ void CX4_op00_0b(running_machine *machine) } //Bitplane Wave -void CX4_op00_0c(running_machine *machine) +static void CX4_op00_0c(running_machine *machine) { int i, j; UINT32 destptr = 0; diff --git a/src/mame/machine/cx4ops.c b/src/mame/machine/cx4ops.c index 218bfe94c77..9b64666d042 100644 --- a/src/mame/machine/cx4ops.c +++ b/src/mame/machine/cx4ops.c @@ -9,7 +9,7 @@ ***************************************************************************/ //Sprite Functions -void CX4_op00(running_machine* machine) +static void CX4_op00(running_machine* machine) { switch(cx4.reg[0x4d]) { @@ -24,14 +24,14 @@ void CX4_op00(running_machine* machine) } //Draw Wireframe -void CX4_op01(running_machine* machine) +static void CX4_op01(running_machine* machine) { memset(cx4.ram + 0x300, 0, 2304); CX4_C4DrawWireFrame(machine); } //Propulsion -void CX4_op05(running_machine *machine) +static void CX4_op05(running_machine *machine) { INT32 temp = 0x10000; if(CX4_readw(0x1f83)) @@ -42,7 +42,7 @@ void CX4_op05(running_machine *machine) } //Set Vector length -void CX4_op0d(running_machine *machine) +static void CX4_op0d(running_machine *machine) { cx4.C41FXVal = CX4_readw(0x1f80); cx4.C41FYVal = CX4_readw(0x1f83); @@ -56,7 +56,7 @@ void CX4_op0d(running_machine *machine) } //Triangle -void CX4_op10() +static void CX4_op10(void) { cx4.r0 = CX4_ldr(0); cx4.r1 = CX4_ldr(1); @@ -84,7 +84,7 @@ void CX4_op10() } //Triangle -void CX4_op13() +static void CX4_op13(void) { cx4.r0 = CX4_ldr(0); cx4.r1 = CX4_ldr(1); @@ -108,7 +108,7 @@ void CX4_op13() } //Pythagorean -void CX4_op15(running_machine *machine) +static void CX4_op15(running_machine *machine) { double temp = 0.0; cx4.C41FXVal = CX4_readw(0x1f80); @@ -119,7 +119,7 @@ void CX4_op15(running_machine *machine) } //Calculate distance -void CX4_op1f(running_machine *machine) +static void CX4_op1f(running_machine *machine) { cx4.C41FXVal = CX4_readw(0x1f80); cx4.C41FYVal = CX4_readw(0x1f83); @@ -142,7 +142,7 @@ void CX4_op1f(running_machine *machine) } //Trapezoid -void CX4_op22() +static void CX4_op22(void) { INT16 angle1 = CX4_readw(0x1f8c) & 0x1ff; INT16 angle2 = CX4_readw(0x1f8f) & 0x1ff; @@ -198,7 +198,7 @@ void CX4_op22() } //Multiply -void CX4_op25() +static void CX4_op25(void) { cx4.r0 = CX4_ldr(0); cx4.r1 = CX4_ldr(1); @@ -208,7 +208,7 @@ void CX4_op25() } //Transform Coords -void CX4_op2d(running_machine *machine) +static void CX4_op2d(running_machine *machine) { cx4.C4WFXVal = CX4_readw(0x1f81); cx4.C4WFYVal = CX4_readw(0x1f84); @@ -223,7 +223,7 @@ void CX4_op2d(running_machine *machine) } //Sum -void CX4_op40() +static void CX4_op40(void) { UINT32 i; cx4.r0 = 0; @@ -235,7 +235,7 @@ void CX4_op40() } //Square -void CX4_op54() +static void CX4_op54(void) { cx4.r0 = CX4_ldr(0); CX4_mul(cx4.r0, cx4.r0, &cx4.r1, &cx4.r2); @@ -244,32 +244,32 @@ void CX4_op54() } //Immediate Register -void CX4_op5c() +static void CX4_op5c(void) { CX4_str(0, 0x000000); CX4_immediate_reg(0); } //Immediate Register (Multiple) -void CX4_op5e() { CX4_immediate_reg( 0); } -void CX4_op60() { CX4_immediate_reg( 3); } -void CX4_op62() { CX4_immediate_reg( 6); } -void CX4_op64() { CX4_immediate_reg( 9); } -void CX4_op66() { CX4_immediate_reg(12); } -void CX4_op68() { CX4_immediate_reg(15); } -void CX4_op6a() { CX4_immediate_reg(18); } -void CX4_op6c() { CX4_immediate_reg(21); } -void CX4_op6e() { CX4_immediate_reg(24); } -void CX4_op70() { CX4_immediate_reg(27); } -void CX4_op72() { CX4_immediate_reg(30); } -void CX4_op74() { CX4_immediate_reg(33); } -void CX4_op76() { CX4_immediate_reg(36); } -void CX4_op78() { CX4_immediate_reg(39); } -void CX4_op7a() { CX4_immediate_reg(42); } -void CX4_op7c() { CX4_immediate_reg(45); } +static void CX4_op5e(void) { CX4_immediate_reg( 0); } +static void CX4_op60(void) { CX4_immediate_reg( 3); } +static void CX4_op62(void) { CX4_immediate_reg( 6); } +static void CX4_op64(void) { CX4_immediate_reg( 9); } +static void CX4_op66(void) { CX4_immediate_reg(12); } +static void CX4_op68(void) { CX4_immediate_reg(15); } +static void CX4_op6a(void) { CX4_immediate_reg(18); } +static void CX4_op6c(void) { CX4_immediate_reg(21); } +static void CX4_op6e(void) { CX4_immediate_reg(24); } +static void CX4_op70(void) { CX4_immediate_reg(27); } +static void CX4_op72(void) { CX4_immediate_reg(30); } +static void CX4_op74(void) { CX4_immediate_reg(33); } +static void CX4_op76(void) { CX4_immediate_reg(36); } +static void CX4_op78(void) { CX4_immediate_reg(39); } +static void CX4_op7a(void) { CX4_immediate_reg(42); } +static void CX4_op7c(void) { CX4_immediate_reg(45); } //Immediate ROM -void CX4_op89() +static void CX4_op89(void) { CX4_str(0, 0x054336); CX4_str(1, 0xffffff); diff --git a/src/mame/machine/galaxold.c b/src/mame/machine/galaxold.c index 13b5943d568..0982bc68333 100644 --- a/src/mame/machine/galaxold.c +++ b/src/mame/machine/galaxold.c @@ -122,6 +122,7 @@ WRITE8_HANDLER( galaxold_leds_w ) } +#ifdef UNUSED_FUNCTION static READ8_HANDLER( checkmaj_protection_r ) { switch (cpu_get_pc(space->cpu)) @@ -212,6 +213,7 @@ DRIVER_INIT( dingoe ) memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x3001, 0x3001, 0, 0, dingoe_3001_r); /* Protection check */ } +#endif READ8_HANDLER( scramblb_protection_1_r ) @@ -253,6 +255,7 @@ CUSTOM_INPUT( _4in1_fake_port_r ) return (input_port_read(field->port->machine, portnames[_4in1_bank]) & bit_mask) ? 0x01 : 0x00; } +#ifdef UNUSED_FUNCTION DRIVER_INIT( pisces ) { /* the coin lockout was replaced */ @@ -383,6 +386,7 @@ Pin layout is such that links can replace the PAL if encryption is not used. rom[i] ^= data_xor; } } +#endif DRIVER_INIT( 4in1 ) { diff --git a/src/mame/machine/namcos2.c b/src/mame/machine/namcos2.c index 95bd90d2cec..2ec7fabc354 100644 --- a/src/mame/machine/namcos2.c +++ b/src/mame/machine/namcos2.c @@ -17,6 +17,8 @@ Namco System II extern void namcos21_kickstart(running_machine *, int); static TIMER_CALLBACK( namcos2_posirq_tick ); +static void InitC148(void); + static emu_timer *namcos2_posirq_timer; int namcos2_gametype; @@ -110,7 +112,6 @@ MACHINE_START( namcos2 ) MACHINE_RESET( namcos2 ) { const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); - int loop; mFinalLapProtCount = 0; namcos2_mcu_analog_ctrl = 0; namcos2_mcu_analog_data = 0xaa; @@ -126,12 +127,7 @@ MACHINE_RESET( namcos2 ) ResetAllSubCPUs( machine, ASSERT_LINE ); /* Initialise interrupt handlers */ - for(loop = 0; loop < 0x20; loop++) - { - namcos2_68k_master_C148[loop] = 0; - namcos2_68k_slave_C148[loop] = 0; - namcos2_68k_gpu_C148[loop] = 0; - } + InitC148(); /* reset POSIRQ timer */ timer_adjust_oneshot(namcos2_posirq_timer, attotime_never, 0); @@ -190,7 +186,7 @@ READ16_HANDLER( namcos2_68k_data_rom_r ){ /* 68000 Shared serial communications processor (CPU5?) */ /**************************************************************/ -UINT16 namcos2_68k_serial_comms_ctrl[0x8]; +static UINT16 namcos2_68k_serial_comms_ctrl[0x8]; UINT16 *namcos2_68k_serial_comms_ram; READ16_HANDLER( namcos2_68k_serial_comms_ram_r ){ @@ -458,9 +454,9 @@ WRITE16_HANDLER( namcos2_68k_key_w ) #define FRAME_TIME (1.0/60.0) #define LINE_LENGTH (FRAME_TIME/NO_OF_LINES) -UINT16 namcos2_68k_master_C148[0x20]; -UINT16 namcos2_68k_slave_C148[0x20]; -UINT16 namcos2_68k_gpu_C148[0x20]; +static UINT16 namcos2_68k_master_C148[0x20]; +static UINT16 namcos2_68k_slave_C148[0x20]; +static UINT16 namcos2_68k_gpu_C148[0x20]; static int IsSystem21( void ) @@ -479,6 +475,18 @@ static int IsSystem21( void ) } } +static void InitC148(void) +{ + int loop; + + for(loop = 0; loop < 0x20; loop++) + { + namcos2_68k_master_C148[loop] = 0; + namcos2_68k_slave_C148[loop] = 0; + namcos2_68k_gpu_C148[loop] = 0; + } +} + static UINT16 ReadWriteC148( const address_space *space, offs_t offset, UINT16 data, int bWrite ) { diff --git a/src/mame/machine/scramble.c b/src/mame/machine/scramble.c index cecdfa3eed2..af4ea907abb 100644 --- a/src/mame/machine/scramble.c +++ b/src/mame/machine/scramble.c @@ -206,11 +206,12 @@ DRIVER_INIT( scramble_ppi ) { } -DRIVER_INIT( scobra ) +static DRIVER_INIT( scobra ) { memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa803, 0xa803, 0, 0, scrambold_background_enable_w); } +#ifdef UNUSED_FUNCTION DRIVER_INIT( atlantis ) { memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x6803, 0x6803, 0, 0, scrambold_background_enable_w); @@ -220,6 +221,7 @@ DRIVER_INIT( scramble ) { DRIVER_INIT_CALL(atlantis); } +#endif DRIVER_INIT( stratgyx ) { @@ -250,6 +252,7 @@ DRIVER_INIT( mariner ) /*memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x6803, 0x6803, 0, 0, (write8_space_func)SMH_NOP);*/ } +#ifdef UNUSED_FUNCTION DRIVER_INIT( frogger ) { offs_t A; @@ -276,6 +279,7 @@ DRIVER_INIT( froggers ) for (A = 0;A < 0x0800;A++) ROM[A] = BITSWAP8(ROM[A],7,6,5,4,3,2,0,1); } +#endif DRIVER_INIT( devilfsh ) { @@ -396,6 +400,7 @@ static int bit(int i,int n) } +#ifdef UNUSED_FUNCTION DRIVER_INIT( anteater ) { offs_t i, len; @@ -432,6 +437,7 @@ DRIVER_INIT( anteater ) free(scratch); } +#endif DRIVER_INIT( rescue ) { @@ -507,6 +513,7 @@ DRIVER_INIT( minefld ) free(scratch); } +#ifdef UNUSED_FUNCTION DRIVER_INIT( losttomb ) { offs_t i, len; @@ -543,7 +550,7 @@ DRIVER_INIT( losttomb ) free(scratch); } - +#endif DRIVER_INIT( hustler ) { diff --git a/src/mame/machine/segas24.c b/src/mame/machine/segas24.c index 9549a3b4989..19cfc5a1fdd 100644 --- a/src/mame/machine/segas24.c +++ b/src/mame/machine/segas24.c @@ -7,6 +7,7 @@ just made a copy & renamed them for now to avoid any conflicts */ +#ifdef UNUSED_FUNCTION UINT16 *system24temp_sys16_shared_ram; READ16_HANDLER( system24temp_sys16_shared_ram_r ) { @@ -17,6 +18,7 @@ WRITE16_HANDLER( system24temp_sys16_shared_ram_w ) { COMBINE_DATA(system24temp_sys16_shared_ram + offset); } +#endif /* The 315-5296 8 8bits I/O ports, 3 output-only pins, some protection, and diff --git a/src/mame/machine/snescx4.c b/src/mame/machine/snescx4.c index d215fac2ee1..7219f836c35 100644 --- a/src/mame/machine/snescx4.c +++ b/src/mame/machine/snescx4.c @@ -10,13 +10,25 @@ ***************************************************************************/ +#include "driver.h" #include "snescx4.h" + +static CX4 cx4; + +static UINT8 CX4_read(UINT32 addr); +static UINT16 CX4_readw(UINT16 addr); +static UINT32 CX4_readl(UINT16 addr); + +static void CX4_write(running_machine *machine, UINT32 addr, UINT8 data); +static void CX4_writew(running_machine *machine, UINT16 addr, UINT16 data); +//static void CX4_writel(running_machine *machine, UINT16 addr, UINT32 data); + +static void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT16 Z2, UINT8 Color); + #include "cx4data.c" #include "cx4fn.c" -#include "cx4oam.c" -#include "cx4ops.c" -UINT32 CX4_ldr(UINT8 r) +static UINT32 CX4_ldr(UINT8 r) { UINT16 addr = 0x0080 + (r * 3); return (cx4.reg[addr + 0] << 0) @@ -24,7 +36,7 @@ UINT32 CX4_ldr(UINT8 r) | (cx4.reg[addr + 2] << 16); } -void CX4_str(UINT8 r, UINT32 data) +static void CX4_str(UINT8 r, UINT32 data) { UINT16 addr = 0x0080 + (r * 3); cx4.reg[addr + 0] = (data >> 0); @@ -32,7 +44,7 @@ void CX4_str(UINT8 r, UINT32 data) cx4.reg[addr + 2] = (data >> 16); } -void CX4_mul(UINT32 x, UINT32 y, UINT32 *rl, UINT32 *rh) +static void CX4_mul(UINT32 x, UINT32 y, UINT32 *rl, UINT32 *rh) { INT64 rx = x & 0xffffff; INT64 ry = y & 0xffffff; @@ -45,7 +57,7 @@ void CX4_mul(UINT32 x, UINT32 y, UINT32 *rl, UINT32 *rh) *rh = (rx >> 24) & 0xffffff; } -UINT32 CX4_sin(UINT32 rx) +static UINT32 CX4_sin(UINT32 rx) { cx4.r0 = rx & 0x1ff; if(cx4.r0 & 0x100) @@ -66,12 +78,12 @@ UINT32 CX4_sin(UINT32 rx) } } -UINT32 CX4_cos(UINT32 rx) +static UINT32 CX4_cos(UINT32 rx) { return CX4_sin(rx + 0x080); } -void CX4_immediate_reg(UINT32 start) +static void CX4_immediate_reg(UINT32 start) { UINT32 i = 0; cx4.r0 = CX4_ldr(0); @@ -86,7 +98,7 @@ void CX4_immediate_reg(UINT32 start) CX4_str(0, cx4.r0); } -void CX4_transfer_data(running_machine *machine) +static void CX4_transfer_data(running_machine *machine) { UINT32 src; UINT16 dest, count; @@ -102,7 +114,10 @@ void CX4_transfer_data(running_machine *machine) } } -void CX4_write(running_machine *machine, UINT32 addr, UINT8 data) +#include "cx4oam.c" +#include "cx4ops.c" + +static void CX4_write(running_machine *machine, UINT32 addr, UINT8 data) { addr &= 0x1fff; @@ -176,25 +191,29 @@ void CX4_write(running_machine *machine, UINT32 addr, UINT8 data) } } +#ifdef UNUSED_FUNCTION void CX4_writeb(running_machine *machine, UINT16 addr, UINT8 data) { CX4_write(machine, addr, data); } +#endif -void CX4_writew(running_machine *machine, UINT16 addr, UINT16 data) +static void CX4_writew(running_machine *machine, UINT16 addr, UINT16 data) { CX4_write(machine, addr + 0, data >> 0); CX4_write(machine, addr + 1, data >> 8); } +#ifdef UNUSED_FUNCTION void CX4_writel(running_machine *machine, UINT16 addr, UINT32 data) { CX4_write(machine, addr + 0, data >> 0); CX4_write(machine, addr + 1, data >> 8); CX4_write(machine, addr + 2, data >> 16); } +#endif -UINT8 CX4_read(UINT32 addr) +static UINT8 CX4_read(UINT32 addr) { addr &= 0x1fff; @@ -211,23 +230,28 @@ UINT8 CX4_read(UINT32 addr) return 0xff; } +#ifdef UNUSED_FUNCTION UINT8 CX4_readb(UINT16 addr) { return CX4_read(addr); } +#endif -UINT16 CX4_readw(UINT16 addr) +static UINT16 CX4_readw(UINT16 addr) { return CX4_read(addr) | (CX4_read(addr + 1) << 8); } -UINT32 CX4_readl(UINT16 addr) +static UINT32 CX4_readl(UINT16 addr) { return CX4_read(addr) | (CX4_read(addr + 1) << 8) | (CX4_read(addr + 2) << 16); } +#ifdef UNUSED_FUNCTION void CX4_reset() { memset(cx4.ram, 0, 0x0c00); memset(cx4.reg, 0, 0x0100); } +#endif + diff --git a/src/mame/machine/snescx4.h b/src/mame/machine/snescx4.h index b39468ef4fa..4555d5c9e11 100644 --- a/src/mame/machine/snescx4.h +++ b/src/mame/machine/snescx4.h @@ -8,8 +8,6 @@ ***************************************************************************/ -#include "driver.h" - typedef struct { UINT8 ram[0x0c00]; @@ -24,69 +22,3 @@ typedef struct double c4x, c4y, c4z; double c4x2, c4y2, c4z2; } CX4; - -static CX4 cx4; - -UINT32 CX4_ldr(UINT8 r); -void CX4_str(UINT8 r, UINT32 data); -void CX4_mul(UINT32 x, UINT32 y, UINT32 *rl, UINT32 *rh); -UINT32 CX4_sin(UINT32 rx); -UINT32 CX4_cos(UINT32 rx); - -void CX4_transfer_data(running_machine *machine); -void CX4_immediate_reg(UINT32 num); - -void CX4_op00_00(running_machine *machine); -void CX4_op00_03(void); -void CX4_op00_05(running_machine *machine); -void CX4_op00_07(void); -void CX4_op00_08(running_machine *machine); -void CX4_op00_0b(running_machine *machine); -void CX4_op00_0c(running_machine *machine); - -void CX4_op00(running_machine* machine); -void CX4_op01(running_machine* machine); -void CX4_op05(running_machine *machine); -void CX4_op0d(running_machine *machine); -void CX4_op10(void); -void CX4_op13(void); -void CX4_op15(running_machine *machine); -void CX4_op1f(running_machine *machine); -void CX4_op22(void); -void CX4_op25(void); -void CX4_op2d(running_machine *machine); -void CX4_op40(void); -void CX4_op54(void); -void CX4_op5c(void); -void CX4_op5e(void); -void CX4_op60(void); -void CX4_op62(void); -void CX4_op64(void); -void CX4_op66(void); -void CX4_op68(void); -void CX4_op6a(void); -void CX4_op6c(void); -void CX4_op6e(void); -void CX4_op70(void); -void CX4_op72(void); -void CX4_op74(void); -void CX4_op76(void); -void CX4_op78(void); -void CX4_op7a(void); -void CX4_op7c(void); -void CX4_op89(void); - -UINT8 CX4_readb(UINT16 addr); -UINT16 CX4_readw(UINT16 addr); -UINT32 CX4_readl(UINT16 addr); - -void CX4_writeb(running_machine *machine, UINT16 addr, UINT8 data); -void CX4_writew(running_machine *machine, UINT16 addr, UINT16 data); -void CX4_writel(running_machine *machine, UINT16 addr, UINT32 data); - -void CX4_reset(void); - -UINT8 CX4_read(UINT32 addr); -void CX4_write(running_machine *machine, UINT32 addr, UINT8 data); - -void CX4_C4DrawLine(INT32 X1, INT32 Y1, INT16 Z1, INT32 X2, INT32 Y2, INT16 Z2, UINT8 Color); diff --git a/src/mame/machine/snesdsp3.c b/src/mame/machine/snesdsp3.c index 75fe34fb14f..3fb621f1f19 100644 --- a/src/mame/machine/snesdsp3.c +++ b/src/mame/machine/snesdsp3.c @@ -12,59 +12,61 @@ ************************************************************************/ -UINT16 DSP3_DataROM[1024]; +static UINT16 DSP3_DataROM[1024]; -void (*SetDSP3)( void ); -void DSP3_Command( void ); +static void(*SetDSP3)(void); +static void DSP3_Command(void); -UINT16 DSP3_DR; -UINT16 DSP3_SR; -UINT16 DSP3_MemoryIndex; +static UINT16 DSP3_DR; +static UINT16 DSP3_SR; +static UINT16 DSP3_MemoryIndex; -void DSP3_Reset( void ) +static void DSP3_Reset(void) { DSP3_DR = 0x0080; DSP3_SR = 0x0084; SetDSP3 = &DSP3_Command; } -void DSP3_MemorySize( void ) +#ifdef UNUSED_FUNCTION +void DSP3_MemorySize(void) { DSP3_DR = 0x0300; SetDSP3 = &DSP3_Reset; } +#endif -void DSP3_TestMemory( void ) +static void DSP3_TestMemory(void) { DSP3_DR = 0x0000; SetDSP3 = &DSP3_Reset; } -void DSP3_DumpDataROM( void ) +static void DSP3_DumpDataROM(void) { DSP3_DR = DSP3_DataROM[DSP3_MemoryIndex++]; if (DSP3_MemoryIndex == 1024) SetDSP3 = &DSP3_Reset; } -void DSP3_MemoryDump( void ) +static void DSP3_MemoryDump(void) { DSP3_MemoryIndex = 0; SetDSP3 = &DSP3_DumpDataROM; DSP3_DumpDataROM(); } -INT16 DSP3_WinLo; -INT16 DSP3_WinHi; +static INT16 DSP3_WinLo; +static INT16 DSP3_WinHi; -void DSP3_OP06( void ) +static void DSP3_OP06(void) { DSP3_WinLo = (UINT8)(DSP3_DR); DSP3_WinHi = (UINT8)(DSP3_DR >> 8); DSP3_Reset(); } -void DSP3_OP03( void ) +static void DSP3_OP03(void) { INT16 Lo = (UINT8)(DSP3_DR); INT16 Hi = (UINT8)(DSP3_DR >> 8); @@ -73,17 +75,17 @@ void DSP3_OP03( void ) SetDSP3 = &DSP3_Reset; } -INT16 DSP3_AddLo; -INT16 DSP3_AddHi; +static INT16 DSP3_AddLo; +static INT16 DSP3_AddHi; -void DSP3_OP07_B( void ) +static void DSP3_OP07_B(void) { INT16 Ofs = (DSP3_WinLo * DSP3_AddHi << 1) + (DSP3_AddLo << 1); DSP3_DR = Ofs >> 1; SetDSP3 = &DSP3_Reset; } -void DSP3_OP07_A( void ) +static void DSP3_OP07_A(void) { INT16 Lo = (UINT8)(DSP3_DR); INT16 Hi = (UINT8)(DSP3_DR >> 8); @@ -109,7 +111,7 @@ void DSP3_OP07_A( void ) SetDSP3 = &DSP3_OP07_B; } -void DSP3_OP07( void ) +static void DSP3_OP07(void) { UINT32 dataOfs = ((DSP3_DR << 1) + 0x03b2) & 0x03ff; @@ -120,28 +122,28 @@ void DSP3_OP07( void ) DSP3_SR = 0x0080; } -UINT16 DSP3_Codewords; -UINT16 DSP3_Outwords; -UINT16 DSP3_Symbol; -UINT16 DSP3_BitCount; -UINT16 DSP3_Index; -UINT16 DSP3_Codes[512]; -UINT16 DSP3_BitsLeft; -UINT16 DSP3_ReqBits; -UINT16 DSP3_ReqData; -UINT16 DSP3_BitCommand; -UINT8 DSP3_BaseLength; -UINT16 DSP3_BaseCodes; -UINT16 DSP3_BaseCode; -UINT8 DSP3_CodeLengths[8]; -UINT16 DSP3_CodeOffsets[8]; -UINT16 DSP3_LZCode; -UINT8 DSP3_LZLength; - -UINT16 DSP3_X; -UINT16 DSP3_Y; - -void DSP3_Coordinate( void ) +static UINT16 DSP3_Codewords; +static UINT16 DSP3_Outwords; +static UINT16 DSP3_Symbol; +static UINT16 DSP3_BitCount; +static UINT16 DSP3_Index; +static UINT16 DSP3_Codes[512]; +static UINT16 DSP3_BitsLeft; +static UINT16 DSP3_ReqBits; +static UINT16 DSP3_ReqData; +static UINT16 DSP3_BitCommand; +static UINT8 DSP3_BaseLength; +static UINT16 DSP3_BaseCodes; +static UINT16 DSP3_BaseCode; +static UINT8 DSP3_CodeLengths[8]; +static UINT16 DSP3_CodeOffsets[8]; +static UINT16 DSP3_LZCode; +static UINT8 DSP3_LZLength; + +static UINT16 DSP3_X; +static UINT16 DSP3_Y; + +static void DSP3_Coordinate(void) { DSP3_Index++; @@ -178,13 +180,13 @@ void DSP3_Coordinate( void ) } } -UINT8 DSP3_Bitmap[8]; -UINT8 DSP3_Bitplane[8]; -UINT16 DSP3_BMIndex; -UINT16 DSP3_BPIndex; -UINT16 DSP3_Count; +static UINT8 DSP3_Bitmap[8]; +static UINT8 DSP3_Bitplane[8]; +static UINT16 DSP3_BMIndex; +static UINT16 DSP3_BPIndex; +static UINT16 DSP3_Count; -void DSP3_Convert_A( void ) +static void DSP3_Convert_A(void) { if (DSP3_BMIndex < 8) { @@ -221,14 +223,14 @@ void DSP3_Convert_A( void ) } } -void DSP3_Convert( void ) +static void DSP3_Convert(void) { DSP3_Count = DSP3_DR; DSP3_BMIndex = 0; SetDSP3 = &DSP3_Convert_A; } -UINT8 DSP3_GetBits(UINT8 Count) +static UINT8 DSP3_GetBits(UINT8 Count) { if (!DSP3_BitsLeft) { @@ -255,7 +257,7 @@ UINT8 DSP3_GetBits(UINT8 Count) return 1; } -void DSP3_Decode_Data( void ) +static void DSP3_Decode_Data(void) { if (!DSP3_BitCount) { @@ -328,7 +330,7 @@ void DSP3_Decode_Data( void ) DSP3_DR = DSP3_Symbol; } -void DSP3_Decode_Tree( void ) +static void DSP3_Decode_Tree(void) { if (!DSP3_BitCount) { @@ -373,7 +375,7 @@ void DSP3_Decode_Tree( void ) if (DSP3_BitCount) DSP3_Decode_Data(); } -void DSP3_Decode_Symbols( void ) +static void DSP3_Decode_Symbols(void) { DSP3_ReqData = DSP3_DR; DSP3_BitCount += 16; @@ -428,7 +430,7 @@ void DSP3_Decode_Symbols( void ) if (DSP3_BitCount) DSP3_Decode_Tree(); } -void DSP3_Decode_A( void ) +static void DSP3_Decode_A(void) { DSP3_Outwords = DSP3_DR; SetDSP3 = &DSP3_Decode_Symbols; @@ -440,7 +442,7 @@ void DSP3_Decode_A( void ) DSP3_SR = 0xC0; } -void DSP3_Decode( void ) +static void DSP3_Decode(void) { DSP3_Codewords = DSP3_DR; SetDSP3 = &DSP3_Decode_A; @@ -450,31 +452,31 @@ void DSP3_Decode( void ) // Opcodes 1E/3E bit-perfect to 'dsp3-intro' log // src: adapted from SD Gundam X/G-Next -INT16 op3e_x; -INT16 op3e_y; +static INT16 op3e_x; +static INT16 op3e_y; -INT16 op1e_terrain[0x2000]; -INT16 op1e_cost[0x2000]; -INT16 op1e_weight[0x2000]; +static INT16 op1e_terrain[0x2000]; +static INT16 op1e_cost[0x2000]; +static INT16 op1e_weight[0x2000]; -INT16 op1e_cell; -INT16 op1e_turn; -INT16 op1e_search; +static INT16 op1e_cell; +static INT16 op1e_turn; +static INT16 op1e_search; -INT16 op1e_x; -INT16 op1e_y; +static INT16 op1e_x; +static INT16 op1e_y; -INT16 op1e_min_radius; -INT16 op1e_max_radius; +static INT16 op1e_min_radius; +static INT16 op1e_max_radius; -INT16 op1e_max_search_radius; -INT16 op1e_max_path_radius; +static INT16 op1e_max_search_radius; +static INT16 op1e_max_path_radius; -INT16 op1e_lcv_radius; -INT16 op1e_lcv_steps; -INT16 op1e_lcv_turns; +static INT16 op1e_lcv_radius; +static INT16 op1e_lcv_steps; +static INT16 op1e_lcv_turns; -void DSP3_OP3E( void ) +static void DSP3_OP3E(void) { op3e_x = (UINT8)(DSP3_DR & 0x00ff); op3e_y = (UINT8)((DSP3_DR & 0xff00)>>8); @@ -489,23 +491,23 @@ void DSP3_OP3E( void ) op1e_max_path_radius = 0; } -void DSP3_OP1E_A( void ); -void DSP3_OP1E_A1( void ); -void DSP3_OP1E_A2( void ); -void DSP3_OP1E_A3( void ); +static void DSP3_OP1E_A(void); +static void DSP3_OP1E_A1(void); +static void DSP3_OP1E_A2(void); +static void DSP3_OP1E_A3(void); -void DSP3_OP1E_B( void ); -void DSP3_OP1E_B1( void ); -void DSP3_OP1E_B2( void ); +static void DSP3_OP1E_B(void); +static void DSP3_OP1E_B1(void); +static void DSP3_OP1E_B2(void); -void DSP3_OP1E_C( void ); -void DSP3_OP1E_C1( void ); -void DSP3_OP1E_C2( void ); +static void DSP3_OP1E_C(void); +static void DSP3_OP1E_C1(void); +static void DSP3_OP1E_C2(void); -void DSP3_OP1E_D( INT16, INT16 *, INT16 * ); -void DSP3_OP1E_D1( INT16 move, INT16 *lo, INT16 *hi ); +static void DSP3_OP1E_D( INT16, INT16 *, INT16 * ); +static void DSP3_OP1E_D1( INT16 move, INT16 *lo, INT16 *hi ); -void DSP3_OP1E( void ) +static void DSP3_OP1E(void) { int lcv; @@ -536,7 +538,7 @@ void DSP3_OP1E( void ) DSP3_OP1E_A(); } -void DSP3_OP1E_A( void ) +static void DSP3_OP1E_A(void) { int lcv; @@ -582,13 +584,13 @@ void DSP3_OP1E_A( void ) SetDSP3 = &DSP3_OP1E_A1; } -void DSP3_OP1E_A1( void ) +static void DSP3_OP1E_A1(void) { DSP3_SR = 0x0084; SetDSP3 = &DSP3_OP1E_A2; } -void DSP3_OP1E_A2( void ) +static void DSP3_OP1E_A2(void) { op1e_terrain[ op1e_cell ] = (UINT8)(DSP3_DR & 0x00ff); @@ -596,7 +598,7 @@ void DSP3_OP1E_A2( void ) SetDSP3 = &DSP3_OP1E_A3; } -void DSP3_OP1E_A3( void ) +static void DSP3_OP1E_A3(void) { op1e_cost[ op1e_cell ] = (UINT8)(DSP3_DR & 0x00ff); @@ -619,7 +621,7 @@ void DSP3_OP1E_A3( void ) } -void DSP3_OP1E_B( void ) +static void DSP3_OP1E_B(void) { op1e_x = op3e_x; op1e_y = op3e_y; @@ -633,7 +635,7 @@ void DSP3_OP1E_B( void ) } -void DSP3_OP1E_B1( void ) +static void DSP3_OP1E_B1(void) { while( op1e_lcv_radius < op1e_max_radius ) { op1e_y--; @@ -673,7 +675,7 @@ void DSP3_OP1E_B1( void ) } -void DSP3_OP1E_B2( void ) +static void DSP3_OP1E_B2(void) { INT16 cell; INT16 path; @@ -713,7 +715,7 @@ void DSP3_OP1E_B2( void ) } -void DSP3_OP1E_C( void ) +static void DSP3_OP1E_C(void) { int lcv; @@ -745,7 +747,7 @@ void DSP3_OP1E_C( void ) } -void DSP3_OP1E_C1( void ) +static void DSP3_OP1E_C1(void) { int lcv; @@ -792,7 +794,7 @@ void DSP3_OP1E_C1( void ) } -void DSP3_OP1E_C2( void ) +static void DSP3_OP1E_C2(void) { DSP3_DR = op1e_weight[ op1e_cell ]; @@ -804,7 +806,7 @@ void DSP3_OP1E_C2( void ) } -void DSP3_OP1E_D( INT16 move, INT16 *lo, INT16 *hi ) +static void DSP3_OP1E_D( INT16 move, INT16 *lo, INT16 *hi ) { UINT32 dataOfs = ((move << 1) + 0x03b2) & 0x03ff; INT16 Lo; @@ -838,7 +840,7 @@ void DSP3_OP1E_D( INT16 move, INT16 *lo, INT16 *hi ) } -void DSP3_OP1E_D1( INT16 move, INT16 *lo, INT16 *hi ) +static void DSP3_OP1E_D1( INT16 move, INT16 *lo, INT16 *hi ) { //UINT32 dataOfs = ((move << 1) + 0x03b2) & 0x03ff; INT16 Lo; @@ -871,7 +873,7 @@ void DSP3_OP1E_D1( INT16 move, INT16 *lo, INT16 *hi ) } -void DSP3_OP10( void ) +static void DSP3_OP10(void) { if( DSP3_DR == 0xffff ) { DSP3_Reset(); @@ -881,17 +883,17 @@ void DSP3_OP10( void ) } } - -void DSP3_OP0C_A( void ) +#ifdef UNUSED_FUNCTION +static void DSP3_OP0C_A(void) { // absorb 2 bytes DSP3_DR = 0; SetDSP3 = &DSP3_Reset; } +#endif - -void DSP3_OP0C( void ) +static void DSP3_OP0C(void) { // absorb 2 bytes @@ -901,7 +903,7 @@ void DSP3_OP0C( void ) } -void DSP3_OP1C_C( void ) +static void DSP3_OP1C_C(void) { // return 2 bytes DSP3_DR = 0; @@ -909,7 +911,7 @@ void DSP3_OP1C_C( void ) } -void DSP3_OP1C_B( void ) +static void DSP3_OP1C_B(void) { // absorb 2 bytes @@ -919,7 +921,7 @@ void DSP3_OP1C_B( void ) } -void DSP3_OP1C_A( void ) +static void DSP3_OP1C_A(void) { // absorb 2 bytes @@ -927,7 +929,7 @@ void DSP3_OP1C_A( void ) } -void DSP3_OP1C( void ) +static void DSP3_OP1C(void) { // absorb 2 bytes @@ -935,7 +937,7 @@ void DSP3_OP1C( void ) } -void DSP3_Command( void ) +static void DSP3_Command(void) { if (DSP3_DR < 0x40) { @@ -963,7 +965,7 @@ void DSP3_Command( void ) } -void DSP3_write( UINT16 dsp3_address, UINT8 dsp3_byte ) +static void DSP3_write( UINT16 dsp3_address, UINT8 dsp3_byte ) { if (dsp3_address < 0xC000) { @@ -987,7 +989,7 @@ void DSP3_write( UINT16 dsp3_address, UINT8 dsp3_byte ) } } -UINT8 DSP3_read( UINT16 dsp3_address ) +static UINT8 DSP3_read( UINT16 dsp3_address ) { UINT8 value; if (dsp3_address < 0xC000) @@ -1019,7 +1021,7 @@ UINT8 DSP3_read( UINT16 dsp3_address ) return value; } -void InitDSP3( running_machine *machine ) +static void InitDSP3( running_machine *machine ) { UINT32 i; UINT8 *dspin = memory_region(machine, "addons"); diff --git a/src/mame/machine/snesdsp4.c b/src/mame/machine/snesdsp4.c index 7b9635ad76d..20a16cc5afc 100644 --- a/src/mame/machine/snesdsp4.c +++ b/src/mame/machine/snesdsp4.c @@ -27,8 +27,8 @@ Fixed-point math reminder: #include "snesdsp4.h" -struct DSP4_t DSP4; -struct DSP4_vars_t DSP4_vars; +static struct DSP4_t DSP4; +static struct DSP4_vars_t DSP4_vars; INLINE UINT16 READ_WORD(UINT8 *addr) { @@ -142,7 +142,7 @@ static const UINT16 div_lut[64] = { 0x0000, 0x8000, 0x4000, 0x2aaa, 0x2000, 0x19 0x0333, 0x031f, 0x030c, 0x02fa, 0x02e8, 0x02d8, 0x02c8, 0x02b9, 0x02aa, 0x029c, 0x028f, 0x0282, 0x0276, 0x026a, 0x025e, 0x0253, 0x0249, 0x023e, 0x0234, 0x022b, 0x0222, 0x0219, 0x0210, 0x0208, }; -INT16 DSP4_Inverse(INT16 value) +static INT16 DSP4_Inverse(INT16 value) { // saturate bounds if (value < 0) @@ -160,12 +160,12 @@ INT16 DSP4_Inverse(INT16 value) ////////////////////////////////////////////////////////////// // Prototype -void DSP4_OP0B(UINT8 *draw, INT16 sp_x, INT16 sp_y, INT16 sp_attr, UINT8 size, UINT8 stop); +static void DSP4_OP0B(UINT8 *draw, INT16 sp_x, INT16 sp_y, INT16 sp_attr, UINT8 size, UINT8 stop); ////////////////////////////////////////////////////////////// // OP00 -void DSP4_Multiply(INT16 Multiplicand, INT16 Multiplier, INT32 *Product) +static void DSP4_Multiply(INT16 Multiplicand, INT16 Multiplier, INT32 *Product) { *Product = (Multiplicand * Multiplier << 1) >> 1; } @@ -173,7 +173,7 @@ void DSP4_Multiply(INT16 Multiplicand, INT16 Multiplier, INT32 *Product) ////////////////////////////////////////////////////////////// -void DSP4_OP01( void ) +static void DSP4_OP01( void ) { DSP4.waiting4command = 0; @@ -388,7 +388,7 @@ void DSP4_OP01( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP03( void ) +static void DSP4_OP03( void ) { DSP4_vars.OAM_RowMax = 33; memset(DSP4_vars.OAM_Row, 0, 64); @@ -398,7 +398,7 @@ void DSP4_OP03( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP05( void ) +static void DSP4_OP05( void ) { DSP4_vars.OAM_index = 0; DSP4_vars.OAM_bits = 0; @@ -409,7 +409,7 @@ void DSP4_OP05( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP06( void ) +static void DSP4_OP06( void ) { DSP4_CLEAR_OUT(); DSP4_WRITE_16_WORD(DSP4_vars.OAM_attr); @@ -418,7 +418,7 @@ void DSP4_OP06( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP07( void ) +static void DSP4_OP07( void ) { DSP4.waiting4command = 0; @@ -587,7 +587,7 @@ void DSP4_OP07( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP08( void ) +static void DSP4_OP08( void ) { INT16 win_left, win_right; INT16 view_x[2], view_y[2]; @@ -918,7 +918,7 @@ void DSP4_OP08( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP09( void ) +static void DSP4_OP09( void ) { DSP4.waiting4command = 0; @@ -1181,10 +1181,10 @@ void DSP4_OP09( void ) ////////////////////////////////////////////////////////////// -const UINT16 OP0A_Values[16] = { 0x0000, 0x0030, 0x0060, 0x0090, 0x00c0, 0x00f0, 0x0120, 0x0150, 0xfe80, +static const UINT16 OP0A_Values[16] = { 0x0000, 0x0030, 0x0060, 0x0090, 0x00c0, 0x00f0, 0x0120, 0x0150, 0xfe80, 0xfeb0, 0xfee0, 0xff10, 0xff40, 0xff70, 0xffa0, 0xffd0 }; -void DSP4_OP0A(INT16 n2, INT16 *o1, INT16 *o2, INT16 *o3, INT16 *o4) +static void DSP4_OP0A(INT16 n2, INT16 *o1, INT16 *o2, INT16 *o3, INT16 *o4) { *o4 = OP0A_Values[(n2 & 0x000f)]; *o3 = OP0A_Values[(n2 & 0x00f0) >> 4]; @@ -1194,7 +1194,7 @@ void DSP4_OP0A(INT16 n2, INT16 *o1, INT16 *o2, INT16 *o3, INT16 *o4) ////////////////////////////////////////////////////////////// -void DSP4_OP0B(UINT8 *draw, INT16 sp_x, INT16 sp_y, INT16 sp_attr, UINT8 size, UINT8 stop) +static void DSP4_OP0B(UINT8 *draw, INT16 sp_x, INT16 sp_y, INT16 sp_attr, UINT8 size, UINT8 stop) { INT16 Row1, Row2; @@ -1279,7 +1279,7 @@ void DSP4_OP0B(UINT8 *draw, INT16 sp_x, INT16 sp_y, INT16 sp_attr, UINT8 size, U ////////////////////////////////////////////////////////////// -void DSP4_OP0D( void ) +static void DSP4_OP0D( void ) { DSP4.waiting4command = 0; @@ -1467,7 +1467,7 @@ void DSP4_OP0D( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP0E( void ) +static void DSP4_OP0E( void ) { DSP4_vars.OAM_RowMax = 16; memset(DSP4_vars.OAM_Row, 0, 64); @@ -1476,7 +1476,7 @@ void DSP4_OP0E( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP0F( void ) +static void DSP4_OP0F( void ) { DSP4.waiting4command = 0; @@ -1727,7 +1727,7 @@ void DSP4_OP0F( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP10( void ) +static void DSP4_OP10( void ) { DSP4.waiting4command = 0; @@ -1935,7 +1935,7 @@ void DSP4_OP10( void ) ////////////////////////////////////////////////////////////// -void DSP4_OP11(INT16 A, INT16 B, INT16 C, INT16 D, INT16 *M) +static void DSP4_OP11(INT16 A, INT16 B, INT16 C, INT16 D, INT16 *M) { // 0x155 = 341 = Horizontal Width of the Screen *M = ((A * 0x0155 >> 2) & 0xf000) | @@ -1952,13 +1952,13 @@ void DSP4_OP11(INT16 A, INT16 B, INT16 C, INT16 D, INT16 *M) //Processing Code ///////////////////////////////////////////////////////////// -void InitDSP4( void ) +static void InitDSP4( void ) { memset(&DSP4, 0, sizeof(DSP4)); DSP4.waiting4command = 1; } -void DSP4_write( UINT8 dsp4_byte ) +static void DSP4_write( UINT8 dsp4_byte ) { // clear pending read if (DSP4.out_index < DSP4.out_count) @@ -2159,7 +2159,7 @@ void DSP4_write( UINT8 dsp4_byte ) } } -UINT8 DSP4_read( void ) +static UINT8 DSP4_read( void ) { UINT8 value; diff --git a/src/mame/machine/snesdsp4.h b/src/mame/machine/snesdsp4.h index 1bb08d7e1b2..c37d37a3a02 100644 --- a/src/mame/machine/snesdsp4.h +++ b/src/mame/machine/snesdsp4.h @@ -18,8 +18,6 @@ struct DSP4_t UINT8 output[512]; }; -extern struct DSP4_t DSP4; - struct DSP4_vars_t { // op control @@ -99,6 +97,4 @@ struct DSP4_vars_t INT16 OAM_Row[32]; // current number of tiles per row }; -extern struct DSP4_vars_t DSP4_vars; - #endif diff --git a/src/mame/machine/snesst10.c b/src/mame/machine/snesst10.c index bb500cfac13..173e76f1648 100644 --- a/src/mame/machine/snesst10.c +++ b/src/mame/machine/snesst10.c @@ -486,12 +486,12 @@ static void st010_op_08( void ) { // init, reset & handlers -UINT8 st010_read( UINT16 address ) +static UINT8 st010_read( UINT16 address ) { return st010_readb(address); } -void st010_write( UINT16 address, UINT8 data ) +static void st010_write( UINT16 address, UINT8 data ) { st010_writeb(address, data); @@ -514,12 +514,12 @@ void st010_write( UINT16 address, UINT8 data ) } -void st010_init( running_machine* machine ) +static void st010_init( running_machine* machine ) { snes_st010.ram = (UINT8*)auto_alloc_array(machine, UINT8, 0x1000); } -void st010_reset( void ) +static void st010_reset( void ) { snes_st010.x1 = 0; snes_st010.y1 = 0; diff --git a/src/mame/machine/system16.c b/src/mame/machine/system16.c index e3c1cb9d1bc..c4de5e47a69 100644 --- a/src/mame/machine/system16.c +++ b/src/mame/machine/system16.c @@ -2,12 +2,6 @@ #include "system16.h" #include "sound/upd7759.h" -UINT16 *sys16_workingram; -UINT16 *sys16_workingram2; -UINT16 *sys16_extraram; -UINT16 *sys16_extraram2; -UINT16 *sys16_extraram3; - static void patch_codeX( UINT16 *mem, offs_t offset, int data ) { int aligned_offset = offset&0xfffffe; diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index e3b099a12f2..37c8b624a8e 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -228,6 +228,7 @@ PALETTE_INIT( dkong2b) free(rgb); } +#ifdef UNUSED_FUNCTION PALETTE_INIT( dkong4b ) { dkong_state *state = (dkong_state *)machine->driver_data; @@ -265,6 +266,7 @@ PALETTE_INIT( dkong4b ) /* color_prom now points to the beginning of the character color codes */ state->color_codes = color_prom; /* we'll need it later */ } +#endif PALETTE_INIT( radarscp ) { diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c index db3327e1266..200762ab807 100644 --- a/src/mame/video/galaxold.c +++ b/src/mame/video/galaxold.c @@ -93,7 +93,7 @@ static UINT8 timer_adjusted; static void (*draw_stars)(running_machine *machine, bitmap_t *, const rectangle *); /* function to call to draw the star layer */ static void noop_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); void galaxold_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); -static void scramble_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); +static void scrambold_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); static void rescue_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); static void mariner_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); static void start_stars_blink_timer(double ra, double rb, double c); @@ -103,7 +103,7 @@ static void start_stars_scroll_timer(running_machine *machine); static UINT8 darkplnt_bullet_color; static void (*draw_bullets)(running_machine *,bitmap_t *,const rectangle *,int,int,int); /* function to call to draw a bullet */ static void galaxold_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y); -static void scramble_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y); +static void scrambold_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y); static void darkplnt_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y); static void dambustr_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y); @@ -112,8 +112,8 @@ static UINT8 background_enable; static UINT8 background_red, background_green, background_blue; static void (*draw_background)(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); /* function to call to draw the background */ static void galaxold_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); -static void scramble_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); -static void turtles_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); +static void scrambold_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); +static void ad2083_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); static void mariner_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); static void stratgyx_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); static void minefld_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect); @@ -575,11 +575,11 @@ VIDEO_START( scrambold ) */ tilemap_set_scrolldx(bg_tilemap, 0, 0); - draw_stars = scramble_draw_stars; + draw_stars = scrambold_draw_stars; - draw_bullets = scramble_draw_bullets; + draw_bullets = scrambold_draw_bullets; - draw_background = scramble_draw_background; + draw_background = scrambold_draw_background; } VIDEO_START( darkplnt ) @@ -628,7 +628,7 @@ VIDEO_START( mariner ) draw_stars = mariner_draw_stars; - draw_bullets = scramble_draw_bullets; + draw_bullets = scrambold_draw_bullets; draw_background = mariner_draw_background; @@ -681,6 +681,7 @@ VIDEO_START( pisces ) modify_spritecode = pisces_modify_spritecode; } +#ifdef UNUSED_FUNCTION static void theend_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y) { int i; @@ -702,6 +703,7 @@ VIDEO_START( theend ) draw_bullets = theend_draw_bullets; } +#endif static void mooncrst_modify_spritecode(UINT8 *spriteram,int *code,int *flipx,int *flipy,int offs) { @@ -826,9 +828,9 @@ VIDEO_START( ad2083 ) mooncrst_gfxextend = 0; - draw_bullets = scramble_draw_bullets; + draw_bullets = scrambold_draw_bullets; - draw_background = turtles_draw_background; + draw_background = ad2083_draw_background; background_enable = 0; background_blue = 0; background_red = 0; @@ -1022,6 +1024,7 @@ WRITE8_HANDLER( galaxold_flip_screen_y_w ) } +#ifdef UNUSED_FUNCTION WRITE8_HANDLER( gteikob2_flip_screen_x_w ) { galaxold_flip_screen_x_w(space, offset, ~data); @@ -1031,6 +1034,7 @@ WRITE8_HANDLER( gteikob2_flip_screen_y_w ) { galaxold_flip_screen_y_w(space, offset, ~data); } +#endif WRITE8_HANDLER( hotshock_flip_screen_w ) @@ -1251,7 +1255,7 @@ static void galaxold_draw_bullets(running_machine *machine, bitmap_t *bitmap, co } } -static void scramble_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y) +static void scrambold_draw_bullets(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int offs, int x, int y) { if (flipscreen_x) x++; @@ -1308,7 +1312,7 @@ static void galaxold_draw_background(running_machine *machine, bitmap_t *bitmap, bitmap_fill(bitmap,cliprect,0); } -static void scramble_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) +static void scrambold_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { if (background_enable) bitmap_fill(bitmap,cliprect,BACKGROUND_COLOR_BASE); @@ -1316,7 +1320,7 @@ static void scramble_draw_background(running_machine *machine, bitmap_t *bitmap, bitmap_fill(bitmap,cliprect,0); } -static void turtles_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) +static void ad2083_draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { int color = (background_blue << 2) | (background_green << 1) | background_red; @@ -1600,7 +1604,7 @@ void galaxold_draw_stars(running_machine *machine, bitmap_t *bitmap, const recta } } -static void scramble_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) +static void scrambold_draw_stars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { int offs; diff --git a/src/mame/video/galpani2.c b/src/mame/video/galpani2.c index 02d0c9e26a8..6293b47fd3a 100644 --- a/src/mame/video/galpani2.c +++ b/src/mame/video/galpani2.c @@ -25,12 +25,13 @@ UINT16 *galpani2_bg8_0, *galpani2_bg8_1; UINT16 *galpani2_palette_0, *galpani2_palette_1; -UINT16 *galpani2_bg8_regs_0, *galpani2_bg8_regs_1; +//UINT16 *galpani2_bg8_regs_0, *galpani2_bg8_regs_1; UINT16 *galpani2_bg8_0_scrollx, *galpani2_bg8_1_scrollx; UINT16 *galpani2_bg8_0_scrolly, *galpani2_bg8_1_scrolly; static bitmap_t *galpani2_bg8_bitmap_0, *galpani2_bg8_bitmap_1; +#ifdef UNUSED_DEFINITION #define galpani2_BG8_REGS_R( _n_ ) \ READ16_HANDLER( galpani2_bg8_regs_##_n_##_r ) \ { \ @@ -55,6 +56,7 @@ WRITE16_HANDLER( galpani2_bg8_regs_##_n_##_w ) \ { \ COMBINE_DATA(&galpani2_bg8_regs_##_n_[offset]); \ } +#endif #define galpani2_BG8_W( _n_ ) \ WRITE16_HANDLER( galpani2_bg8_##_n_##_w ) \ @@ -74,11 +76,13 @@ WRITE16_HANDLER( galpani2_palette_##_n_##_w ) \ palette_set_color_rgb( space->machine, offset + 0x4000 + _n_ * 0x100, pal5bit(newword >> 5), pal5bit(newword >> 10), pal5bit(newword >> 0) ); \ } +#ifdef UNUSED_FUNCTION galpani2_BG8_REGS_R( 0 ) galpani2_BG8_REGS_R( 1 ) galpani2_BG8_REGS_W( 0 ) galpani2_BG8_REGS_W( 1 ) +#endif galpani2_BG8_W( 0 ) galpani2_BG8_W( 1 ) diff --git a/src/mame/video/lucky74.c b/src/mame/video/lucky74.c index d45a843fdd6..64810582aac 100644 --- a/src/mame/video/lucky74.c +++ b/src/mame/video/lucky74.c @@ -97,31 +97,31 @@ #include "video/resnet.h" -UINT8 *fg_videoram, *fg_colorram, *bg_videoram, *bg_colorram; +UINT8 *lucky74_fg_videoram, *lucky74_fg_colorram, *lucky74_bg_videoram, *lucky74_bg_colorram; static tilemap *fg_tilemap, *bg_tilemap; -WRITE8_HANDLER( fg_videoram_w ) +WRITE8_HANDLER( lucky74_fg_videoram_w ) { - fg_videoram[offset] = data; + lucky74_fg_videoram[offset] = data; tilemap_mark_tile_dirty(fg_tilemap, offset); } -WRITE8_HANDLER( fg_colorram_w ) +WRITE8_HANDLER( lucky74_fg_colorram_w ) { - fg_colorram[offset] = data; + lucky74_fg_colorram[offset] = data; tilemap_mark_tile_dirty(fg_tilemap, offset); } -WRITE8_HANDLER( bg_videoram_w ) +WRITE8_HANDLER( lucky74_bg_videoram_w ) { - bg_videoram[offset] = data; + lucky74_bg_videoram[offset] = data; tilemap_mark_tile_dirty(bg_tilemap, offset); } -WRITE8_HANDLER( bg_colorram_w ) +WRITE8_HANDLER( lucky74_bg_colorram_w ) { - bg_colorram[offset] = data; + lucky74_bg_colorram[offset] = data; tilemap_mark_tile_dirty(bg_tilemap, offset); } @@ -206,8 +206,8 @@ static TILE_GET_INFO( get_fg_tile_info ) xxxx ---- tiles page offset. */ int bank = 0; - int attr = fg_colorram[tile_index]; - int code = fg_videoram[tile_index] + ((attr & 0xf0) << 4); + int attr = lucky74_fg_colorram[tile_index]; + int code = lucky74_fg_videoram[tile_index] + ((attr & 0xf0) << 4); int color = (attr & 0x0f); SET_TILE_INFO(bank, code, color, 0); @@ -221,8 +221,8 @@ static TILE_GET_INFO( get_bg_tile_info ) xxxx ---- tiles page offset. */ int bank = 1; - int attr = bg_colorram[tile_index]; - int code = bg_videoram[tile_index] + ((attr & 0xf0) << 4); + int attr = lucky74_bg_colorram[tile_index]; + int code = lucky74_bg_videoram[tile_index] + ((attr & 0xf0) << 4); int color = (attr & 0x0f); SET_TILE_INFO(bank, code, color, 0); diff --git a/src/mame/video/mcr3.c b/src/mame/video/mcr3.c index 5713d2775a0..ce9ea1f1d9e 100644 --- a/src/mame/video/mcr3.c +++ b/src/mame/video/mcr3.c @@ -42,6 +42,7 @@ static tilemap *alpha_tilemap; * *************************************/ +#ifdef UNUSED_FUNCTION static TILE_GET_INFO( get_bg_tile_info ) { int data = videoram[tile_index * 2] | (videoram[tile_index * 2 + 1] << 8); @@ -49,6 +50,7 @@ static TILE_GET_INFO( get_bg_tile_info ) int color = (data >> 12) & 3; SET_TILE_INFO(0, code, color, TILE_FLIPYX((data >> 10) & 3)); } +#endif static TILE_GET_INFO( mcrmono_get_bg_tile_info ) @@ -105,11 +107,13 @@ PALETTE_INIT( spyhunt ) * *************************************/ +#ifdef UNUSED_FUNCTION VIDEO_START( mcr3 ) { /* initialize the background tilemap */ bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 16,16, 32,30); } +#endif VIDEO_START( mcrmono ) diff --git a/src/mame/video/plygonet.c b/src/mame/video/plygonet.c index d4f5d7d0714..176caffcc16 100644 --- a/src/mame/video/plygonet.c +++ b/src/mame/video/plygonet.c @@ -78,7 +78,7 @@ static TILEMAP_MAPPER( plygonet_scan ) return row * num_cols + (col^1); } -TILEMAP_MAPPER( plygonet_scan_cols ) +static TILEMAP_MAPPER( plygonet_scan_cols ) { return col * num_rows + (row^1); } diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c index 8dcc40807f6..be446d0e95d 100644 --- a/src/mame/video/system16.c +++ b/src/mame/video/system16.c @@ -145,8 +145,6 @@ int sys16_sh_shadowpal; int sys16_MaxShadowColors; /* video driver constants (potentially different for each game) */ -int sys16_gr_bitmap_width; - const int *sys16_obj_bank; int sys16_sprxoffset; int sys16_bgxoffset; @@ -185,15 +183,6 @@ UINT16 *sys18_splittab_bg_y; UINT16 *sys18_splittab_fg_x; UINT16 *sys18_splittab_fg_y; -UINT16 *sys16_gr_ver; -UINT16 *sys16_gr_hor; -UINT16 *sys16_gr_pal; -UINT16 *sys16_gr_flip; -int sys16_gr_palette; -int sys16_gr_palette_default; -UINT8 sys16_gr_colorflip[2][4]; -UINT16 *sys16_gr_second_road; - static tilemap *background, *foreground, *text_layer; static tilemap *background2, *foreground2; static int old_bg_page[4],old_fg_page[4], old_tile_bank1, old_tile_bank0; diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c index 751c0f9b1b5..c30e58eecb1 100644 --- a/src/mame/video/taito_f2.c +++ b/src/mame/video/taito_f2.c @@ -43,7 +43,6 @@ size_t f2_spriteext_size; static UINT16 spritebank[8]; //static UINT16 spritebank_eof[8]; static UINT16 spritebank_buffered[8]; -static UINT16 koshien_spritebank; static INT32 sprites_disabled,sprites_active_area,sprites_master_scrollx,sprites_master_scrolly; /* remember flip status over frames because driftout can fail to set it */ @@ -134,7 +133,6 @@ static void taitof2_core_vh_start (running_machine *machine, int sprite_type,int state_save_register_global(machine, f2_hide_pixels); state_save_register_global(machine, f2_sprite_type); state_save_register_global_array(machine, spritebank); - state_save_register_global(machine, koshien_spritebank); state_save_register_global(machine, sprites_disabled); state_save_register_global(machine, sprites_active_area); state_save_register_global_pointer(machine, spriteram_delayed, spriteram_size/2); @@ -347,15 +345,8 @@ WRITE16_HANDLER( taitof2_spritebank_w ) } -READ16_HANDLER( koshien_spritebank_r ) -{ - return koshien_spritebank; -} - WRITE16_HANDLER( koshien_spritebank_w ) { - koshien_spritebank = data; - spritebank_buffered[0]=0x0000; /* never changes */ spritebank_buffered[1]=0x0400; |