From: Atari Ace [mailto:atari_ace@verizon.net]

Sent: Sunday, September 21, 2008 10:45 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] More static qualifiers

Hi mamedev,

Another static function update from yours truly, almost entirely
affecting code added in the last few months to MAME.  The fixes are
the usual lot, changing enum definitions so they aren't declared,
decorating dead code/declarations with #if...#endif, and of course,
adding static where appropriate.  In addition, I fixed a bunch of
UNUSED_FUNCTON symbols to be spelled correctly (I didn't introduce
this).

~aa
This commit is contained in:
Aaron Giles 2008-09-26 05:25:11 +00:00
parent 844dca9402
commit 0f3e79564d
45 changed files with 110 additions and 99 deletions

View File

@ -221,7 +221,7 @@ static UINT64 execute_tobcd(void *ref, UINT32 params, const UINT64 *param);
the format
-------------------------------------------------*/
const char *format_int(astring *string, UINT64 value, int format)
static const char *format_int(astring *string, UINT64 value, int format)
{
switch (format)
{

View File

@ -125,10 +125,12 @@ WRITE32_HANDLER((*arm7_coproc_rt_w_callback)); // holder for the co processor R
void (*arm7_coproc_dt_r_callback)(UINT32 insn, UINT32 *prn, UINT32 (*read32)(UINT32 addr));
void (*arm7_coproc_dt_w_callback)(UINT32 insn, UINT32 *prn, void (*write32)(UINT32 addr, UINT32 data));
#ifdef UNUSED_DEFINITION
// custom dasm callback handlers for co-processor instructions
char *(*arm7_dasm_cop_dt_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
char *(*arm7_dasm_cop_rt_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
char *(*arm7_dasm_cop_do_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
#endif
/***************************************************************************

View File

@ -403,8 +403,10 @@ extern void (*arm7_coproc_dt_w_callback)(UINT32 insn, UINT32* prn, void (*write3
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)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
extern char *(*arm7_dasm_cop_rt_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
extern char *(*arm7_dasm_cop_do_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
#endif
#endif /* __ARM7CORE_H__ */

View File

@ -56,7 +56,7 @@ static const char *const dst[] =
"RAMU ",
};
enum
enum alu_src
{
AQ = 0,
AB = 1,
@ -66,9 +66,9 @@ enum
DA = 5,
DQ = 6,
DZ = 7,
} alu_src;
};
enum
enum alu_ins
{
ADD = 0,
SUBR = 1,
@ -78,9 +78,9 @@ enum
NOTRS = 5,
EXOR = 6,
EXNOR = 7,
} alu_ins;
};
enum
enum alu_dst
{
QREG = 0,
NOP = 1,
@ -90,7 +90,7 @@ enum
RAMD = 5,
RAMQU = 6,
RAMU = 7,
} alu_dest;
};
/***************************************************************************
MACROS
@ -517,12 +517,12 @@ static void cquestlin_exit(void)
#define SND_PC (cquestsnd.pc)
#define SND_DATA_IN (_ramen ? cquestsnd.sound_data[cquestsnd.platch] : cquestsnd.dinlatch)
enum
enum snd_latch_type
{
PLTCH = 0,
DAC = 1,
ADLATCH = 2,
} snd_latch_type;
};
static int do_sndjmp(int jmp)
{
@ -820,7 +820,7 @@ static offs_t cquestsnd_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const
#define ROT_PC (cquestrot.pc & 0x1ff)
enum
enum rot_spf
{
SPF_UNUSED0 = 0,
SPF_UNUSED1 = 1,
@ -832,9 +832,9 @@ enum
SPF_MULT = 7,
SPF_DRED = 8,
SPF_DWRT = 9,
} rot_spf;
};
enum
enum rot_yout
{
YOUT_UNUSED0 = 0,
YOUT_UNUSED1 = 1,
@ -844,7 +844,7 @@ enum
YOUT_Y2DYN = 5,
YOUT_Y2R = 6,
YOUT_Y2D = 7,
} rot_yout;
};
/* Sync is asserted for the duration of every fourth cycle */
/* The Dynamic RAM latch clocks in a value at the end of this cycle */
@ -1297,7 +1297,7 @@ static offs_t cquestrot_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const
#define VISIBLE_FIELD !cquestlin.field
enum
enum line_spf
{
LSPF_UNUSUED = 0,
LSPF_FSTOP = 1,
@ -1307,9 +1307,9 @@ enum
LSPF_MULT = 5,
LSPF_LSTOP = 6,
LSPF_BRES = 7,
} line_spf;
};
enum
enum line_latch
{
LLATCH_UNUSED = 0,
LLATCH_SEQLATCH = 1,
@ -1319,9 +1319,9 @@ enum
LLATCH_FADLATCH = 5,
LLATCH_CLATCH = 6,
LLATCH_ZLATCH = 7,
} line_latch;
};
enum
enum sreg_bits
{
SREG_E0 = 0,
SREG_DX_DY = 1,
@ -1331,7 +1331,7 @@ enum
SREG_LDX_DY = 5,
SREG_LDY = 6,
SREG_LDX = 7,
} sreg_bits;
};
INLINE int do_linjmp(int jmp)
{

View File

@ -808,6 +808,7 @@ void debug_cpu_go_interrupt(int irqline)
specified exception fires
-------------------------------------------------*/
#ifdef UNUSED_FUNCTION
void debug_cpu_go_exception(int exception)
{
debug_cpu_info *info = global.livecpu;
@ -820,6 +821,7 @@ void debug_cpu_go_exception(int exception)
info->flags |= DEBUG_FLAG_STOP_EXCEPTION;
global.execution_state = EXECUTION_STATE_RUNNING;
}
#endif
/*-------------------------------------------------

View File

@ -804,7 +804,7 @@ static ADDRESS_MAP_START( simutrek_portmap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
MACHINE_DRIVER_START( simutrek )
static MACHINE_DRIVER_START( simutrek )
MDRV_CPU_ADD("simutrek", I8748, XTAL_6MHz)
MDRV_CPU_IO_MAP(simutrek_portmap,0)

View File

@ -182,7 +182,7 @@ static int EG_Update(struct _SLOT *slot)
return lin2expvol[slot->EG.volume>>EG_SHIFT];
}
unsigned int Get_RATE(unsigned int *Steps,unsigned int rate,unsigned int val)
static unsigned int Get_RATE(unsigned int *Steps,unsigned int rate,unsigned int val)
{
int r=4*val+rate;
if(val==0)
@ -312,7 +312,7 @@ static void LFO_ComputeStep(struct _MultiPCM *ptChip,struct _LFO *LFO,UINT32 LFO
void WriteSlot(struct _MultiPCM *ptChip,struct _SLOT *slot,int reg,unsigned char data)
static void WriteSlot(struct _MultiPCM *ptChip,struct _SLOT *slot,int reg,unsigned char data)
{
slot->Regs[reg]=data;
@ -481,7 +481,7 @@ static void MultiPCM_update(void *param, stream_sample_t **inputs, stream_sample
}
}
unsigned char multi_pcm_reg_r(int chip, int offset)
static unsigned char multi_pcm_reg_r(int chip, int offset)
{
// struct _MultiPCM *ptChip = sndti_token(SOUND_MULTIPCM, chip);
return 0;

View File

@ -58,7 +58,7 @@ INLINE UINT8 fetch_8bit(UINT8 *v)
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE UINT16 fetch_16bit(UINT8 *v)
{
return BIG_ENDIANIZE_INT16(*(UINT16 *)v);
@ -77,7 +77,7 @@ INLINE void put_8bit(UINT8 *v, UINT8 data)
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void put_16bit(UINT8 *v, UINT16 data)
{
*(UINT16 *)v = BIG_ENDIANIZE_INT16(data);

View File

@ -37,13 +37,13 @@
#define ALPHA_PEN 8192
enum
enum cpu_indices
{
MAIN_CPU = 0,
ROTATE_CPU = 1,
LINE_CPU = 2,
SOUND_CPU = 3,
} cpu_indices;
};
/*************************************
@ -469,7 +469,7 @@ static struct
} cquest_sound;
/* Called by the sound CPU emulation */
void sound_dac_w(UINT16 data)
static void sound_dac_w(UINT16 data)
{
int side = data & 1;
int chan = (data >> 1) & 7;
@ -504,7 +504,7 @@ static void cquest_stream_update(void *param, stream_sample_t **inputs, stream_s
}
}
void *cquest_sh_start(int clock, const custom_sound_interface *config)
static void *cquest_sh_start(int clock, const custom_sound_interface *config)
{
/* Allocate the stream */
cquest_stream = stream_create(0, 2, Machine->sample_rate, NULL, cquest_stream_update);

View File

@ -250,7 +250,7 @@ ADDRESS_MAP_END
Input Ports
***************************************************************************/
INPUT_PORTS_START( galaxi )
static INPUT_PORTS_START( galaxi )
PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z)
@ -272,7 +272,7 @@ INPUT_PORTS_START( galaxi )
INPUT_PORTS_END
INPUT_PORTS_START( magjoker )
static INPUT_PORTS_START( magjoker )
PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z)

View File

@ -287,7 +287,7 @@ static const gfx_layout layout_16x16x4 =
16*16
};
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
static const gfx_layout layout_16x16x4_2 =
{
16,16,

View File

@ -544,7 +544,7 @@ READ8_HANDLER( K056230_r )
return 0;
}
TIMER_CALLBACK( network_irq_clear )
static TIMER_CALLBACK( network_irq_clear )
{
cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ2, CLEAR_LINE);
}

View File

@ -35,7 +35,7 @@
#define FDC_LOG(x) do { if (LOG_FDC_COMMANDS) mame_printf_debug x; } while(0)
enum
enum int_levels
{
INT_UNKNOWN1 = 1,
INT_UNKNOWN2 = 2,
@ -44,7 +44,7 @@ enum
INT_TMS34061 = 5,
INT_FLOPPYCTRL = 6,
INT_WATCHDOG_INT = 7,
} int_levels;
};
/*************************************
@ -272,7 +272,7 @@ static emu_timer *fdc_timer;
#define DISK_TRACK_SIZE (DISK_SECTOR_SIZE * DISK_SECTORS)
#define DISK_SIDE_SIZE (DISK_TRACK_SIZE * DISK_TRACKS)
enum
enum wd1770_status
{
BUSY = 1 << 0,
DATA_REQUEST = 1 << 1,
@ -285,7 +285,7 @@ enum
SPIN_UP = 1 << 5,
WRITE_PROTECT = 1 << 6,
MOTOR_ON = 1 << 7
} wd1770_status;
};
static TIMER_CALLBACK( fdc_data_callback )

View File

@ -261,12 +261,12 @@ Network PCB
//static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK };
VIDEO_START(hikaru)
static VIDEO_START(hikaru)
{
}
VIDEO_UPDATE(hikaru)
static VIDEO_UPDATE(hikaru)
{
return 0;
}

View File

@ -295,7 +295,7 @@ ADDRESS_MAP_END
Input Ports
***************************************************************************/
INPUT_PORTS_START( jingbell )
static INPUT_PORTS_START( jingbell )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )

View File

@ -49,12 +49,12 @@
* Video Hardware *
*************************/
VIDEO_START( itgambl3 )
static VIDEO_START( itgambl3 )
{
}
VIDEO_UPDATE( itgambl3 )
static VIDEO_UPDATE( itgambl3 )
{
return 0;
}
@ -158,7 +158,7 @@ GFXDECODE_END
* Machine Reset *
**************************/
MACHINE_RESET( itgambl3 )
static MACHINE_RESET( itgambl3 )
{
/* stop the CPU, we have no code for it anyway */
cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, ASSERT_LINE);

View File

@ -693,7 +693,7 @@ nth_word32( const UINT32 *pSource, int which )
/* nth_byte32 is a general-purpose utility function, which allows us to
* read from 32-bit aligned memory as if it were an array of bytes.
*/
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE UINT8
nth_byte32( const UINT32 *pSource, int which )
{

View File

@ -1272,7 +1272,7 @@ struct AtomiswaveKey
int S3[8];
};
struct AtomiswaveKey fotns_key = {
static const struct AtomiswaveKey fotns_key = {
{0,2,7,11,12,1,5,6,15,4,8,9,14,3,10,13},
{12,8,3,7,0,15,1,11,6,10,4,14,9,5,13,2},
{4,1,10,16,9,25,26,31,13,0,14,15,24,6,30,18,7,20,5,12,22,17,27,3,8,11,21,29,19,23,28,2},
@ -1281,7 +1281,7 @@ struct AtomiswaveKey fotns_key = {
{7,1,6,5,4,2,0,3}
};
struct AtomiswaveKey df_key = {
static const struct AtomiswaveKey df_key = {
{1,4,5,6,9,7,10,11,13,0,8,12,14,2,3,15},
{12,0,3,8,7,6,15,11,1,4,14,10,9,5,13,2},
{9,27,15,6,28,30,7,12,21,0,1,25,22,3,16,29,13,4,24,20,2,5,23,19,18,10,8,14,17,11,31,26},
@ -1291,7 +1291,7 @@ struct AtomiswaveKey df_key = {
};
UINT16 atomiswave_decrypt(UINT16 cipherText, int address, struct AtomiswaveKey* key)
static UINT16 atomiswave_decrypt(UINT16 cipherText, int address, const struct AtomiswaveKey* key)
{
int b0,b1,b2,b3;
int aux;
@ -1317,7 +1317,7 @@ UINT16 atomiswave_decrypt(UINT16 cipherText, int address, struct AtomiswaveKey*
}
DRIVER_INIT(fotns)
static DRIVER_INIT(fotns)
{
int i;
UINT16 *src = (UINT16 *)(memory_region(machine, "user1"));
@ -1347,7 +1347,7 @@ DRIVER_INIT(fotns)
DRIVER_INIT(demofist)
static DRIVER_INIT(demofist)
{
int i;
UINT16 *src = (UINT16 *)(memory_region(machine, "user1"));
@ -2725,6 +2725,7 @@ time to go to sleep
*/
#ifdef UNUSED_FUNCTION
// rather crude function to write out a key file
void naomi_write_keyfile(void)
{
@ -2795,6 +2796,8 @@ void naomi_write_keyfile(void)
}
#endif
extern void naomi_game_decrypt(UINT64 key, UINT8* region, int length);
@ -2860,7 +2863,7 @@ GAME( 2001, hod2bios, 0, naomi, naomi, 0, ROT0, "Sega",
DRIVER_INIT( ngdkey )
static DRIVER_INIT( ngdkey )
{
UINT8* picdata = memory_region(machine,"picreturn");
UINT64 key;

View File

@ -574,7 +574,7 @@ static INPUT_PORTS_START( niyanpai )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
INPUT_PORTS_START( nbmjctrl_16 )
static INPUT_PORTS_START( nbmjctrl_16 )
PORT_START("KEY0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2)

View File

@ -198,7 +198,7 @@ static READ32_HANDLER( dsp_r )
}
#endif
READ32_HANDLER( dsp_host_interface_r )
static READ32_HANDLER( dsp_host_interface_r )
{
UINT32 value;
UINT8 hi_addr = offset << 1;

View File

@ -75,7 +75,7 @@ static WRITE8_HANDLER( fg_ram_w )
tilemap_mark_tile_dirty(fg_tmap, offset/4);
}
VIDEO_START(quizpun2)
static VIDEO_START(quizpun2)
{
bg_tmap = tilemap_create( get_bg_tile_info, tilemap_scan_rows, 8,16, 0x20,0x20 );
fg_tmap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, 8,16, 0x20,0x20 );
@ -84,7 +84,7 @@ VIDEO_START(quizpun2)
tilemap_set_transparent_pen(fg_tmap, 0);
}
VIDEO_UPDATE(quizpun2)
static VIDEO_UPDATE(quizpun2)
{
int layers_ctrl = -1;
@ -335,7 +335,7 @@ ADDRESS_MAP_END
Input Ports
***************************************************************************/
INPUT_PORTS_START( quizpun2 )
static INPUT_PORTS_START( quizpun2 )
PORT_START("DSW")
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
PORT_DIPUNKNOWN( 0x02, 0x02 )

View File

@ -979,12 +979,12 @@ ROM_START( baluba )
ROM_END
DRIVER_INIT( starforc )
static DRIVER_INIT( starforc )
{
is_senjyo = 0;
senjyo_scrollhack = 1;
}
DRIVER_INIT( starfore )
static DRIVER_INIT( starfore )
{
/* encrypted CPU */
suprloco_decode(machine, "main");
@ -993,7 +993,7 @@ DRIVER_INIT( starfore )
senjyo_scrollhack = 0;
}
DRIVER_INIT( starfora )
static DRIVER_INIT( starfora )
{
/* encrypted CPU */
yamato_decode(machine, "main");
@ -1002,7 +1002,7 @@ DRIVER_INIT( starfora )
senjyo_scrollhack = 1;
}
DRIVER_INIT( senjyo )
static DRIVER_INIT( senjyo )
{
is_senjyo = 1;
senjyo_scrollhack = 0;

View File

@ -410,7 +410,7 @@ static const ym2203_interface sh_ym2203_interface =
};
const ym2203_interface kothello_ym2203_interface =
static const ym2203_interface kothello_ym2203_interface =
{
{
AY8910_LEGACY_OUTPUT,

View File

@ -433,7 +433,7 @@ static DRIVER_INIT(kinstb)
DRIVER_INIT_CALL(snes_hirom);
}
DRIVER_INIT( ffight2b )
static DRIVER_INIT( ffight2b )
{
INT32 i;
UINT8 *rom = memory_region(machine, "user3");

View File

@ -720,7 +720,7 @@ hand, always returning 0xf inbetween valid values confuses the game.
*****************************************************************************/
CUSTOM_INPUT( gwar_rotary )
static CUSTOM_INPUT( gwar_rotary )
{
static int last_value[2] = {0, 0};
static int cp_count[2] = {0, 0};
@ -739,7 +739,7 @@ CUSTOM_INPUT( gwar_rotary )
return value;
}
CUSTOM_INPUT( gwarb_rotary )
static CUSTOM_INPUT( gwarb_rotary )
{
if (input_port_read(field->port->machine, "JOYSTICK_MODE") == 1)
{

View File

@ -29,7 +29,7 @@ To enter test mode in smoto, keep F2 pressed during boot.
***************************************************************************/
static tilemap *tmap;
int tiles_offset;
static int tiles_offset;
static WRITE8_HANDLER( subsino_tiles_offset_w )
{
@ -148,7 +148,7 @@ ADDRESS_MAP_END
Input Ports
***************************************************************************/
INPUT_PORTS_START( smoto )
static INPUT_PORTS_START( smoto )
PORT_START( "DSW1" )
PORT_DIPUNKNOWN( 0x01, 0x01 )

View File

@ -254,7 +254,7 @@ static UINT8 dc_40103;
static UINT8 te_40103;
static UINT8 ld_40103;
UINT8 c_io, hp_1, hp_2, bell, aux3;
static UINT8 c_io, hp_1, hp_2, bell;
/*************************
@ -264,7 +264,7 @@ UINT8 c_io, hp_1, hp_2, bell, aux3;
static tilemap *bg_tilemap;
PALETTE_INIT( videopkr )
static PALETTE_INIT( videopkr )
{
int i;
@ -299,18 +299,18 @@ static TILE_GET_INFO( get_bg_tile_info )
}
VIDEO_START( videopkr )
static VIDEO_START( videopkr )
{
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
VIDEO_START( vidadcba )
static VIDEO_START( vidadcba )
{
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 16, 8, 32, 32);
}
VIDEO_UPDATE( videopkr )
static VIDEO_UPDATE( videopkr )
{
tilemap_mark_all_tiles_dirty(bg_tilemap);
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);

View File

@ -2243,7 +2243,7 @@ static CUSTOM_INPUT( jdredd_gun_mux_read )
return jdredd_gun_mux;
}
INTERRUPT_GEN( jdredd_vblank )
static INTERRUPT_GEN( jdredd_vblank )
{
int x;
int y;
@ -2898,7 +2898,7 @@ static INPUT_PORTS_START( zn6b )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
INPUT_PORTS_END
INPUT_PORTS_START( jdredd )
static INPUT_PORTS_START( jdredd )
PORT_INCLUDE( zn )
PORT_MODIFY("P1")
@ -2936,7 +2936,7 @@ INPUT_PORTS_START( jdredd )
PORT_BIT( 0xffff, 0x0122, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0x02d-1,0x217+1) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(2)
INPUT_PORTS_END
INPUT_PORTS_START( primrag2 )
static INPUT_PORTS_START( primrag2 )
PORT_INCLUDE( zn )
PORT_MODIFY("SYSTEM")

View File

@ -260,7 +260,7 @@ static const char *const akiko_reg_names[] =
/*E*/ "C2P"
};
const char* get_akiko_reg_name(int reg)
static const char* get_akiko_reg_name(int reg)
{
if (reg < 0xf )
{

View File

@ -1211,7 +1211,7 @@ DRIVER_INIT( tankfrce )
}
// Inputs are multiplexed, somehow
READ8_HANDLER( tankfrc4_input_r )
static READ8_HANDLER( tankfrc4_input_r )
{
switch (offset)

View File

@ -20,7 +20,7 @@ Memo:
int nb1413m3_type;
int nb1413m3_sndromregion;
//int nb1413m3_sndromregion;
const char * nb1413m3_sndromrgntag;
int nb1413m3_sndrombank1;
int nb1413m3_sndrombank2;

View File

@ -35,7 +35,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
UINT32 *g_p_n_psxram;
size_t g_n_psxramsize;
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void psxwriteword( UINT32 n_address, UINT16 n_data )
{
*( (UINT16 *)( (UINT8 *)g_p_n_psxram + WORD_XOR_LE( n_address ) ) ) = n_data;

View File

@ -162,7 +162,7 @@ static void draw_rle_zoom_hflip(bitmap_t *bitmap, const atarirle_info *gfx,
two.
---------------------------------------------------------------*/
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE int compute_log(int value)
{
int log = 0;
@ -201,7 +201,7 @@ INLINE int round_to_powerof2(int value)
value into the result, packing the bits along the way.
---------------------------------------------------------------*/
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE int collapse_bits(int value, int mask)
{
int testmask, ormask;

View File

@ -1217,10 +1217,12 @@ static TIMER_CALLBACK( run_state_machine )
*
************************************/
#ifdef UNUSED_FUNCTION
int avgdvg_done(void)
{
return vg->sync_halt;
}
#endif
CUSTOM_INPUT( avgdvg_done_r )
{

View File

@ -61,7 +61,7 @@ typedef struct {
UINT32 depthcomparemode,cullingmode,zwritedisable,cachebypass,dcalcctrl,volumeinstruction,mipmapped,vqcompressed,strideselect,paletteselector;
} pvrta_state;
pvrta_state state_ta;
static pvrta_state state_ta;
// register decode helper
INLINE int decode_reg_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift)

View File

@ -68,7 +68,7 @@ VIDEO_UPDATE( esd16 );
static tilemap *esdtilemap_0;
static tilemap *esdtilemap_1;
tilemap *esdtilemap_1_16x16;
tilemap *esdtilemap_0_16x16;
static tilemap *esdtilemap_0_16x16;
static TILE_GET_INFO( get_tile_info_0 )
{

View File

@ -24,7 +24,7 @@ static UINT16 fifo[FIFO_LENGTH];
static UINT16 readfifo;
UINT16 *HD63484_ram;
UINT16 HD63484_reg[256/2];
UINT16 pattern[16];
static UINT16 pattern[16];
static int org,org_dpd,rwp;
static UINT16 cl0,cl1,ccmp,edg,mask,ppy,pzcy,ppx,pzcx,psy,psx,pey,pzy,pex,pzx,xmin,ymin,xmax,ymax,rwp_dn;
static INT16 cpx,cpy;
@ -790,7 +790,7 @@ static void ptn(int opcode,int src_x,int src_y,INT16 _ax,INT16 _ay)
}
}
void line(INT16 sx, INT16 sy, INT16 ex, INT16 ey, INT16 col)
static void line(INT16 sx, INT16 sy, INT16 ex, INT16 ey, INT16 col)
{
INT16 ax,ay;
@ -841,7 +841,7 @@ void line(INT16 sx, INT16 sy, INT16 ex, INT16 ey, INT16 col)
}
void paint(int sx, int sy, int col)
static void paint(int sx, int sy, int col)
{
int getpixel;
dot(sx,sy,0,col);

View File

@ -126,7 +126,7 @@ static UINT8 *empty_tiles;
/* 8x8x4 tiles only */
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void get_tile_info(running_machine *machine,tile_data *tileinfo,int tile_index,int layer,UINT16 *vram)
{
UINT16 code;
@ -204,7 +204,7 @@ INLINE void get_tile_info_8bit(running_machine *machine,tile_data *tileinfo,int
/* 16x16x4 or 16x16x8 tiles. It's the tile's color that decides: if its low 4
bits are high ($f,$1f,$2f etc) the tile is 8bpp, otherwise it's 4bpp */
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void get_tile_info_16x16_8bit(running_machine *machine,tile_data *tileinfo,int tile_index,int layer,UINT16 *vram)
{
UINT16 code;

View File

@ -202,7 +202,7 @@ INLINE void waveram_plot_check_depth(int y, int x, UINT16 color, UINT16 depth)
}
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void waveram_plot_check_depth_nowrite(int y, int x, UINT16 color, UINT16 depth)
{
if (x >= 0 && x <= zeus_cliprect.max_x && y >= 0 && y < zeus_cliprect.max_y)

View File

@ -169,7 +169,7 @@ INLINE void *waveram1_ptr_from_expanded_addr(UINT32 addr)
return WAVERAM_BLOCK1(blocknum);
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void *waveram0_ptr_from_texture_addr(UINT32 addr, int width)
{
UINT32 blocknum = ((addr & ~1) * width) / 8;
@ -184,7 +184,7 @@ INLINE void *waveram0_ptr_from_texture_addr(UINT32 addr, int width)
*
*************************************/
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void waveram_plot(int y, int x, UINT32 color)
{
if (x >= 0 && x <= zeus_cliprect.max_x && y >= 0 && y < zeus_cliprect.max_y)
@ -201,7 +201,7 @@ INLINE void waveram_plot_depth(int y, int x, UINT32 color, UINT16 depth)
}
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void waveram_plot_check_depth(int y, int x, UINT32 color, UINT16 depth)
{
if (x >= 0 && x <= zeus_cliprect.max_x && y >= 0 && y < zeus_cliprect.max_y)
@ -216,7 +216,7 @@ INLINE void waveram_plot_check_depth(int y, int x, UINT32 color, UINT16 depth)
}
#endif
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void waveram_plot_check_depth_nowrite(int y, int x, UINT32 color, UINT16 depth)
{
if (x >= 0 && x <= zeus_cliprect.max_x && y >= 0 && y < zeus_cliprect.max_y)
@ -242,7 +242,7 @@ INLINE UINT8 get_texel_8bit(const void *base, int y, int x, int width)
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE UINT8 get_texel_4bit(const void *base, int y, int x, int width)
{
UINT32 byteoffs = (y / 2) * (width * 2) + ((x / 8) << 3) + ((y & 1) << 2) + ((x / 2) & 3);

View File

@ -739,7 +739,7 @@ INLINE void write_texture16(int xpos, int ypos, int width, int height, int page,
}
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE void write_texture8(int xpos, int ypos, int width, int height, int page, UINT16 *data)
{
int x,y,i,j;
@ -916,7 +916,7 @@ WRITE64_HANDLER( real3d_cmd_w )
/*****************************************************************************/
/* matrix and vector operations */
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE float dot_product(VECTOR a, VECTOR b)
{
return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]);

View File

@ -14,7 +14,7 @@ static UINT32 namcofl_sprbank;
/* nth_word32 is a general-purpose utility function, which allows us to
* read from 32-bit aligned memory as if it were an array of 16 bit words.
*/
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE UINT16
nth_word32( const UINT32 *source, int which )
{
@ -34,7 +34,7 @@ nth_word32( const UINT32 *source, int which )
/* nth_byte32 is a general-purpose utility function, which allows us to
* read from 32-bit aligned memory as if it were an array of bytes.
*/
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE UINT8
nth_byte32( const UINT32 *pSource, int which )
{

View File

@ -178,7 +178,7 @@ void system1_define_background_memory(int mode)
}
#ifdef UNUSED_FUNCTON
#ifdef UNUSED_FUNCTION
INLINE int get_sprite_bottom_y(int spr_number)
{
return spriteram[0x10 * spr_number + SPR_Y_BOTTOM];

View File

@ -309,7 +309,7 @@ void osd_wait_for_debugger(running_machine *machine, int firststop)
// debugwin_seq_pressed
//============================================================
int debugwin_seq_pressed(void)
static int debugwin_seq_pressed(void)
{
const input_seq *seq = input_type_seq(Machine, IPT_UI_DEBUG_BREAK, 0, SEQ_TYPE_STANDARD);
int result = FALSE;

View File

@ -119,7 +119,7 @@ static int msf_to_frames( char *token )
return f;
}
chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_track_input_info *outinfo)
static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_track_input_info *outinfo)
{
FILE *infile;
int i, numtracks;