Simple LTO warning fixes (Part1) (nw)

This commit is contained in:
Cowering 2015-05-24 06:07:44 -05:00
parent c3573f9201
commit 9bfa439757
23 changed files with 123 additions and 123 deletions

View File

@ -23,7 +23,7 @@ All rights reserved.
#define ADDRESS_65816(A) ((A)&0xffffff) #define ADDRESS_65816(A) ((A)&0xffffff)
struct opcode_struct struct g65816_opcode_struct
{ {
unsigned char name; unsigned char name;
unsigned char flag; unsigned char flag;
@ -70,7 +70,7 @@ static const char *const g_opnames[] =
"TYA", "TYX", "WAI", "WDM", "XBA", "XCE" "TYA", "TYX", "WAI", "WDM", "XBA", "XCE"
}; };
static const opcode_struct g_opcodes[256] = static const g65816_opcode_struct g_opcodes[256] =
{ {
{BRK, I, SIG }, {ORA, M, DXI }, {COP, I, SIG }, {ORA, M, S }, {BRK, I, SIG }, {ORA, M, DXI }, {COP, I, SIG }, {ORA, M, S },
{TSB, M, D }, {ORA, M, D }, {ASL, M, D }, {ORA, M, DLI }, {TSB, M, D }, {ORA, M, D }, {ASL, M, D }, {ORA, M, DLI },
@ -192,7 +192,7 @@ INLINE char* int_16_str(unsigned int val)
unsigned g65816_disassemble(char* buff, unsigned int pc, unsigned int pb, const UINT8 *oprom, int m_flag, int x_flag) unsigned g65816_disassemble(char* buff, unsigned int pc, unsigned int pb, const UINT8 *oprom, int m_flag, int x_flag)
{ {
unsigned int instruction; unsigned int instruction;
const opcode_struct* opcode; const g65816_opcode_struct* opcode;
char* ptr; char* ptr;
int var; int var;
int length = 1; int length = 1;

View File

@ -65,7 +65,7 @@ enum
SEG_SS SEG_SS
}; };
struct I386_OPCODE { struct NEC_I386_OPCODE {
char mnemonic[32]; char mnemonic[32];
UINT32 flags; UINT32 flags;
UINT32 param1; UINT32 param1;
@ -74,15 +74,15 @@ struct I386_OPCODE {
offs_t dasm_flags; offs_t dasm_flags;
}; };
struct GROUP_OP { struct NEC_GROUP_OP {
char mnemonic[32]; char mnemonic[32];
const I386_OPCODE *opcode; const NEC_I386_OPCODE *opcode;
}; };
static const UINT8 *opcode_ptr; static const UINT8 *opcode_ptr;
static const UINT8 *opcode_ptr_base; static const UINT8 *opcode_ptr_base;
static const I386_OPCODE necv_opcode_table1[256] = static const NEC_I386_OPCODE necv_opcode_table1[256] =
{ {
// 0x00 // 0x00
{"add", MODRM, PARAM_RM8, PARAM_REG8, 0 }, {"add", MODRM, PARAM_RM8, PARAM_REG8, 0 },
@ -358,7 +358,7 @@ static const I386_OPCODE necv_opcode_table1[256] =
{"group2w", GROUP, 0, 0, 0 } {"group2w", GROUP, 0, 0, 0 }
}; };
static const I386_OPCODE necv_opcode_table2[256] = static const NEC_I386_OPCODE necv_opcode_table2[256] =
{ {
// 0x00 // 0x00
{"???", 0, 0, 0, 0 }, {"???", 0, 0, 0, 0 },
@ -634,7 +634,7 @@ static const I386_OPCODE necv_opcode_table2[256] =
{"brkem", 0, PARAM_UI8, 0, 0 } /* V20,30,40,50 only */ {"brkem", 0, PARAM_UI8, 0, 0 } /* V20,30,40,50 only */
}; };
static const I386_OPCODE immb_table[8] = static const NEC_I386_OPCODE immb_table[8] =
{ {
{"add", 0, PARAM_RMPTR8, PARAM_UI8, 0 }, {"add", 0, PARAM_RMPTR8, PARAM_UI8, 0 },
{"or", 0, PARAM_RMPTR8, PARAM_UI8, 0 }, {"or", 0, PARAM_RMPTR8, PARAM_UI8, 0 },
@ -646,7 +646,7 @@ static const I386_OPCODE immb_table[8] =
{"cmp", 0, PARAM_RMPTR8, PARAM_UI8, 0 } {"cmp", 0, PARAM_RMPTR8, PARAM_UI8, 0 }
}; };
static const I386_OPCODE immw_table[8] = static const NEC_I386_OPCODE immw_table[8] =
{ {
{"add", 0, PARAM_RMPTR16, PARAM_IMM, 0 }, {"add", 0, PARAM_RMPTR16, PARAM_IMM, 0 },
{"or", 0, PARAM_RMPTR16, PARAM_IMM, 0 }, {"or", 0, PARAM_RMPTR16, PARAM_IMM, 0 },
@ -658,7 +658,7 @@ static const I386_OPCODE immw_table[8] =
{"cmp", 0, PARAM_RMPTR16, PARAM_IMM, 0 } {"cmp", 0, PARAM_RMPTR16, PARAM_IMM, 0 }
}; };
static const I386_OPCODE immws_table[8] = static const NEC_I386_OPCODE immws_table[8] =
{ {
{"add", 0, PARAM_RMPTR16, PARAM_I8, 0 }, {"add", 0, PARAM_RMPTR16, PARAM_I8, 0 },
{"or", 0, PARAM_RMPTR16, PARAM_I8, 0 }, {"or", 0, PARAM_RMPTR16, PARAM_I8, 0 },
@ -670,7 +670,7 @@ static const I386_OPCODE immws_table[8] =
{"cmp", 0, PARAM_RMPTR16, PARAM_I8, 0 } {"cmp", 0, PARAM_RMPTR16, PARAM_I8, 0 }
}; };
static const I386_OPCODE shiftbi_table[8] = static const NEC_I386_OPCODE shiftbi_table[8] =
{ {
{"rol", 0, PARAM_RMPTR8, PARAM_I8, 0 }, {"rol", 0, PARAM_RMPTR8, PARAM_I8, 0 },
{"ror", 0, PARAM_RMPTR8, PARAM_I8, 0 }, {"ror", 0, PARAM_RMPTR8, PARAM_I8, 0 },
@ -682,7 +682,7 @@ static const I386_OPCODE shiftbi_table[8] =
{"shra", 0, PARAM_RMPTR8, PARAM_I8, 0 } {"shra", 0, PARAM_RMPTR8, PARAM_I8, 0 }
}; };
static const I386_OPCODE shiftwi_table[8] = static const NEC_I386_OPCODE shiftwi_table[8] =
{ {
{"rol", 0, PARAM_RMPTR16, PARAM_I8, 0 }, {"rol", 0, PARAM_RMPTR16, PARAM_I8, 0 },
{"ror", 0, PARAM_RMPTR16, PARAM_I8, 0 }, {"ror", 0, PARAM_RMPTR16, PARAM_I8, 0 },
@ -694,7 +694,7 @@ static const I386_OPCODE shiftwi_table[8] =
{"shra", 0, PARAM_RMPTR16, PARAM_I8, 0 } {"shra", 0, PARAM_RMPTR16, PARAM_I8, 0 }
}; };
static const I386_OPCODE shiftb_table[8] = static const NEC_I386_OPCODE shiftb_table[8] =
{ {
{"rol", 0, PARAM_RMPTR8, PARAM_1, 0 }, {"rol", 0, PARAM_RMPTR8, PARAM_1, 0 },
{"ror", 0, PARAM_RMPTR8, PARAM_1, 0 }, {"ror", 0, PARAM_RMPTR8, PARAM_1, 0 },
@ -706,7 +706,7 @@ static const I386_OPCODE shiftb_table[8] =
{"shra", 0, PARAM_RMPTR8, PARAM_1, 0 } {"shra", 0, PARAM_RMPTR8, PARAM_1, 0 }
}; };
static const I386_OPCODE shiftw_table[8] = static const NEC_I386_OPCODE shiftw_table[8] =
{ {
{"rol", 0, PARAM_RMPTR16, PARAM_1, 0 }, {"rol", 0, PARAM_RMPTR16, PARAM_1, 0 },
{"ror", 0, PARAM_RMPTR16, PARAM_1, 0 }, {"ror", 0, PARAM_RMPTR16, PARAM_1, 0 },
@ -718,7 +718,7 @@ static const I386_OPCODE shiftw_table[8] =
{"shra", 0, PARAM_RMPTR16, PARAM_1, 0 } {"shra", 0, PARAM_RMPTR16, PARAM_1, 0 }
}; };
static const I386_OPCODE shiftbv_table[8] = static const NEC_I386_OPCODE shiftbv_table[8] =
{ {
{"rol", 0, PARAM_RMPTR8, PARAM_CL, 0 }, {"rol", 0, PARAM_RMPTR8, PARAM_CL, 0 },
{"ror", 0, PARAM_RMPTR8, PARAM_CL, 0 }, {"ror", 0, PARAM_RMPTR8, PARAM_CL, 0 },
@ -730,7 +730,7 @@ static const I386_OPCODE shiftbv_table[8] =
{"shra", 0, PARAM_RMPTR8, PARAM_CL, 0 } {"shra", 0, PARAM_RMPTR8, PARAM_CL, 0 }
}; };
static const I386_OPCODE shiftwv_table[8] = static const NEC_I386_OPCODE shiftwv_table[8] =
{ {
{"rol", 0, PARAM_RMPTR16, PARAM_CL, 0 }, {"rol", 0, PARAM_RMPTR16, PARAM_CL, 0 },
{"ror", 0, PARAM_RMPTR16, PARAM_CL, 0 }, {"ror", 0, PARAM_RMPTR16, PARAM_CL, 0 },
@ -742,7 +742,7 @@ static const I386_OPCODE shiftwv_table[8] =
{"shra", 0, PARAM_RMPTR16, PARAM_CL, 0 } {"shra", 0, PARAM_RMPTR16, PARAM_CL, 0 }
}; };
static const I386_OPCODE group1b_table[8] = static const NEC_I386_OPCODE group1b_table[8] =
{ {
{"test", 0, PARAM_RMPTR8, PARAM_UI8, 0 }, {"test", 0, PARAM_RMPTR8, PARAM_UI8, 0 },
{"???", 0, 0, 0, 0 }, {"???", 0, 0, 0, 0 },
@ -754,7 +754,7 @@ static const I386_OPCODE group1b_table[8] =
{"div", 0, PARAM_RMPTR8, 0, 0 } {"div", 0, PARAM_RMPTR8, 0, 0 }
}; };
static const I386_OPCODE group1w_table[8] = static const NEC_I386_OPCODE group1w_table[8] =
{ {
{"test", 0, PARAM_RMPTR16, PARAM_IMM, 0 }, {"test", 0, PARAM_RMPTR16, PARAM_IMM, 0 },
{"???", 0, 0, 0, 0 }, {"???", 0, 0, 0, 0 },
@ -766,7 +766,7 @@ static const I386_OPCODE group1w_table[8] =
{"div", 0, PARAM_RMPTR16, 0, 0 } {"div", 0, PARAM_RMPTR16, 0, 0 }
}; };
static const I386_OPCODE group2b_table[8] = static const NEC_I386_OPCODE group2b_table[8] =
{ {
{"inc", 0, PARAM_RMPTR8, 0, 0 }, {"inc", 0, PARAM_RMPTR8, 0, 0 },
{"dec", 0, PARAM_RMPTR8, 0, 0 }, {"dec", 0, PARAM_RMPTR8, 0, 0 },
@ -778,7 +778,7 @@ static const I386_OPCODE group2b_table[8] =
{"???", 0, 0, 0, 0 } {"???", 0, 0, 0, 0 }
}; };
static const I386_OPCODE group2w_table[8] = static const NEC_I386_OPCODE group2w_table[8] =
{ {
{"inc", 0, PARAM_RMPTR16, 0, 0 }, {"inc", 0, PARAM_RMPTR16, 0, 0 },
{"dec", 0, PARAM_RMPTR16, 0, 0 }, {"dec", 0, PARAM_RMPTR16, 0, 0 },
@ -790,7 +790,7 @@ static const I386_OPCODE group2w_table[8] =
{"???", 0, 0, 0, 0 } {"???", 0, 0, 0, 0 }
}; };
static const GROUP_OP group_op_table[] = static const NEC_GROUP_OP group_op_table[] =
{ {
{ "immb", immb_table }, { "immb", immb_table },
{ "immw", immw_table }, { "immw", immw_table },
@ -1507,7 +1507,7 @@ static void handle_fpu(char *s, UINT8 op1, UINT8 op2)
} }
} }
static void decode_opcode(char *s, const I386_OPCODE *op, UINT8 op1 ) static void decode_opcode(char *s, const NEC_I386_OPCODE *op, UINT8 op1 )
{ {
int i; int i;
UINT8 op2; UINT8 op2;

View File

@ -17,7 +17,7 @@ struct oprandinfo {
operandtype decode[4]; operandtype decode[4];
}; };
struct opcodeinfo { struct tms7000_opcodeinfo {
int opcode; int opcode;
char name[8]; char name[8];
int operand; int operand;
@ -84,7 +84,7 @@ static const oprandinfo of[] = {
/* 45 */ { {" *R%u", "", "", ""}, {UI8, DONE, DONE, DONE} } /* 45 */ { {" *R%u", "", "", ""}, {UI8, DONE, DONE, DONE} }
}; };
static const opcodeinfo opcodes[] = { static const tms7000_opcodeinfo opcodes[] = {
{0x69, "ADC", 0, 0 }, {0x69, "ADC", 0, 0 },
{0x19, "ADC", 1, 0 }, {0x19, "ADC", 1, 0 },
{0x39, "ADC", 2, 0 }, {0x39, "ADC", 2, 0 },
@ -375,7 +375,7 @@ CPU_DISASSEMBLE( tms7000 )
opcode = oprom[pos++]; opcode = oprom[pos++];
for( i=0; i<sizeof(opcodes) / sizeof(opcodeinfo); i++ ) for( i=0; i<sizeof(opcodes) / sizeof(tms7000_opcodeinfo); i++ )
{ {
if( opcode == opcodes[i].opcode ) if( opcode == opcodes[i].opcode )
{ {

View File

@ -36,7 +36,7 @@
TYPE DEFINITIONS TYPE DEFINITIONS
***************************************************************************/ ***************************************************************************/
struct parse_info struct jed_parse_info
{ {
UINT16 checksum; /* checksum value */ UINT16 checksum; /* checksum value */
UINT32 explicit_numfuses; /* explicitly specified number of fuses */ UINT32 explicit_numfuses; /* explicitly specified number of fuses */
@ -117,7 +117,7 @@ static UINT32 suck_number(const UINT8 **psrc)
process_field - process a single JEDEC field process_field - process a single JEDEC field
-------------------------------------------------*/ -------------------------------------------------*/
static void process_field(jed_data *data, const UINT8 *cursrc, const UINT8 *srcend, parse_info *pinfo) static void process_field(jed_data *data, const UINT8 *cursrc, const UINT8 *srcend, jed_parse_info *pinfo)
{ {
/* switch off of the field type */ /* switch off of the field type */
switch (*cursrc) switch (*cursrc)
@ -192,7 +192,7 @@ int jed_parse(const void *data, size_t length, jed_data *result)
const UINT8 *cursrc = (const UINT8 *)data; const UINT8 *cursrc = (const UINT8 *)data;
const UINT8 *srcend = cursrc + length; const UINT8 *srcend = cursrc + length;
const UINT8 *scan; const UINT8 *scan;
parse_info pinfo; jed_parse_info pinfo;
UINT16 checksum; UINT16 checksum;
int i; int i;

View File

@ -192,7 +192,7 @@ void beezer_sound_device::device_reset()
* *
*************************************/ *************************************/
// need to set int_flag properly here // need to set int_flag properly here
INLINE void sh6840_apply_clock(struct sh6840_timer_channel *t, int clocks) INLINE void sh6840_apply_clock(struct sh6840_timer_channel_beez *t, int clocks)
{ {
/* dual 8-bit case */ /* dual 8-bit case */
if (t->cr & 0x04) if (t->cr & 0x04)
@ -328,7 +328,7 @@ READ8_MEMBER( beezer_sound_device::noise_r )
WRITE8_MEMBER( beezer_sound_device::sh6840_w ) WRITE8_MEMBER( beezer_sound_device::sh6840_w )
{ {
struct sh6840_timer_channel *sh6840_timer = m_sh6840_timer; struct sh6840_timer_channel_beez *sh6840_timer = m_sh6840_timer;
/* force an update of the stream */ /* force an update of the stream */
m_stream->update(); m_stream->update();
@ -400,7 +400,7 @@ WRITE8_MEMBER( beezer_sound_device::sfxctrl_w )
void beezer_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) void beezer_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{ {
struct sh6840_timer_channel *sh6840_timer = m_sh6840_timer; struct sh6840_timer_channel_beez *sh6840_timer = m_sh6840_timer;
/* hack to skip the expensive lfsr noise generation unless at least one of the 2 channels which actually depend on it are set to use it as a source */ /* hack to skip the expensive lfsr noise generation unless at least one of the 2 channels which actually depend on it are set to use it as a source */
int noisy = ((sh6840_timer[0].cr & sh6840_timer[2].cr & 0x02) == 0); int noisy = ((sh6840_timer[0].cr & sh6840_timer[2].cr & 0x02) == 0);
@ -409,7 +409,7 @@ void beezer_sound_device::sound_stream_update(sound_stream &stream, stream_sampl
/* loop over samples */ /* loop over samples */
while (samples--) while (samples--)
{ {
struct sh6840_timer_channel *t; struct sh6840_timer_channel_beez *t;
int clocks_this_sample; int clocks_this_sample;
int clocks; int clocks;
INT16 sample1, sample2, sample3, sample0; INT16 sample1, sample2, sample3, sample0;

View File

@ -40,21 +40,21 @@
INLINE FUNCTIONS INLINE FUNCTIONS
***************************************************************************/ ***************************************************************************/
INLINE void configure_filter(filter_state *state, double r, double c) INLINE void configure_filter(g80_filter_state *state, double r, double c)
{ {
state->capval = 0; state->capval = 0;
state->exponent = 1.0 - exp(-1.0 / (r * c * SAMPLE_RATE)); state->exponent = 1.0 - exp(-1.0 / (r * c * SAMPLE_RATE));
} }
INLINE double step_rc_filter(filter_state *state, double input) INLINE double step_rc_filter(g80_filter_state *state, double input)
{ {
state->capval += (input - state->capval) * state->exponent; state->capval += (input - state->capval) * state->exponent;
return state->capval; return state->capval;
} }
INLINE double step_cr_filter(filter_state *state, double input) INLINE double step_cr_filter(g80_filter_state *state, double input)
{ {
double result = (input - state->capval); double result = (input - state->capval);
state->capval += (input - state->capval) * state->exponent; state->capval += (input - state->capval) * state->exponent;
@ -276,7 +276,7 @@ usb_sound_device::usb_sound_device(const machine_config &mconfig, const char *ta
void usb_sound_device::device_start() void usb_sound_device::device_start()
{ {
filter_state temp; g80_filter_state temp;
int tchan, tgroup; int tchan, tgroup;
/* find the CPU we are associated with */ /* find the CPU we are associated with */

View File

@ -52,9 +52,9 @@ MACHINE_CONFIG_EXTERN( sega_speech_board );
struct filter_state struct g80_filter_state
{ {
filter_state(): g80_filter_state():
capval(0), capval(0),
exponent(0) {} exponent(0) {}
@ -104,9 +104,9 @@ struct timer8253
timer8253_channel chan[3]; /* three channels' worth of information */ timer8253_channel chan[3]; /* three channels' worth of information */
double env[3]; /* envelope value for each channel */ double env[3]; /* envelope value for each channel */
filter_state chan_filter[2]; /* filter states for the first two channels */ g80_filter_state chan_filter[2]; /* filter states for the first two channels */
filter_state gate1; /* first RC filter state */ g80_filter_state gate1; /* first RC filter state */
filter_state gate2; /* second RC filter state */ g80_filter_state gate2; /* second RC filter state */
UINT8 config; /* configuration for this timer */ UINT8 config; /* configuration for this timer */
}; };
@ -163,8 +163,8 @@ private:
UINT8 m_noise_subcount; UINT8 m_noise_subcount;
double m_gate_rc1_exp[2]; double m_gate_rc1_exp[2];
double m_gate_rc2_exp[2]; double m_gate_rc2_exp[2];
filter_state m_final_filter; g80_filter_state m_final_filter;
filter_state m_noise_filters[5]; g80_filter_state m_noise_filters[5];
TIMER_CALLBACK_MEMBER( delayed_usb_data_w ); TIMER_CALLBACK_MEMBER( delayed_usb_data_w );
void timer_w(int which, UINT8 offset, UINT8 data); void timer_w(int which, UINT8 offset, UINT8 data);

View File

@ -30,7 +30,7 @@ wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const ch
m_mixer_buffer(NULL), m_mixer_buffer(NULL),
m_mixer_buffer_2(NULL) m_mixer_buffer_2(NULL)
{ {
memset(m_channel_list, 0, sizeof(sound_channel)*MAX_VOICES); memset(m_channel_list, 0, sizeof(wp_sound_channel)*MAX_VOICES);
memset(m_soundregs, 0, sizeof(UINT8)*0x4000); memset(m_soundregs, 0, sizeof(UINT8)*0x4000);
} }
@ -41,7 +41,7 @@ wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const ch
void wiping_sound_device::device_start() void wiping_sound_device::device_start()
{ {
sound_channel *voice; wp_sound_channel *voice;
/* get stream channels */ /* get stream channels */
m_stream = machine().sound().stream_alloc(*this, 0, 1, samplerate); m_stream = machine().sound().stream_alloc(*this, 0, 1, samplerate);
@ -111,7 +111,7 @@ void wiping_sound_device::make_mixer_table(int voices, int gain)
WRITE8_MEMBER( wiping_sound_device::sound_w ) WRITE8_MEMBER( wiping_sound_device::sound_w )
{ {
sound_channel *voice; wp_sound_channel *voice;
int base; int base;
/* update the streams */ /* update the streams */
@ -162,7 +162,7 @@ WRITE8_MEMBER( wiping_sound_device::sound_w )
void wiping_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) void wiping_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{ {
stream_sample_t *buffer = outputs[0]; stream_sample_t *buffer = outputs[0];
sound_channel *voice; wp_sound_channel *voice;
short *mix; short *mix;
int i; int i;

View File

@ -4,7 +4,7 @@
#define MAX_VOICES 8 #define MAX_VOICES 8
/* this structure defines the parameters for a channel */ /* this structure defines the parameters for a channel */
struct sound_channel struct wp_sound_channel
{ {
int frequency; int frequency;
int counter; int counter;
@ -34,8 +34,8 @@ private:
// internal state // internal state
/* data about the sound system */ /* data about the sound system */
sound_channel m_channel_list[MAX_VOICES]; wp_sound_channel m_channel_list[MAX_VOICES];
sound_channel *m_last_channel; wp_sound_channel *m_last_channel;
/* global sound parameters */ /* global sound parameters */
const UINT8 *m_sound_prom; const UINT8 *m_sound_prom;

View File

@ -147,7 +147,7 @@ union ADDR_REG
/* /*
Blitter state Blitter state
*/ */
struct blitter_t struct bf_blitter_t
{ {
ADDR_REG program; ADDR_REG program;
@ -273,7 +273,7 @@ public:
UINT8 m_col8bit[256]; UINT8 m_col8bit[256];
UINT8 m_col7bit[256]; UINT8 m_col7bit[256];
UINT8 m_col6bit[256]; UINT8 m_col6bit[256];
struct blitter_t m_blitter; struct bf_blitter_t m_blitter;
struct ramdac_t m_ramdac; struct ramdac_t m_ramdac;
struct fdc_t m_fdc; struct fdc_t m_fdc;
DECLARE_READ8_MEMBER(ramdac_r); DECLARE_READ8_MEMBER(ramdac_r);
@ -480,7 +480,7 @@ void bfcobra_state::RunBlit(address_space &space)
{ {
#define BLITPRG_READ(x) blitter.x = *(blitter_get_addr(blitter.program.addr++)) #define BLITPRG_READ(x) blitter.x = *(blitter_get_addr(blitter.program.addr++))
struct blitter_t &blitter = m_blitter; struct bf_blitter_t &blitter = m_blitter;
int cycles_used = 0; int cycles_used = 0;

View File

@ -47,7 +47,7 @@ public:
/*----------- defined in audio/beezer.c -----------*/ /*----------- defined in audio/beezer.c -----------*/
/* 6840 variables */ /* 6840 variables */
struct sh6840_timer_channel struct sh6840_timer_channel_beez
{ {
UINT8 cr; UINT8 cr;
UINT8 state; UINT8 state;
@ -96,7 +96,7 @@ private:
/* IRQ variable */ /* IRQ variable */
//UINT8 m_ptm_irq_state; //UINT8 m_ptm_irq_state;
struct sh6840_timer_channel m_sh6840_timer[3]; struct sh6840_timer_channel_beez m_sh6840_timer[3];
UINT8 m_sh6840_volume[4]; UINT8 m_sh6840_volume[4];
UINT8 m_sh6840_MSB_latch; UINT8 m_sh6840_MSB_latch;
UINT8 m_sh6840_LSB_latch; UINT8 m_sh6840_LSB_latch;

View File

@ -19,7 +19,7 @@
/* star circuit */ /* star circuit */
#define STAR_COUNT 252 #define STAR_COUNT 252
struct star struct star_gold
{ {
int x, y, color; int x, y, color;
}; };
@ -106,7 +106,7 @@ public:
UINT8 m_stars_blink_state; UINT8 m_stars_blink_state;
emu_timer *m_stars_blink_timer; emu_timer *m_stars_blink_timer;
emu_timer *m_stars_scroll_timer; emu_timer *m_stars_scroll_timer;
struct star m_stars[STAR_COUNT]; struct star_gold m_stars[STAR_COUNT];
DECLARE_READ8_MEMBER(drivfrcg_port0_r); DECLARE_READ8_MEMBER(drivfrcg_port0_r);
DECLARE_READ8_MEMBER(scrambler_protection_2_r); DECLARE_READ8_MEMBER(scrambler_protection_2_r);

View File

@ -9,7 +9,7 @@
#include "video/bufsprite.h" #include "video/bufsprite.h"
#include "sound/okim6295.h" #include "sound/okim6295.h"
struct pf_layer_info struct M92_pf_layer_info
{ {
tilemap_t * tmap; tilemap_t * tmap;
tilemap_t * wide_tmap; tilemap_t * wide_tmap;
@ -54,7 +54,7 @@ public:
UINT16 m_videocontrol; UINT16 m_videocontrol;
UINT8 m_sprite_buffer_busy; UINT8 m_sprite_buffer_busy;
UINT8 m_game_kludge; UINT8 m_game_kludge;
pf_layer_info m_pf_layer[3]; M92_pf_layer_info m_pf_layer[3];
UINT16 m_pf_master_control[4]; UINT16 m_pf_master_control[4];
INT32 m_sprite_list; INT32 m_sprite_list;
UINT8 m_palette_bank; UINT8 m_palette_bank;

View File

@ -40,8 +40,8 @@ public:
required_shared_ptr<UINT16> m_color_xlat; required_shared_ptr<UINT16> m_color_xlat;
struct view *m_view; struct view *m_view;
struct point *m_pointdb; struct m1_point *m_pointdb;
struct point *m_pointpt; struct m1_point *m_pointpt;
struct quad_m1 *m_quaddb; struct quad_m1 *m_quaddb;
struct quad_m1 *m_quadpt; struct quad_m1 *m_quadpt;
struct quad_m1 **m_quadind; struct quad_m1 **m_quadind;
@ -276,7 +276,7 @@ public:
void sort_quads(); void sort_quads();
void unsort_quads(); void unsort_quads();
void draw_quads(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_quads(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void fclip_push_quad_next(int level, struct quad_m1 *q, struct point *p1, struct point *p2, struct point *p3, struct point *p4); void fclip_push_quad_next(int level, struct quad_m1 *q, struct m1_point *p1, struct m1_point *p2, struct m1_point *p3, struct m1_point *p4);
void fclip_push_quad(int level, struct quad_m1 *q); void fclip_push_quad(int level, struct quad_m1 *q);
void push_object(UINT32 tex_adr, UINT32 poly_adr, UINT32 size); void push_object(UINT32 tex_adr, UINT32 poly_adr, UINT32 size);
UINT16 *push_direct(UINT16 *list); UINT16 *push_direct(UINT16 *list);

View File

@ -27,7 +27,7 @@ struct dsp_state
int slaveActive; int slaveActive;
}; };
struct vertex struct n21_vertex
{ {
double x,y; double x,y;
double z; double z;
@ -173,7 +173,7 @@ public:
void clear_poly_framebuffer(); void clear_poly_framebuffer();
void copy_visible_poly_framebuffer(bitmap_ind16 &bitmap, const rectangle &clip, int zlo, int zhi); void copy_visible_poly_framebuffer(bitmap_ind16 &bitmap, const rectangle &clip, int zlo, int zhi);
void renderscanline_flat(const edge *e1, const edge *e2, int sy, unsigned color, int depthcueenable); void renderscanline_flat(const edge *e1, const edge *e2, int sy, unsigned color, int depthcueenable);
void rendertri(const vertex *v0, const vertex *v1, const vertex *v2, unsigned color, int depthcueenable); void rendertri(const n21_vertex *v0, const n21_vertex *v1, const n21_vertex *v2, unsigned color, int depthcueenable);
void draw_quad(int sx[4], int sy[4], int zcode[4], int color); void draw_quad(int sx[4], int sy[4], int zcode[4], int color);
INT32 read_pointrom_data(unsigned offset); INT32 read_pointrom_data(unsigned offset);
void transmit_word_to_slave(UINT16 data); void transmit_word_to_slave(UINT16 data);

View File

@ -1324,7 +1324,7 @@ void galaxold_state::dambustr_draw_upper_background(bitmap_ind16 &bitmap, const
void galaxold_state::galaxold_init_stars(int colors_offset) void galaxold_state::galaxold_init_stars(int colors_offset)
{ {
struct star *stars = m_stars; struct star_gold *stars = m_stars;
int i; int i;
int total_stars; int total_stars;
UINT32 generator; UINT32 generator;
@ -1412,7 +1412,7 @@ void galaxold_state::noop_draw_stars(bitmap_ind16 &bitmap, const rectangle &clip
void galaxold_state::galaxold_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect) void galaxold_state::galaxold_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect)
{ {
struct star *stars = m_stars; struct star_gold *stars = m_stars;
int offs; int offs;
@ -1440,7 +1440,7 @@ void galaxold_state::galaxold_draw_stars(bitmap_ind16 &bitmap, const rectangle &
void galaxold_state::scrambold_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect) void galaxold_state::scrambold_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect)
{ {
struct star *stars = m_stars; struct star_gold *stars = m_stars;
int offs; int offs;
@ -1485,7 +1485,7 @@ void galaxold_state::scrambold_draw_stars(bitmap_ind16 &bitmap, const rectangle
void galaxold_state::rescue_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect) void galaxold_state::rescue_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect)
{ {
struct star *stars = m_stars; struct star_gold *stars = m_stars;
int offs; int offs;
@ -1532,7 +1532,7 @@ void galaxold_state::rescue_draw_stars(bitmap_ind16 &bitmap, const rectangle &cl
void galaxold_state::mariner_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect) void galaxold_state::mariner_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect)
{ {
struct star *stars = m_stars; struct star_gold *stars = m_stars;
int offs; int offs;
UINT8 *prom; UINT8 *prom;

View File

@ -70,7 +70,7 @@ void kaneko16_sprite_device::static_set_gfxdecode_tag(device_t &device, const ch
void kaneko16_sprite_device::device_start() void kaneko16_sprite_device::device_start()
{ {
m_first_sprite = auto_alloc_array(machine(), struct tempsprite, 0x400); m_first_sprite = auto_alloc_array(machine(), struct kan_tempsprite, 0x400);
m_sprites_regs = auto_alloc_array_clear(machine(), UINT16, 0x20/2); m_sprites_regs = auto_alloc_array_clear(machine(), UINT16, 0x20/2);
m_screen->register_screen_bitmap(m_sprites_bitmap); m_screen->register_screen_bitmap(m_sprites_bitmap);
@ -175,7 +175,7 @@ Offset: Format: Value:
#define USE_LATCHED_CODE 2 #define USE_LATCHED_CODE 2
#define USE_LATCHED_COLOR 4 #define USE_LATCHED_COLOR 4
void kaneko_kc002_sprite_device::get_sprite_attributes(struct tempsprite *s, UINT16 attr) void kaneko_kc002_sprite_device::get_sprite_attributes(struct kan_tempsprite *s, UINT16 attr)
{ {
s->color = (attr & 0x003f); s->color = (attr & 0x003f);
s->priority = (attr & 0x00c0) >> 6; s->priority = (attr & 0x00c0) >> 6;
@ -184,7 +184,7 @@ void kaneko_kc002_sprite_device::get_sprite_attributes(struct tempsprite *s, UIN
s->code += (s->y & 1) << 16; // bloodwar s->code += (s->y & 1) << 16; // bloodwar
} }
void kaneko_vu002_sprite_device::get_sprite_attributes(struct tempsprite *s, UINT16 attr) void kaneko_vu002_sprite_device::get_sprite_attributes(struct kan_tempsprite *s, UINT16 attr)
{ {
s->flipy = (attr & 0x0001); s->flipy = (attr & 0x0001);
s->flipx = (attr & 0x0002); s->flipx = (attr & 0x0002);
@ -193,7 +193,7 @@ void kaneko_vu002_sprite_device::get_sprite_attributes(struct tempsprite *s, UIN
} }
int kaneko16_sprite_device::kaneko16_parse_sprite_type012(int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes) int kaneko16_sprite_device::kaneko16_parse_sprite_type012(int i, struct kan_tempsprite *s, UINT16* spriteram16, int spriteram16_bytes)
{ {
int attr, xoffs, offs; int attr, xoffs, offs;
@ -358,7 +358,7 @@ void kaneko16_sprite_device::kaneko16_draw_sprites(_BitmapClass &bitmap, const r
int max = (m_screen->width() > 0x100) ? (0x200<<6) : (0x100<<6); int max = (m_screen->width() > 0x100) ? (0x200<<6) : (0x100<<6);
int i = 0; int i = 0;
struct tempsprite *s = m_first_sprite; struct kan_tempsprite *s = m_first_sprite;
/* These values are latched from the last sprite. */ /* These values are latched from the last sprite. */
int x = 0; int x = 0;

View File

@ -16,7 +16,7 @@ struct kaneko16_priority_t
int sprite[4]; int sprite[4];
}; };
struct tempsprite struct kan_tempsprite
{ {
int code,color; int code,color;
int x,y; int x,y;
@ -72,7 +72,7 @@ protected:
// pure virtual function for getting the attributes on sprites, the two different chip types have // pure virtual function for getting the attributes on sprites, the two different chip types have
// them in a different order // them in a different order
virtual void get_sprite_attributes(struct tempsprite *s, UINT16 attr) =0; virtual void get_sprite_attributes(struct kan_tempsprite *s, UINT16 attr) =0;
private: private:
@ -81,7 +81,7 @@ private:
UINT16 m_sprite_flipy; UINT16 m_sprite_flipy;
UINT16* m_sprites_regs; UINT16* m_sprites_regs;
struct tempsprite *m_first_sprite; struct kan_tempsprite *m_first_sprite;
int m_keep_sprites; int m_keep_sprites;
bitmap_ind16 m_sprites_bitmap; bitmap_ind16 m_sprites_bitmap;
@ -95,7 +95,7 @@ private:
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
bitmap_ind8 &priority_bitmap, int priority); bitmap_ind8 &priority_bitmap, int priority);
int kaneko16_parse_sprite_type012(int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes); int kaneko16_parse_sprite_type012(int i, struct kan_tempsprite *s, UINT16* spriteram16, int spriteram16_bytes);
void kaneko16_copybitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); void kaneko16_copybitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
void kaneko16_copybitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); void kaneko16_copybitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect);
@ -114,7 +114,7 @@ class kaneko_vu002_sprite_device : public kaneko16_sprite_device
{ {
public: public:
kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
void get_sprite_attributes(struct tempsprite *s, UINT16 attr); void get_sprite_attributes(struct kan_tempsprite *s, UINT16 attr);
int get_sprite_type(void){ return 0; }; int get_sprite_type(void){ return 0; };
}; };
@ -124,7 +124,7 @@ class kaneko_kc002_sprite_device : public kaneko16_sprite_device
{ {
public: public:
kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
void get_sprite_attributes(struct tempsprite *s, UINT16 attr); void get_sprite_attributes(struct kan_tempsprite *s, UINT16 attr);
int get_sprite_type(void){ return 1; }; int get_sprite_type(void){ return 1; };
}; };

View File

@ -147,7 +147,7 @@ WRITE16_MEMBER(m92_state::m92_paletteram_w)
TILE_GET_INFO_MEMBER(m92_state::get_pf_tile_info) TILE_GET_INFO_MEMBER(m92_state::get_pf_tile_info)
{ {
pf_layer_info *layer = (pf_layer_info *)tilemap.user_data(); M92_pf_layer_info *layer = (M92_pf_layer_info *)tilemap.user_data();
int tile, attrib; int tile, attrib;
tile_index = 2 * tile_index + layer->vram_base; tile_index = 2 * tile_index + layer->vram_base;
@ -203,7 +203,7 @@ WRITE16_MEMBER(m92_state::m92_pf3_control_w)
WRITE16_MEMBER(m92_state::m92_master_control_w) WRITE16_MEMBER(m92_state::m92_master_control_w)
{ {
UINT16 old = m_pf_master_control[offset]; UINT16 old = m_pf_master_control[offset];
pf_layer_info *layer; M92_pf_layer_info *layer;
COMBINE_DATA(&m_pf_master_control[offset]); COMBINE_DATA(&m_pf_master_control[offset]);
@ -252,7 +252,7 @@ VIDEO_START_MEMBER(m92_state,m92)
memset(&m_pf_layer, 0, sizeof(m_pf_layer)); memset(&m_pf_layer, 0, sizeof(m_pf_layer));
for (laynum = 0; laynum < 3; laynum++) for (laynum = 0; laynum < 3; laynum++)
{ {
pf_layer_info *layer = &m_pf_layer[laynum]; M92_pf_layer_info *layer = &m_pf_layer[laynum];
/* allocate two tilemaps per layer, one normal, one wide */ /* allocate two tilemaps per layer, one normal, one wide */
layer->tmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m92_state::get_pf_tile_info),this), TILEMAP_SCAN_ROWS, 8,8, 64,64); layer->tmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m92_state::get_pf_tile_info),this), TILEMAP_SCAN_ROWS, 8,8, 64,64);
@ -307,7 +307,7 @@ VIDEO_START_MEMBER(m92_state,ppan)
for (laynum = 0; laynum < 3; laynum++) for (laynum = 0; laynum < 3; laynum++)
{ {
pf_layer_info *layer = &m_pf_layer[laynum]; M92_pf_layer_info *layer = &m_pf_layer[laynum];
/* set scroll offsets */ /* set scroll offsets */
layer->tmap->set_scrolldx(2 * laynum + 11, -2 * laynum + 11); layer->tmap->set_scrolldx(2 * laynum + 11, -2 * laynum + 11);
@ -485,7 +485,7 @@ void m92_state::m92_update_scroll_positions()
for (laynum = 0; laynum < 3; laynum++) for (laynum = 0; laynum < 3; laynum++)
{ {
pf_layer_info *layer = &m_pf_layer[laynum]; M92_pf_layer_info *layer = &m_pf_layer[laynum];
if (m_pf_master_control[laynum] & 0x40) if (m_pf_master_control[laynum] & 0x40)
{ {

View File

@ -37,7 +37,7 @@
* *
*************************************/ *************************************/
struct poly_extra_data struct mz2_poly_extra_data
{ {
const void * palbase; const void * palbase;
const void * texbase; const void * texbase;
@ -258,7 +258,7 @@ VIDEO_START_MEMBER(midzeus2_state,midzeus2)
waveram[1] = auto_alloc_array(machine(), UINT32, WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 12/4); waveram[1] = auto_alloc_array(machine(), UINT32, WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 12/4);
/* initialize polygon engine */ /* initialize polygon engine */
poly = poly_alloc(machine(), 10000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS); poly = poly_alloc(machine(), 10000, sizeof(mz2_poly_extra_data), POLYFLAG_ALLOW_QUADS);
/* we need to cleanup on exit */ /* we need to cleanup on exit */
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(midzeus2_state::exit_handler2), this)); machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(midzeus2_state::exit_handler2), this));
@ -1027,7 +1027,7 @@ void midzeus2_state::zeus2_draw_model(UINT32 baseaddr, UINT16 count, int logit)
void midzeus2_state::zeus2_draw_quad(const UINT32 *databuffer, UINT32 texoffs, int logit) void midzeus2_state::zeus2_draw_quad(const UINT32 *databuffer, UINT32 texoffs, int logit)
{ {
poly_draw_scanline_func callback; poly_draw_scanline_func callback;
poly_extra_data *extra; mz2_poly_extra_data *extra;
poly_vertex clipvert[8]; poly_vertex clipvert[8];
poly_vertex vert[4]; poly_vertex vert[4];
// float uscale, vscale; // float uscale, vscale;
@ -1198,7 +1198,7 @@ In memory:
clipvert[i].y += 0.0005f; clipvert[i].y += 0.0005f;
} }
extra = (poly_extra_data *)poly_get_extra_data(poly); extra = (mz2_poly_extra_data *)poly_get_extra_data(poly);
switch (texmode) switch (texmode)
{ {
case 0x01d: /* crusnexo: RHS of score bar */ case 0x01d: /* crusnexo: RHS of score bar */
@ -1257,7 +1257,7 @@ In memory:
static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid) static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
{ {
const poly_extra_data *extra = (const poly_extra_data *)extradata; const mz2_poly_extra_data *extra = (const mz2_poly_extra_data *)extradata;
INT32 curz = extent->param[0].start; INT32 curz = extent->param[0].start;
INT32 curu = extent->param[1].start; INT32 curu = extent->param[1].start;
INT32 curv = extent->param[2].start; INT32 curv = extent->param[2].start;

View File

@ -37,19 +37,19 @@ struct view {
struct lightparam lightparams[32]; struct lightparam lightparams[32];
}; };
struct spoint { struct m1_spoint {
INT32 x, y; INT32 x, y;
}; };
struct point { struct m1_point {
float x, y, z; float x, y, z;
float xx, yy; float xx, yy;
struct spoint s; struct m1_spoint s;
}; };
struct quad_m1 { struct quad_m1 {
struct point *p[4]; struct m1_point *p[4];
float z; float z;
int col; int col;
}; };
@ -71,9 +71,9 @@ static float readf(const UINT16 *adr)
return u2f(readi(adr)); return u2f(readi(adr));
} }
static void _transform_point(struct view *view, struct point *p) static void _transform_point(struct view *view, struct m1_point *p)
{ {
struct point q = *p; struct m1_point q = *p;
float *trans = view->trans_mat; float *trans = view->trans_mat;
float xx, zz; float xx, zz;
xx = trans[0]*q.x+trans[3]*q.y+trans[6]*q.z+trans[9]+view->vxx; xx = trans[0]*q.x+trans[3]*q.y+trans[6]*q.z+trans[9]+view->vxx;
@ -107,7 +107,7 @@ static float mult_vector(const struct vector_t *p, const struct vector_t *q)
return p->x*q->x+p->y*q->y+p->z*q->z; return p->x*q->x+p->y*q->y+p->z*q->z;
} }
static float view_determinant(const struct point *p1, const struct point *p2, const struct point *p3) static float view_determinant(const struct m1_point *p1, const struct m1_point *p2, const struct m1_point *p3)
{ {
float x1 = p2->x - p1->x; float x1 = p2->x - p1->x;
float y1 = p2->y - p1->y; float y1 = p2->y - p1->y;
@ -120,7 +120,7 @@ static float view_determinant(const struct point *p1, const struct point *p2, co
} }
static void project_point(struct view *view, struct point *p) static void project_point(struct view *view, struct m1_point *p)
{ {
p->xx = p->x / p->z; p->xx = p->x / p->z;
p->yy = p->y / p->z; p->yy = p->y / p->z;
@ -128,7 +128,7 @@ static void project_point(struct view *view, struct point *p)
p->s.y = view->yc-(p->yy*view->zoomy+view->transy); p->s.y = view->yc-(p->yy*view->zoomy+view->transy);
} }
static void project_point_direct(struct view *view, struct point *p) static void project_point_direct(struct view *view, struct m1_point *p)
{ {
p->xx = p->x /*/ p->z*/; p->xx = p->x /*/ p->z*/;
p->yy = p->y /*/ p->z*/; p->yy = p->y /*/ p->z*/;
@ -241,7 +241,7 @@ static void fill_quad(bitmap_rgb32 &bitmap, struct view *view, const struct quad
{ {
INT32 sl1, sl2, cury, limy, x1, x2; INT32 sl1, sl2, cury, limy, x1, x2;
int pmin, pmax, i, ps1, ps2; int pmin, pmax, i, ps1, ps2;
struct spoint p[8]; struct m1_spoint p[8];
int color = q->col; int color = q->col;
if(color < 0) { if(color < 0) {
@ -502,12 +502,12 @@ static void recompute_frustrum(struct view *view)
view->a_top = (-view->y2+view->yc-view->transy)/view->zoomy; view->a_top = (-view->y2+view->yc-view->transy)/view->zoomy;
} }
static int fclip_isc_bottom(struct view *view, struct point *p) static int fclip_isc_bottom(struct view *view, struct m1_point *p)
{ {
return p->y > p->z*view->a_bottom; return p->y > p->z*view->a_bottom;
} }
static void fclip_clip_bottom(struct view *view, struct point *pt, struct point *p1, struct point *p2) static void fclip_clip_bottom(struct view *view, struct m1_point *pt, struct m1_point *p1, struct m1_point *p2)
{ {
float t = (p2->z*view->a_bottom-p2->y)/((p2->z-p1->z)*view->a_bottom-(p2->y-p1->y)); float t = (p2->z*view->a_bottom-p2->y)/((p2->z-p1->z)*view->a_bottom-(p2->y-p1->y));
pt->x = p1->x*t + p2->x*(1-t); pt->x = p1->x*t + p2->x*(1-t);
@ -516,12 +516,12 @@ static void fclip_clip_bottom(struct view *view, struct point *pt, struct point
project_point(view, pt); project_point(view, pt);
} }
static int fclip_isc_top(struct view *view, struct point *p) static int fclip_isc_top(struct view *view, struct m1_point *p)
{ {
return p->y < p->z*view->a_top; return p->y < p->z*view->a_top;
} }
static void fclip_clip_top(struct view *view, struct point *pt, struct point *p1, struct point *p2) static void fclip_clip_top(struct view *view, struct m1_point *pt, struct m1_point *p1, struct m1_point *p2)
{ {
float t = (p2->z*view->a_top-p2->y)/((p2->z-p1->z)*view->a_top-(p2->y-p1->y)); float t = (p2->z*view->a_top-p2->y)/((p2->z-p1->z)*view->a_top-(p2->y-p1->y));
pt->x = p1->x*t + p2->x*(1-t); pt->x = p1->x*t + p2->x*(1-t);
@ -530,12 +530,12 @@ static void fclip_clip_top(struct view *view, struct point *pt, struct point *p1
project_point(view, pt); project_point(view, pt);
} }
static int fclip_isc_left(struct view *view, struct point *p) static int fclip_isc_left(struct view *view, struct m1_point *p)
{ {
return p->x < p->z*view->a_left; return p->x < p->z*view->a_left;
} }
static void fclip_clip_left(struct view *view, struct point *pt, struct point *p1, struct point *p2) static void fclip_clip_left(struct view *view, struct m1_point *pt, struct m1_point *p1, struct m1_point *p2)
{ {
float t = (p2->z*view->a_left-p2->x)/((p2->z-p1->z)*view->a_left-(p2->x-p1->x)); float t = (p2->z*view->a_left-p2->x)/((p2->z-p1->z)*view->a_left-(p2->x-p1->x));
pt->x = p1->x*t + p2->x*(1-t); pt->x = p1->x*t + p2->x*(1-t);
@ -544,12 +544,12 @@ static void fclip_clip_left(struct view *view, struct point *pt, struct point *p
project_point(view, pt); project_point(view, pt);
} }
static int fclip_isc_right(struct view *view, struct point *p) static int fclip_isc_right(struct view *view, struct m1_point *p)
{ {
return p->x > p->z*view->a_right; return p->x > p->z*view->a_right;
} }
static void fclip_clip_right(struct view *view, struct point *pt, struct point *p1, struct point *p2) static void fclip_clip_right(struct view *view, struct m1_point *pt, struct m1_point *p1, struct m1_point *p2)
{ {
float t = (p2->z*view->a_right-p2->x)/((p2->z-p1->z)*view->a_right-(p2->x-p1->x)); float t = (p2->z*view->a_right-p2->x)/((p2->z-p1->z)*view->a_right-(p2->x-p1->x));
pt->x = p1->x*t + p2->x*(1-t); pt->x = p1->x*t + p2->x*(1-t);
@ -559,8 +559,8 @@ static void fclip_clip_right(struct view *view, struct point *pt, struct point *
} }
static const struct { static const struct {
int (*isclipped)(struct view *view, struct point *p); int (*isclipped)(struct view *view, struct m1_point *p);
void (*clip)(struct view *view, struct point *pt, struct point *p1, struct point *p2); void (*clip)(struct view *view, struct m1_point *pt, struct m1_point *p1, struct m1_point *p2);
} clipfn[4] = { } clipfn[4] = {
{ fclip_isc_bottom, fclip_clip_bottom }, { fclip_isc_bottom, fclip_clip_bottom },
{ fclip_isc_top, fclip_clip_top }, { fclip_isc_top, fclip_clip_top },
@ -569,7 +569,7 @@ static const struct {
}; };
void model1_state::fclip_push_quad_next(int level, struct quad_m1 *q, void model1_state::fclip_push_quad_next(int level, struct quad_m1 *q,
struct point *p1, struct point *p2, struct point *p3, struct point *p4) struct m1_point *p1, struct m1_point *p2, struct m1_point *p3, struct m1_point *p4)
{ {
struct quad_m1 q2; struct quad_m1 q2;
q2.col = q->col; q2.col = q->col;
@ -586,9 +586,9 @@ void model1_state::fclip_push_quad(int level, struct quad_m1 *q)
{ {
struct view *view = m_view; struct view *view = m_view;
int i, j; int i, j;
struct point *pt[4], *pi1, *pi2; struct m1_point *pt[4], *pi1, *pi2;
int is_out[4], is_out2[4]; int is_out[4], is_out2[4];
void (*fclip_point)(struct view *view, struct point *pt, struct point *p1, struct point *p2); void (*fclip_point)(struct view *view, struct m1_point *pt, struct m1_point *p1, struct m1_point *p2);
if(level == 4) { if(level == 4) {
LOG_TGP(("VIDEOCQ %d", level)); LOG_TGP(("VIDEOCQ %d", level));
@ -729,7 +729,7 @@ void model1_state::push_object(UINT32 tex_adr, UINT32 poly_adr, UINT32 size)
struct view *view = m_view; struct view *view = m_view;
int i; int i;
UINT32 flags; UINT32 flags;
struct point *old_p0, *old_p1, *p0, *p1; struct m1_point *old_p0, *old_p1, *p0, *p1;
struct vector_t vn; struct vector_t vn;
int link, type; int link, type;
#if 0 #if 0
@ -943,7 +943,7 @@ UINT16 *model1_state::push_direct(UINT16 *list)
struct view *view = m_view; struct view *view = m_view;
UINT32 flags; UINT32 flags;
UINT32 tex_adr, lum; //, v1, v2; UINT32 tex_adr, lum; //, v1, v2;
struct point *old_p0, *old_p1, *p0, *p1; struct m1_point *old_p0, *old_p1, *p0, *p1;
int link, type; int link, type;
float z; float z;
struct quad_m1 cquad; struct quad_m1 cquad;
@ -1446,7 +1446,7 @@ VIDEO_START_MEMBER(model1_state,model1)
m_poly_rom = (UINT32 *)memregion("user1")->base(); m_poly_rom = (UINT32 *)memregion("user1")->base();
m_poly_ram = auto_alloc_array_clear(machine(), UINT32, 0x400000); m_poly_ram = auto_alloc_array_clear(machine(), UINT32, 0x400000);
m_tgp_ram = auto_alloc_array_clear(machine(), UINT16, 0x100000-0x40000); m_tgp_ram = auto_alloc_array_clear(machine(), UINT16, 0x100000-0x40000);
m_pointdb = auto_alloc_array_clear(machine(), struct point, 1000000*2); m_pointdb = auto_alloc_array_clear(machine(), struct m1_point, 1000000*2);
m_quaddb = auto_alloc_array_clear(machine(), struct quad_m1, 1000000); m_quaddb = auto_alloc_array_clear(machine(), struct quad_m1, 1000000);
m_quadind = auto_alloc_array_clear(machine(), struct quad_m1 *, 1000000); m_quadind = auto_alloc_array_clear(machine(), struct quad_m1 *, 1000000);

View File

@ -272,7 +272,7 @@ void namcos21_state::renderscanline_flat(const edge *e1, const edge *e2, int sy,
} }
} }
void namcos21_state::rendertri(const vertex *v0, const vertex *v1, const vertex *v2, unsigned color, int depthcueenable) void namcos21_state::rendertri(const n21_vertex *v0, const n21_vertex *v1, const n21_vertex *v2, unsigned color, int depthcueenable)
{ {
int dy,ystart,yend,crop; int dy,ystart,yend,crop;
@ -281,11 +281,11 @@ void namcos21_state::rendertri(const vertex *v0, const vertex *v1, const vertex
{ {
if( v0->y > v1->y ) if( v0->y > v1->y )
{ {
SWAP(vertex,v0,v1); SWAP(n21_vertex,v0,v1);
} }
else if( v1->y > v2->y ) else if( v1->y > v2->y )
{ {
SWAP(vertex,v1,v2); SWAP(n21_vertex,v1,v2);
} }
else else
{ {
@ -387,7 +387,7 @@ void namcos21_state::rendertri(const vertex *v0, const vertex *v1, const vertex
void namcos21_state::draw_quad(int sx[4], int sy[4], int zcode[4], int color) void namcos21_state::draw_quad(int sx[4], int sy[4], int zcode[4], int color)
{ {
vertex a,b,c,d; n21_vertex a,b,c,d;
int depthcueenable = 1; int depthcueenable = 1;
/* /*
0x0000..0x1fff sprite palettes (0x20 sets of 0x100 colors) 0x0000..0x1fff sprite palettes (0x20 sets of 0x100 colors)

View File

@ -20,7 +20,7 @@
#define VERBOSE_LEVEL ( 0 ) #define VERBOSE_LEVEL ( 0 )
struct smc_t struct jb_smc_t
{ {
int add_latch; int add_latch;
int cmd_latch; int cmd_latch;
@ -43,7 +43,7 @@ public:
required_device<s3c44b0_device> m_s3c44b0; required_device<s3c44b0_device> m_s3c44b0;
required_device<smartmedia_image_device> m_smartmedia; required_device<smartmedia_image_device> m_smartmedia;
UINT32 port[9]; UINT32 port[9];
smc_t smc; jb_smc_t smc;
#if defined(JUICEBOX_ENTER_DEBUG_MENU) || defined(JUICEBOX_DISPLAY_ROM_ID) #if defined(JUICEBOX_ENTER_DEBUG_MENU) || defined(JUICEBOX_DISPLAY_ROM_ID)
int port_g_read_count; int port_g_read_count;