diff options
author | 2008-02-18 01:30:05 +0000 | |
---|---|---|
committer | 2008-02-18 01:30:05 +0000 | |
commit | 3d5cdeaf8c8f5ab43c847f9dd2092af189f15459 (patch) | |
tree | 56da4315abff0cf2a33929fe46697bf3b16a8242 | |
parent | c49a02dfc91f83cd8e082b5e81372d7dcaee9d77 (diff) |
From Atari Ace:
Hi mamedev,
Here's my periodic batch of code cleanups. The usual batch of adding static/const plus some include fixes. In addition, I reverted some of the changes to build.mak from u1 which made some MSVC builds fail, and adjusted/optimized an m10.c gfx_layout. I also added some missing cores to cpuintrf.c, sndintrf.c and added some missing #if's to 5220intf.c.
~aa
46 files changed, 78 insertions, 66 deletions
diff --git a/src/build/build.mak b/src/build/build.mak index b2186239ccf..d7c1a001a09 100644 --- a/src/build/build.mak +++ b/src/build/build.mak @@ -44,7 +44,7 @@ FILE2STROBJS = \ $(FILE2STR): $(FILE2STROBJS) $(LIBOCORE) @echo Linking $@... - $(LD) $(LDFLAGS) $^ -o $@ + $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ @@ -57,7 +57,7 @@ PNG2BDCOBJS = \ $(PNG2BDC): $(PNG2BDCOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) @echo Linking $@... - $(LD) $(LDFLAGS) $^ $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(LIBS) -o $@ + $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ @@ -70,6 +70,6 @@ VERINFOOBJS = \ $(VERINFO): $(VERINFOOBJS) $(LIBOCORE) @echo Linking $@... - $(LD) $(LDFLAGS) $^ -o $@ + $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ endif diff --git a/src/emu/cpu/alph8201/alph8201.h b/src/emu/cpu/alph8201/alph8201.h index 9b99e8eb86b..b6e783bde55 100644 --- a/src/emu/cpu/alph8201/alph8201.h +++ b/src/emu/cpu/alph8201/alph8201.h @@ -38,8 +38,8 @@ enum { ALPHA8201_R4,ALPHA8201_R5,ALPHA8201_R6,ALPHA8201_R7 }; -extern void ALPHA8201_get_info(UINT32 state, cpuinfo *info); -extern void ALPHA8301_get_info(UINT32 state, cpuinfo *info); +extern void alpha8201_get_info(UINT32 state, cpuinfo *info); +extern void alpha8301_get_info(UINT32 state, cpuinfo *info); /* * Read a UINT8 from given memory location diff --git a/src/emu/cpu/ssp1610/ssp1610.h b/src/emu/cpu/ssp1610/ssp1610.h index eb164423a6b..b8e24f6dadd 100644 --- a/src/emu/cpu/ssp1610/ssp1610.h +++ b/src/emu/cpu/ssp1610/ssp1610.h @@ -6,7 +6,7 @@ /* Functions */ #if (HAS_SSP1610) -void e116t_get_info(UINT32 state, cpuinfo *info); +void ssp1610_get_info(UINT32 state, cpuinfo *info); #endif #ifdef ENABLE_DEBUGGER diff --git a/src/emu/cpuexec.h b/src/emu/cpuexec.h index 344aa315afd..142df166c88 100644 --- a/src/emu/cpuexec.h +++ b/src/emu/cpuexec.h @@ -121,6 +121,7 @@ enum _cpu_type CPU_TMS99100, CPU_TMS99105A, CPU_TMS99110A, + CPU_TMS99000, CPU_Z8000, CPU_TMS32010, CPU_TMS32025, diff --git a/src/emu/cpuintrf.c b/src/emu/cpuintrf.c index 8eb2bd07bed..b4555203d97 100644 --- a/src/emu/cpuintrf.c +++ b/src/emu/cpuintrf.c @@ -93,6 +93,7 @@ void tms9989_get_info(UINT32 state, cpuinfo *info); void tms9995_get_info(UINT32 state, cpuinfo *info); void tms99105a_get_info(UINT32 state, cpuinfo *info); void tms99110a_get_info(UINT32 state, cpuinfo *info); +void tms99000_get_info(UINT32 state, cpuinfo *info); void z8000_get_info(UINT32 state, cpuinfo *info); void tms32010_get_info(UINT32 state, cpuinfo *info); void tms32025_get_info(UINT32 state, cpuinfo *info); @@ -491,6 +492,9 @@ static const struct #if (HAS_TMS99110A) { CPU_TMS99110A, tms99110a_get_info }, #endif +#if (HAS_TMS99000) + { CPU_TMS99000, tms99000_get_info }, +#endif #if (HAS_Z8000) { CPU_Z8000, z8000_get_info }, #endif diff --git a/src/emu/sndintrf.c b/src/emu/sndintrf.c index 616a52555e4..4983ff1087a 100644 --- a/src/emu/sndintrf.c +++ b/src/emu/sndintrf.c @@ -316,6 +316,9 @@ static const struct #if (HAS_M58817) { SOUND_M58817, m58817_get_info }, #endif +#if (HAS_TMC0285) + { SOUND_TMC0285, tmc0285_get_info }, +#endif #if (HAS_TMS5200) { SOUND_TMS5200, tms5200_get_info }, #endif diff --git a/src/emu/sound/5220intf.c b/src/emu/sound/5220intf.c index 65831b056ee..3e227743267 100644 --- a/src/emu/sound/5220intf.c +++ b/src/emu/sound/5220intf.c @@ -269,6 +269,7 @@ void tms5220_get_info(void *token, UINT32 state, sndinfo *info) } } +#if (HAS_TMC0285) void tmc0285_get_info(void *token, UINT32 state, sndinfo *info) { switch (state) @@ -278,7 +279,9 @@ void tmc0285_get_info(void *token, UINT32 state, sndinfo *info) default: tms5220_get_info(token, state, info); break; } } +#endif +#if (HAS_TMS5200) void tms5200_get_info(void *token, UINT32 state, sndinfo *info) { switch (state) @@ -288,4 +291,4 @@ void tms5200_get_info(void *token, UINT32 state, sndinfo *info) default: tms5220_get_info(token, state, info); break; } } - +#endif diff --git a/src/emu/video/generic.h b/src/emu/video/generic.h index ff482f5c02d..5b1a15ee308 100644 --- a/src/emu/video/generic.h +++ b/src/emu/video/generic.h @@ -55,10 +55,6 @@ extern size_t spriteram_size; extern size_t spriteram_2_size; extern size_t spriteram_3_size; -extern UINT8 *dirtybuffer; -extern UINT16 *dirtybuffer16; -extern UINT32 *dirtybuffer32; - extern UINT8 *paletteram; extern UINT16 *paletteram16; extern UINT32 *paletteram32; diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c index 4e5e0a1f249..f1447054dcf 100644 --- a/src/mame/audio/dkong.c +++ b/src/mame/audio/dkong.c @@ -1286,7 +1286,7 @@ ADDRESS_MAP_END static const struct NESinterface nes_interface_1 = { REGION_CPU2 }; static const struct NESinterface nes_interface_2 = { REGION_CPU3 }; -static struct TMS5110interface tms5110_interface = +static const struct TMS5110interface tms5110_interface = { REGION_SOUND1, /* Sample Rom */ NULL, diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c index a2ac380808d..8d421bb4101 100644 --- a/src/mame/audio/exidy.c +++ b/src/mame/audio/exidy.c @@ -13,6 +13,7 @@ #include "sound/hc55516.h" #include "sound/5220intf.h" #include "sound/custom.h" +#include "exidy.h" @@ -726,7 +727,7 @@ WRITE8_HANDLER( exidy_sfxctrl_w ) * *************************************/ -WRITE8_HANDLER( exidy_sound_filter_w ) +static WRITE8_HANDLER( exidy_sound_filter_w ) { logerror("exidy_sound_filter_w = %02X\n", data); } diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c index dbdc9b33e6b..98ca987dc4b 100644 --- a/src/mame/audio/irem.c +++ b/src/mame/audio/irem.c @@ -260,7 +260,7 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_DRIVER_START( irem_audio_base ) +static MACHINE_DRIVER_START( irem_audio_base ) MDRV_SOUND_START(irem_audio) diff --git a/src/mame/audio/redalert.c b/src/mame/audio/redalert.c index 3388eb975f5..f214c47be5e 100644 --- a/src/mame/audio/redalert.c +++ b/src/mame/audio/redalert.c @@ -14,6 +14,7 @@ #include "machine/6821pia.h" #include "sound/ay8910.h" #include "sound/hc55516.h" +#include "redalert.h" diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c index d3efc84f401..99262f23cd8 100644 --- a/src/mame/drivers/20pacgal.c +++ b/src/mame/drivers/20pacgal.c @@ -159,7 +159,7 @@ static WRITE8_HANDLER( _20pacgal_coin_counter_w ) * *************************************/ -WRITE8_HANDLER( rom_bank_select_w ) +static WRITE8_HANDLER( rom_bank_select_w ) { _20pacgal_state *state = Machine->driver_data; @@ -170,7 +170,7 @@ WRITE8_HANDLER( rom_bank_select_w ) } -WRITE8_HANDLER( rom_48000_w ) +static WRITE8_HANDLER( rom_48000_w ) { _20pacgal_state *state = Machine->driver_data; diff --git a/src/mame/drivers/crbaloon.c b/src/mame/drivers/crbaloon.c index f3488f3aa00..600cd6c4b6a 100644 --- a/src/mame/drivers/crbaloon.c +++ b/src/mame/drivers/crbaloon.c @@ -344,7 +344,7 @@ GFXDECODE_END * *************************************/ -MACHINE_RESET( crballoon ) +static MACHINE_RESET( crballoon ) { pc3092_reset(); port_sound_w(0, 0); diff --git a/src/mame/drivers/m10.c b/src/mame/drivers/m10.c index 09c8f0df124..317821ef621 100644 --- a/src/mame/drivers/m10.c +++ b/src/mame/drivers/m10.c @@ -723,7 +723,7 @@ GFXDECODE_END * *************************************/ -static const char *m10_sample_names[] = +static const char *const m10_sample_names[] = { "*ipminvad", "1.wav", /* shot/missle */ @@ -740,7 +740,7 @@ static const char *m10_sample_names[] = }; -static struct Samplesinterface m10_samples_interface = +static const struct Samplesinterface m10_samples_interface = { 6, /* 6 channels */ m10_sample_names diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c index db3c83e35d7..3a2cb60a47a 100644 --- a/src/mame/drivers/suprnova.c +++ b/src/mame/drivers/suprnova.c @@ -183,7 +183,7 @@ NEP-16 extern void skns_sprite_kludge(int x, int y); UINT32 *skns_tilemapA_ram, *skns_tilemapB_ram, *skns_v3slc_ram; -UINT32 *skns_palette_ram, *skns_v3t_ram, *skns_main_ram, *skns_cache_ram; +UINT32 *skns_palette_ram; UINT32 *skns_pal_regs, *skns_v3_regs, *skns_spc_regs; UINT32 skns_v3t_dirty[0x4000]; // allocate this elsewhere? @@ -199,6 +199,8 @@ VIDEO_START(skns); VIDEO_EOF(skns); VIDEO_UPDATE(skns); +static UINT32 *skns_v3t_ram, *skns_main_ram, *skns_cache_ram; + /* hit.c */ static struct { diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index 0403cabedf4..ba44a3d8dc9 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -176,12 +176,12 @@ static UINT16 tmaster_color; static UINT16 tmaster_addr; static int (*compute_addr) (UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high); -int tmaster_compute_addr(UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high) +static int tmaster_compute_addr(UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high) { return (reg_low & 0xff) | ((reg_mid & 0x1ff) << 8) | (reg_high << 17); } -int galgames_compute_addr(UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high) +static int galgames_compute_addr(UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high) { return reg_low | (reg_mid << 16); } diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index 37cc2fde3e1..cd48cd63ab8 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -9,7 +9,7 @@ #define CVS_S2636_X_OFFSET (-26) -/*----------- defined in driver/cvs.c -----------*/ +/*----------- defined in drivers/cvs.c -----------*/ extern UINT8 *cvs_color_ram; extern UINT8 *cvs_video_ram; diff --git a/src/mame/includes/dc.h b/src/mame/includes/dc.h index 6d4b810e238..8d8ef98bf47 100644 --- a/src/mame/includes/dc.h +++ b/src/mame/includes/dc.h @@ -31,8 +31,6 @@ WRITE32_HANDLER( dc_arm_aica_w ); MACHINE_RESET( dc ); -void dc_vblank( void ); - int compute_interrupt_level(void); void update_interrupt_status(void); @@ -94,6 +92,8 @@ extern UINT32 sysctrl_regs[0x200/4]; /*----------- defined in video/dc.c -----------*/ +void dc_vblank( void ); + READ64_HANDLER( pvr_ctrl_r ); WRITE64_HANDLER( pvr_ctrl_w ); READ64_HANDLER( pvr_ta_r ); diff --git a/src/mame/includes/jedi.h b/src/mame/includes/jedi.h index babf5863ce3..4535d463f3e 100644 --- a/src/mame/includes/jedi.h +++ b/src/mame/includes/jedi.h @@ -15,8 +15,6 @@ extern UINT8 *jedi_foreground_bank; VIDEO_START( jedi ); VIDEO_UPDATE( jedi ); -WRITE8_HANDLER( jedi_alpha_banksel_w ); -WRITE8_HANDLER( jedi_paletteram_w ); WRITE8_HANDLER( jedi_vscroll_w ); WRITE8_HANDLER( jedi_hscroll_w ); WRITE8_HANDLER( jedi_video_off_w ); diff --git a/src/mame/includes/kangaroo.h b/src/mame/includes/kangaroo.h index 0588d596f87..0c8a9213cdc 100644 --- a/src/mame/includes/kangaroo.h +++ b/src/mame/includes/kangaroo.h @@ -10,10 +10,8 @@ extern UINT8 *kangaroo_video_control; -PALETTE_INIT( kangaroo ); VIDEO_START( kangaroo ); VIDEO_UPDATE( kangaroo ); -WRITE8_HANDLER( kangaroo_blitter_w ); WRITE8_HANDLER( kangaroo_videoram_w ); WRITE8_HANDLER( kangaroo_video_control_w ); diff --git a/src/mame/includes/leland.h b/src/mame/includes/leland.h index 130f124977c..dc3ced3c67c 100644 --- a/src/mame/includes/leland.h +++ b/src/mame/includes/leland.h @@ -125,7 +125,6 @@ ADDRESS_MAP_EXTERN(ataxx_80186_map_io); /*----------- defined in video/leland.c -----------*/ extern UINT8 *ataxx_qram; -extern UINT8 leland_last_scanline_int; WRITE8_HANDLER( leland_scroll_w ); WRITE8_HANDLER( leland_gfx_port_w ); diff --git a/src/mame/includes/m62.h b/src/mame/includes/m62.h index 101b3e191f8..963f4230a95 100644 --- a/src/mame/includes/m62.h +++ b/src/mame/includes/m62.h @@ -4,7 +4,7 @@ *************************************************************************/ -/*----------- defined in video/centiped.c -----------*/ +/*----------- defined in video/m62.c -----------*/ PALETTE_INIT( m62 ); PALETTE_INIT( lotlot ); diff --git a/src/mame/includes/midzeus.h b/src/mame/includes/midzeus.h index e55746b60ed..06f649ca0e0 100644 --- a/src/mame/includes/midzeus.h +++ b/src/mame/includes/midzeus.h @@ -17,6 +17,8 @@ VIDEO_UPDATE( midzeus ); READ32_HANDLER( zeus_r ); WRITE32_HANDLER( zeus_w ); +/*----------- defined in video/midzeus2.c -----------*/ + VIDEO_START( midzeus2 ); VIDEO_UPDATE( midzeus2 ); diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h index 54472c8a1ea..f8cf66125a9 100644 --- a/src/mame/includes/neogeo.h +++ b/src/mame/includes/neogeo.h @@ -42,6 +42,7 @@ /*----------- defined in drivers/neogeo.c -----------*/ +void neogeo_set_display_position_interrupt_control(UINT16 data); void neogeo_set_display_counter_msb(UINT16 data); void neogeo_set_display_counter_lsb(UINT16 data); void neogeo_acknowledge_interrupt(UINT16 data); @@ -140,8 +141,6 @@ VIDEO_UPDATE( neogeo ); READ16_HANDLER( neogeo_video_register_r ); WRITE16_HANDLER( neogeo_video_register_w ); -void neogeo_set_display_position_interrupt_control(UINT16 data); - void neogeo_set_palette_bank(UINT8 data); void neogeo_set_screen_dark(UINT8 data); READ16_HANDLER( neogeo_paletteram_r ); diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h index 71ca2307d04..c9482622a52 100644 --- a/src/mame/includes/ninjakd2.h +++ b/src/mame/includes/ninjakd2.h @@ -1,3 +1,5 @@ +/*----------- defined in video/ninjakd2.c -----------*/ + extern WRITE8_HANDLER( ninjakd2_bgvideoram_w ); extern WRITE8_HANDLER( ninjakd2_fgvideoram_w ); extern WRITE8_HANDLER( ninjakd2_bg_ctrl_w ); diff --git a/src/mame/includes/nova2001.h b/src/mame/includes/nova2001.h index 9727389cb13..6e6211c2611 100644 --- a/src/mame/includes/nova2001.h +++ b/src/mame/includes/nova2001.h @@ -1,3 +1,5 @@ +/*----------- defined in video/nova2001.c -----------*/ + extern UINT8 *nova2001_fg_videoram, *nova2001_bg_videoram; extern WRITE8_HANDLER( nova2001_fg_videoram_w ); diff --git a/src/mame/includes/snes.h b/src/mame/includes/snes.h index ffb29b909b2..0d75e70a53c 100644 --- a/src/mame/includes/snes.h +++ b/src/mame/includes/snes.h @@ -379,6 +379,9 @@ extern UINT8 *snes_vram; /* Video RAM (Should be 16-bit, but it's easier this extern UINT16 *snes_cgram; /* Colour RAM */ extern UINT16 *snes_oam; /* Object Attribute Memory */ extern UINT8 *snes_ram; /* Main memory */ +extern UINT8 *spc_ram; /* SPC main memory */ +extern UINT8 spc_port_in[4]; /* SPC input ports */ +extern UINT8 spc_port_out[4]; /* SPC output ports */ struct SNES_PPU_STRUCT { struct @@ -451,9 +454,6 @@ extern struct snes_cart_info snes_cart; /*----------- defined in audio/snes.c -----------*/ /* (APU) Sound related */ -extern UINT8 *spc_ram; /* SPC main memory */ -extern UINT8 spc_port_in[4]; /* SPC input ports */ -extern UINT8 spc_port_out[4]; /* SPC output ports */ extern READ8_HANDLER( spc_io_r ); extern WRITE8_HANDLER( spc_io_w ); extern READ8_HANDLER( spc_ram_r ); diff --git a/src/mame/includes/st0016.h b/src/mame/includes/st0016.h index 501e30b46bc..3b46f235d81 100644 --- a/src/mame/includes/st0016.h +++ b/src/mame/includes/st0016.h @@ -18,6 +18,12 @@ #define ST0016_CHAR_BANK_MASK (ST0016_MAX_CHAR_BANK-1) #define ST0016_PAL_BANK_MASK (ST0016_MAX_PAL_BANK-1) +/*----------- defined in drivers/st0016.c -----------*/ + +extern UINT32 st0016_rom_bank; +WRITE8_HANDLER (st0016_rom_bank_w); + + /*----------- defined in video/st0016.c -----------*/ extern UINT8 *st0016_charram,*st0016_spriteram,*st0016_paletteram; @@ -38,15 +44,12 @@ READ8_HANDLER (st0016_character_ram_r); WRITE8_HANDLER (st0016_character_ram_w); READ8_HANDLER (st0016_vregs_r); WRITE8_HANDLER (st0016_vregs_w); -WRITE8_HANDLER (st0016_rom_bank_w); VIDEO_START(st0016); VIDEO_UPDATE(st0016); extern UINT32 st0016_game; -extern UINT32 st0016_rom_bank; - void st0016_save_init(void); diff --git a/src/mame/includes/tx1.h b/src/mame/includes/tx1.h index ccd17236053..839c65e5ea6 100644 --- a/src/mame/includes/tx1.h +++ b/src/mame/includes/tx1.h @@ -98,7 +98,6 @@ VIDEO_UPDATE( buggyboy ); VIDEO_EOF( buggyboy ); extern UINT16 *buggybjr_vram; -PALETTE_INIT( buggybjr ); WRITE16_HANDLER( buggybjr_vram_w ); VIDEO_START( buggybjr ); VIDEO_UPDATE( buggybjr ); diff --git a/src/mame/machine/dc.c b/src/mame/machine/dc.c index f61aa47183e..fdcbef086af 100644 --- a/src/mame/machine/dc.c +++ b/src/mame/machine/dc.c @@ -19,7 +19,7 @@ #define DEBUG_MAPLE (0) #if DEBUG_SYSCTRL -static const char *sysctrl_names[] = +static const char *const sysctrl_names[] = { "CH2 DMA dest", "CH2 DMA length", @@ -73,7 +73,7 @@ static const char *sysctrl_names[] = #endif #if DEBUG_MAPLE -static const char *maple_names[] = +static const char *const maple_names[] = { "5f6c00", "DMA command table addr", @@ -126,7 +126,7 @@ extern UINT32 dma_offset; static UINT8 maple0x86data1[0x80]; static UINT8 maple0x86data2[0x400]; -static UINT32 maple0x82answer[]= +static const UINT32 maple0x82answer[]= { 0x07200083,0x2d353133,0x39343136,0x20202020,0x59504f43,0x48474952,0x45532054,0x45204147, 0x05200083,0x5245544e,0x53495250,0x43205345,0x544c2c4f,0x20202e44,0x38393931,0x5c525043 @@ -809,7 +809,7 @@ WRITE64_HANDLER( dc_aica_reg_w ) } AICA_0_w(offset*2, dat, shift ? ((mem_mask>>32)&0xffff) : (mem_mask & 0xffff)); - + // mame_printf_verbose("AICA REG: [%08x=%x] write %llx to %x, mask %llx\n", 0x700000+reg*4, dat, data, offset, mem_mask); } diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index d9e95a40bca..367365f47f3 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -566,7 +566,7 @@ const rsp_config n64_rsp_config = // Video Interface -UINT32 n64_vi_width; +static UINT32 n64_vi_width; UINT32 n64_vi_origin; UINT32 n64_vi_control; static UINT32 n64_vi_burst, n64_vi_vsync, n64_vi_hsync, n64_vi_leap, n64_vi_hstart, n64_vi_vstart; diff --git a/src/mame/video/atarifb.c b/src/mame/video/atarifb.c index c76d713e180..e6817dc1672 100644 --- a/src/mame/video/atarifb.c +++ b/src/mame/video/atarifb.c @@ -5,6 +5,7 @@ *************************************************************************/ #include "driver.h" +#include "includes/atarifb.h" /* local */ diff --git a/src/mame/video/cclimber.c b/src/mame/video/cclimber.c index 9a5b3d5025e..39fac951e22 100644 --- a/src/mame/video/cclimber.c +++ b/src/mame/video/cclimber.c @@ -8,6 +8,7 @@ #include "driver.h" #include "video/resnet.h" +#include "includes/cclimber.h" UINT8 *cclimber_bsvideoram; diff --git a/src/mame/video/dc.c b/src/mame/video/dc.c index 14d9a45c8b9..ed0cd06803b 100644 --- a/src/mame/video/dc.c +++ b/src/mame/video/dc.c @@ -15,9 +15,9 @@ static UINT32 pvrctrl_regs[0x100/4]; static UINT32 pvrta_regs[0x2000/4]; -static int pvr_parconfseq[] = {1,2,3,2,3,4,5,6,5,6,7,8,9,10,11,12,13,14,13,14,15,16,17,16,17,0,0,0,0,0,18,19,20,19,20,21,22,23,22,23}; -static int pvr_wordsvertex[24] = {8,8,8,8,8,16,16,8,8,8, 8, 8,8,8,8,8,16,16, 8,16,16,8,16,16}; -static int pvr_wordspolygon[24] = {8,8,8,8,8, 8, 8,8,8,8,16,16,8,8,8,8, 8, 8,16,16,16,8, 8, 8}; +static const int pvr_parconfseq[] = {1,2,3,2,3,4,5,6,5,6,7,8,9,10,11,12,13,14,13,14,15,16,17,16,17,0,0,0,0,0,18,19,20,19,20,21,22,23,22,23}; +static const int pvr_wordsvertex[24] = {8,8,8,8,8,16,16,8,8,8, 8, 8,8,8,8,8,16,16, 8,16,16,8,16,16}; +static const int pvr_wordspolygon[24] = {8,8,8,8,8, 8, 8,8,8,8,16,16,8,8,8,8, 8, 8,16,16,16,8, 8, 8}; static int pvr_parameterconfig[64]; UINT64 *dc_texture_ram; @@ -26,7 +26,7 @@ static int tafifo_pos, tafifo_mask, tafifo_vertexwords, tafifo_listtype; static int start_render_received; static int alloc_ctrl_OPB_Mode, alloc_ctrl_PT_OPB, alloc_ctrl_TM_OPB, alloc_ctrl_T_OPB, alloc_ctrl_ZM_OPB, alloc_ctrl_O_OPB; -struct testsprites +static struct testsprites { int positionx, positiony; int sizex, sizey; diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c index 7af895e5ff8..d28c2532971 100644 --- a/src/mame/video/exidy.c +++ b/src/mame/video/exidy.c @@ -6,6 +6,7 @@ #include "driver.h" #include "deprecat.h" +#include "exidy.h" UINT8 *exidy_videoram; diff --git a/src/mame/video/f1gp.c b/src/mame/video/f1gp.c index 5062060d83b..4a105103bb5 100644 --- a/src/mame/video/f1gp.c +++ b/src/mame/video/f1gp.c @@ -1,6 +1,7 @@ #include "driver.h" #include "deprecat.h" #include "video/konamiic.h" +#include "f1gp.h" UINT16 *f1gp_spr1vram,*f1gp_spr2vram,*f1gp_spr1cgram,*f1gp_spr2cgram; diff --git a/src/mame/video/ikki.c b/src/mame/video/ikki.c index 889f9586c74..61bdb309354 100644 --- a/src/mame/video/ikki.c +++ b/src/mame/video/ikki.c @@ -59,11 +59,6 @@ PALETTE_INIT( ikki ) } } -WRITE8_HANDLER( ikki_scroll_w ) -{ - ikki_scroll[offset] = data; -} - WRITE8_HANDLER( ikki_scrn_ctrl_w ) { ikki_flipscreen = (data >> 2) & 1; diff --git a/src/mame/video/lockon.c b/src/mame/video/lockon.c index 22025e5067f..75d0854a5c7 100644 --- a/src/mame/video/lockon.c +++ b/src/mame/video/lockon.c @@ -32,7 +32,6 @@ size_t lockon_hudram_size; size_t lockon_objectram_size; size_t lockon_groundram_size; -UINT8 *obj_pal_ram; /************************************* * @@ -62,6 +61,7 @@ static UINT16 dyll; /* Object palette RAM control */ static UINT32 iden; +static UINT8 *obj_pal_ram; static UINT32 obj_pal_latch; static UINT32 obj_pal_addr; diff --git a/src/mame/video/m10.c b/src/mame/video/m10.c index e7658887938..fdc1697972d 100644 --- a/src/mame/video/m10.c +++ b/src/mame/video/m10.c @@ -17,25 +17,24 @@ static tilemap * tx_tilemap; static gfx_element * back_gfx; static UINT32 extyoffs[32*8]; -static UINT32 extxoffs[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; static const gfx_layout backlayout = { 8,8*32, /* 8*8 characters */ - 4, /* 256 characters */ - 1, /* 1 bits per pixel */ + 4, /* 256 characters */ + 1, /* 1 bit per pixel */ { 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, - { 0*8*32, 1*8*32, 2*8*32, 3*8*32, 4*8*32, 5*8*32, 6*8*32, 7*8*32 }, + EXTENDED_YOFFS, 32*8*8, /* every char takes 8 consecutive bytes */ - extxoffs, extyoffs + NULL, extyoffs }; static const gfx_layout charlayout = { 8,8, /* 8*8 characters */ 256, /* 256 characters */ - 1, /* 1 bits per pixel */ + 1, /* 1 bit per pixel */ { 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, diff --git a/src/mame/video/n64.c b/src/mame/video/n64.c index f5046a1bb95..4c82ed43a5f 100644 --- a/src/mame/video/n64.c +++ b/src/mame/video/n64.c @@ -18,7 +18,6 @@ extern UINT32 *rsp_dmem; extern void dp_full_sync(void); extern UINT32 n64_vi_origin; -extern UINT32 n64_vi_width; extern UINT32 n64_vi_control; extern UINT32 dp_start; diff --git a/src/mame/video/ninjakd2.c b/src/mame/video/ninjakd2.c index 7f1a518ccc7..c70e81b54df 100644 --- a/src/mame/video/ninjakd2.c +++ b/src/mame/video/ninjakd2.c @@ -88,7 +88,7 @@ static TILEMAP_MAPPER( omegaf_bg_scan ) return (col & 0x0f) | ((row & 0x1f) << 4) | ((col & 0x70) << 5); } -void robokid_get_bg_tile_info(running_machine* const machine, tile_data* const tileinfo, tilemap_memory_index const tile_index, int const gfxnum, const UINT8* const videoram) +static void robokid_get_bg_tile_info(running_machine* const machine, tile_data* const tileinfo, tilemap_memory_index const tile_index, int const gfxnum, const UINT8* const videoram) { int const lo = videoram[(tile_index << 1)]; int const hi = videoram[(tile_index << 1) | 1]; @@ -282,7 +282,7 @@ WRITE8_HANDLER( robokid_bg2_videoram_w ) -void bg_ctrl(int offset, int data, tilemap* tilemap) +static void bg_ctrl(int offset, int data, tilemap* tilemap) { int scrollx = tilemap_get_scrollx(tilemap, 0); int scrolly = tilemap_get_scrolly(tilemap, 0); diff --git a/src/mame/video/redalert.c b/src/mame/video/redalert.c index c88f3839a6d..4e4f2a06fd4 100644 --- a/src/mame/video/redalert.c +++ b/src/mame/video/redalert.c @@ -9,6 +9,7 @@ #include "driver.h" #include "video/resnet.h" +#include "redalert.h" #define NUM_CHARMAP_PENS 0x200 diff --git a/src/mame/video/starfire.c b/src/mame/video/starfire.c index d5328e4ee52..d39948f6678 100644 --- a/src/mame/video/starfire.c +++ b/src/mame/video/starfire.c @@ -5,6 +5,7 @@ ***************************************************************************/ #include "driver.h" +#include "starfire.h" #define NUM_PENS (0x40) diff --git a/src/mame/video/suprnova.c b/src/mame/video/suprnova.c index d24de415829..f0cd8aff102 100644 --- a/src/mame/video/suprnova.c +++ b/src/mame/video/suprnova.c @@ -20,7 +20,7 @@ Tilemap flip flags were reversed #define SUPRNOVA_DECODE_BUFFER_SIZE 0x2000 extern UINT32 *skns_tilemapA_ram, *skns_tilemapB_ram, *skns_v3slc_ram; -extern UINT32 *skns_palette_ram, *skns_v3t_ram, *skns_main_ram, *skns_cache_ram; +extern UINT32 *skns_palette_ram; extern UINT32 *skns_pal_regs, *skns_v3_regs, *skns_spc_regs; extern UINT32 skns_v3t_dirty[0x4000]; // allocate this elsewhere? extern UINT32 skns_v3t_4bppdirty[0x8000]; // allocate this elsewhere? diff --git a/src/mame/video/vdc.c b/src/mame/video/vdc.c index 88514b382e3..969adbce0d7 100644 --- a/src/mame/video/vdc.c +++ b/src/mame/video/vdc.c @@ -629,7 +629,7 @@ WRITE8_HANDLER ( vce_w ) static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens) { - static int width_table[4] = {5, 6, 7, 7}; + static const int width_table[4] = {5, 6, 7, 7}; int scroll_y = ( vdc[which].y_scroll & 0x01FF); int scroll_x = (vdc[which].vdc_data[BXR].w & 0x03FF); |