mirror of
https://github.com/holub/mame
synced 2025-07-10 04:05:16 +03:00
Added missing casts and made other tweaks. The entire project
can now be optionally compiled with the C++ compiler (mingw g++ only for the moment; MSVC still has issues).
This commit is contained in:
parent
5d4816b665
commit
9eb86548bb
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -2390,6 +2390,7 @@ src/mame/includes/lethalj.h svneol=native#text/plain
|
||||
src/mame/includes/liberatr.h svneol=native#text/plain
|
||||
src/mame/includes/lkage.h svneol=native#text/plain
|
||||
src/mame/includes/lockon.h svneol=native#text/plain
|
||||
src/mame/includes/lordgun.h svneol=native#text/plain
|
||||
src/mame/includes/lsasquad.h svneol=native#text/plain
|
||||
src/mame/includes/lwings.h svneol=native#text/plain
|
||||
src/mame/includes/m10.h svneol=native#text/plain
|
||||
|
@ -80,6 +80,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* write the initial header */
|
||||
fprintf(dst, "extern const %s %s[];\n", type, varname);
|
||||
fprintf(dst, "const %s %s[] =\n{\n\t", type, varname);
|
||||
|
||||
/* write out the data */
|
||||
|
@ -283,6 +283,7 @@ static const UINT32 condition_map[] =
|
||||
|
||||
static UINT64 immediate_zero = 0;
|
||||
|
||||
extern const drcbe_interface drcbe_c_be_interface;
|
||||
const drcbe_interface drcbe_c_be_interface =
|
||||
{
|
||||
drcbec_alloc,
|
||||
|
@ -222,6 +222,7 @@ static int ddivs(UINT64 *dstlo, UINT64 *dsthi, INT64 src1, INT64 src2);
|
||||
***************************************************************************/
|
||||
|
||||
/* globally-accessible interface to the backend */
|
||||
extern const drcbe_interface drcbe_x86_be_interface;
|
||||
const drcbe_interface drcbe_x86_be_interface =
|
||||
{
|
||||
drcbex86_alloc,
|
||||
|
@ -2253,6 +2253,7 @@ OP(ff, OP_SBC ( ALX ) ) /* SBC alx (G) */
|
||||
|
||||
|
||||
|
||||
extern TABLE_OPCODES;
|
||||
TABLE_OPCODES =
|
||||
{
|
||||
O(00),O(01),O(02),O(03),O(04),O(05),O(06),O(07),
|
||||
|
@ -31,8 +31,8 @@ static CPU_INIT( i860 )
|
||||
cpustate->device = device;
|
||||
cpustate->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM);
|
||||
reset_i860(cpustate);
|
||||
i860_set_pin(cpustate, DEC_PIN_BUS_HOLD, 0);
|
||||
i860_set_pin(cpustate, DEC_PIN_RESET, 0);
|
||||
i860_set_pin(device, DEC_PIN_BUS_HOLD, 0);
|
||||
i860_set_pin(device, DEC_PIN_RESET, 0);
|
||||
cpustate->single_stepping = 0;
|
||||
|
||||
state_save_register_device_item_array(device, 0, cpustate->iregs);
|
||||
|
@ -198,7 +198,7 @@ extern void i860_gen_interrupt(i860_state_t*);
|
||||
|
||||
/* This is the external interface for asserting/deasserting a pin on
|
||||
the i860. */
|
||||
extern void i860_set_pin(i860_state_t*, int, int);
|
||||
extern void i860_set_pin(const device_config *, int, int);
|
||||
|
||||
/* Hard or soft reset. */
|
||||
extern void reset_i860(i860_state_t*);
|
||||
|
@ -309,8 +309,9 @@ static int has_delay_slot(UINT32 insn)
|
||||
|
||||
/* This is the external interface for asserting/deasserting pins on
|
||||
the i860. */
|
||||
void i860_set_pin (i860s *cpustate, int pin, int val)
|
||||
void i860_set_pin (const device_config *device, int pin, int val)
|
||||
{
|
||||
i860s *cpustate = get_safe_token(device);
|
||||
if (pin == DEC_PIN_BUS_HOLD)
|
||||
cpustate->pin_bus_hold = val;
|
||||
else if (pin == DEC_PIN_RESET)
|
||||
|
@ -62,6 +62,7 @@ static void m37710_set_irq_line(m37710i_cpu_struct *cpustate, int line, int stat
|
||||
|
||||
/* interrupt control mapping */
|
||||
|
||||
extern const int m37710_irq_levels[M37710_LINE_MAX];
|
||||
const int m37710_irq_levels[M37710_LINE_MAX] =
|
||||
{
|
||||
// maskable
|
||||
|
@ -2721,6 +2721,7 @@ OP(235, OP_DIV ( DX ) ) /* DIV dx */
|
||||
OP(249, OP_RLA ( IMM ) ) /* RLA imm */
|
||||
OP(2c2, OP_LDT ( IMM ) ) /* LDT imm */
|
||||
|
||||
extern TABLE_OPCODES;
|
||||
TABLE_OPCODES =
|
||||
{
|
||||
O(00),O(01),O(02),O(03),O(04),O(05),O(06),O(07),
|
||||
@ -2757,6 +2758,7 @@ TABLE_OPCODES =
|
||||
O(f8),O(f9),O(fa),O(fb),O(fc),O(fd),O(fe),O(ff)
|
||||
};
|
||||
|
||||
extern TABLE_OPCODES2;
|
||||
TABLE_OPCODES2 =
|
||||
{
|
||||
O(200),O(101),O(200),O(103),O(200),O(105),O(200),O(107),
|
||||
@ -2793,6 +2795,7 @@ TABLE_OPCODES2 =
|
||||
O(200),O(200),O(200),O(200),O(200),O(200),O(200),O(200)
|
||||
};
|
||||
|
||||
extern TABLE_OPCODES3;
|
||||
TABLE_OPCODES3 =
|
||||
{
|
||||
O(200),O(200),O(200),O(203),O(200),O(205),O(200),O(200),
|
||||
|
@ -189,7 +189,8 @@ struct _game_driver
|
||||
GAMEL(YEAR,NAME,PARENT,MACHINE,INPUT,INIT,MONITOR,COMPANY,FULLNAME,FLAGS,((const char *)0))
|
||||
|
||||
#define GAMEL(YEAR,NAME,PARENT,MACHINE,INPUT,INIT,MONITOR,COMPANY,FULLNAME,FLAGS,LAYOUT) \
|
||||
const game_driver driver_##NAME = \
|
||||
extern const game_driver driver_##NAME; \
|
||||
const game_driver driver_##NAME = \
|
||||
{ \
|
||||
__FILE__, \
|
||||
#PARENT, \
|
||||
|
@ -361,7 +361,7 @@ void *eepromdev_get_data_pointer(const device_config *device, UINT32 *length, UI
|
||||
|
||||
static DEVICE_NVRAM( eeprom )
|
||||
{
|
||||
const eeprom_config *config = device->inline_config;
|
||||
const eeprom_config *config = (const eeprom_config *)device->inline_config;
|
||||
|
||||
if (read_or_write)
|
||||
eepromdev_save(device, file);
|
||||
@ -384,7 +384,7 @@ static DEVICE_START(eeprom)
|
||||
assert(device->machine != NULL);
|
||||
assert(device->machine->config != NULL);
|
||||
|
||||
config = device->inline_config;
|
||||
config = (const eeprom_config *)device->inline_config;
|
||||
|
||||
c->intf = config->pinterface;
|
||||
|
||||
|
@ -375,7 +375,7 @@ static DEVICE_START( i2cmem )
|
||||
assert( device->machine != NULL );
|
||||
assert( device->machine->config != NULL );
|
||||
|
||||
config = device->inline_config;
|
||||
config = (const i2cmem_config *)device->inline_config;
|
||||
|
||||
c->scl = 0;
|
||||
c->sdaw = 0;
|
||||
@ -431,7 +431,7 @@ static DEVICE_RESET( i2cmem )
|
||||
|
||||
static DEVICE_NVRAM( i2cmem )
|
||||
{
|
||||
const i2cmem_config *config = device->inline_config;
|
||||
const i2cmem_config *config = (const i2cmem_config *)device->inline_config;
|
||||
i2cmem_state *c = get_safe_token( device );
|
||||
|
||||
if( read_or_write )
|
||||
|
@ -860,7 +860,7 @@ static DEVICE_START( speaker_output )
|
||||
static DEVICE_STOP( speaker_output )
|
||||
{
|
||||
#ifdef MAME_DEBUG
|
||||
speaker_info *info = device->token;
|
||||
speaker_info *info = (speaker_info *)device->token;
|
||||
|
||||
/* log the maximum sample values for all speakers */
|
||||
if (info->max_sample > 0)
|
||||
|
@ -35,6 +35,8 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine *machine, int n_level,
|
||||
#define SAMPLES_PER_BLOCK ( 28 )
|
||||
#define PITCH_SHIFT ( 12 )
|
||||
|
||||
typedef enum { e_attack = 0, e_decay, e_sustain, e_sustainEnd, e_release, e_releaseend } sound_envstate;
|
||||
|
||||
struct psxinfo
|
||||
{
|
||||
const psx_spu_interface *intf;
|
||||
@ -66,7 +68,7 @@ struct psxinfo
|
||||
UINT16 m_p_n_pitch[ MAX_CHANNEL ];
|
||||
UINT16 m_p_n_address[ MAX_CHANNEL ];
|
||||
UINT16 m_p_n_envelopestate[ MAX_CHANNEL ];
|
||||
enum envstate { e_attack = 0, e_decay, e_sustain, e_sustainEnd, e_release, e_releaseend } m_envstate;
|
||||
sound_envstate m_envstate;
|
||||
UINT16 m_p_n_attackdecaysustain[ MAX_CHANNEL ];
|
||||
UINT16 m_p_n_sustainrelease[ MAX_CHANNEL ];
|
||||
UINT16 m_p_n_adsrvolume[ MAX_CHANNEL ];
|
||||
|
@ -239,7 +239,7 @@ static void qsound_set_command(qsound_state *chip, int data, int value)
|
||||
ch=(ch+1)&0x0f; /* strange ... */
|
||||
chip->channel[ch].bank=(value&0x7f)<<16;
|
||||
#ifdef MAME_DEBUG
|
||||
if (!value & 0x8000)
|
||||
if (!(value & 0x8000))
|
||||
popmessage("Register3=%04x",value);
|
||||
#endif
|
||||
|
||||
|
@ -703,7 +703,7 @@ void timer_adjust_oneshot(emu_timer *which, attotime duration, INT32 param)
|
||||
void timer_device_adjust_oneshot(const device_config *timer, attotime duration, INT32 param)
|
||||
{
|
||||
#ifdef MAME_DEBUG
|
||||
timer_config *config = timer->inline_config;
|
||||
timer_config *config = (timer_config *)timer->inline_config;
|
||||
|
||||
/* doesn't make sense for scanline timers */
|
||||
assert(config->type != TIMER_TYPE_SCANLINE);
|
||||
@ -756,7 +756,7 @@ void timer_device_adjust_periodic(const device_config *timer, attotime start_del
|
||||
{
|
||||
timer_state *state = get_safe_token(timer);
|
||||
#ifdef MAME_DEBUG
|
||||
timer_config *config = timer->inline_config;
|
||||
timer_config *config = (timer_config *)timer->inline_config;
|
||||
|
||||
/* doesn't make sense for scanline timers */
|
||||
assert(config->type != TIMER_TYPE_SCANLINE);
|
||||
@ -820,7 +820,7 @@ void timer_device_reset(const device_config *timer)
|
||||
{
|
||||
timer_state *state = get_safe_token(timer);
|
||||
#ifdef MAME_DEBUG
|
||||
timer_config *config = timer->inline_config;
|
||||
timer_config *config = (timer_config *)timer->inline_config;
|
||||
|
||||
/* doesn't make sense for scanline timers */
|
||||
assert(config->type != TIMER_TYPE_SCANLINE);
|
||||
@ -890,7 +890,7 @@ int timer_device_get_param(const device_config *timer)
|
||||
{
|
||||
timer_state *state = get_safe_token(timer);
|
||||
#ifdef MAME_DEBUG
|
||||
timer_config *config = timer->inline_config;
|
||||
timer_config *config = (timer_config *)timer->inline_config;
|
||||
|
||||
/* doesn't make sense for scanline timers */
|
||||
assert(config->type != TIMER_TYPE_SCANLINE);
|
||||
@ -915,7 +915,7 @@ void timer_device_set_param(const device_config *timer, int param)
|
||||
{
|
||||
timer_state *state = get_safe_token(timer);
|
||||
#ifdef MAME_DEBUG
|
||||
timer_config *config = timer->inline_config;
|
||||
timer_config *config = (timer_config *)timer->inline_config;
|
||||
|
||||
/* doesn't make sense for scanline timers */
|
||||
assert(config->type != TIMER_TYPE_SCANLINE);
|
||||
|
@ -1987,7 +1987,7 @@ static char *slider_get_laserdisc_desc(const device_config *laserdisc)
|
||||
#ifdef MAME_DEBUG
|
||||
static INT32 slider_crossscale(running_machine *machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
input_field_config *field = arg;
|
||||
input_field_config *field = (input_field_config *)arg;
|
||||
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
field->crossscale = (float)newval * 0.001f;
|
||||
@ -2006,7 +2006,7 @@ static INT32 slider_crossscale(running_machine *machine, void *arg, astring *str
|
||||
#ifdef MAME_DEBUG
|
||||
static INT32 slider_crossoffset(running_machine *machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
input_field_config *field = arg;
|
||||
input_field_config *field = (input_field_config *)arg;
|
||||
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
field->crossoffset = (float)newval * 0.001f;
|
||||
|
@ -1511,7 +1511,7 @@ static void menu_main_populate(running_machine *machine, ui_menu *menu, void *st
|
||||
|
||||
/* add crosshair options menu */
|
||||
if (crosshair_get_usage(machine))
|
||||
ui_menu_item_append(menu, "Crosshair Options", NULL, 0, menu_crosshair);
|
||||
ui_menu_item_append(menu, "Crosshair Options", NULL, 0, (void *)menu_crosshair);
|
||||
|
||||
/* add cheat menu */
|
||||
if (options_get_bool(mame_options(), OPTION_CHEAT) && cheat_get_next_menu_entry(machine, NULL, NULL, NULL, NULL) != NULL)
|
||||
@ -3077,7 +3077,7 @@ static void menu_crosshair(running_machine *machine, ui_menu *menu, void *parame
|
||||
if (event != NULL && event->itemref != NULL)
|
||||
{
|
||||
crosshair_user_settings settings;
|
||||
crosshair_item_data *data = event->itemref;
|
||||
crosshair_item_data *data = (crosshair_item_data *)event->itemref;
|
||||
int changed = FALSE;
|
||||
int set_def = FALSE;
|
||||
int newval = data->cur;
|
||||
@ -3193,7 +3193,7 @@ static void menu_crosshair_populate(running_machine *machine, ui_menu *menu)
|
||||
if (settings.mode == CROSSHAIR_VISIBILITY_AUTO) use_auto = TRUE;
|
||||
|
||||
/* CROSSHAIR_ITEM_VIS - allocate a data item and fill it */
|
||||
data = ui_menu_pool_alloc(menu, sizeof(*data));
|
||||
data = (crosshair_item_data *)ui_menu_pool_alloc(menu, sizeof(*data));
|
||||
data->type = CROSSHAIR_ITEM_VIS;
|
||||
data->player = player;
|
||||
data->min = CROSSHAIR_VISIBILITY_OFF;
|
||||
@ -3212,7 +3212,7 @@ static void menu_crosshair_populate(running_machine *machine, ui_menu *menu)
|
||||
ui_menu_item_append(menu, temp_text, vis_text[settings.mode], flags, data);
|
||||
|
||||
/* CROSSHAIR_ITEM_PIC - allocate a data item and fill it */
|
||||
data = ui_menu_pool_alloc(menu, sizeof(*data));
|
||||
data = (crosshair_item_data *)ui_menu_pool_alloc(menu, sizeof(*data));
|
||||
data->type = CROSSHAIR_ITEM_PIC;
|
||||
data->player = player;
|
||||
data->last_name[0] = 0;
|
||||
@ -3299,7 +3299,7 @@ static void menu_crosshair_populate(running_machine *machine, ui_menu *menu)
|
||||
crosshair_get_user_settings(machine, 0, &settings);
|
||||
|
||||
/* CROSSHAIR_ITEM_AUTO_TIME - allocate a data item and fill it */
|
||||
data = ui_menu_pool_alloc(menu, sizeof(*data));
|
||||
data = (crosshair_item_data *)ui_menu_pool_alloc(menu, sizeof(*data));
|
||||
data->type = CROSSHAIR_ITEM_AUTO_TIME;
|
||||
data->min = CROSSHAIR_VISIBILITY_AUTOTIME_MIN;
|
||||
data->max = CROSSHAIR_VISIBILITY_AUTOTIME_MAX;
|
||||
|
@ -25,6 +25,8 @@ static const discrete_mixer_desc desc_cliffhgr_mixer =
|
||||
8
|
||||
};
|
||||
|
||||
DISCRETE_SOUND_EXTERN(cliffhgr);
|
||||
|
||||
DISCRETE_SOUND_START(cliffhgr)
|
||||
DISCRETE_INPUT_LOGIC(CLIFF_ENABLE_SND_1)
|
||||
DISCRETE_INPUT_LOGIC(CLIFF_ENABLE_SND_2)
|
||||
|
@ -304,7 +304,7 @@ struct dkong_custom_mixer_context
|
||||
|
||||
static DISCRETE_STEP( dkong_custom_mixer )
|
||||
{
|
||||
struct dkong_custom_mixer_context *context = node->context;
|
||||
struct dkong_custom_mixer_context *context = (struct dkong_custom_mixer_context *)node->context;
|
||||
|
||||
int in_1 = (int)DKONG_CUSTOM_IN1;
|
||||
|
||||
@ -323,7 +323,7 @@ static DISCRETE_STEP( dkong_custom_mixer )
|
||||
|
||||
static DISCRETE_RESET( dkong_custom_mixer )
|
||||
{
|
||||
struct dkong_custom_mixer_context *context = node->context;
|
||||
struct dkong_custom_mixer_context *context = (struct dkong_custom_mixer_context *)node->context;
|
||||
|
||||
/* everything is based on the input to the O.C. inverter */
|
||||
/* precalculate current from In1 */
|
||||
@ -975,7 +975,7 @@ DISCRETE_SOUND_END
|
||||
|
||||
static SOUND_START( dkong)
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
|
||||
state->snd_rom = memory_region(machine, "soundcpu");
|
||||
state->dev_vp2 = devtag_get_device(machine, "virtual_p2");
|
||||
@ -1106,7 +1106,7 @@ static READ8_DEVICE_HANDLER( dkong_voice_status_r )
|
||||
|
||||
static READ8_DEVICE_HANDLER( dkong_tune_r )
|
||||
{
|
||||
dkong_state *state = device->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)device->machine->driver_data;
|
||||
UINT8 page = latch8_r(state->dev_vp2,0) & 0x47;
|
||||
|
||||
if ( page & 0x40 )
|
||||
|
@ -774,9 +774,9 @@ static void decode_and_filter_cvsd(UINT8 *input, int bytes, int maskbits, int fr
|
||||
int chunk_start;
|
||||
|
||||
/* compute the charge, decay, and leak constants */
|
||||
charge = pow(exp(-1), 1.0 / (FILTER_CHARGE_TC * (double)frequency));
|
||||
decay = pow(exp(-1), 1.0 / (FILTER_DECAY_TC * (double)frequency));
|
||||
leak = pow(exp(-1), 1.0 / (INTEGRATOR_LEAK_TC * (double)frequency));
|
||||
charge = pow(exp(-1.0), 1.0 / (FILTER_CHARGE_TC * (double)frequency));
|
||||
decay = pow(exp(-1.0), 1.0 / (FILTER_DECAY_TC * (double)frequency));
|
||||
leak = pow(exp(-1.0), 1.0 / (INTEGRATOR_LEAK_TC * (double)frequency));
|
||||
|
||||
/* compute the gain */
|
||||
gain = SAMPLE_GAIN;
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
static SOUND_START( jedi )
|
||||
{
|
||||
jedi_state *state = machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)machine->driver_data;
|
||||
|
||||
/* set up save state */
|
||||
state_save_register_global(machine, state->audio_latch);
|
||||
@ -40,7 +40,7 @@ static SOUND_START( jedi )
|
||||
|
||||
static SOUND_RESET( jedi )
|
||||
{
|
||||
jedi_state *state = machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)machine->driver_data;
|
||||
|
||||
/* init globals */
|
||||
state->audio_latch = 0;
|
||||
@ -79,7 +79,7 @@ WRITE8_HANDLER( jedi_audio_reset_w )
|
||||
|
||||
static TIMER_CALLBACK( delayed_audio_latch_w )
|
||||
{
|
||||
jedi_state *state = machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)machine->driver_data;
|
||||
|
||||
state->audio_latch = param;
|
||||
*state->audio_comm_stat |= 0x80;
|
||||
@ -94,7 +94,7 @@ WRITE8_HANDLER( jedi_audio_latch_w )
|
||||
|
||||
static READ8_HANDLER( audio_latch_r )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
|
||||
*state->audio_comm_stat &= ~0x80;
|
||||
return state->audio_latch;
|
||||
@ -103,7 +103,7 @@ static READ8_HANDLER( audio_latch_r )
|
||||
|
||||
CUSTOM_INPUT( jedi_audio_comm_stat_r )
|
||||
{
|
||||
jedi_state *state = field->port->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)field->port->machine->driver_data;
|
||||
return *state->audio_comm_stat >> 6;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ CUSTOM_INPUT( jedi_audio_comm_stat_r )
|
||||
|
||||
READ8_HANDLER( jedi_audio_ack_latch_r )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
|
||||
*state->audio_comm_stat &= ~0x40;
|
||||
return state->audio_ack_latch;
|
||||
@ -126,7 +126,7 @@ READ8_HANDLER( jedi_audio_ack_latch_r )
|
||||
|
||||
static WRITE8_HANDLER( audio_ack_latch_w )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
|
||||
state->audio_ack_latch = data;
|
||||
*state->audio_comm_stat |= 0x40;
|
||||
@ -142,7 +142,7 @@ static WRITE8_HANDLER( audio_ack_latch_w )
|
||||
|
||||
static WRITE8_HANDLER( speech_strobe_w )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
int new_speech_strobe_state = (~offset >> 8) & 1;
|
||||
|
||||
if ((new_speech_strobe_state != state->speech_strobe_state) && new_speech_strobe_state)
|
||||
|
@ -380,7 +380,7 @@ static STREAM_UPDATE( leland_80186_dac_update )
|
||||
|
||||
static STREAM_UPDATE( leland_80186_dma_update )
|
||||
{
|
||||
const address_space *dmaspace = param;
|
||||
const address_space *dmaspace = (const address_space *)param;
|
||||
stream_sample_t *buffer = outputs[0];
|
||||
int i, j;
|
||||
|
||||
|
@ -190,7 +190,7 @@ struct mario_custom_run_context
|
||||
|
||||
static DISCRETE_STEP( mario_custom_run )
|
||||
{
|
||||
struct mario_custom_run_context *context = node->context;
|
||||
struct mario_custom_run_context *context = (struct mario_custom_run_context *)node->context;
|
||||
|
||||
double t1 = 0.5 / LS624_F(MARIO_CUSTOM_C1, MARIO_CUSTOM_IN1, RUN_VCO_VOLTAGE);
|
||||
double t2 = 0.5 / LS624_F(MARIO_CUSTOM_C2, MARIO_CUSTOM_IN2, RUN_VCO_VOLTAGE);
|
||||
@ -248,7 +248,7 @@ static DISCRETE_STEP( mario_custom_run )
|
||||
|
||||
static DISCRETE_RESET( mario_custom_run )
|
||||
{
|
||||
struct mario_custom_run_context *context = node->context;
|
||||
struct mario_custom_run_context *context = (struct mario_custom_run_context *)node->context;
|
||||
|
||||
context->remain1 = 0.0;
|
||||
context->remain2 = 0.0;
|
||||
@ -363,7 +363,7 @@ DISCRETE_SOUND_END
|
||||
|
||||
static void set_ea(const address_space *space, int ea)
|
||||
{
|
||||
mario_state *state = space->machine->driver_data;
|
||||
mario_state *state = (mario_state *)space->machine->driver_data;
|
||||
//printf("ea: %d\n", ea);
|
||||
//cputag_set_input_line(machine, "audiocpu", MCS48_INPUT_EA, (ea) ? ASSERT_LINE : CLEAR_LINE);
|
||||
if (state->eabank != 0)
|
||||
@ -378,7 +378,7 @@ static void set_ea(const address_space *space, int ea)
|
||||
|
||||
static SOUND_START( mario )
|
||||
{
|
||||
mario_state *state = machine->driver_data;
|
||||
mario_state *state = (mario_state *)machine->driver_data;
|
||||
const device_config *audiocpu = cputag_get_cpu(machine, "audiocpu");
|
||||
#if USE_8039
|
||||
UINT8 *SND = memory_region(machine, "audiocpu");
|
||||
@ -401,7 +401,7 @@ static SOUND_START( mario )
|
||||
|
||||
static SOUND_RESET( mario )
|
||||
{
|
||||
mario_state *state = machine->driver_data;
|
||||
mario_state *state = (mario_state *)machine->driver_data;
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
#if USE_8039
|
||||
@ -480,7 +480,7 @@ static WRITE8_HANDLER( mario_sh_p2_w )
|
||||
|
||||
WRITE8_HANDLER( masao_sh_irqtrigger_w )
|
||||
{
|
||||
mario_state *state = space->machine->driver_data;
|
||||
mario_state *state = (mario_state *)space->machine->driver_data;
|
||||
|
||||
if (state->last == 1 && data == 0)
|
||||
{
|
||||
@ -513,7 +513,7 @@ WRITE8_DEVICE_HANDLER( mario_sh2_w )
|
||||
/* Misc samples */
|
||||
WRITE8_HANDLER( mario_sh3_w )
|
||||
{
|
||||
mario_state *state = space->machine->driver_data;
|
||||
mario_state *state = (mario_state *)space->machine->driver_data;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
|
@ -69,24 +69,19 @@ static write8_space_func ssio_custom_output[2];
|
||||
/* Chip Squeak Deluxe-specific globals */
|
||||
static const device_config *csdeluxe_sound_cpu;
|
||||
static UINT8 csdeluxe_status;
|
||||
static const pia6821_interface csdeluxe_pia_intf;
|
||||
|
||||
/* Turbo Chip Squeak-specific globals */
|
||||
static const device_config *turbocs_sound_cpu;
|
||||
static UINT8 turbocs_status;
|
||||
static const pia6821_interface turbocs_pia_intf;
|
||||
|
||||
/* Sounds Good-specific globals */
|
||||
static const device_config *soundsgood_sound_cpu;
|
||||
static UINT8 soundsgood_status;
|
||||
static const pia6821_interface soundsgood_pia_intf;
|
||||
|
||||
/* Squawk n' Talk-specific globals */
|
||||
static const device_config *squawkntalk_sound_cpu;
|
||||
static UINT8 squawkntalk_tms_command;
|
||||
static UINT8 squawkntalk_tms_strobes;
|
||||
static const pia6821_interface squawkntalk_pia0_intf;
|
||||
static const pia6821_interface squawkntalk_pia1_intf;
|
||||
|
||||
|
||||
|
||||
|
@ -43,8 +43,6 @@
|
||||
static UINT8 ay8910_latch_1;
|
||||
static UINT8 ay8910_latch_2;
|
||||
|
||||
static UINT8 ay8910_latch_1;
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
|
@ -144,7 +144,7 @@ struct _seibu_adpcm_state
|
||||
|
||||
static STREAM_UPDATE( seibu_adpcm_callback )
|
||||
{
|
||||
seibu_adpcm_state *state = param;
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)param;
|
||||
stream_sample_t *dest = outputs[0];
|
||||
|
||||
while (state->playing && samples > 0)
|
||||
@ -172,7 +172,7 @@ static STREAM_UPDATE( seibu_adpcm_callback )
|
||||
static DEVICE_START( seibu_adpcm )
|
||||
{
|
||||
running_machine *machine = device->machine;
|
||||
seibu_adpcm_state *state = device->token;
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)device->token;
|
||||
|
||||
state->playing = 0;
|
||||
state->stream = stream_create(device, 0, 1, device->clock, state, seibu_adpcm_callback);
|
||||
@ -215,7 +215,7 @@ void seibu_adpcm_decrypt(running_machine *machine, const char *region)
|
||||
|
||||
WRITE8_DEVICE_HANDLER( seibu_adpcm_adr_w )
|
||||
{
|
||||
seibu_adpcm_state *state = device->token;
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)device->token;
|
||||
|
||||
if (state->stream)
|
||||
stream_update(state->stream);
|
||||
@ -232,7 +232,7 @@ WRITE8_DEVICE_HANDLER( seibu_adpcm_adr_w )
|
||||
|
||||
WRITE8_DEVICE_HANDLER( seibu_adpcm_ctl_w )
|
||||
{
|
||||
seibu_adpcm_state *state = device->token;
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)device->token;
|
||||
|
||||
// sequence is 00 02 01 each time.
|
||||
if (state->stream)
|
||||
|
@ -246,7 +246,7 @@ WRITE8_HANDLER( tiamc1_timer1_gate_w )
|
||||
|
||||
static STREAM_UPDATE( tiamc1_sound_update )
|
||||
{
|
||||
int count, o0, o1, o2, len, or = 0;
|
||||
int count, o0, o1, o2, len, orval = 0;
|
||||
|
||||
len = samples * CLOCK_DIVIDER;
|
||||
|
||||
@ -271,11 +271,11 @@ static STREAM_UPDATE( tiamc1_sound_update )
|
||||
o1 = timer8253_get_output(&timer0, 1) ? 1 : 0;
|
||||
o2 = timer8253_get_output(&timer0, 2) ? 1 : 0;
|
||||
|
||||
or = (or << 1) | (((o0 | o1) ^ 0xff) & o2);
|
||||
orval = (orval << 1) | (((o0 | o1) ^ 0xff) & o2);
|
||||
|
||||
if ((count + 1) % CLOCK_DIVIDER == 0) {
|
||||
outputs[0][count / CLOCK_DIVIDER] = or ? 0x2828 : 0;
|
||||
or = 0;
|
||||
outputs[0][count / CLOCK_DIVIDER] = orval ? 0x2828 : 0;
|
||||
orval = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ if (!((data >> 4) & 1)) mame_printf_debug("/TRIG4\n");
|
||||
WRITE8_DEVICE_HANDLER( turbo_sound_a_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(device->machine, "samples");
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[0];
|
||||
state->sound_state[0] = data;
|
||||
|
||||
@ -122,7 +122,7 @@ WRITE8_DEVICE_HANDLER( turbo_sound_a_w )
|
||||
WRITE8_DEVICE_HANDLER( turbo_sound_b_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(device->machine, "samples");
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[1];
|
||||
state->sound_state[1] = data;
|
||||
|
||||
@ -145,7 +145,7 @@ WRITE8_DEVICE_HANDLER( turbo_sound_b_w )
|
||||
WRITE8_DEVICE_HANDLER( turbo_sound_c_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(device->machine, "samples");
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
|
||||
/* OSEL1-2 */
|
||||
state->turbo_osel = (state->turbo_osel & 1) | ((data & 3) << 1);
|
||||
@ -295,7 +295,7 @@ MACHINE_DRIVER_END
|
||||
|
||||
WRITE8_DEVICE_HANDLER( subroc3d_sound_a_w )
|
||||
{
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->sound_state[0] = data;
|
||||
|
||||
/* DIS0-3 contained in bits 0-3 */
|
||||
@ -326,7 +326,7 @@ INLINE void subroc3d_update_volume(const device_config *samples, int leftchan, U
|
||||
WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(device->machine, "samples");
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[1];
|
||||
state->sound_state[1] = data;
|
||||
|
||||
@ -382,7 +382,7 @@ WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w )
|
||||
WRITE8_DEVICE_HANDLER( subroc3d_sound_c_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(device->machine, "samples");
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[2];
|
||||
state->sound_state[2] = data;
|
||||
|
||||
@ -507,7 +507,7 @@ static void buckrog_update_samples(turbo_state *state, const device_config *samp
|
||||
WRITE8_DEVICE_HANDLER( buckrog_sound_a_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(device->machine, "samples");
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[0];
|
||||
state->sound_state[0] = data;
|
||||
|
||||
@ -533,7 +533,7 @@ WRITE8_DEVICE_HANDLER( buckrog_sound_a_w )
|
||||
WRITE8_DEVICE_HANDLER( buckrog_sound_b_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(device->machine, "samples");
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[1];
|
||||
state->sound_state[1] = data;
|
||||
|
||||
|
@ -160,7 +160,7 @@ static WRITE8_HANDLER( _20pacgal_coin_counter_w )
|
||||
|
||||
static WRITE8_HANDLER( rom_bank_select_w )
|
||||
{
|
||||
_20pacgal_state *state = space->machine->driver_data;
|
||||
_20pacgal_state *state = (_20pacgal_state *)space->machine->driver_data;
|
||||
|
||||
state->game_selected = data & 1;
|
||||
|
||||
@ -174,7 +174,7 @@ static WRITE8_HANDLER( rom_bank_select_w )
|
||||
|
||||
static WRITE8_HANDLER( rom_48000_w )
|
||||
{
|
||||
_20pacgal_state *state = space->machine->driver_data;
|
||||
_20pacgal_state *state = (_20pacgal_state *)space->machine->driver_data;
|
||||
|
||||
if (state->game_selected)
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ static UINT8 coin_counter[2];
|
||||
|
||||
static WRITE16_HANDLER( arcadia_multibios_change_game )
|
||||
{
|
||||
memory_install_read16_handler(space, 0x800000, 0x97ffff, 0, 0, (data == 0) ? SMH_BANK(2) : SMH_NOP);
|
||||
memory_install_read16_handler(space, 0x800000, 0x97ffff, 0, 0, (read16_space_func)((data == 0) ? SMH_BANK(2) : SMH_NOP));
|
||||
}
|
||||
|
||||
|
||||
@ -156,7 +156,7 @@ static CUSTOM_INPUT( coin_counter_r )
|
||||
|
||||
static INPUT_CHANGED( coin_changed_callback )
|
||||
{
|
||||
UINT8 *counter = param;
|
||||
UINT8 *counter = (UINT8 *)param;
|
||||
|
||||
/* check for a 0 -> 1 transition */
|
||||
if (!oldval && newval && *counter < 3)
|
||||
|
@ -141,7 +141,7 @@ static DIRECT_UPDATE_HANDLER( sloop_direct_handler )
|
||||
{
|
||||
if (address < 0x80000)
|
||||
{
|
||||
direct->raw = direct->decrypted = (void *)sloop_base;
|
||||
direct->raw = direct->decrypted = (UINT8 *)sloop_base;
|
||||
return (offs_t)-1;
|
||||
}
|
||||
return address;
|
||||
|
@ -457,7 +457,7 @@ static READ8_HANDLER( leta_r )
|
||||
/* if the joystick is centered, leave the rest of this alone */
|
||||
angle = last_angle;
|
||||
if (analogx < -32 || analogx > 32 || analogy < -32 || analogy > 32)
|
||||
angle = atan2(analogx, analogy) * 360 / (2 * M_PI);
|
||||
angle = atan2((double)analogx, (double)analogy) * 360 / (2 * M_PI);
|
||||
|
||||
/* detect when we pass the 0 point in either direction */
|
||||
if (last_angle < -90 && angle > 90)
|
||||
|
@ -497,7 +497,7 @@ static WRITE8_HANDLER( mux2latch_w )
|
||||
if ( changed & 0x08 )
|
||||
{ // clock changed
|
||||
|
||||
if ( (!data & 0x08) )
|
||||
if ( !(data & 0x08) )
|
||||
{ // clock changed to low
|
||||
int strobe, offset, pattern, i;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
static CDP1802_MODE_READ( cidelsa_mode_r )
|
||||
{
|
||||
cidelsa_state *state = device->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)device->machine->driver_data;
|
||||
|
||||
return state->cdp1802_mode;
|
||||
}
|
||||
@ -29,7 +29,7 @@ static CDP1802_EF_READ( cidelsa_ef_r )
|
||||
|
||||
static CDP1802_Q_WRITE( cidelsa_q_w )
|
||||
{
|
||||
cidelsa_state *state = device->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)device->machine->driver_data;
|
||||
|
||||
state->cdp1802_q = level;
|
||||
}
|
||||
@ -66,7 +66,7 @@ static WRITE8_HANDLER( draco_sound_bankswitch_w )
|
||||
|
||||
static WRITE8_DEVICE_HANDLER( draco_sound_g_w )
|
||||
{
|
||||
cidelsa_state *state = device->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)device->machine->driver_data;
|
||||
|
||||
/*
|
||||
|
||||
@ -97,21 +97,21 @@ static WRITE8_DEVICE_HANDLER( draco_sound_g_w )
|
||||
|
||||
static READ8_HANDLER( draco_sound_in_r )
|
||||
{
|
||||
cidelsa_state *state = space->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)space->machine->driver_data;
|
||||
|
||||
return ~(state->draco_sound) & 0x07;
|
||||
}
|
||||
|
||||
static READ8_HANDLER( draco_sound_ay8910_r )
|
||||
{
|
||||
cidelsa_state *state = space->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)space->machine->driver_data;
|
||||
|
||||
return state->draco_ay_latch;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( draco_sound_ay8910_w )
|
||||
{
|
||||
cidelsa_state *state = space->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)space->machine->driver_data;
|
||||
|
||||
state->draco_ay_latch = data;
|
||||
}
|
||||
@ -171,7 +171,7 @@ static WRITE8_HANDLER( draco_out1_w )
|
||||
7 SONIDO C -> COP402 IN2
|
||||
*/
|
||||
|
||||
cidelsa_state *state = space->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)space->machine->driver_data;
|
||||
|
||||
state->draco_sound = (data & 0xe0) >> 5;
|
||||
}
|
||||
@ -308,14 +308,14 @@ ADDRESS_MAP_END
|
||||
|
||||
static CUSTOM_INPUT( cdp1869_pcb_r )
|
||||
{
|
||||
cidelsa_state *state = field->port->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)field->port->machine->driver_data;
|
||||
|
||||
return state->cdp1869_pcb;
|
||||
}
|
||||
|
||||
static CUSTOM_INPUT( cdp1869_predisplay_r )
|
||||
{
|
||||
cidelsa_state *state = field->port->machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)field->port->machine->driver_data;
|
||||
|
||||
return state->cdp1869_prd;
|
||||
}
|
||||
@ -466,14 +466,14 @@ INPUT_PORTS_END
|
||||
|
||||
static TIMER_CALLBACK( set_cpu_mode )
|
||||
{
|
||||
cidelsa_state *state = machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)machine->driver_data;
|
||||
|
||||
state->cdp1802_mode = CDP1802_MODE_RUN;
|
||||
}
|
||||
|
||||
static MACHINE_START( cidelsa )
|
||||
{
|
||||
cidelsa_state *state = machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)machine->driver_data;
|
||||
|
||||
/* reset the CPU */
|
||||
state->cdp1802_mode = CDP1802_MODE_RESET;
|
||||
@ -485,7 +485,7 @@ static MACHINE_START( cidelsa )
|
||||
|
||||
static MACHINE_START( draco )
|
||||
{
|
||||
cidelsa_state *state = machine->driver_data;
|
||||
cidelsa_state *state = (cidelsa_state *)machine->driver_data;
|
||||
|
||||
MACHINE_START_CALL( cidelsa );
|
||||
|
||||
|
@ -8280,7 +8280,7 @@ static DRIVER_INIT( sf2ue )
|
||||
{
|
||||
/* This specific version of SF2 has the CPS-B custom mapped at a different address. */
|
||||
/* The mapping is handled by a PAL on the B-board */
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x800140, 0x80017f, 0, 0, SMH_UNMAP, SMH_UNMAP);
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x800140, 0x80017f, 0, 0, (read16_space_func)SMH_UNMAP, (write16_space_func)SMH_UNMAP);
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8001c0, 0x8001ff, 0, 0, cps1_cps_b_r, cps1_cps_b_w);
|
||||
|
||||
DRIVER_INIT_CALL(cps1);
|
||||
|
@ -620,13 +620,13 @@ static UINT16 rotate_left(UINT16 value, int n)
|
||||
return ((value<<n)|aux)%0x10000;
|
||||
}
|
||||
|
||||
static UINT16 rotxor(UINT16 val, UINT16 xor)
|
||||
static UINT16 rotxor(UINT16 val, UINT16 xorval)
|
||||
{
|
||||
UINT16 res;
|
||||
|
||||
res = val + rotate_left(val,2);
|
||||
|
||||
res = rotate_left(res,4) ^ (res & (val ^ xor));
|
||||
res = rotate_left(res,4) ^ (res & (val ^ xorval));
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -1429,8 +1429,8 @@ static WRITE32_HANDLER( cps3_gfxflash_w )
|
||||
UINT32* romdata = (UINT32*)cps3_user5region;
|
||||
int real_offset = 0;
|
||||
UINT32 newdata;
|
||||
UINT8* ptr1 = intelflash_getmemptr(flash1);
|
||||
UINT8* ptr2 = intelflash_getmemptr(flash2);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(flash1);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(flash2);
|
||||
|
||||
real_offset = ((cram_gfxflash_bank&0x3e) * 0x200000) + offset*4;
|
||||
|
||||
@ -1532,10 +1532,10 @@ static void cps3_flashmain_w(running_machine *machine, int base, UINT32 offset,
|
||||
UINT32* romdata2 = (UINT32*)decrypted_gamerom;
|
||||
int real_offset = 0;
|
||||
UINT32 newdata;
|
||||
UINT8* ptr1 = intelflash_getmemptr(base+0);
|
||||
UINT8* ptr2 = intelflash_getmemptr(base+1);
|
||||
UINT8* ptr3 = intelflash_getmemptr(base+2);
|
||||
UINT8* ptr4 = intelflash_getmemptr(base+3);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(base+0);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(base+1);
|
||||
UINT8* ptr3 = (UINT8*)intelflash_getmemptr(base+2);
|
||||
UINT8* ptr4 = (UINT8*)intelflash_getmemptr(base+3);
|
||||
|
||||
real_offset = offset * 4;
|
||||
|
||||
@ -2297,10 +2297,10 @@ static void precopy_to_flash(running_machine *machine)
|
||||
for (i=0;i<0x800000;i+=4)
|
||||
{
|
||||
UINT32 data;
|
||||
UINT8* ptr1 = intelflash_getmemptr(0);
|
||||
UINT8* ptr2 = intelflash_getmemptr(1);
|
||||
UINT8* ptr3 = intelflash_getmemptr(2);
|
||||
UINT8* ptr4 = intelflash_getmemptr(3);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(0);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(1);
|
||||
UINT8* ptr3 = (UINT8*)intelflash_getmemptr(2);
|
||||
UINT8* ptr4 = (UINT8*)intelflash_getmemptr(3);
|
||||
|
||||
data = romdata[i/4];
|
||||
|
||||
@ -2313,10 +2313,10 @@ static void precopy_to_flash(running_machine *machine)
|
||||
for (i=0;i<0x800000;i+=4)
|
||||
{
|
||||
UINT32 data;
|
||||
UINT8* ptr1 = intelflash_getmemptr(4);
|
||||
UINT8* ptr2 = intelflash_getmemptr(5);
|
||||
UINT8* ptr3 = intelflash_getmemptr(6);
|
||||
UINT8* ptr4 = intelflash_getmemptr(7);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(4);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(5);
|
||||
UINT8* ptr3 = (UINT8*)intelflash_getmemptr(6);
|
||||
UINT8* ptr4 = (UINT8*)intelflash_getmemptr(7);
|
||||
|
||||
data = romdata[(0x800000+i)/4];
|
||||
|
||||
@ -2338,8 +2338,8 @@ static void precopy_to_flash(running_machine *machine)
|
||||
|
||||
for (i=0;i<0x200000;i+=2)
|
||||
{
|
||||
UINT8* ptr1 = intelflash_getmemptr(flashnum);
|
||||
UINT8* ptr2 = intelflash_getmemptr(flashnum+1);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(flashnum);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(flashnum+1);
|
||||
UINT32 dat = romdata[(thebase+i)/2];
|
||||
|
||||
ptr1[BYTE_XOR_LE(i+1)] = (dat&0xff000000)>>24;
|
||||
@ -2364,10 +2364,10 @@ static void copy_from_nvram(running_machine *machine)
|
||||
for (i=0;i<0x800000;i+=4)
|
||||
{
|
||||
UINT32 data;
|
||||
UINT8* ptr1 = intelflash_getmemptr(0);
|
||||
UINT8* ptr2 = intelflash_getmemptr(1);
|
||||
UINT8* ptr3 = intelflash_getmemptr(2);
|
||||
UINT8* ptr4 = intelflash_getmemptr(3);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(0);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(1);
|
||||
UINT8* ptr3 = (UINT8*)intelflash_getmemptr(2);
|
||||
UINT8* ptr4 = (UINT8*)intelflash_getmemptr(3);
|
||||
|
||||
data = ((ptr1[i/4]<<24) | (ptr2[i/4]<<16) | (ptr3[i/4]<<8) | (ptr4[i/4]<<0));
|
||||
|
||||
@ -2383,10 +2383,10 @@ static void copy_from_nvram(running_machine *machine)
|
||||
for (i=0;i<0x800000;i+=4)
|
||||
{
|
||||
UINT32 data;
|
||||
UINT8* ptr1 = intelflash_getmemptr(4);
|
||||
UINT8* ptr2 = intelflash_getmemptr(5);
|
||||
UINT8* ptr3 = intelflash_getmemptr(6);
|
||||
UINT8* ptr4 = intelflash_getmemptr(7);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(4);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(5);
|
||||
UINT8* ptr3 = (UINT8*)intelflash_getmemptr(6);
|
||||
UINT8* ptr4 = (UINT8*)intelflash_getmemptr(7);
|
||||
|
||||
data = ((ptr1[i/4]<<24) | (ptr2[i/4]<<16) | (ptr3[i/4]<<8) | (ptr4[i/4]<<0));
|
||||
|
||||
@ -2408,8 +2408,8 @@ static void copy_from_nvram(running_machine *machine)
|
||||
|
||||
for (i=0;i<0x200000;i+=2)
|
||||
{
|
||||
UINT8* ptr1 = intelflash_getmemptr(flashnum);
|
||||
UINT8* ptr2 = intelflash_getmemptr(flashnum+1);
|
||||
UINT8* ptr1 = (UINT8*)intelflash_getmemptr(flashnum);
|
||||
UINT8* ptr2 = (UINT8*)intelflash_getmemptr(flashnum+1);
|
||||
UINT32 dat = (ptr1[i+0]<<8) |
|
||||
(ptr1[i+1]<<24) |
|
||||
(ptr2[i+0]<<0) |
|
||||
@ -2476,7 +2476,7 @@ static NVRAM_HANDLER( cps3 )
|
||||
|
||||
|
||||
|
||||
static UINT32 cps3_dma_callback(UINT32 src, UINT32 dst, UINT32 data, int size)
|
||||
static int cps3_dma_callback(UINT32 src, UINT32 dst, UINT32 data, int size)
|
||||
{
|
||||
/*
|
||||
on the actual CPS3 hardware the SH2 DMA bypasses the encryption.
|
||||
@ -2535,7 +2535,7 @@ static UINT32 cps3_dma_callback(UINT32 src, UINT32 dst, UINT32 data, int size)
|
||||
|
||||
static const sh2_cpu_core sh2_conf_cps3 = {
|
||||
0, // master
|
||||
(void*)cps3_dma_callback
|
||||
cps3_dma_callback
|
||||
};
|
||||
|
||||
static MACHINE_DRIVER_START( cps3 )
|
||||
|
@ -480,7 +480,7 @@ static WRITE32_HANDLER( tattass_control_w )
|
||||
static int pendingCommand=0; /* 1 = read, 2 = write */
|
||||
static int readBitCount=0;
|
||||
static int byteAddr=0;
|
||||
UINT8 *eeprom=eeprom_get_data_pointer(NULL,NULL);
|
||||
UINT8 *eeprom=(UINT8 *)eeprom_get_data_pointer(NULL,NULL);
|
||||
|
||||
/* Eprom in low byte */
|
||||
if (mem_mask==0x000000ff) { /* Byte write to low byte only (different from word writing including low byte) */
|
||||
|
@ -390,7 +390,7 @@ static INTERRUPT_GEN( s2650_interrupt )
|
||||
|
||||
static MACHINE_START( dkong2b )
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
|
||||
state->hardware_type = HARDWARE_TKG04;
|
||||
|
||||
@ -401,7 +401,7 @@ static MACHINE_START( dkong2b )
|
||||
|
||||
static MACHINE_START( s2650 )
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
UINT8 *p = memory_region(machine, "user1");
|
||||
const char *game_name = machine->gamedrv->name;
|
||||
int i;
|
||||
@ -433,7 +433,7 @@ static MACHINE_START( s2650 )
|
||||
|
||||
static MACHINE_START( radarscp )
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
|
||||
MACHINE_START_CALL(dkong2b);
|
||||
state->hardware_type = HARDWARE_TRS02;
|
||||
@ -441,7 +441,7 @@ static MACHINE_START( radarscp )
|
||||
|
||||
static MACHINE_START( radarsc1 )
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
|
||||
MACHINE_START_CALL(dkong2b);
|
||||
state->hardware_type = HARDWARE_TRS01;
|
||||
@ -449,7 +449,7 @@ static MACHINE_START( radarsc1 )
|
||||
|
||||
static MACHINE_START( dkong3 )
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
|
||||
state->hardware_type = HARDWARE_TKG04;
|
||||
}
|
||||
@ -461,7 +461,7 @@ static MACHINE_RESET( dkong )
|
||||
|
||||
static MACHINE_RESET( strtheat )
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
UINT8 *ROM = memory_region(machine, "maincpu");
|
||||
|
||||
MACHINE_RESET_CALL(dkong);
|
||||
@ -474,7 +474,7 @@ static MACHINE_RESET( strtheat )
|
||||
|
||||
static MACHINE_RESET( drakton )
|
||||
{
|
||||
dkong_state *state = machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)machine->driver_data;
|
||||
UINT8 *ROM = memory_region(machine, "maincpu");
|
||||
|
||||
MACHINE_RESET_CALL(dkong);
|
||||
@ -507,7 +507,7 @@ static WRITE8_DEVICE_HANDLER( dk_dma_write_byte )
|
||||
static READ8_DEVICE_HANDLER( hb_dma_read_byte )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
dkong_state *state = device->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)device->machine->driver_data;
|
||||
int bucket = state->rev_map[(offset>>10) & 0x1ff];
|
||||
int addr;
|
||||
|
||||
@ -522,7 +522,7 @@ static READ8_DEVICE_HANDLER( hb_dma_read_byte )
|
||||
static WRITE8_DEVICE_HANDLER( hb_dma_write_byte )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
dkong_state *state = device->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)device->machine->driver_data;
|
||||
int bucket = state->rev_map[(offset>>10) & 0x1ff];
|
||||
int addr;
|
||||
|
||||
@ -536,13 +536,13 @@ static WRITE8_DEVICE_HANDLER( hb_dma_write_byte )
|
||||
|
||||
static READ8_DEVICE_HANDLER( p8257_ctl_r )
|
||||
{
|
||||
dkong_state *state = device->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)device->machine->driver_data;
|
||||
return state->dma_latch;
|
||||
}
|
||||
|
||||
static WRITE8_DEVICE_HANDLER( p8257_ctl_w )
|
||||
{
|
||||
dkong_state *state = device->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)device->machine->driver_data;
|
||||
state->dma_latch = data;
|
||||
}
|
||||
|
||||
@ -606,7 +606,7 @@ static WRITE8_HANDLER( s2650_mirror_w )
|
||||
|
||||
static READ8_HANDLER( epos_decrypt_rom )
|
||||
{
|
||||
dkong_state *state = space->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)space->machine->driver_data;
|
||||
|
||||
if (offset & 0x01)
|
||||
{
|
||||
@ -636,7 +636,7 @@ static READ8_HANDLER( epos_decrypt_rom )
|
||||
|
||||
static WRITE8_HANDLER( s2650_data_w )
|
||||
{
|
||||
dkong_state *state = space->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)space->machine->driver_data;
|
||||
#if DEBUG_PROTECTION
|
||||
logerror("write : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), data);
|
||||
#endif
|
||||
@ -646,7 +646,7 @@ static WRITE8_HANDLER( s2650_data_w )
|
||||
|
||||
static READ8_HANDLER( s2650_port0_r )
|
||||
{
|
||||
dkong_state *state = space->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)space->machine->driver_data;
|
||||
#if DEBUG_PROTECTION
|
||||
logerror("port 0 : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), state->hunchloopback);
|
||||
#endif
|
||||
@ -673,7 +673,7 @@ static READ8_HANDLER( s2650_port0_r )
|
||||
|
||||
static READ8_HANDLER( s2650_port1_r )
|
||||
{
|
||||
dkong_state *state = space->machine->driver_data;
|
||||
dkong_state *state = (dkong_state *)space->machine->driver_data;
|
||||
#if DEBUG_PROTECTION
|
||||
logerror("port 1 : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), state->hunchloopback);
|
||||
#endif
|
||||
|
@ -842,7 +842,7 @@ static INPUT_CHANGED( gmgalax_game_changed )
|
||||
|
||||
static CUSTOM_INPUT( gmgalax_port_r )
|
||||
{
|
||||
const char *portname = param;
|
||||
const char *portname = (const char *)param;
|
||||
if (gmgalax_selected_game != 0)
|
||||
portname += strlen(portname) + 1;
|
||||
return input_port_read(field->port->machine, portname);
|
||||
|
@ -91,7 +91,7 @@ TODO:
|
||||
|
||||
static WRITE8_DEVICE_HANDLER( io_select_w )
|
||||
{
|
||||
gameplan_state *state = device->machine->driver_data;
|
||||
gameplan_state *state = (gameplan_state *)device->machine->driver_data;
|
||||
|
||||
switch (data)
|
||||
{
|
||||
@ -108,7 +108,7 @@ static WRITE8_DEVICE_HANDLER( io_select_w )
|
||||
static READ8_DEVICE_HANDLER( io_port_r )
|
||||
{
|
||||
static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3", "DSW0", "DSW1" };
|
||||
gameplan_state *state = device->machine->driver_data;
|
||||
gameplan_state *state = (gameplan_state *)device->machine->driver_data;
|
||||
|
||||
return input_port_read(device->machine, portnames[state->current_port]);
|
||||
}
|
||||
@ -139,7 +139,7 @@ static const via6522_interface via_1_interface =
|
||||
|
||||
static WRITE8_DEVICE_HANDLER( audio_reset_w )
|
||||
{
|
||||
gameplan_state *state = device->machine->driver_data;
|
||||
gameplan_state *state = (gameplan_state *)device->machine->driver_data;
|
||||
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (data == 0)
|
||||
{
|
||||
@ -151,14 +151,14 @@ static WRITE8_DEVICE_HANDLER( audio_reset_w )
|
||||
|
||||
static WRITE8_DEVICE_HANDLER( audio_cmd_w )
|
||||
{
|
||||
gameplan_state *state = device->machine->driver_data;
|
||||
gameplan_state *state = (gameplan_state *)device->machine->driver_data;
|
||||
riot6532_porta_in_set(state->riot, data, 0x7f);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_DEVICE_HANDLER( audio_trigger_w )
|
||||
{
|
||||
gameplan_state *state = device->machine->driver_data;
|
||||
gameplan_state *state = (gameplan_state *)device->machine->driver_data;
|
||||
riot6532_porta_in_set(state->riot, data << 7, 0x80);
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ static const riot6532_interface r6532_interface =
|
||||
|
||||
static MACHINE_START( gameplan )
|
||||
{
|
||||
gameplan_state *state = machine->driver_data;
|
||||
gameplan_state *state = (gameplan_state *)machine->driver_data;
|
||||
|
||||
state->riot = devtag_get_device(machine, "riot");
|
||||
|
||||
|
@ -7002,7 +7002,7 @@ static void do_blockswaps(UINT8* ROM)
|
||||
0xa000, 0xa800, 0xb000, 0xb800,
|
||||
};
|
||||
|
||||
buffer = malloc(0x10000);
|
||||
buffer = alloc_array_or_die(UINT8, 0x10000);
|
||||
memcpy(buffer,ROM,0x10000);
|
||||
|
||||
// swap some 0x800 blocks around..
|
||||
|
@ -305,7 +305,7 @@ static MACHINE_RESET( gottlieb )
|
||||
|
||||
static CUSTOM_INPUT( analog_delta_r )
|
||||
{
|
||||
const char *string = param;
|
||||
const char *string = (const char *)param;
|
||||
int which = string[0] - '0';
|
||||
|
||||
return input_port_read(field->port->machine, &string[1]) - track[which];
|
||||
|
@ -92,7 +92,7 @@ static MACHINE_RESET( grchamp )
|
||||
|
||||
static INTERRUPT_GEN( grchamp_cpu0_interrupt )
|
||||
{
|
||||
grchamp_state *state = device->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)device->machine->driver_data;
|
||||
|
||||
if (state->cpu0_out[0] & 0x01)
|
||||
cpu_set_input_line(device, 0, ASSERT_LINE);
|
||||
@ -101,7 +101,7 @@ static INTERRUPT_GEN( grchamp_cpu0_interrupt )
|
||||
|
||||
static INTERRUPT_GEN( grchamp_cpu1_interrupt )
|
||||
{
|
||||
grchamp_state *state = device->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)device->machine->driver_data;
|
||||
|
||||
if (state->cpu1_out[4] & 0x01)
|
||||
cpu_set_input_line(device, 0, ASSERT_LINE);
|
||||
@ -117,7 +117,7 @@ static INTERRUPT_GEN( grchamp_cpu1_interrupt )
|
||||
|
||||
static WRITE8_HANDLER( cpu0_outputs_w )
|
||||
{
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
UINT8 diff = data ^ state->cpu0_out[offset];
|
||||
state->cpu0_out[offset] = data;
|
||||
|
||||
@ -201,7 +201,7 @@ static WRITE8_HANDLER( led_board_w )
|
||||
{
|
||||
static const UINT8 ls247_map[16] =
|
||||
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x58,0x4c,0x62,0x69,0x78,0x00 };
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -245,7 +245,7 @@ static WRITE8_HANDLER( led_board_w )
|
||||
static WRITE8_HANDLER( cpu1_outputs_w )
|
||||
{
|
||||
const device_config *discrete = devtag_get_device(space->machine, "discrete");
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
UINT8 diff = data ^ state->cpu1_out[offset];
|
||||
state->cpu1_out[offset] = data;
|
||||
|
||||
@ -354,28 +354,28 @@ INLINE UINT8 get_pc3259_bits(running_machine *machine, grchamp_state *state, int
|
||||
|
||||
static READ8_HANDLER( pc3259_0_r )
|
||||
{
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
return get_pc3259_bits(space->machine, state, 0);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( pc3259_1_r )
|
||||
{
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
return get_pc3259_bits(space->machine, state, 1);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( pc3259_2_r )
|
||||
{
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
return get_pc3259_bits(space->machine, state, 2);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( pc3259_3_r )
|
||||
{
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
return get_pc3259_bits(space->machine, state, 3);
|
||||
}
|
||||
|
||||
@ -389,14 +389,14 @@ static READ8_HANDLER( pc3259_3_r )
|
||||
|
||||
static READ8_HANDLER( sub_to_main_comm_r )
|
||||
{
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
return state->comm_latch;
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( main_to_sub_comm_sync_w )
|
||||
{
|
||||
grchamp_state *state = machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)machine->driver_data;
|
||||
int offset = param >> 8;
|
||||
state->comm_latch2[offset & 3] = param;
|
||||
}
|
||||
@ -410,7 +410,7 @@ static WRITE8_HANDLER( main_to_sub_comm_w )
|
||||
|
||||
static READ8_HANDLER( main_to_sub_comm_r )
|
||||
{
|
||||
grchamp_state *state = space->machine->driver_data;
|
||||
grchamp_state *state = (grchamp_state *)space->machine->driver_data;
|
||||
return state->comm_latch2[offset];
|
||||
}
|
||||
|
||||
|
@ -1139,7 +1139,7 @@ INPUT_PORTS_END
|
||||
|
||||
static CUSTOM_INPUT( gtg_mux )
|
||||
{
|
||||
const char *tag1 = param;
|
||||
const char *tag1 = (const char *)param;
|
||||
const char *tag2 = tag1 + strlen(tag1) + 1;
|
||||
return input_port_read(field->port->machine, tag1) & input_port_read(field->port->machine, tag2);
|
||||
}
|
||||
|
@ -451,8 +451,6 @@ static READ16_HANDLER ( jchan_ctrl_r )
|
||||
***************************************************************************/
|
||||
|
||||
/* communications - hacky! */
|
||||
static UINT16 *mainsub_shared_ram;
|
||||
|
||||
static WRITE16_HANDLER( main2sub_cmd_w )
|
||||
{
|
||||
COMBINE_DATA(&mainsub_shared_ram[0x03ffe/2]);
|
||||
|
@ -124,7 +124,7 @@
|
||||
|
||||
static TIMER_CALLBACK( generate_interrupt )
|
||||
{
|
||||
jedi_state *state = machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)machine->driver_data;
|
||||
int scanline = param;
|
||||
|
||||
/* IRQ is set by /32V */
|
||||
@ -154,7 +154,7 @@ static WRITE8_HANDLER( main_irq_ack_w )
|
||||
|
||||
static MACHINE_START( jedi )
|
||||
{
|
||||
jedi_state *state = machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)machine->driver_data;
|
||||
|
||||
/* set a timer to run the interrupts */
|
||||
state->interrupt_timer = timer_alloc(machine, generate_interrupt, NULL);
|
||||
@ -177,7 +177,7 @@ static MACHINE_START( jedi )
|
||||
|
||||
static MACHINE_RESET( jedi )
|
||||
{
|
||||
jedi_state *state = machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)machine->driver_data;
|
||||
|
||||
/* init globals */
|
||||
state->a2d_select = 0;
|
||||
@ -209,7 +209,7 @@ static WRITE8_HANDLER( rom_banksel_w )
|
||||
|
||||
static READ8_HANDLER( a2d_data_r )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
UINT8 ret = 0;
|
||||
|
||||
switch (state->a2d_select)
|
||||
@ -224,7 +224,7 @@ static READ8_HANDLER( a2d_data_r )
|
||||
|
||||
static WRITE8_HANDLER( a2d_select_w )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
|
||||
state->a2d_select = offset;
|
||||
}
|
||||
@ -245,7 +245,7 @@ static WRITE8_HANDLER( jedi_coin_counter_w )
|
||||
|
||||
static WRITE8_HANDLER( nvram_data_w )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
|
||||
if (state->nvram_enabled)
|
||||
generic_nvram[offset] = data;
|
||||
@ -254,7 +254,7 @@ static WRITE8_HANDLER( nvram_data_w )
|
||||
|
||||
static WRITE8_HANDLER( nvram_enable_w )
|
||||
{
|
||||
jedi_state *state = space->machine->driver_data;
|
||||
jedi_state *state = (jedi_state *)space->machine->driver_data;
|
||||
|
||||
state->nvram_enabled = ~offset & 1;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ static PALETTE_INIT( looping )
|
||||
|
||||
static TILE_GET_INFO( get_tile_info )
|
||||
{
|
||||
looping_state *state = machine->driver_data;
|
||||
looping_state *state = (looping_state *)machine->driver_data;
|
||||
int tile_number = state->videoram[tile_index];
|
||||
int color = state->colorram[(tile_index & 0x1f) * 2 + 1] & 0x07;
|
||||
SET_TILE_INFO(0, tile_number, color, 0);
|
||||
@ -175,7 +175,7 @@ static TILE_GET_INFO( get_tile_info )
|
||||
|
||||
static VIDEO_START( looping )
|
||||
{
|
||||
looping_state *state = machine->driver_data;
|
||||
looping_state *state = (looping_state *)machine->driver_data;
|
||||
|
||||
state->bg_tilemap = tilemap_create(machine, get_tile_info, tilemap_scan_rows, 8,8, 32,32);
|
||||
|
||||
@ -192,7 +192,7 @@ static VIDEO_START( looping )
|
||||
|
||||
static WRITE8_HANDLER( flip_screen_x_w )
|
||||
{
|
||||
looping_state *state = space->machine->driver_data;
|
||||
looping_state *state = (looping_state *)space->machine->driver_data;
|
||||
flip_screen_x_set(space->machine, ~data & 0x01);
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, flip_screen_get(space->machine) ? 128 : 0);
|
||||
}
|
||||
@ -200,7 +200,7 @@ static WRITE8_HANDLER( flip_screen_x_w )
|
||||
|
||||
static WRITE8_HANDLER( flip_screen_y_w )
|
||||
{
|
||||
looping_state *state = space->machine->driver_data;
|
||||
looping_state *state = (looping_state *)space->machine->driver_data;
|
||||
flip_screen_y_set(space->machine, ~data & 0x01);
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, flip_screen_get(space->machine) ? 128 : 0);
|
||||
}
|
||||
@ -208,7 +208,7 @@ static WRITE8_HANDLER( flip_screen_y_w )
|
||||
|
||||
static WRITE8_HANDLER( looping_videoram_w )
|
||||
{
|
||||
looping_state *state = space->machine->driver_data;
|
||||
looping_state *state = (looping_state *)space->machine->driver_data;
|
||||
state->videoram[offset] = data;
|
||||
tilemap_mark_tile_dirty(state->bg_tilemap, offset);
|
||||
}
|
||||
@ -216,7 +216,7 @@ static WRITE8_HANDLER( looping_videoram_w )
|
||||
|
||||
static WRITE8_HANDLER( looping_colorram_w )
|
||||
{
|
||||
looping_state *state = space->machine->driver_data;
|
||||
looping_state *state = (looping_state *)space->machine->driver_data;
|
||||
int i;
|
||||
|
||||
state->colorram[offset] = data;
|
||||
@ -246,7 +246,7 @@ static WRITE8_HANDLER( looping_colorram_w )
|
||||
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
const UINT8 *source;
|
||||
looping_state *state = machine->driver_data;
|
||||
looping_state *state = (looping_state *)machine->driver_data;
|
||||
|
||||
for (source = state->spriteram; source < state->spriteram + 0x40; source += 4)
|
||||
{
|
||||
@ -276,7 +276,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
||||
|
||||
static VIDEO_UPDATE( looping )
|
||||
{
|
||||
looping_state *state = screen->machine->driver_data;
|
||||
looping_state *state = (looping_state *)screen->machine->driver_data;
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
|
||||
|
||||
draw_sprites(screen->machine, bitmap, cliprect);
|
||||
@ -293,7 +293,7 @@ static VIDEO_UPDATE( looping )
|
||||
|
||||
static MACHINE_START( looping )
|
||||
{
|
||||
looping_state *state = machine->driver_data;
|
||||
looping_state *state = (looping_state *)machine->driver_data;
|
||||
state_save_register_global_array(machine, state->sound);
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ static WRITE8_DEVICE_HANDLER( looping_sound_sw )
|
||||
0007 = AFA
|
||||
*/
|
||||
|
||||
looping_state *state = device->machine->driver_data;
|
||||
looping_state *state = (looping_state *)device->machine->driver_data;
|
||||
state->sound[offset + 1] = data ^ 1;
|
||||
dac_data_w(device, ((state->sound[2] << 7) + (state->sound[3] << 6)) * state->sound[7]);
|
||||
}
|
||||
|
@ -32,34 +32,11 @@ To do:
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "lordgun.h"
|
||||
|
||||
// Variables defined in video:
|
||||
|
||||
extern UINT16 *lordgun_vram_0, *lordgun_scroll_x_0, *lordgun_scroll_y_0;
|
||||
extern UINT16 *lordgun_vram_1, *lordgun_scroll_x_1, *lordgun_scroll_y_1;
|
||||
extern UINT16 *lordgun_vram_2, *lordgun_scroll_x_2, *lordgun_scroll_y_2;
|
||||
extern UINT16 *lordgun_vram_3, *lordgun_scroll_x_3, *lordgun_scroll_y_3;
|
||||
extern UINT16 *lordgun_scrollram;
|
||||
static UINT16 *lordgun_priority_ram, lordgun_priority;
|
||||
extern int lordgun_whitescreen;
|
||||
|
||||
extern struct
|
||||
{
|
||||
int scr_x, scr_y;
|
||||
UINT16 hw_x, hw_y;
|
||||
} lordgun_gun[2];
|
||||
|
||||
// Functions defined in video:
|
||||
|
||||
WRITE16_HANDLER( lordgun_vram_0_w );
|
||||
WRITE16_HANDLER( lordgun_vram_1_w );
|
||||
WRITE16_HANDLER( lordgun_vram_2_w );
|
||||
WRITE16_HANDLER( lordgun_vram_3_w );
|
||||
|
||||
void lordgun_update_gun(running_machine *machine, int i);
|
||||
|
||||
VIDEO_START( lordgun );
|
||||
VIDEO_UPDATE( lordgun );
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
|
@ -191,7 +191,7 @@ static PALETTE_INIT( m10 )
|
||||
|
||||
static MACHINE_RESET( irem )
|
||||
{
|
||||
m10_state *state = machine->driver_data;
|
||||
m10_state *state = (m10_state *)machine->driver_data;
|
||||
|
||||
state_save_register_global(machine, state->bottomline);
|
||||
state_save_register_global(machine, state->flip);
|
||||
@ -225,7 +225,7 @@ static MACHINE_RESET( irem )
|
||||
static WRITE8_HANDLER( m10_ctrl_w )
|
||||
{
|
||||
const device_config *samples = devtag_get_device(space->machine, "samples");
|
||||
m10_state *state = space->machine->driver_data;
|
||||
m10_state *state = (m10_state *)space->machine->driver_data;
|
||||
|
||||
#if DEBUG
|
||||
if (data & 0x40)
|
||||
@ -302,7 +302,7 @@ static WRITE8_HANDLER( m10_ctrl_w )
|
||||
|
||||
static WRITE8_HANDLER( m11_ctrl_w )
|
||||
{
|
||||
m10_state *state = space->machine->driver_data;
|
||||
m10_state *state = (m10_state *)space->machine->driver_data;
|
||||
|
||||
#if DEBUG
|
||||
if (data & 0x4C)
|
||||
@ -335,7 +335,7 @@ static WRITE8_HANDLER( m11_ctrl_w )
|
||||
|
||||
static WRITE8_HANDLER( m15_ctrl_w )
|
||||
{
|
||||
m10_state *state = space->machine->driver_data;
|
||||
m10_state *state = (m10_state *)space->machine->driver_data;
|
||||
|
||||
#if DEBUG
|
||||
if (data & 0xF0)
|
||||
@ -916,7 +916,7 @@ MACHINE_DRIVER_END
|
||||
static DRIVER_INIT( andromed )
|
||||
{
|
||||
int i;
|
||||
m10_state *state = machine->driver_data;
|
||||
m10_state *state = (m10_state *)machine->driver_data;
|
||||
|
||||
for (i=0x1c00;i<0x2000;i++)
|
||||
state->rom[i]=0x60;
|
||||
@ -925,7 +925,7 @@ static DRIVER_INIT( andromed )
|
||||
static DRIVER_INIT( ipminva1 )
|
||||
{
|
||||
int i;
|
||||
m10_state *state = machine->driver_data;
|
||||
m10_state *state = (m10_state *)machine->driver_data;
|
||||
|
||||
for (i=0x1400;i<0x17ff;i++)
|
||||
state->rom[i]=0x60;
|
||||
|
@ -190,7 +190,7 @@ static TIMER_CALLBACK( delayed_ram16_w )
|
||||
{
|
||||
UINT16 val = ((UINT32) param) & 0xffff;
|
||||
UINT16 offset = (((UINT32) param) >> 16) & 0xffff;
|
||||
UINT16 *ram = ptr;
|
||||
UINT16 *ram = (UINT16 *)ptr;
|
||||
|
||||
ram[offset] = val;
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ static READ8_HANDLER( mcu_r )
|
||||
return 0;
|
||||
}
|
||||
|
||||
case 3: upd7759_busy_r(0) ? 0 : 0x08;
|
||||
case 3: return upd7759_busy_r(0) ? 0 : 0x08;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ static WRITE32_HANDLER( tms32031_control_w )
|
||||
static CUSTOM_INPUT( custom_49way_r )
|
||||
{
|
||||
static const UINT8 translate49[7] = { 0x8, 0xc, 0xe, 0xf, 0x3, 0x1, 0x0 };
|
||||
const char *namex = param;
|
||||
const char *namex = (const char *)param;
|
||||
const char *namey = namex + strlen(namex) + 1;
|
||||
return (translate49[input_port_read(field->port->machine, namey) >> 4] << 4) | translate49[input_port_read(field->port->machine, namex) >> 4];
|
||||
}
|
||||
@ -456,7 +456,7 @@ static WRITE32_HANDLER( keypad_select_w )
|
||||
|
||||
static CUSTOM_INPUT( keypad_r )
|
||||
{
|
||||
UINT32 bits = input_port_read(field->port->machine, param);
|
||||
UINT32 bits = input_port_read(field->port->machine, (const char *)param);
|
||||
UINT8 select = keypad_select;
|
||||
while ((select & 1) != 0)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ static struct mjkjidai_adpcm_state
|
||||
|
||||
static STREAM_UPDATE( mjkjidai_adpcm_callback )
|
||||
{
|
||||
struct mjkjidai_adpcm_state *state = param;
|
||||
struct mjkjidai_adpcm_state *state = (struct mjkjidai_adpcm_state *)param;
|
||||
stream_sample_t *dest = outputs[0];
|
||||
|
||||
while (state->playing && samples > 0)
|
||||
|
@ -72,7 +72,7 @@ static INPUT_CHANGED( coin_inserted )
|
||||
|
||||
static WRITE8_HANDLER( mystston_ay8910_select_w )
|
||||
{
|
||||
mystston_state *state = space->machine->driver_data;
|
||||
mystston_state *state = (mystston_state *)space->machine->driver_data;
|
||||
|
||||
/* bit 5 goes to 8910 #0 BDIR pin */
|
||||
if (((*state->ay8910_select & 0x20) == 0x20) && ((data & 0x20) == 0x00))
|
||||
|
@ -57,7 +57,7 @@ namco_tilemap_init( running_machine *machine, int gfxbank, void *maskBaseAddr,
|
||||
{
|
||||
int i;
|
||||
mTilemapInfo.gfxbank = gfxbank;
|
||||
mTilemapInfo.maskBaseAddr = maskBaseAddr;
|
||||
mTilemapInfo.maskBaseAddr = (UINT8 *)maskBaseAddr;
|
||||
mTilemapInfo.cb = cb;
|
||||
mTilemapInfo.videoram = auto_alloc_array(machine, UINT16, 0x10000 );
|
||||
|
||||
@ -1603,7 +1603,7 @@ namco_road_set_transparent_color(pen_t pen)
|
||||
void
|
||||
namco_road_draw(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int pri )
|
||||
{
|
||||
const UINT8 *clut = (void *)memory_region(machine, "user3");
|
||||
const UINT8 *clut = (const UINT8 *)memory_region(machine, "user3");
|
||||
bitmap_t *pSourceBitmap;
|
||||
unsigned yscroll;
|
||||
int i;
|
||||
|
@ -687,7 +687,7 @@ static NVRAM_HANDLER( naomi_eeproms )
|
||||
UINT8 *dat;
|
||||
UINT8* jvseeprom_default = NULL;
|
||||
|
||||
dat = eeprom_get_data_pointer(&length, &size);
|
||||
dat = (UINT8 *)eeprom_get_data_pointer(&length, &size);
|
||||
memset(dat, 0, length * size);
|
||||
|
||||
// mainboard eeprom?
|
||||
|
@ -791,7 +791,7 @@ ADDRESS_MAP_END
|
||||
static CUSTOM_INPUT( peplus_input_r )
|
||||
{
|
||||
UINT8 inp_ret = 0x00;
|
||||
UINT8 inp_read = input_port_read(field->port->machine, param);
|
||||
UINT8 inp_read = input_port_read(field->port->machine, (const char *)param);
|
||||
|
||||
if (inp_read & 0x01) inp_ret = 0x01;
|
||||
if (inp_read & 0x02) inp_ret = 0x02;
|
||||
|
@ -151,7 +151,7 @@ static NVRAM_HANDLER( pntnpuzl )
|
||||
UINT32 length, size;
|
||||
UINT8 *dat;
|
||||
|
||||
dat = eeprom_get_data_pointer(&length, &size);
|
||||
dat = (UINT8 *)eeprom_get_data_pointer(&length, &size);
|
||||
memset(dat, 0, length * size);
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ static const UINT8 s1945j_table[256] = {
|
||||
};
|
||||
|
||||
static UINT8 s1945_mcu_direction, s1945_mcu_latch1, s1945_mcu_latch2, s1945_mcu_inlatch, s1945_mcu_index;
|
||||
static UINT8 s1945_mcu_latching, s1945_mcu_mode, s1945_mcu_direction, s1945_mcu_control, s1945_mcu_bctrl;
|
||||
static UINT8 s1945_mcu_latching, s1945_mcu_mode, s1945_mcu_control, s1945_mcu_bctrl;
|
||||
static const UINT8 *s1945_mcu_table;
|
||||
|
||||
static void s1945_mcu_init(const UINT8 *mcu_table)
|
||||
|
@ -191,7 +191,7 @@ static NVRAM_HANDLER(93C56)
|
||||
UINT32 length, size;
|
||||
UINT8 *dat;
|
||||
|
||||
dat = eeprom_get_data_pointer(&length, &size);
|
||||
dat = (UINT8 *)eeprom_get_data_pointer(&length, &size);
|
||||
memset(dat, 0, length * size);
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ static NVRAM_HANDLER(93C56)
|
||||
UINT32 length, size;
|
||||
UINT8 *dat;
|
||||
|
||||
dat = eeprom_get_data_pointer(&length, &size);
|
||||
dat = (UINT8 *)eeprom_get_data_pointer(&length, &size);
|
||||
memset(dat, 0, length * size);
|
||||
|
||||
if (use_factory_eeprom!=eeprom_0) /* Set the EEPROM to Factory Defaults for games needing them*/
|
||||
|
@ -46,7 +46,7 @@ static INT32 gp2_irq_control;
|
||||
|
||||
static CUSTOM_INPUT( inputs_r )
|
||||
{
|
||||
const char *tag1 = param;
|
||||
const char *tag1 = (const char *)param;
|
||||
const char *tag2 = tag1 + strlen(tag1) + 1;
|
||||
return input_port_read(field->port->machine, (control & 0x0080) ? tag1 : tag2);
|
||||
}
|
||||
|
@ -1188,23 +1188,23 @@ static int kram3_permut1(int idx, int value)
|
||||
|
||||
static int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table)
|
||||
{
|
||||
int xor = 0;
|
||||
int xorval = 0;
|
||||
|
||||
if (idx == 0 || idx == 3)
|
||||
{
|
||||
xor = xor_table[tbl_index];
|
||||
xorval = xor_table[tbl_index];
|
||||
|
||||
// handle missing values in table
|
||||
if (xor == 99)
|
||||
return xor;
|
||||
if (xorval == 99)
|
||||
return xorval;
|
||||
}
|
||||
|
||||
xor ^= 0x02;
|
||||
xorval ^= 0x02;
|
||||
|
||||
if (idx == 3)
|
||||
xor = BITSWAP8(xor, 7,6,5,4, 0,2,3,1);
|
||||
xorval = BITSWAP8(xorval, 7,6,5,4, 0,2,3,1);
|
||||
|
||||
return xor;
|
||||
return xorval;
|
||||
}
|
||||
|
||||
static int kram3_decrypt(int address, int value)
|
||||
|
@ -119,8 +119,9 @@ bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine));
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
typedef enum { STATE_IDLE = 0, STATE_ADDR_R, STATE_ROM_R, STATE_EEPROM_R, STATE_EEPROM_W } prot_state;
|
||||
static struct {
|
||||
enum { STATE_IDLE = 0, STATE_ADDR_R, STATE_ROM_R, STATE_EEPROM_R, STATE_EEPROM_W } state;
|
||||
prot_state state;
|
||||
int wait_param;
|
||||
int param;
|
||||
int cmd;
|
||||
|
@ -139,7 +139,7 @@ static struct renegade_adpcm_state
|
||||
|
||||
static STREAM_UPDATE( renegade_adpcm_callback )
|
||||
{
|
||||
struct renegade_adpcm_state *state = param;
|
||||
struct renegade_adpcm_state *state = (struct renegade_adpcm_state *)param;
|
||||
stream_sample_t *dest = outputs[0];
|
||||
|
||||
while (state->playing && samples > 0)
|
||||
|
@ -1273,7 +1273,7 @@ static TIMER_CALLBACK( sms_scanline_timer_callback )
|
||||
The position to get the H position also has to compensate for a few errors
|
||||
*/
|
||||
// printf("num %d\n",num );
|
||||
struct sms_vdp *chip = ptr;
|
||||
struct sms_vdp *chip = (struct sms_vdp *)ptr;
|
||||
|
||||
if (chip->sms_scanline_counter<(chip->sms_total_scanlines-1))
|
||||
{
|
||||
@ -2206,7 +2206,7 @@ static void init_systeme_map(running_machine *machine)
|
||||
|
||||
void init_for_megadrive(running_machine *machine)
|
||||
{
|
||||
md_sms_vdp = start_vdp(machine, GEN_VDP);
|
||||
md_sms_vdp = (struct sms_vdp *)start_vdp(machine, GEN_VDP);
|
||||
md_sms_vdp->set_irq = sms_vdp_cpu1_irq_callback;
|
||||
md_sms_vdp->is_pal = 0;
|
||||
md_sms_vdp->sms_total_scanlines = 262;
|
||||
@ -2220,7 +2220,7 @@ DRIVER_INIT( megatech_bios )
|
||||
{
|
||||
// init_systeme_map(machine);
|
||||
|
||||
vdp1 = start_vdp(machine, SMS2_VDP);
|
||||
vdp1 = (struct sms_vdp *)start_vdp(machine, SMS2_VDP);
|
||||
vdp1->set_irq = sms_vdp_cpu2_irq_callback;
|
||||
vdp1->is_pal = 0;
|
||||
vdp1->sms_total_scanlines = 262;
|
||||
@ -2235,7 +2235,7 @@ static DRIVER_INIT( segasyse )
|
||||
{
|
||||
init_systeme_map(machine);
|
||||
|
||||
vdp1 = start_vdp(machine, SMS2_VDP);
|
||||
vdp1 = (struct sms_vdp *)start_vdp(machine, SMS2_VDP);
|
||||
// vdp1->set_irq = sms_vdp_cpu0_irq_callback;
|
||||
vdp1->is_pal = 0;
|
||||
vdp1->sms_total_scanlines = 262;
|
||||
@ -2246,7 +2246,7 @@ static DRIVER_INIT( segasyse )
|
||||
vdp1_vram_bank1 = auto_alloc_array(machine, UINT8, 0x4000);
|
||||
|
||||
|
||||
vdp2 = start_vdp(machine, SMS2_VDP);
|
||||
vdp2 = (struct sms_vdp *)start_vdp(machine, SMS2_VDP);
|
||||
vdp2->set_irq = sms_vdp_cpu0_irq_callback;
|
||||
vdp2->is_pal = 0;
|
||||
vdp2->sms_total_scanlines = 262;
|
||||
|
@ -97,17 +97,17 @@ static const ppi8255_interface single_ppi_intf =
|
||||
|
||||
static const segaic16_memory_map_entry outrun_info[] =
|
||||
{
|
||||
{ 0x35/2, 0x90000, 0x10000, 0xf00000, ~0, segaic16_road_control_0_r, segaic16_road_control_0_w, NULL, "road control" },
|
||||
{ 0x35/2, 0x80000, 0x01000, 0xf0f000, ~0, SMH_BANK(10), SMH_BANK(10), &segaic16_roadram_0, "road RAM" },
|
||||
{ 0x35/2, 0x60000, 0x08000, 0xf18000, ~0, SMH_BANK(11), SMH_BANK(11), &cpu1ram, "CPU 1 RAM" },
|
||||
{ 0x35/2, 0x00000, 0x60000, 0xf00000, ~0, SMH_BANK(12), SMH_UNMAP, &cpu1rom, "CPU 1 ROM" },
|
||||
{ 0x31/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x2d/2, 0x00000, 0x01000, 0xfff000, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x29/2, 0x00000, 0x02000, 0xffe000, ~0, SMH_BANK(14), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x25/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(15), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x25/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(16), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x21/2, 0x60000, 0x08000, 0xf98000, ~0, SMH_BANK(17), SMH_BANK(17), &workram, "CPU 0 RAM" },
|
||||
{ 0x21/2, 0x00000, 0x60000, 0xf80000, 0x00000, SMH_BANK(18), SMH_UNMAP, NULL, "CPU 0 ROM" },
|
||||
{ 0x35/2, 0x90000, 0x10000, 0xf00000, ~0, segaic16_road_control_0_r, segaic16_road_control_0_w, NULL, "road control" },
|
||||
{ 0x35/2, 0x80000, 0x01000, 0xf0f000, ~0, (read16_space_func)SMH_BANK(10), (write16_space_func)SMH_BANK(10), &segaic16_roadram_0, "road RAM" },
|
||||
{ 0x35/2, 0x60000, 0x08000, 0xf18000, ~0, (read16_space_func)SMH_BANK(11), (write16_space_func)SMH_BANK(11), &cpu1ram, "CPU 1 RAM" },
|
||||
{ 0x35/2, 0x00000, 0x60000, 0xf00000, ~0, (read16_space_func)SMH_BANK(12), (write16_space_func)SMH_UNMAP, &cpu1rom, "CPU 1 ROM" },
|
||||
{ 0x31/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x2d/2, 0x00000, 0x01000, 0xfff000, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x29/2, 0x00000, 0x02000, 0xffe000, ~0, (read16_space_func)SMH_BANK(14), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x25/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(15), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x25/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(16), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x21/2, 0x60000, 0x08000, 0xf98000, ~0, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_BANK(17), &workram, "CPU 0 RAM" },
|
||||
{ 0x21/2, 0x00000, 0x60000, 0xf80000, 0x00000, (read16_space_func)SMH_BANK(18), (write16_space_func)SMH_UNMAP, NULL, "CPU 0 ROM" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -950,71 +950,71 @@ static WRITE16_HANDLER( atomicp_sound_w );
|
||||
|
||||
static const segaic16_memory_map_entry rom_171_5358_info_small[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x20000, SMH_BANK(15), SMH_UNMAP, NULL, "ROM 2" },
|
||||
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x10000, SMH_BANK(16), SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x20000, (read16_space_func)SMH_BANK(15), (write16_space_func)SMH_UNMAP, NULL, "ROM 2" },
|
||||
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x10000, (read16_space_func)SMH_BANK(16), (write16_space_func)SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static const segaic16_memory_map_entry rom_171_5358_info[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x40000, SMH_BANK(15), SMH_UNMAP, NULL, "ROM 2" },
|
||||
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x20000, SMH_BANK(16), SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x40000, (read16_space_func)SMH_BANK(15), (write16_space_func)SMH_UNMAP, NULL, "ROM 2" },
|
||||
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x20000, (read16_space_func)SMH_BANK(16), (write16_space_func)SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static const segaic16_memory_map_entry rom_171_5704_info[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, rom_5704_bank_w, NULL, "tile bank" },
|
||||
{ 0x25/2, 0x00000, 0x80000, 0xfc0000, 0x80000, SMH_BANK(16), SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, rom_5704_bank_w, NULL, "tile bank" },
|
||||
{ 0x25/2, 0x00000, 0x80000, 0xfc0000, 0x80000, (read16_space_func)SMH_BANK(16), (write16_space_func)SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static const segaic16_memory_map_entry rom_atomicp_info[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, rom_5704_bank_w, NULL, "tile bank" },
|
||||
{ 0x25/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, atomicp_sound_w, NULL, "sound" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, rom_5704_bank_w, NULL, "tile bank" },
|
||||
{ 0x25/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, atomicp_sound_w, NULL, "sound" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static const segaic16_memory_map_entry rom_171_5797_info[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, unknown_rgn2_r, unknown_rgn2_w, NULL, "???" },
|
||||
{ 0x25/2, 0x00000, 0x04000, 0xffc000, ~0, rom_5797_bank_math_r, rom_5797_bank_math_w, NULL, "tile bank/math" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, unknown_rgn2_r, unknown_rgn2_w, NULL, "???" },
|
||||
{ 0x25/2, 0x00000, 0x04000, 0xffc000, ~0, rom_5797_bank_math_r, rom_5797_bank_math_w, NULL, "tile bank/math" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -92,43 +92,43 @@ static WRITE16_HANDLER( rom_5987_bank_w );
|
||||
|
||||
static const segaic16_memory_map_entry rom_171_shad_info[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, NULL, "????" },
|
||||
{ 0x25/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, genesis_vdp_w, NULL, "VDP" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, NULL, "????" },
|
||||
{ 0x25/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, genesis_vdp_w, NULL, "VDP" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static const segaic16_memory_map_entry rom_171_5874_info[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, genesis_vdp_w, NULL, "VDP" },
|
||||
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, SMH_BANK(16), SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, genesis_vdp_w, NULL, "VDP" },
|
||||
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, (read16_space_func)SMH_BANK(16), (write16_space_func)SMH_UNMAP, NULL, "ROM 1" },
|
||||
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static const segaic16_memory_map_entry rom_171_5987_info[] =
|
||||
{
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, SMH_BANK(13), SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, SMH_BANK(14), SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, genesis_vdp_w, NULL, "VDP" },
|
||||
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, SMH_BANK(16), rom_5987_bank_w, NULL, "ROM 1/banking" },
|
||||
{ 0x21/2, 0x00000, 0x100000,0xf00000, 0x00000, SMH_BANK(17), SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, misc_io_w, NULL, "I/O space" },
|
||||
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, (read16_space_func)SMH_BANK(10), segaic16_paletteram_w, &paletteram16, "color RAM" },
|
||||
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, (read16_space_func)SMH_BANK(11), segaic16_tileram_0_w, &segaic16_tileram_0, "tile RAM" },
|
||||
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, (read16_space_func)SMH_BANK(12), segaic16_textram_0_w, &segaic16_textram_0, "text RAM" },
|
||||
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, (read16_space_func)SMH_BANK(13), (write16_space_func)SMH_BANK(13), &segaic16_spriteram_0, "object RAM" },
|
||||
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, (read16_space_func)SMH_BANK(14), (write16_space_func)SMH_BANK(14), &workram, "work RAM" },
|
||||
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, genesis_vdp_w, NULL, "VDP" },
|
||||
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, (read16_space_func)SMH_BANK(16), rom_5987_bank_w, NULL, "ROM 1/banking" },
|
||||
{ 0x21/2, 0x00000, 0x100000,0xf00000, 0x00000, (read16_space_func)SMH_BANK(17), (write16_space_func)SMH_UNMAP, NULL, "ROM 0" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -1268,7 +1268,7 @@ INPUT_PORTS_END
|
||||
static CUSTOM_INPUT( ejanhs_encode )
|
||||
{
|
||||
static const UINT8 encoding[] = { 0x02, 0x10, 0x03, 0x18, 0x04, 0x20, 0x05, 0x28, 0x06, 0x30, 0x07 };
|
||||
input_port_value state = input_port_read(field->port->machine, param);
|
||||
input_port_value state = input_port_read(field->port->machine, (const char *)param);
|
||||
int bit;
|
||||
|
||||
for (bit = 0; bit < ARRAY_LENGTH(encoding); bit++)
|
||||
|
@ -608,7 +608,7 @@ static NVRAM_HANDLER(93C46_gundamex)
|
||||
UINT32 length, size;
|
||||
UINT16 *dat;
|
||||
|
||||
dat = eeprom_get_data_pointer(&length, &size);
|
||||
dat = (UINT16 *)eeprom_get_data_pointer(&length, &size);
|
||||
dat[0] = 0x7008;
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ static WRITE16_HANDLER( dsp_w )
|
||||
if(offset == 0x21 && dsp_ram[0x21]) {
|
||||
switch(dsp_ram[0x20]) {
|
||||
case 0x0001:
|
||||
dsp_ram[0x11] = (UINT8)(128*atan2(dsp_ram[0] - dsp_ram[1], dsp_ram[2] - dsp_ram[3])/M_PI) ^ 0x80;
|
||||
dsp_ram[0x11] = (UINT8)(128*atan2((double)(dsp_ram[0] - dsp_ram[1]), (double)(dsp_ram[2] - dsp_ram[3]))/M_PI) ^ 0x80;
|
||||
dsp_ram[0x21] = 0;
|
||||
break;
|
||||
default:
|
||||
|
@ -55,7 +55,7 @@ Verify Color PROM resistor values (Last 8 colors)
|
||||
|
||||
static CUSTOM_INPUT( get_motor_not_ready )
|
||||
{
|
||||
stactics_state *state = field->port->machine->driver_data;
|
||||
stactics_state *state = (stactics_state *)field->port->machine->driver_data;
|
||||
|
||||
/* if the motor is self-centering, but not centered yet */
|
||||
return ((*state->motor_on & 0x01) == 0) &&
|
||||
@ -65,7 +65,7 @@ static CUSTOM_INPUT( get_motor_not_ready )
|
||||
|
||||
static READ8_HANDLER( vert_pos_r )
|
||||
{
|
||||
stactics_state *state = space->machine->driver_data;
|
||||
stactics_state *state = (stactics_state *)space->machine->driver_data;
|
||||
|
||||
return 0x70 - state->vert_pos;
|
||||
}
|
||||
@ -73,7 +73,7 @@ static READ8_HANDLER( vert_pos_r )
|
||||
|
||||
static READ8_HANDLER( horiz_pos_r )
|
||||
{
|
||||
stactics_state *state = space->machine->driver_data;
|
||||
stactics_state *state = (stactics_state *)space->machine->driver_data;
|
||||
|
||||
return state->horiz_pos + 0x88;
|
||||
}
|
||||
@ -156,7 +156,7 @@ static WRITE8_HANDLER( stactics_coin_lockout_w )
|
||||
|
||||
static INTERRUPT_GEN( stactics_interrupt )
|
||||
{
|
||||
stactics_state *state = device->machine->driver_data;
|
||||
stactics_state *state = (stactics_state *)device->machine->driver_data;
|
||||
|
||||
move_motor(device->machine, state);
|
||||
|
||||
@ -287,7 +287,7 @@ INPUT_PORTS_END
|
||||
|
||||
static MACHINE_START( stactics )
|
||||
{
|
||||
stactics_state *state = machine->driver_data;
|
||||
stactics_state *state = (stactics_state *)machine->driver_data;
|
||||
|
||||
state->vert_pos = 0;
|
||||
state->horiz_pos = 0;
|
||||
|
@ -490,7 +490,7 @@ static INTERRUPT_GEN(skns_interrupt)
|
||||
|
||||
static CUSTOM_INPUT( paddle_r )
|
||||
{
|
||||
const char *tag = param;
|
||||
const char *tag = (const char *)param;
|
||||
return input_port_read(field->port->machine, tag);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ Notes:
|
||||
|
||||
static READ8_HANDLER( trvquest_question_r )
|
||||
{
|
||||
gameplan_state *state = space->machine->driver_data;
|
||||
gameplan_state *state = (gameplan_state *)space->machine->driver_data;
|
||||
|
||||
return memory_region(space->machine, "questions")[*state->trvquest_question * 0x2000 + offset];
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ static READ8_DEVICE_HANDLER( turbo_analog_r );
|
||||
|
||||
static MACHINE_RESET( buckrog )
|
||||
{
|
||||
turbo_state *state = machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)machine->driver_data;
|
||||
state->buckrog_command = 0x00;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ static MACHINE_RESET( buckrog )
|
||||
static WRITE8_DEVICE_HANDLER( turbo_ppi0a_w )
|
||||
{
|
||||
/* bit0-7 = 0PA0-7 */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->turbo_opa = data;
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ static WRITE8_DEVICE_HANDLER( turbo_ppi0a_w )
|
||||
static WRITE8_DEVICE_HANDLER( turbo_ppi0b_w )
|
||||
{
|
||||
/* bit0-7 = 0PB0-7 */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->turbo_opb = data;
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ static WRITE8_DEVICE_HANDLER( turbo_ppi0b_w )
|
||||
static WRITE8_DEVICE_HANDLER( turbo_ppi0c_w )
|
||||
{
|
||||
/* bit0-7 = 0PC0-7 */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->turbo_opc = data;
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ static WRITE8_DEVICE_HANDLER( turbo_ppi0c_w )
|
||||
static WRITE8_DEVICE_HANDLER( turbo_ppi1a_w )
|
||||
{
|
||||
/* bit0-7 = 1PA0-7 */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->turbo_ipa = data;
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ static WRITE8_DEVICE_HANDLER( turbo_ppi1a_w )
|
||||
static WRITE8_DEVICE_HANDLER( turbo_ppi1b_w )
|
||||
{
|
||||
/* bit0-7 = 1PB0-7 */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->turbo_ipb = data;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ static WRITE8_DEVICE_HANDLER( turbo_ppi1b_w )
|
||||
static WRITE8_DEVICE_HANDLER( turbo_ppi1c_w )
|
||||
{
|
||||
/* bit0-7 = 1PC0-7 */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->turbo_ipc = data;
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ static WRITE8_DEVICE_HANDLER( turbo_ppi3c_w )
|
||||
/* bit 0-3 = PLA0-3 */
|
||||
/* bit 4-6 = COL0-2 */
|
||||
/* bit 7 = n/c */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->turbo_fbpla = data & 0x0f;
|
||||
state->turbo_fbcol = (data >> 4) & 0x07;
|
||||
}
|
||||
@ -322,7 +322,7 @@ static WRITE8_DEVICE_HANDLER( subroc3d_ppi0a_w )
|
||||
{
|
||||
/* bit 0-3 = PLY0-3 */
|
||||
/* bit 4-7 = n/c */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->subroc3d_ply = data & 0x0f;
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ static WRITE8_DEVICE_HANDLER( subroc3d_ppi0a_w )
|
||||
static WRITE8_DEVICE_HANDLER( subroc3d_ppi0c_w )
|
||||
{
|
||||
/* bit 0-3 = COL0-3 */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->subroc3d_col = data & 0x0f;
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ static WRITE8_DEVICE_HANDLER( subroc3d_ppi0b_w )
|
||||
/* bit 2 = STLA (START LAMP) */
|
||||
/* bit 3 = NOUSE (n/c) */
|
||||
/* bit 4 = FLIP (not really flip, just offset) */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
coin_counter_w(0, data & 0x01);
|
||||
coin_counter_w(1, data & 0x02);
|
||||
set_led_status(0, data & 0x04);
|
||||
@ -381,7 +381,7 @@ static const ppi8255_interface subroc3d_8255_intf[2] =
|
||||
static WRITE8_DEVICE_HANDLER( buckrog_ppi0a_w )
|
||||
{
|
||||
/* bit 0-7 = data to be read on the /IOREQ */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->buckrog_command = data;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ static WRITE8_DEVICE_HANDLER( buckrog_ppi0b_w )
|
||||
{
|
||||
/* bit 0-5 = MOV0-5 */
|
||||
/* bit 6-7 = n/c */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->buckrog_mov = data & 0x3f;
|
||||
}
|
||||
|
||||
@ -401,7 +401,7 @@ static WRITE8_DEVICE_HANDLER( buckrog_ppi0c_w )
|
||||
/* bit 3-5 = n/c */
|
||||
/* bit 6 = /IOREQ on the 2nd CPU */
|
||||
/* bit 7 = /INT on the 2nd CPU */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->buckrog_fchg = data & 0x07;
|
||||
cpu_set_input_line(device->machine->cpu[1], 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
@ -415,7 +415,7 @@ static WRITE8_DEVICE_HANDLER( buckrog_ppi1c_w )
|
||||
/* bit 5 = COM2 (COIN METER 2) */
|
||||
/* bit 6 = STLA (START LAMP) */
|
||||
/* bit 7 = NOUSE (BODY SONIC) */
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
state->buckrog_obch = data & 0x07;
|
||||
coin_counter_w(0, data & 0x10);
|
||||
coin_counter_w(1, data & 0x20);
|
||||
@ -479,7 +479,7 @@ static void update_outputs(i8279_state *chip, UINT16 which)
|
||||
|
||||
static READ8_HANDLER( turbo_8279_r )
|
||||
{
|
||||
turbo_state *state = space->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)space->machine->driver_data;
|
||||
i8279_state *chip = &state->i8279;
|
||||
UINT8 result = 0xff;
|
||||
UINT8 addr;
|
||||
@ -520,7 +520,7 @@ static READ8_HANDLER( turbo_8279_r )
|
||||
|
||||
static WRITE8_HANDLER( turbo_8279_w )
|
||||
{
|
||||
turbo_state *state = space->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)space->machine->driver_data;
|
||||
i8279_state *chip = &state->i8279;
|
||||
UINT8 addr;
|
||||
|
||||
@ -624,7 +624,7 @@ static WRITE8_HANDLER( turbo_8279_w )
|
||||
|
||||
static READ8_HANDLER( turbo_collision_r )
|
||||
{
|
||||
turbo_state *state = space->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)space->machine->driver_data;
|
||||
video_screen_update_partial(space->machine->primary_screen, video_screen_get_vpos(space->machine->primary_screen));
|
||||
return input_port_read(space->machine, "DSW3") | (state->turbo_collision & 15);
|
||||
}
|
||||
@ -632,7 +632,7 @@ static READ8_HANDLER( turbo_collision_r )
|
||||
|
||||
static WRITE8_HANDLER( turbo_collision_clear_w )
|
||||
{
|
||||
turbo_state *state = space->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)space->machine->driver_data;
|
||||
video_screen_update_partial(space->machine->primary_screen, video_screen_get_vpos(space->machine->primary_screen));
|
||||
state->turbo_collision = 0;
|
||||
}
|
||||
@ -640,14 +640,14 @@ static WRITE8_HANDLER( turbo_collision_clear_w )
|
||||
|
||||
static READ8_DEVICE_HANDLER( turbo_analog_r )
|
||||
{
|
||||
turbo_state *state = device->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)device->machine->driver_data;
|
||||
return input_port_read(device->machine, "DIAL") - state->turbo_last_analog;
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( turbo_analog_reset_w )
|
||||
{
|
||||
turbo_state *state = space->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)space->machine->driver_data;
|
||||
state->turbo_last_analog = input_port_read(space->machine, "DIAL");
|
||||
}
|
||||
|
||||
@ -679,7 +679,7 @@ static WRITE8_HANDLER( turbo_coin_and_lamp_w )
|
||||
static READ8_HANDLER( buckrog_cpu2_command_r )
|
||||
{
|
||||
/* assert ACK */
|
||||
turbo_state *state = space->machine->driver_data;
|
||||
turbo_state *state = (turbo_state *)space->machine->driver_data;
|
||||
ppi8255_set_port_c(devtag_get_device(space->machine, "ppi8255_0"), 0x00);
|
||||
return state->buckrog_command;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ static CUSTOM_INPUT( get_collision )
|
||||
|
||||
static CUSTOM_INPUT( get_joystick )
|
||||
{
|
||||
UINT8 joy = input_port_read(field->port->machine, param) & 3;
|
||||
UINT8 joy = input_port_read(field->port->machine, (const char *)param) & 3;
|
||||
|
||||
if (joy == 1)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ static WRITE32_HANDLER( eeprom_w )
|
||||
|
||||
static CUSTOM_INPUT( analog_ctrl_r )
|
||||
{
|
||||
const char *tag = param;
|
||||
const char *tag = (const char *)param;
|
||||
return input_port_read(field->port->machine, tag) & 0xfff;
|
||||
}
|
||||
|
||||
|
@ -199,21 +199,21 @@ static void wiggle_i860_common(int n, UINT16 data, const device_config *device)
|
||||
if (bus_hold)
|
||||
{
|
||||
fprintf(stderr, "M0 asserting bus HOLD to i860 %s\n", device->tag);
|
||||
i860_set_pin(device->token, DEC_PIN_BUS_HOLD, 1);
|
||||
i860_set_pin(device, DEC_PIN_BUS_HOLD, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "M0 clearing bus HOLD to i860 %s\n", device->tag);
|
||||
i860_set_pin(device->token, DEC_PIN_BUS_HOLD, 0);
|
||||
i860_set_pin(device, DEC_PIN_BUS_HOLD, 0);
|
||||
}
|
||||
|
||||
if (reset)
|
||||
{
|
||||
fprintf(stderr, "M0 asserting RESET to i860 %s\n", device->tag);
|
||||
i860_set_pin(device->token, DEC_PIN_RESET, 1);
|
||||
i860_set_pin(device, DEC_PIN_RESET, 1);
|
||||
}
|
||||
else
|
||||
i860_set_pin(device->token, DEC_PIN_RESET, 0);
|
||||
i860_set_pin(device, DEC_PIN_RESET, 0);
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( wiggle_i860p0_pins_w )
|
||||
@ -379,8 +379,8 @@ static MACHINE_RESET( vcombat )
|
||||
/* Setup the Bt476 VGA RAMDAC palette chip */
|
||||
tlc34076_reset(6);
|
||||
|
||||
i860_set_pin(cputag_get_cpu(machine, "vid_0")->token, DEC_PIN_BUS_HOLD, 1);
|
||||
i860_set_pin(cputag_get_cpu(machine, "vid_1")->token, DEC_PIN_BUS_HOLD, 1);
|
||||
i860_set_pin(cputag_get_cpu(machine, "vid_0"), DEC_PIN_BUS_HOLD, 1);
|
||||
i860_set_pin(cputag_get_cpu(machine, "vid_1"), DEC_PIN_BUS_HOLD, 1);
|
||||
|
||||
crtc_select = 0;
|
||||
}
|
||||
@ -390,7 +390,7 @@ static MACHINE_RESET( shadfgtr )
|
||||
/* Setup the Bt476 VGA RAMDAC palette chip */
|
||||
tlc34076_reset(6);
|
||||
|
||||
i860_set_pin(cputag_get_cpu(machine, "vid_0")->token, DEC_PIN_BUS_HOLD, 1);
|
||||
i860_set_pin(cputag_get_cpu(machine, "vid_0"), DEC_PIN_BUS_HOLD, 1);
|
||||
|
||||
crtc_select = 0;
|
||||
}
|
||||
|
@ -1571,7 +1571,7 @@ static void remap_dynamic_addresses(running_machine *machine)
|
||||
add_dynamic_address(base + 0x2000, base + 0x2003, sio_irq_cause_r, NULL);
|
||||
add_dynamic_address(base + 0x3000, base + 0x3003, sio_irq_status_r, NULL);
|
||||
add_dynamic_address(base + 0x4000, base + 0x4003, sio_led_r, sio_led_w);
|
||||
add_dynamic_address(base + 0x5000, base + 0x5007, SMH_NOP, NULL);
|
||||
add_dynamic_address(base + 0x5000, base + 0x5007, (read32_space_func)SMH_NOP, NULL);
|
||||
add_dynamic_address(base + 0x6000, base + 0x6003, NULL, cmos_unlock_w);
|
||||
add_dynamic_address(base + 0x7000, base + 0x7003, NULL, vegas_watchdog_w);
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ static READ8_HANDLER( safari_io_r )
|
||||
static WRITE8_HANDLER( safari_io_w )
|
||||
{
|
||||
if (offset & 0x01) assert_coin_status();
|
||||
if (offset & 0x02) /* safari_audio_w(0, data) */;
|
||||
if (offset & 0x02) { /* safari_audio_w(0, data) */ }
|
||||
}
|
||||
|
||||
|
||||
@ -567,7 +567,7 @@ static WRITE8_HANDLER( headon_io_w )
|
||||
{
|
||||
if (offset & 0x01) assert_coin_status();
|
||||
if (offset & 0x02) headon_audio_w(space, 0, data);
|
||||
if (offset & 0x04) /* vicdual_palette_bank_w(0, data) */; /* not written to */
|
||||
if (offset & 0x04) { /* vicdual_palette_bank_w(0, data) */ } /* not written to */
|
||||
}
|
||||
|
||||
|
||||
@ -759,8 +759,8 @@ static WRITE8_HANDLER( headon2_io_w )
|
||||
if (offset & 0x01) assert_coin_status();
|
||||
if (offset & 0x02) headon_audio_w(space, 0, data);
|
||||
if (offset & 0x04) vicdual_palette_bank_w(space, 0, data);
|
||||
if (offset & 0x08) ;/* schematics show this as going into a shifer circuit, but never written to */
|
||||
if (offset & 0x10) ;/* schematics show this as going to an edge connector, but never written to */
|
||||
if (offset & 0x08) { /* schematics show this as going into a shifer circuit, but never written to */ }
|
||||
if (offset & 0x10) { /* schematics show this as going to an edge connector, but never written to */ }
|
||||
if (offset & 0x18) logerror("********* Write to port %x\n", offset);
|
||||
}
|
||||
|
||||
@ -768,15 +768,15 @@ static WRITE8_HANDLER( headon2_io_w )
|
||||
static WRITE8_HANDLER( digger_io_w )
|
||||
{
|
||||
if (offset & 0x01) assert_coin_status();
|
||||
if (offset & 0x02) /* digger_audio_1_w(0, data) */;
|
||||
if (offset & 0x02) { /* digger_audio_1_w(0, data) */ }
|
||||
if (offset & 0x04)
|
||||
{
|
||||
vicdual_palette_bank_w(space, 0, data & 0x03);
|
||||
/* digger_audio_2_w(0, data & 0xfc) */;
|
||||
/* digger_audio_2_w(0, data & 0xfc); */
|
||||
}
|
||||
|
||||
if (offset & 0x08) ;/* schematics show this as going into a shifer circuit, but never written to */
|
||||
if (offset & 0x10) ;/* schematics show this as going to an edge connector, but never written to */
|
||||
if (offset & 0x08) { /* schematics show this as going into a shifer circuit, but never written to */ }
|
||||
if (offset & 0x10) { /* schematics show this as going to an edge connector, but never written to */ }
|
||||
if (offset & 0x18) logerror("********* Write to port %x\n", offset);
|
||||
}
|
||||
|
||||
@ -972,7 +972,7 @@ static WRITE8_HANDLER( invho2_io_w )
|
||||
static WRITE8_HANDLER( invds_io_w )
|
||||
{
|
||||
if (offset & 0x01) invinco_audio_w(space, 0, data);
|
||||
if (offset & 0x02) /* deepscan_audio_w(0, data) */;
|
||||
if (offset & 0x02) { /* deepscan_audio_w(0, data) */ }
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
if (offset & 0x40) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
@ -981,7 +981,7 @@ static WRITE8_HANDLER( invds_io_w )
|
||||
static WRITE8_HANDLER( sspacaho_io_w )
|
||||
{
|
||||
if (offset & 0x01) invho2_audio_w(space, 0, data);
|
||||
if (offset & 0x02) /* sspaceatt_audio_w(space, 0, data) */;
|
||||
if (offset & 0x02) { /* sspaceatt_audio_w(space, 0, data) */ }
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
if (offset & 0x40) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
@ -989,7 +989,7 @@ static WRITE8_HANDLER( sspacaho_io_w )
|
||||
|
||||
static WRITE8_HANDLER( tranqgun_io_w )
|
||||
{
|
||||
if (offset & 0x01) /* tranqgun_audio_w(space, 0, data) */;
|
||||
if (offset & 0x01) { /* tranqgun_audio_w(space, 0, data) */ }
|
||||
if (offset & 0x02) vicdual_palette_bank_w(space, 0, data);
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
}
|
||||
@ -997,8 +997,8 @@ static WRITE8_HANDLER( tranqgun_io_w )
|
||||
|
||||
static WRITE8_HANDLER( spacetrk_io_w )
|
||||
{
|
||||
if (offset & 0x01) /* spacetrk_audio_w(space, 0, data) */;
|
||||
if (offset & 0x02) /* spacetrk_audio_w(space, 0, data) */;
|
||||
if (offset & 0x01) { /* spacetrk_audio_w(space, 0, data) */ }
|
||||
if (offset & 0x02) { /* spacetrk_audio_w(space, 0, data) */ }
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
if (offset & 0x40) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
@ -1015,7 +1015,7 @@ static WRITE8_HANDLER( carnival_io_w )
|
||||
|
||||
static WRITE8_HANDLER( brdrline_io_w )
|
||||
{
|
||||
if (offset & 0x01) /* brdrline_audio_w(space, 0, data) */;
|
||||
if (offset & 0x01) { /* brdrline_audio_w(space, 0, data) */ }
|
||||
if (offset & 0x02) vicdual_palette_bank_w(space, 0, data);
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
}
|
||||
@ -1032,12 +1032,12 @@ static WRITE8_HANDLER( pulsar_io_w )
|
||||
|
||||
static WRITE8_HANDLER( heiankyo_io_w )
|
||||
{
|
||||
if (offset & 0x01) /* heiankyo_audio_1_w(0, data) */;
|
||||
if (offset & 0x01) { /* heiankyo_audio_1_w(0, data) */ }
|
||||
|
||||
if (offset & 0x02)
|
||||
{
|
||||
vicdual_palette_bank_w(space, 0, data & 0x03);
|
||||
/* heiankyo_audio_2_w(0, data & 0xfc) */;
|
||||
/* heiankyo_audio_2_w(0, data & 0xfc); */
|
||||
}
|
||||
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
@ -1046,8 +1046,8 @@ static WRITE8_HANDLER( heiankyo_io_w )
|
||||
|
||||
static WRITE8_HANDLER( alphaho_io_w )
|
||||
{
|
||||
if (offset & 0x01) /* headon_audio_w(0, data) */;
|
||||
if (offset & 0x02) /* alphaf_audio_w(0, data) */;
|
||||
if (offset & 0x01) { /* headon_audio_w(0, data) */ }
|
||||
if (offset & 0x02) { /* alphaf_audio_w(0, data) */ }
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
if (offset & 0x40) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
@ -1989,7 +1989,7 @@ static CUSTOM_INPUT( samurai_protection_r )
|
||||
|
||||
static WRITE8_HANDLER( samurai_io_w )
|
||||
{
|
||||
if (offset & 0x02) /* samurai_audio_w(0, data) */;
|
||||
if (offset & 0x02) { /* samurai_audio_w(0, data) */ }
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
if (offset & 0x40) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
@ -2108,7 +2108,7 @@ static READ8_HANDLER( nsub_io_r )
|
||||
static WRITE8_HANDLER( nsub_io_w )
|
||||
{
|
||||
if (offset & 0x01) assert_coin_status();
|
||||
if (offset & 0x02) /* nsub_audio_w(0, data) */;
|
||||
if (offset & 0x02) { /* nsub_audio_w(0, data) */ }
|
||||
if (offset & 0x04) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
|
||||
|
@ -178,13 +178,13 @@ static WRITE16_HANDLER ( wwfwfest_soundwrite )
|
||||
/* DIPs are spread accross the other input ports */
|
||||
static CUSTOM_INPUT( dsw_3f_r )
|
||||
{
|
||||
const char *tag = param;
|
||||
const char *tag = (const char *)param;
|
||||
return input_port_read(field->port->machine, tag) & 0x3f;
|
||||
}
|
||||
|
||||
static CUSTOM_INPUT( dsw_c0_r )
|
||||
{
|
||||
const char *tag = param;
|
||||
const char *tag = (const char *)param;
|
||||
return (input_port_read(field->port->machine, tag) & 0xc0) >> 6;
|
||||
}
|
||||
|
||||
|
34
src/mame/includes/lordgun.h
Normal file
34
src/mame/includes/lordgun.h
Normal file
@ -0,0 +1,34 @@
|
||||
/***************************************************************************
|
||||
|
||||
-= IGS Lord Of Gun =-
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
/*----------- defined in video/lordgun.c -----------*/
|
||||
|
||||
extern UINT16 *lordgun_vram_0, *lordgun_scroll_x_0, *lordgun_scroll_y_0;
|
||||
extern UINT16 *lordgun_vram_1, *lordgun_scroll_x_1, *lordgun_scroll_y_1;
|
||||
extern UINT16 *lordgun_vram_2, *lordgun_scroll_x_2, *lordgun_scroll_y_2;
|
||||
extern UINT16 *lordgun_vram_3, *lordgun_scroll_x_3, *lordgun_scroll_y_3;
|
||||
extern UINT16 *lordgun_scrollram;
|
||||
extern int lordgun_whitescreen;
|
||||
|
||||
typedef struct _lordgun_gun_data lordgun_gun_data;
|
||||
struct _lordgun_gun_data
|
||||
{
|
||||
int scr_x, scr_y;
|
||||
UINT16 hw_x, hw_y;
|
||||
};
|
||||
|
||||
extern lordgun_gun_data lordgun_gun[2];
|
||||
|
||||
|
||||
WRITE16_HANDLER( lordgun_vram_0_w );
|
||||
WRITE16_HANDLER( lordgun_vram_1_w );
|
||||
WRITE16_HANDLER( lordgun_vram_2_w );
|
||||
WRITE16_HANDLER( lordgun_vram_3_w );
|
||||
|
||||
void lordgun_update_gun(running_machine *machine, int i);
|
||||
|
||||
VIDEO_START( lordgun );
|
||||
VIDEO_UPDATE( lordgun );
|
@ -131,7 +131,7 @@ CUSTOM_INPUT( arkanoid_68705_input_r )
|
||||
|
||||
CUSTOM_INPUT( arkanoid_input_mux )
|
||||
{
|
||||
const char *tag1 = param;
|
||||
const char *tag1 = (const char *)param;
|
||||
const char *tag2 = tag1 + strlen(tag1) + 1;
|
||||
return input_port_read(field->port->machine, (arkanoid_paddle_select == 0) ? tag1 : tag2);
|
||||
}
|
||||
|
@ -144,17 +144,17 @@ void a600xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
if ( new_mmu & 0x80 )
|
||||
{
|
||||
logerror("%s MMU SELFTEST RAM\n", machine->gamedrv->name);
|
||||
rbank2 = SMH_NOP;
|
||||
wbank2 = SMH_NOP;
|
||||
rbank2 = (read8_space_func)SMH_NOP;
|
||||
wbank2 = (write8_space_func)SMH_NOP;
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("%s MMU SELFTEST ROM\n", machine->gamedrv->name);
|
||||
rbank2 = SMH_BANK(2);
|
||||
wbank2 = SMH_UNMAP;
|
||||
rbank2 = (read8_space_func)SMH_BANK(2);
|
||||
wbank2 = (write8_space_func)SMH_UNMAP;
|
||||
}
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x5000, 0x57ff, 0, 0, rbank2, wbank2);
|
||||
if (rbank2 == SMH_BANK(2))
|
||||
if (rbank2 == (read8_space_func)SMH_BANK(2))
|
||||
memory_set_bankptr(machine, 2, memory_region(machine, "maincpu") + 0x5000);
|
||||
}
|
||||
|
||||
@ -168,21 +168,21 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
if( new_mmu & 0x01 )
|
||||
{
|
||||
logerror("%s MMU BIOS ROM\n", machine->gamedrv->name);
|
||||
rbank3 = SMH_BANK(3);
|
||||
wbank3 = SMH_UNMAP;
|
||||
rbank3 = (read8_space_func)SMH_BANK(3);
|
||||
wbank3 = (write8_space_func)SMH_UNMAP;
|
||||
base3 = memory_region(machine, "maincpu") + 0x14000; /* 8K lo BIOS */
|
||||
rbank4 = SMH_BANK(4);
|
||||
wbank4 = SMH_UNMAP;
|
||||
rbank4 = (read8_space_func)SMH_BANK(4);
|
||||
wbank4 = (write8_space_func)SMH_UNMAP;
|
||||
base4 = memory_region(machine, "maincpu") + 0x15800; /* 4K FP ROM + 8K hi BIOS */
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("%s MMU BIOS RAM\n", machine->gamedrv->name);
|
||||
rbank3 = SMH_BANK(3);
|
||||
wbank3 = SMH_BANK(3);
|
||||
rbank3 = (read8_space_func)SMH_BANK(3);
|
||||
wbank3 = (write8_space_func)SMH_BANK(3);
|
||||
base3 = memory_region(machine, "maincpu") + 0x0c000; /* 8K RAM */
|
||||
rbank4 = SMH_BANK(4);
|
||||
wbank4 = SMH_BANK(4);
|
||||
rbank4 = (read8_space_func)SMH_BANK(4);
|
||||
wbank4 = (write8_space_func)SMH_BANK(4);
|
||||
base4 = memory_region(machine, "maincpu") + 0x0d800; /* 4K RAM + 8K RAM */
|
||||
}
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xcfff, 0, 0, rbank3, wbank3);
|
||||
@ -194,15 +194,15 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
if( new_mmu & 0x02 )
|
||||
{
|
||||
logerror("%s MMU BASIC RAM\n", machine->gamedrv->name);
|
||||
rbank1 = SMH_BANK(1);
|
||||
wbank1 = SMH_BANK(1);
|
||||
rbank1 = (read8_space_func)SMH_BANK(1);
|
||||
wbank1 = (write8_space_func)SMH_BANK(1);
|
||||
base1 = memory_region(machine, "maincpu") + 0x0a000; /* 8K RAM */
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("%s MMU BASIC ROM\n", machine->gamedrv->name);
|
||||
rbank1 = SMH_BANK(1);
|
||||
wbank1 = SMH_UNMAP;
|
||||
rbank1 = (read8_space_func)SMH_BANK(1);
|
||||
wbank1 = (write8_space_func)SMH_UNMAP;
|
||||
base1 = memory_region(machine, "maincpu") + 0x10000; /* 8K BASIC */
|
||||
}
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa000, 0xbfff, 0, 0, rbank1, wbank1);
|
||||
@ -212,15 +212,15 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
if( new_mmu & 0x80 )
|
||||
{
|
||||
logerror("%s MMU SELFTEST RAM\n", machine->gamedrv->name);
|
||||
rbank2 = SMH_BANK(2);
|
||||
wbank2 = SMH_BANK(2);
|
||||
rbank2 = (read8_space_func)SMH_BANK(2);
|
||||
wbank2 = (write8_space_func)SMH_BANK(2);
|
||||
base2 = memory_region(machine, "maincpu") + 0x05000; /* 0x0800 bytes */
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("%s MMU SELFTEST ROM\n", machine->gamedrv->name);
|
||||
rbank2 = SMH_BANK(2);
|
||||
wbank2 = SMH_UNMAP;
|
||||
rbank2 = (read8_space_func)SMH_BANK(2);
|
||||
wbank2 = (write8_space_func)SMH_UNMAP;
|
||||
base2 = memory_region(machine, "maincpu") + 0x15000; /* 0x0800 bytes */
|
||||
}
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x5000, 0x57ff, 0, 0, rbank2, wbank2);
|
||||
|
@ -321,7 +321,7 @@ WRITE32_HANDLER( atarigen_video_int_ack32_w )
|
||||
|
||||
static TIMER_CALLBACK( scanline_interrupt_callback )
|
||||
{
|
||||
const device_config *screen = ptr;
|
||||
const device_config *screen = (const device_config *)ptr;
|
||||
emu_timer *timer = get_scanline_interrupt_timer_for_screen(screen);
|
||||
|
||||
/* generate the interrupt */
|
||||
@ -984,7 +984,7 @@ void atarigen_scanline_timer_reset(const device_config *screen, atarigen_scanlin
|
||||
|
||||
static TIMER_CALLBACK( scanline_timer_callback )
|
||||
{
|
||||
const device_config *screen = ptr;
|
||||
const device_config *screen = (const device_config *)ptr;
|
||||
int scanline = param;
|
||||
|
||||
/* callback */
|
||||
@ -1049,7 +1049,7 @@ static emu_timer *get_atarivc_eof_update_timer_for_screen(const device_config *s
|
||||
|
||||
static TIMER_CALLBACK( atarivc_eof_update )
|
||||
{
|
||||
const device_config *screen = ptr;
|
||||
const device_config *screen = (const device_config *)ptr;
|
||||
emu_timer *timer = get_atarivc_eof_update_timer_for_screen(screen);
|
||||
int i;
|
||||
|
||||
@ -1584,8 +1584,8 @@ static TIMER_CALLBACK( unhalt_cpu )
|
||||
|
||||
void atarigen_swap_mem(void *ptr1, void *ptr2, int bytes)
|
||||
{
|
||||
UINT8 *p1 = ptr1;
|
||||
UINT8 *p2 = ptr2;
|
||||
UINT8 *p1 = (UINT8 *)ptr1;
|
||||
UINT8 *p2 = (UINT8 *)ptr2;
|
||||
while (bytes--)
|
||||
{
|
||||
int temp = *p1;
|
||||
|
@ -347,10 +347,10 @@ WRITE8_HANDLER( boblbobl_ic43_a_w )
|
||||
|
||||
WRITE8_HANDLER( boblbobl_ic43_b_w )
|
||||
{
|
||||
static const int xor[4] = { 4, 1, 8, 2 };
|
||||
static const int xorval[4] = { 4, 1, 8, 2 };
|
||||
|
||||
// logerror("%04x: ic43_b_w (offs %d) %02x\n",cpu_get_pc(space->cpu),offset,data);
|
||||
ic43_b = (data >> 4) ^ xor[offset];
|
||||
ic43_b = (data >> 4) ^ xorval[offset];
|
||||
}
|
||||
|
||||
READ8_HANDLER( boblbobl_ic43_b_r )
|
||||
|
@ -961,7 +961,7 @@ static const struct game_keys keys_table[] =
|
||||
{ "progearj", { 0x9f7edc56,0x39fb47be }, 0x400000 }, // 0C81 63A1 B8D3 cmpi.l #$63A1B8D3,D1
|
||||
{ "progeara", { 0x658ab128,0xfddc9b5e }, 0x400000 }, // 0C81 63A1 B8D3 cmpi.l #$63A1B8D3,D1
|
||||
|
||||
{ 0 } // end of table
|
||||
{ NULL, { 0,0 }, 0 } // end of table
|
||||
};
|
||||
|
||||
|
||||
|
@ -808,7 +808,7 @@ WRITE64_HANDLER( dc_maple_w )
|
||||
|
||||
INPUT_CHANGED( dc_coin_slots_callback )
|
||||
{
|
||||
UINT32 *counter = param;
|
||||
UINT32 *counter = (UINT32 *)param;
|
||||
|
||||
/* check for a 0 -> 1 transition */
|
||||
if (!oldval && newval)
|
||||
|
@ -28,7 +28,7 @@ static UINT16 decrypt(UINT16 data, int address, int select_xor)
|
||||
{ 12,15,8,13,9,11,14,10, 6,5,4,3,2,1,0,7 }, { 11,12,13,14,15,8,9,10, 4,5,7,1,6,3,2,0 },
|
||||
{ 13,8,12,14,11,15,10,9, 7,6,5,4,3,2,1,0 }, { 15,14,13,12,11,10,9,8, 0,6,7,4,3,2,1,5 }
|
||||
};
|
||||
int j, xor;
|
||||
int j, xorval;
|
||||
const UINT8 *bs;
|
||||
|
||||
// calculate bitswap to use
|
||||
@ -39,10 +39,10 @@ static UINT16 decrypt(UINT16 data, int address, int select_xor)
|
||||
// calculate xor to use
|
||||
j = (address ^ select_xor) & 0x0f;
|
||||
if (address & 0x40000) j ^= 2; // boogwing
|
||||
xor = xors[j];
|
||||
xorval = xors[j];
|
||||
|
||||
// decrypt
|
||||
return xor ^ BITSWAP16(data,
|
||||
return xorval ^ BITSWAP16(data,
|
||||
bs[0],bs[1],bs[2],bs[3],bs[4],bs[5],bs[6],bs[7],
|
||||
bs[8],bs[9],bs[10],bs[11],bs[12],bs[13],bs[14],bs[15]);
|
||||
}
|
||||
|
@ -1996,11 +1996,11 @@ static TIMER_CALLBACK( tape_clock_callback )
|
||||
UINT32 dataclock = tape->clockpos - REGION_BOT_GAP_END_CLOCK;
|
||||
|
||||
/* compute the block number */
|
||||
tape->region = REGION_DATA_BLOCK_0 + dataclock / (TAPE_CLOCKS_PER_BYTE * BYTE_BLOCK_TOTAL);
|
||||
tape->region = (tape_region)(REGION_DATA_BLOCK_0 + dataclock / (TAPE_CLOCKS_PER_BYTE * BYTE_BLOCK_TOTAL));
|
||||
dataclock -= (tape->region - REGION_DATA_BLOCK_0) * TAPE_CLOCKS_PER_BYTE * BYTE_BLOCK_TOTAL;
|
||||
|
||||
/* compute the byte within the block */
|
||||
tape->bytenum = dataclock / TAPE_CLOCKS_PER_BYTE;
|
||||
tape->bytenum = (tape_byte)(dataclock / TAPE_CLOCKS_PER_BYTE);
|
||||
dataclock -= tape->bytenum * TAPE_CLOCKS_PER_BYTE;
|
||||
|
||||
/* compute the bit within the byte */
|
||||
|
@ -125,7 +125,7 @@ CPU # Type Status Game Seed Unencrypted data range
|
||||
|
||||
struct parameters
|
||||
{
|
||||
int xor;
|
||||
int xorval;
|
||||
int s7,s6,s5,s4,s3,s2,s1,s0;
|
||||
};
|
||||
|
||||
@ -257,7 +257,7 @@ static int decode_fd1089a(int val,int key,int opcode)
|
||||
table = rearrange_key(key, opcode);
|
||||
|
||||
p = &addr_params[table >> 4];
|
||||
val = BITSWAP8(val, p->s7,p->s6,p->s5,p->s4,p->s3,p->s2,p->s1,p->s0) ^ p->xor;
|
||||
val = BITSWAP8(val, p->s7,p->s6,p->s5,p->s4,p->s3,p->s2,p->s1,p->s0) ^ p->xorval;
|
||||
|
||||
if (BIT(table,3)) val ^= 0x01;
|
||||
if (BIT(table,0)) val ^= 0xb1;
|
||||
@ -296,7 +296,7 @@ static int decode_fd1089a(int val,int key,int opcode)
|
||||
|
||||
q = &data_params[family];
|
||||
|
||||
val ^= q->xor;
|
||||
val ^= q->xorval;
|
||||
val = BITSWAP8(val, q->s7,q->s6,q->s5,q->s4,q->s3,q->s2,q->s1,q->s0);
|
||||
|
||||
return val;
|
||||
@ -305,7 +305,7 @@ static int decode_fd1089a(int val,int key,int opcode)
|
||||
static int decode_fd1089b(int val,int key,int opcode)
|
||||
{
|
||||
int table;
|
||||
int xor;
|
||||
int xorval;
|
||||
|
||||
const struct parameters *p;
|
||||
|
||||
@ -316,7 +316,7 @@ static int decode_fd1089b(int val,int key,int opcode)
|
||||
table = rearrange_key(key, opcode);
|
||||
|
||||
p = &addr_params[table >> 4];
|
||||
val = BITSWAP8(val, p->s7,p->s6,p->s5,p->s4,p->s3,p->s2,p->s1,p->s0) ^ p->xor;
|
||||
val = BITSWAP8(val, p->s7,p->s6,p->s5,p->s4,p->s3,p->s2,p->s1,p->s0) ^ p->xorval;
|
||||
|
||||
if (BIT(table,3)) val ^= 0x01;
|
||||
if (BIT(table,0)) val ^= 0xb1;
|
||||
@ -327,19 +327,19 @@ static int decode_fd1089b(int val,int key,int opcode)
|
||||
|
||||
val = basetable_fd1089[val];
|
||||
|
||||
xor = 0;
|
||||
xorval = 0;
|
||||
if (opcode == 0)
|
||||
{
|
||||
if (BIT(~table,6) & BIT(table,2)) xor ^= 0x01;
|
||||
if (BIT(table,4)) xor ^= 0x01;
|
||||
if (BIT(~table,6) & BIT(table,2)) xorval ^= 0x01;
|
||||
if (BIT(table,4)) xorval ^= 0x01;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BIT(table,6) & BIT(table,2)) xor ^= 0x01;
|
||||
if (BIT(table,5)) xor ^= 0x01;
|
||||
if (BIT(table,6) & BIT(table,2)) xorval ^= 0x01;
|
||||
if (BIT(table,5)) xorval ^= 0x01;
|
||||
}
|
||||
|
||||
val ^= xor;
|
||||
val ^= xorval;
|
||||
|
||||
if (BIT(table,2))
|
||||
{
|
||||
|
@ -895,9 +895,9 @@ static TIMER_CALLBACK( deferred_adsp_bank_switch )
|
||||
if (commands)
|
||||
{
|
||||
INT16 *base = (INT16 *)&som_memory[param * 0x2000];
|
||||
INT16 *end = base + (UINT16)*base++;
|
||||
INT16 *current = base;
|
||||
INT16 *table = base + (UINT16)*current++;
|
||||
INT16 *end = base + (UINT16)*base;
|
||||
INT16 *current = base + 1;
|
||||
INT16 *table = base + 1 + (UINT16)*current++;
|
||||
|
||||
fprintf(commands, "\n---------------\n");
|
||||
|
||||
|
@ -106,7 +106,7 @@ INLINE void K053936GP_copyroz32clip( running_machine *machine,
|
||||
cmask = colormask[tilebpp];
|
||||
|
||||
src_pitch = src_bitmap->rowpixels;
|
||||
src_base = src_bitmap->base;
|
||||
src_base = (UINT16 *)src_bitmap->base;
|
||||
|
||||
dst_ptr = dst_base;
|
||||
cy = starty;
|
||||
@ -374,7 +374,7 @@ INLINE void zdrawgfxzoom32GP( running_machine *machine,
|
||||
pal_base = machine->pens + gfx->color_base + (color % gfx->total_colors) * granularity;
|
||||
shd_base = machine->shadow_table;
|
||||
|
||||
dst_ptr = bitmap->base;
|
||||
dst_ptr = (UINT32 *)bitmap->base;
|
||||
dst_pitch = bitmap->rowpixels;
|
||||
dst_minx = cliprect->min_x;
|
||||
dst_maxx = cliprect->max_x;
|
||||
|
@ -227,7 +227,7 @@ CUSTOM_INPUT( tms5220_r )
|
||||
|
||||
CUSTOM_INPUT( mhavoc_bit67_r )
|
||||
{
|
||||
const char *tag1 = param;
|
||||
const char *tag1 = (const char *)param;
|
||||
const char *tag2 = tag1 + strlen(tag1) + 1;
|
||||
return input_port_read(field->port->machine, player_1 ? tag2 : tag1) & 0x03;
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static TIMER_CALLBACK( namco_50xx_irq_clear )
|
||||
{
|
||||
const device_config *cpu = ptr;
|
||||
const device_config *cpu = (const device_config *)ptr;
|
||||
cpu_set_input_line(cpu, 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
@ -64,22 +64,6 @@ static WRITE8_HANDLER( bank14_w ) { (*namcos1_active_bank[13].bank_handler_w)(sp
|
||||
static WRITE8_HANDLER( bank15_w ) { (*namcos1_active_bank[14].bank_handler_w)(space, offset + namcos1_active_bank[14].bank_offset, data); }
|
||||
static WRITE8_HANDLER( bank16_w ) { (*namcos1_active_bank[15].bank_handler_w)(space, offset + namcos1_active_bank[15].bank_offset, data); }
|
||||
|
||||
static const read8_space_func ram_bank_handler_r[16] =
|
||||
{
|
||||
SMH_BANK(1) ,SMH_BANK(2) ,SMH_BANK(3) ,SMH_BANK(4) ,
|
||||
SMH_BANK(5) ,SMH_BANK(6) ,SMH_BANK(7) ,SMH_BANK(8) ,
|
||||
SMH_BANK(9) ,SMH_BANK(10),SMH_BANK(11),SMH_BANK(12),
|
||||
SMH_BANK(13),SMH_BANK(14),SMH_BANK(15),SMH_BANK(16)
|
||||
};
|
||||
|
||||
static const write8_space_func ram_bank_handler_w[16] =
|
||||
{
|
||||
SMH_BANK(1) ,SMH_BANK(2) ,SMH_BANK(3) ,SMH_BANK(4) ,
|
||||
SMH_BANK(5) ,SMH_BANK(6) ,SMH_BANK(7) ,SMH_BANK(8) ,
|
||||
SMH_BANK(9) ,SMH_BANK(10),SMH_BANK(11),SMH_BANK(12),
|
||||
SMH_BANK(13),SMH_BANK(14),SMH_BANK(15),SMH_BANK(16)
|
||||
};
|
||||
|
||||
static const read8_space_func io_bank_handler_r[16] =
|
||||
{
|
||||
bank1_r, bank2_r, bank3_r, bank4_r,
|
||||
@ -692,7 +676,7 @@ static void set_bank(running_machine *machine, int banknum, const bankhandler *h
|
||||
if (!handler->bank_handler_r)
|
||||
{
|
||||
if (namcos1_active_bank[banknum].bank_handler_r)
|
||||
memory_install_read8_handler(space, bankstart, bankstart + 0x1fff, 0, 0, ram_bank_handler_r[banknum]);
|
||||
memory_install_read8_handler(space, bankstart, bankstart + 0x1fff, 0, 0, (read8_space_func)SMH_BANK(banknum + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -706,7 +690,7 @@ static void set_bank(running_machine *machine, int banknum, const bankhandler *h
|
||||
if (!handler->bank_handler_w)
|
||||
{
|
||||
if (namcos1_active_bank[banknum].bank_handler_w)
|
||||
memory_install_write8_handler(space, bankstart, bankstart + 0x1fff, 0, 0, ram_bank_handler_w[banknum]);
|
||||
memory_install_write8_handler(space, bankstart, bankstart + 0x1fff, 0, 0, (write8_space_func)SMH_BANK(banknum + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ INLINE naomibd_state *get_safe_token(const device_config *device)
|
||||
|
||||
int naomibd_interrupt_callback(const device_config *device, naomibd_interrupt_func callback)
|
||||
{
|
||||
naomibd_config *config = device->inline_config;
|
||||
naomibd_config *config = (naomibd_config *)device->inline_config;
|
||||
//naomibd_state *v = get_safe_token(device);
|
||||
|
||||
config->interrupt = callback;
|
||||
@ -522,7 +522,7 @@ static void load_rom_gdrom(running_machine* machine, naomibd_state *v)
|
||||
|
||||
static DEVICE_START( naomibd )
|
||||
{
|
||||
const naomibd_config *config = device->inline_config;
|
||||
const naomibd_config *config = (const naomibd_config *)device->inline_config;
|
||||
naomibd_state *v = get_safe_token(device);
|
||||
|
||||
/* validate some basic stuff */
|
||||
@ -623,7 +623,7 @@ static DEVICE_NVRAM( naomibd )
|
||||
|
||||
DEVICE_GET_INFO( naomibd )
|
||||
{
|
||||
const naomibd_config *config = (device != NULL) ? device->inline_config : NULL;
|
||||
const naomibd_config *config = (device != NULL) ? (const naomibd_config *)device->inline_config : NULL;
|
||||
switch (state)
|
||||
{
|
||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user