mirror of
https://github.com/holub/mame
synced 2025-05-24 14:56:21 +03:00
Credit Fabio Priuli: Remove port_input_read_indexed in favor of the use of proper tags in a number of drivers
* Checked sprintf calls for sufficient buffer space [couriersud]
This commit is contained in:
parent
e290212a9d
commit
9aacf830fb
@ -198,7 +198,7 @@ static int determine_bios_rom(rom_load_data *romdata, const rom_entry *romp)
|
|||||||
{
|
{
|
||||||
const char *biosname = ROM_GETHASHDATA(rom);
|
const char *biosname = ROM_GETHASHDATA(rom);
|
||||||
int bios_flags = ROM_GETBIOSFLAGS(rom);
|
int bios_flags = ROM_GETBIOSFLAGS(rom);
|
||||||
char bios_number[3];
|
char bios_number[20];
|
||||||
|
|
||||||
/* Allow '-bios n' to still be used */
|
/* Allow '-bios n' to still be used */
|
||||||
sprintf(bios_number, "%d", bios_flags - 1);
|
sprintf(bios_number, "%d", bios_flags - 1);
|
||||||
|
@ -574,7 +574,6 @@ static void allocate_graphics(running_machine *machine, const gfx_decode_entry *
|
|||||||
static void decode_graphics(running_machine *machine, const gfx_decode_entry *gfxdecodeinfo)
|
static void decode_graphics(running_machine *machine, const gfx_decode_entry *gfxdecodeinfo)
|
||||||
{
|
{
|
||||||
int totalgfx = 0, curgfx = 0;
|
int totalgfx = 0, curgfx = 0;
|
||||||
char buffer[200];
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* count total graphics elements */
|
/* count total graphics elements */
|
||||||
@ -596,6 +595,7 @@ static void decode_graphics(running_machine *machine, const gfx_decode_entry *gf
|
|||||||
/* now decode the actual graphics */
|
/* now decode the actual graphics */
|
||||||
for (j = 0; j < gfx->total_elements; j += 1024)
|
for (j = 0; j < gfx->total_elements; j += 1024)
|
||||||
{
|
{
|
||||||
|
char buffer[200];
|
||||||
int num_to_decode = (j + 1024 < gfx->total_elements) ? 1024 : (gfx->total_elements - j);
|
int num_to_decode = (j + 1024 < gfx->total_elements) ? 1024 : (gfx->total_elements - j);
|
||||||
decodegfx(gfx, region_base + gfxdecodeinfo[i].start, j, num_to_decode);
|
decodegfx(gfx, region_base + gfxdecodeinfo[i].start, j, num_to_decode);
|
||||||
curgfx += num_to_decode;
|
curgfx += num_to_decode;
|
||||||
|
@ -893,7 +893,7 @@ static int sfl_int=0;
|
|||||||
static READ8_HANDLER( sfl_input_r )
|
static READ8_HANDLER( sfl_input_r )
|
||||||
{
|
{
|
||||||
sfl_int^=0x80;//vblank flag ?
|
sfl_int^=0x80;//vblank flag ?
|
||||||
return sfl_int|input_port_read_indexed(machine, 1);
|
return sfl_int|input_port_read(machine, "DSW0");
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
|
@ -281,7 +281,7 @@ static READ16_HANDLER(ac_devices_r)
|
|||||||
---- ---- ---- --x- (Activate Test)
|
---- ---- ---- --x- (Activate Test)
|
||||||
---- ---- ---- ---x (Advance Thru Tests)
|
---- ---- ---- ---x (Advance Thru Tests)
|
||||||
*/
|
*/
|
||||||
return input_port_read_indexed(machine,0);
|
return input_port_read(machine, "IN0");
|
||||||
case 0x0014/2:
|
case 0x0014/2:
|
||||||
/*
|
/*
|
||||||
write 0x40,read (~0x08)
|
write 0x40,read (~0x08)
|
||||||
@ -315,7 +315,7 @@ static READ16_HANDLER(ac_devices_r)
|
|||||||
xxxx xxxx ---- ---- DIPSW4
|
xxxx xxxx ---- ---- DIPSW4
|
||||||
---- ---- xxxx xxxx DIPSW3
|
---- ---- xxxx xxxx DIPSW3
|
||||||
*/
|
*/
|
||||||
return input_port_read_indexed(machine,1);
|
return input_port_read(machine, "IN1");
|
||||||
}
|
}
|
||||||
return ac_devram[offset];
|
return ac_devram[offset];
|
||||||
}
|
}
|
||||||
@ -375,7 +375,7 @@ static ADDRESS_MAP_START( acommand, ADDRESS_SPACE_PROGRAM, 16 )
|
|||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static INPUT_PORTS_START( acommand )
|
static INPUT_PORTS_START( acommand )
|
||||||
PORT_START
|
PORT_START_TAG("IN0")
|
||||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
||||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||||
@ -425,7 +425,7 @@ static INPUT_PORTS_START( acommand )
|
|||||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||||
|
|
||||||
PORT_START
|
PORT_START_TAG("IN1")
|
||||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
||||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||||
|
@ -47,16 +47,16 @@ static UINT8 *actfancr_ram;
|
|||||||
|
|
||||||
static READ8_HANDLER( actfan_control_0_r )
|
static READ8_HANDLER( actfan_control_0_r )
|
||||||
{
|
{
|
||||||
return input_port_read_indexed(machine, 2); /* VBL */
|
return input_port_read(machine, "IN2"); /* VBL */
|
||||||
}
|
}
|
||||||
|
|
||||||
static READ8_HANDLER( actfan_control_1_r )
|
static READ8_HANDLER( actfan_control_1_r )
|
||||||
{
|
{
|
||||||
switch (offset) {
|
switch (offset) {
|
||||||
case 0: return input_port_read_indexed(machine, 0); /* Player 1 */
|
case 0: return input_port_read(machine, "IN0"); /* Player 1 */
|
||||||
case 1: return input_port_read_indexed(machine, 1); /* Player 2 */
|
case 1: return input_port_read(machine, "IN1"); /* Player 2 */
|
||||||
case 2: return input_port_read_indexed(machine, 3); /* Dip 1 */
|
case 2: return input_port_read(machine, "DSW1"); /* Dip 1 */
|
||||||
case 3: return input_port_read_indexed(machine, 4); /* Dip 2 */
|
case 3: return input_port_read(machine, "DSW2"); /* Dip 2 */
|
||||||
}
|
}
|
||||||
return 0xff;
|
return 0xff;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ static READ16_HANDLER( control_1_r )
|
|||||||
if (invert_controls)
|
if (invert_controls)
|
||||||
return ~(input_port_read(machine, "IN0") + (input_port_read(machine, "IN1") << 8));
|
return ~(input_port_read(machine, "IN0") + (input_port_read(machine, "IN1") << 8));
|
||||||
|
|
||||||
return (input_port_read_indexed(machine, 0) + (input_port_read_indexed(machine, 1) << 8));
|
return (input_port_read(machine, "IN0") + (input_port_read(machine, "IN1") << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
static READ16_HANDLER( control_2_r )
|
static READ16_HANDLER( control_2_r )
|
||||||
|
@ -46,7 +46,10 @@ VIDEO_UPDATE( amspdwy );
|
|||||||
static READ8_HANDLER( amspdwy_wheel_##_n_##_r ) \
|
static READ8_HANDLER( amspdwy_wheel_##_n_##_r ) \
|
||||||
{ \
|
{ \
|
||||||
static UINT8 wheel_old, ret; \
|
static UINT8 wheel_old, ret; \
|
||||||
UINT8 wheel = input_port_read_indexed(machine, 5 + _n_); \
|
char port1[4], port2[4]; \
|
||||||
|
UINT8 wheel; \
|
||||||
|
sprintf(port1, "IN%d", 5 + _n_); \
|
||||||
|
wheel = input_port_read(machine, port1); \
|
||||||
if (wheel != wheel_old) \
|
if (wheel != wheel_old) \
|
||||||
{ \
|
{ \
|
||||||
wheel = (wheel & 0x7fff) - (wheel & 0x8000); \
|
wheel = (wheel & 0x7fff) - (wheel & 0x8000); \
|
||||||
@ -54,7 +57,8 @@ static READ8_HANDLER( amspdwy_wheel_##_n_##_r ) \
|
|||||||
else ret = ((-wheel) & 0xf) | 0x10; \
|
else ret = ((-wheel) & 0xf) | 0x10; \
|
||||||
wheel_old = wheel; \
|
wheel_old = wheel; \
|
||||||
} \
|
} \
|
||||||
return ret | input_port_read_indexed(machine, 2 + _n_); \
|
sprintf(port2, "IN%d", 2 + _n_); \
|
||||||
|
return ret | input_port_read(machine, port2); \
|
||||||
}
|
}
|
||||||
AMSPDWY_WHEEL_R( 0 )
|
AMSPDWY_WHEEL_R( 0 )
|
||||||
AMSPDWY_WHEEL_R( 1 )
|
AMSPDWY_WHEEL_R( 1 )
|
||||||
@ -62,7 +66,7 @@ AMSPDWY_WHEEL_R( 1 )
|
|||||||
|
|
||||||
static READ8_HANDLER( amspdwy_sound_r )
|
static READ8_HANDLER( amspdwy_sound_r )
|
||||||
{
|
{
|
||||||
return (YM2151_status_port_0_r(machine,0) & ~ 0x30) | input_port_read_indexed(machine, 4);
|
return (YM2151_status_port_0_r(machine,0) & ~ 0x30) | input_port_read(machine, "IN4");
|
||||||
}
|
}
|
||||||
|
|
||||||
static WRITE8_HANDLER( amspdwy_sound_w )
|
static WRITE8_HANDLER( amspdwy_sound_w )
|
||||||
|
@ -180,16 +180,24 @@ these make the game a bit easier for testing purposes
|
|||||||
|
|
||||||
static READ8_HANDLER( angelkds_input_r )
|
static READ8_HANDLER( angelkds_input_r )
|
||||||
{
|
{
|
||||||
int fake = input_port_read_indexed(machine, 6+offset);
|
int fake;
|
||||||
|
char port1[4], port2[6];
|
||||||
|
|
||||||
return ((fake & 0x01) ? fake : input_port_read_indexed(machine, 4+offset));
|
sprintf(port1, "I8%d", 1 + offset);
|
||||||
|
sprintf(port2, "FAKE%d", 1 + offset);
|
||||||
|
fake = input_port_read(machine, port2);
|
||||||
|
|
||||||
|
return ((fake & 0x01) ? fake : input_port_read(machine, port1));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static READ8_HANDLER( angelkds_input_r )
|
static READ8_HANDLER( angelkds_input_r )
|
||||||
{
|
{
|
||||||
return input_port_read_indexed(machine, 4+offset);
|
char port[4];
|
||||||
|
|
||||||
|
sprintf(port, "I8%d", 1 + offset);
|
||||||
|
return input_port_read(machine, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -235,10 +243,10 @@ static ADDRESS_MAP_START( main_portmap, ADDRESS_SPACE_IO, 8 )
|
|||||||
AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) // 00 on start-up, not again
|
AM_RANGE(0x00, 0x00) AM_WRITE(SMH_NOP) // 00 on start-up, not again
|
||||||
AM_RANGE(0x42, 0x42) AM_WRITE(angelkds_cpu_bank_write)
|
AM_RANGE(0x42, 0x42) AM_WRITE(angelkds_cpu_bank_write)
|
||||||
AM_RANGE(0x43, 0x43) AM_WRITE(SMH_NOP) // 9a on start-up, not again
|
AM_RANGE(0x43, 0x43) AM_WRITE(SMH_NOP) // 9a on start-up, not again
|
||||||
AM_RANGE(0x40, 0x40) AM_READ(input_port_0_r) /* "Coinage" Dip Switches */
|
AM_RANGE(0x40, 0x40) AM_READ_PORT("I40") /* "Coinage" Dip Switches */
|
||||||
AM_RANGE(0x41, 0x41) AM_READ(input_port_1_r) /* Other Dip Switches */
|
AM_RANGE(0x41, 0x41) AM_READ_PORT("I41") /* Other Dip Switches */
|
||||||
AM_RANGE(0x42, 0x42) AM_READ(input_port_2_r) /* Players inputs (not needed ?) */
|
AM_RANGE(0x42, 0x42) AM_READ_PORT("I42") /* Players inputs (not needed ?) */
|
||||||
AM_RANGE(0x80, 0x80) AM_READ(input_port_3_r) /* System inputs */
|
AM_RANGE(0x80, 0x80) AM_READ_PORT("I80") /* System inputs */
|
||||||
AM_RANGE(0x81, 0x82) AM_READ(angelkds_input_r) /* Players inputs */
|
AM_RANGE(0x81, 0x82) AM_READ(angelkds_input_r) /* Players inputs */
|
||||||
AM_RANGE(0x83, 0x83) AM_WRITE(SMH_NOP) // 9b on start-up, not again
|
AM_RANGE(0x83, 0x83) AM_WRITE(SMH_NOP) // 9b on start-up, not again
|
||||||
AM_RANGE(0xc0, 0xc3) AM_READWRITE(angelkds_main_sound_r, angelkds_main_sound_w) // 02 various points
|
AM_RANGE(0xc0, 0xc3) AM_READWRITE(angelkds_main_sound_r, angelkds_main_sound_w) // 02 various points
|
||||||
|
@ -86,7 +86,7 @@ static MACHINE_RESET( aquarium )
|
|||||||
static READ16_HANDLER( aquarium_coins_r )
|
static READ16_HANDLER( aquarium_coins_r )
|
||||||
{
|
{
|
||||||
int data;
|
int data;
|
||||||
data = (input_port_read_indexed(machine,2) & 0x7fff); /* IN1 */
|
data = (input_port_read(machine, "IN1") & 0x7fff);
|
||||||
data |= aquarium_snd_ack;
|
data |= aquarium_snd_ack;
|
||||||
aquarium_snd_ack = 0;
|
aquarium_snd_ack = 0;
|
||||||
return data;
|
return data;
|
||||||
|
@ -133,6 +133,7 @@ static READ8_HANDLER( custom_cpu_r )
|
|||||||
/* alternate CPU's RAM space while the CPU is running. If the CPU is not */
|
/* alternate CPU's RAM space while the CPU is running. If the CPU is not */
|
||||||
/* running (i.e., the /SRES line is low), it needs to look like RAM to pass */
|
/* running (i.e., the /SRES line is low), it needs to look like RAM to pass */
|
||||||
/* the self-tests */
|
/* the self-tests */
|
||||||
|
char port[5];
|
||||||
|
|
||||||
/* if the CPU reset line is being held down, just return RAM */
|
/* if the CPU reset line is being held down, just return RAM */
|
||||||
if (custom_cpu_reset)
|
if (custom_cpu_reset)
|
||||||
@ -148,7 +149,8 @@ static READ8_HANDLER( custom_cpu_r )
|
|||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
return input_port_read_indexed(machine, 2 + offset);
|
sprintf(port, "COM%d", offset);
|
||||||
|
return input_port_read(machine, port);
|
||||||
|
|
||||||
/* busy flag; this is polled to check the custom CPU's readiness */
|
/* busy flag; this is polled to check the custom CPU's readiness */
|
||||||
/* we just toggle it on and off until the main CPU gets the result */
|
/* we just toggle it on and off until the main CPU gets the result */
|
||||||
|
@ -148,7 +148,7 @@ static READ16_HANDLER( ultennis_hack_r )
|
|||||||
hack_irq = 0;
|
hack_irq = 0;
|
||||||
update_irq_state(machine);
|
update_irq_state(machine);
|
||||||
}
|
}
|
||||||
return input_port_read_indexed(machine, 0);
|
return input_port_read(machine, "300000");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ static void stonebal_protection(running_machine *machine)
|
|||||||
|
|
||||||
static READ16_HANDLER( special_port5_r )
|
static READ16_HANDLER( special_port5_r )
|
||||||
{
|
{
|
||||||
return input_port_read_indexed(machine, 5) | prot_output_bit;
|
return input_port_read(machine, "300008") | prot_output_bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ static READ16_HANDLER( control1_r )
|
|||||||
/* bit 8 is EEPROM data */
|
/* bit 8 is EEPROM data */
|
||||||
/* bit 9 is EEPROM ready */
|
/* bit 9 is EEPROM ready */
|
||||||
/* bit 10 is service button */
|
/* bit 10 is service button */
|
||||||
res = (eeprom_read_bit()<<8) | input_port_read_indexed(machine,1);
|
res = (eeprom_read_bit()<<8) | input_port_read(machine, "IN1");
|
||||||
|
|
||||||
if (init_eeprom_count)
|
if (init_eeprom_count)
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@ static WRITE8_HANDLER( astinvad_sound2_w )
|
|||||||
if (bits_gone_hi & 0x08) sample_start(5, SND_FLEET4, 0);
|
if (bits_gone_hi & 0x08) sample_start(5, SND_FLEET4, 0);
|
||||||
if (bits_gone_hi & 0x10) sample_start(4, SND_UFOHIT, 0);
|
if (bits_gone_hi & 0x10) sample_start(4, SND_UFOHIT, 0);
|
||||||
|
|
||||||
screen_flip = (input_port_read_indexed(machine, 3) & data & 0x20) ? 0xff : 0x00;
|
screen_flip = (input_port_read(machine, "IN3") & data & 0x20) ? 0xff : 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ static WRITE8_HANDLER( spaceint_sound2_w )
|
|||||||
|
|
||||||
if (bits_gone_hi & 0x04) sample_start(3, SND_INVADERHIT, 0);
|
if (bits_gone_hi & 0x04) sample_start(3, SND_INVADERHIT, 0);
|
||||||
|
|
||||||
screen_flip = (input_port_read_indexed(machine, 3) & data & 0x80) ? 0xff : 0x00;
|
screen_flip = (input_port_read(machine, "IN3") & data & 0x80) ? 0xff : 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ static WRITE16_HANDLER( mo_command_w )
|
|||||||
|
|
||||||
static READ16_HANDLER( special_port0_r )
|
static READ16_HANDLER( special_port0_r )
|
||||||
{
|
{
|
||||||
int temp = input_port_read_indexed(machine, 0);
|
int temp = input_port_read(machine, "IN0");
|
||||||
if (atarigen_cpu_to_sound_ready) temp ^= 0x1000;
|
if (atarigen_cpu_to_sound_ready) temp ^= 0x1000;
|
||||||
temp ^= 0x2000; /* A2DOK always high for now */
|
temp ^= 0x2000; /* A2DOK always high for now */
|
||||||
return temp;
|
return temp;
|
||||||
@ -125,13 +125,18 @@ static WRITE16_HANDLER( a2d_select_w )
|
|||||||
|
|
||||||
static READ16_HANDLER( a2d_data_r )
|
static READ16_HANDLER( a2d_data_r )
|
||||||
{
|
{
|
||||||
|
char port[5];
|
||||||
|
|
||||||
/* Pit Fighter has no A2D, just another input port */
|
/* Pit Fighter has no A2D, just another input port */
|
||||||
if (atarig1_pitfight)
|
if (atarig1_pitfight)
|
||||||
return input_port_read_indexed(machine, 1);
|
return input_port_read(machine, "ADC0");
|
||||||
|
|
||||||
/* otherwise, assume it's hydra */
|
/* otherwise, assume it's hydra */
|
||||||
if (which_input < 3)
|
if (which_input < 3)
|
||||||
return input_port_read_indexed(machine, 1 + which_input) << 8;
|
{
|
||||||
|
sprintf(port, "ADC%d", which_input);
|
||||||
|
return input_port_read(machine, port) << 8;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -250,7 +255,7 @@ ADDRESS_MAP_END
|
|||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static INPUT_PORTS_START( hydra )
|
static INPUT_PORTS_START( hydra )
|
||||||
PORT_START /* fc0000 */
|
PORT_START_TAG("IN0") /* fc0000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON5 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON5 )
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 )
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 )
|
||||||
@ -262,15 +267,15 @@ static INPUT_PORTS_START( hydra )
|
|||||||
PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
|
PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
|
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
|
||||||
|
|
||||||
PORT_START /* ADC 0 @ fc8000 */
|
PORT_START_TAG("ADC0") /* ADC 0 @ fc8000 */
|
||||||
PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
|
PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* ADC 1 @ fc8000 */
|
PORT_START_TAG("ADC1") /* ADC 1 @ fc8000 */
|
||||||
PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
|
PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* ADC 2 @ fc8000 */
|
PORT_START_TAG("ADC2") /* ADC 2 @ fc8000 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
|
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
|
||||||
|
|
||||||
JSA_II_PORT /* audio board port */
|
JSA_II_PORT /* audio board port */
|
||||||
@ -280,7 +285,7 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( pitfight )
|
static INPUT_PORTS_START( pitfight )
|
||||||
PORT_START /* fc0000 */
|
PORT_START_TAG("IN0") /* fc0000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||||
@ -295,7 +300,7 @@ static INPUT_PORTS_START( pitfight )
|
|||||||
PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
|
PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
|
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
|
||||||
|
|
||||||
PORT_START /* fc8000 */
|
PORT_START_TAG("ADC0") /* fc8000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3)
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3)
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
|
||||||
@ -315,10 +320,10 @@ static INPUT_PORTS_START( pitfight )
|
|||||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* not used */
|
PORT_START_TAG("ADC1") /* not used */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* not used */
|
PORT_START_TAG("ADC2") /* not used */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
JSA_II_PORT /* audio board port */
|
JSA_II_PORT /* audio board port */
|
||||||
@ -328,7 +333,7 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( pitfighj )
|
static INPUT_PORTS_START( pitfighj )
|
||||||
PORT_START /* fc0000 */
|
PORT_START_TAG("IN0") /* fc0000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||||
@ -343,7 +348,7 @@ static INPUT_PORTS_START( pitfighj )
|
|||||||
PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
|
PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
|
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK )
|
||||||
|
|
||||||
PORT_START /* fc8000 */
|
PORT_START_TAG("ADC0") /* fc8000 */
|
||||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
|
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
|
||||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
|
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
|
||||||
@ -355,10 +360,10 @@ static INPUT_PORTS_START( pitfighj )
|
|||||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* not used */
|
PORT_START_TAG("ADC1") /* not used */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* not used */
|
PORT_START_TAG("ADC2") /* not used */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
JSA_II_PORT /* audio board port */
|
JSA_II_PORT /* audio board port */
|
||||||
|
@ -83,7 +83,7 @@ static MACHINE_RESET( atarig42 )
|
|||||||
|
|
||||||
static READ16_HANDLER( special_port2_r )
|
static READ16_HANDLER( special_port2_r )
|
||||||
{
|
{
|
||||||
int temp = input_port_read_indexed(machine, 2);
|
int temp = input_port_read(machine, "IN2");
|
||||||
if (atarigen_cpu_to_sound_ready) temp ^= 0x0020;
|
if (atarigen_cpu_to_sound_ready) temp ^= 0x0020;
|
||||||
if (atarigen_sound_to_cpu_ready) temp ^= 0x0010;
|
if (atarigen_sound_to_cpu_ready) temp ^= 0x0010;
|
||||||
temp ^= 0x0008; /* A2D.EOC always high for now */
|
temp ^= 0x0008; /* A2D.EOC always high for now */
|
||||||
@ -93,7 +93,10 @@ static READ16_HANDLER( special_port2_r )
|
|||||||
|
|
||||||
static WRITE16_HANDLER( a2d_select_w )
|
static WRITE16_HANDLER( a2d_select_w )
|
||||||
{
|
{
|
||||||
analog_data = input_port_read_indexed(machine, 4 + (offset != 0));
|
char port[5];
|
||||||
|
|
||||||
|
sprintf(port, "A2D%d", (offset != 0));
|
||||||
|
analog_data = input_port_read(machine, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -381,17 +384,17 @@ ADDRESS_MAP_END
|
|||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static INPUT_PORTS_START( roadriot )
|
static INPUT_PORTS_START( roadriot )
|
||||||
PORT_START /* e00000 */
|
PORT_START_TAG("IN0") /* e00000 */
|
||||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
|
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
|
||||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* e00002 */
|
PORT_START_TAG("IN1") /* e00002 */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* e00010 */
|
PORT_START_TAG("IN2") /* e00010 */
|
||||||
PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_SERVICE( 0x0040, IP_ACTIVE_LOW )
|
PORT_SERVICE( 0x0040, IP_ACTIVE_LOW )
|
||||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK )
|
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK )
|
||||||
@ -399,16 +402,16 @@ static INPUT_PORTS_START( roadriot )
|
|||||||
|
|
||||||
JSA_III_PORT /* audio board port */
|
JSA_III_PORT /* audio board port */
|
||||||
|
|
||||||
PORT_START /* analog 0 */
|
PORT_START_TAG("A2D0") /* analog 0 */
|
||||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
|
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
|
||||||
|
|
||||||
PORT_START /* analog 1 */
|
PORT_START_TAG("A2D1") /* analog 1 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
|
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( guardian )
|
static INPUT_PORTS_START( guardian )
|
||||||
PORT_START /* e00000 */
|
PORT_START_TAG("IN0") /* e00000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(3)
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(3)
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
|
||||||
@ -426,7 +429,7 @@ static INPUT_PORTS_START( guardian )
|
|||||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||||
|
|
||||||
PORT_START /* e00002 */
|
PORT_START_TAG("IN1") /* e00002 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||||
@ -442,7 +445,7 @@ static INPUT_PORTS_START( guardian )
|
|||||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
|
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
|
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
|
||||||
|
|
||||||
PORT_START /* e00010 */
|
PORT_START_TAG("IN2") /* e00010 */
|
||||||
PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_SERVICE( 0x0040, IP_ACTIVE_LOW )
|
PORT_SERVICE( 0x0040, IP_ACTIVE_LOW )
|
||||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK )
|
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK )
|
||||||
@ -450,10 +453,10 @@ static INPUT_PORTS_START( guardian )
|
|||||||
|
|
||||||
JSA_III_PORT /* audio board port */
|
JSA_III_PORT /* audio board port */
|
||||||
|
|
||||||
PORT_START /* analog 0 */
|
PORT_START_TAG("A2D0") /* analog 0 */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* analog 1 */
|
PORT_START_TAG("A2D1") /* analog 1 */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ static MACHINE_RESET( atarigx2 )
|
|||||||
|
|
||||||
static READ32_HANDLER( special_port2_r )
|
static READ32_HANDLER( special_port2_r )
|
||||||
{
|
{
|
||||||
int temp = input_port_read_indexed(machine, 2);
|
int temp = input_port_read(machine, "IN2");
|
||||||
if (atarigen_cpu_to_sound_ready) temp ^= 0x0020;
|
if (atarigen_cpu_to_sound_ready) temp ^= 0x0020;
|
||||||
if (atarigen_sound_to_cpu_ready) temp ^= 0x0010;
|
if (atarigen_sound_to_cpu_ready) temp ^= 0x0010;
|
||||||
temp ^= 0x0008; /* A2D.EOC always high for now */
|
temp ^= 0x0008; /* A2D.EOC always high for now */
|
||||||
@ -91,7 +91,7 @@ static READ32_HANDLER( special_port2_r )
|
|||||||
|
|
||||||
static READ32_HANDLER( special_port3_r )
|
static READ32_HANDLER( special_port3_r )
|
||||||
{
|
{
|
||||||
int temp = input_port_read_indexed(machine, 3);
|
int temp = input_port_read(machine, "IN3");
|
||||||
return (temp << 16) | temp;
|
return (temp << 16) | temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,9 +111,9 @@ static READ32_HANDLER( a2d_data_r )
|
|||||||
switch (offset)
|
switch (offset)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return (input_port_read_indexed(machine, 5) << 24) | (input_port_read_indexed(machine, 6) << 8);
|
return (input_port_read(machine, "A2D0") << 24) | (input_port_read(machine, "A2D1") << 8);
|
||||||
case 1:
|
case 1:
|
||||||
return (input_port_read_indexed(machine, 7) << 24) | (input_port_read_indexed(machine, 8) << 8);
|
return (input_port_read(machine, "A2D2") << 24) | (input_port_read(machine, "A2D3") << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1169,7 +1169,7 @@ static READ32_HANDLER( atarigx2_protection_r )
|
|||||||
|
|
||||||
static READ32_HANDLER( inputs_01_r )
|
static READ32_HANDLER( inputs_01_r )
|
||||||
{
|
{
|
||||||
return (input_port_read_indexed(machine, 0) << 16) | input_port_read_indexed(machine, 1);
|
return (input_port_read(machine, "IN0") << 16) | input_port_read(machine, "IN1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1215,7 +1215,7 @@ ADDRESS_MAP_END
|
|||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static INPUT_PORTS_START( spclords )
|
static INPUT_PORTS_START( spclords )
|
||||||
PORT_START /* 68.SW (A1=0) */
|
PORT_START_TAG("IN0") /* 68.SW (A1=0) */
|
||||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) /* BLUE button */
|
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) /* BLUE button */
|
||||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* Left thumb */
|
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* Left thumb */
|
||||||
@ -1226,7 +1226,7 @@ static INPUT_PORTS_START( spclords )
|
|||||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* Throttle button */
|
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* Throttle button */
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||||
|
|
||||||
PORT_START /* 68.SW (A1=1) */
|
PORT_START_TAG("IN1") /* 68.SW (A1=1) */
|
||||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 ) /* RED button */
|
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 ) /* RED button */
|
||||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* Right thumb */
|
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* Right thumb */
|
||||||
@ -1237,7 +1237,7 @@ static INPUT_PORTS_START( spclords )
|
|||||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
|
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
|
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
|
||||||
|
|
||||||
PORT_START /* 68.STATUS (A2=0) */
|
PORT_START_TAG("IN2") /* 68.STATUS (A2=0) */
|
||||||
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
||||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
|
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
|
||||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
|
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
|
||||||
@ -1246,7 +1246,7 @@ static INPUT_PORTS_START( spclords )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 68.STATUS (A2=1) */
|
PORT_START_TAG("IN3") /* 68.STATUS (A2=1) */
|
||||||
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
|
||||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
|
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
|
||||||
@ -1257,26 +1257,26 @@ static INPUT_PORTS_START( spclords )
|
|||||||
|
|
||||||
JSA_III_PORT /* audio board port */
|
JSA_III_PORT /* audio board port */
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00000 */
|
PORT_START_TAG("A2D0") /* A2D @ 0xD00000 */
|
||||||
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00002 */
|
PORT_START_TAG("A2D1") /* A2D @ 0xD00002 */
|
||||||
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00004 */
|
PORT_START_TAG("A2D2") /* A2D @ 0xD00004 */
|
||||||
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
|
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00006 */
|
PORT_START_TAG("A2D3") /* A2D @ 0xD00006 */
|
||||||
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
|
PORT_BIT ( 0x00ff, 0x0080, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( motofren )
|
static INPUT_PORTS_START( motofren )
|
||||||
PORT_START /* 68.SW (A1=0) */
|
PORT_START_TAG("IN0") /* 68.SW (A1=0) */
|
||||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) /* Start/fire */
|
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) /* Start/fire */
|
||||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* AUX3 */
|
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* AUX3 */
|
||||||
@ -1284,10 +1284,10 @@ static INPUT_PORTS_START( motofren )
|
|||||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* AUX1 */
|
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* AUX1 */
|
||||||
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 68.SW (A1=1) */
|
PORT_START_TAG("IN1") /* 68.SW (A1=1) */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 68.STATUS (A2=0) */
|
PORT_START_TAG("IN2") /* 68.STATUS (A2=0) */
|
||||||
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_UNUSED ) /* +5V */
|
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_UNUSED ) /* +5V */
|
||||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
|
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
|
||||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
|
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
|
||||||
@ -1296,7 +1296,7 @@ static INPUT_PORTS_START( motofren )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 68.STATUS (A2=1) */
|
PORT_START_TAG("IN3") /* 68.STATUS (A2=1) */
|
||||||
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
|
||||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
|
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
|
||||||
@ -1307,22 +1307,22 @@ static INPUT_PORTS_START( motofren )
|
|||||||
|
|
||||||
JSA_III_PORT /* audio board port */
|
JSA_III_PORT /* audio board port */
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00000 */
|
PORT_START_TAG("A2D0") /* A2D @ 0xD00000 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
|
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00002 */
|
PORT_START_TAG("A2D1") /* A2D @ 0xD00002 */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00004 */
|
PORT_START_TAG("A2D2") /* A2D @ 0xD00004 */
|
||||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
|
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00006 */
|
PORT_START_TAG("A2D3") /* A2D @ 0xD00006 */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( rrreveng )
|
static INPUT_PORTS_START( rrreveng )
|
||||||
PORT_START /* 68.SW (A1=0) */
|
PORT_START_TAG("IN0") /* 68.SW (A1=0) */
|
||||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
|
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
|
||||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||||
@ -1332,12 +1332,12 @@ static INPUT_PORTS_START( rrreveng )
|
|||||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 68.SW (A1=1) */
|
PORT_START_TAG("IN1") /* 68.SW (A1=1) */
|
||||||
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 68.STATUS (A2=0) */
|
PORT_START_TAG("IN2") /* 68.STATUS (A2=0) */
|
||||||
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
||||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
|
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */
|
||||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
|
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */
|
||||||
@ -1346,7 +1346,7 @@ static INPUT_PORTS_START( rrreveng )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 68.STATUS (A2=1) */
|
PORT_START_TAG("IN3") /* 68.STATUS (A2=1) */
|
||||||
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_SPECIAL ) /* +5V */
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XIRQ */
|
||||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
|
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /XFULL */
|
||||||
@ -1357,18 +1357,18 @@ static INPUT_PORTS_START( rrreveng )
|
|||||||
|
|
||||||
JSA_III_PORT /* audio board port */
|
JSA_III_PORT /* audio board port */
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00000 */
|
PORT_START_TAG("A2D0") /* A2D @ 0xD00000 */
|
||||||
PORT_BIT ( 0x00ff, 0x0010, IPT_PEDAL ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
|
PORT_BIT ( 0x00ff, 0x0010, IPT_PEDAL ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00002 */
|
PORT_START_TAG("A2D1") /* A2D @ 0xD00002 */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00004 */
|
PORT_START_TAG("A2D2") /* A2D @ 0xD00004 */
|
||||||
PORT_BIT ( 0x00ff, 0x0080, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
|
PORT_BIT ( 0x00ff, 0x0080, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* A2D @ 0xD00006 */
|
PORT_START_TAG("A2D3") /* A2D @ 0xD00006 */
|
||||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
@ -211,18 +211,22 @@ static TIMER_CALLBACK( delayed_joystick_int )
|
|||||||
static READ16_HANDLER( joystick_r )
|
static READ16_HANDLER( joystick_r )
|
||||||
{
|
{
|
||||||
int newval = 0xff;
|
int newval = 0xff;
|
||||||
|
char port[4];
|
||||||
|
|
||||||
/* digital joystick type */
|
/* digital joystick type */
|
||||||
if (joystick_type == 1)
|
if (joystick_type == 1)
|
||||||
newval = (input_port_read_indexed(machine, 0) & (0x80 >> offset)) ? 0xf0 : 0x00;
|
newval = (input_port_read(machine, "IN0") & (0x80 >> offset)) ? 0xf0 : 0x00;
|
||||||
|
|
||||||
/* Hall-effect analog joystick */
|
/* Hall-effect analog joystick */
|
||||||
else if (joystick_type == 2)
|
else if (joystick_type == 2)
|
||||||
newval = input_port_read_indexed(machine, offset & 1);
|
{
|
||||||
|
sprintf(port, "IN%d", offset & 1);
|
||||||
|
newval = input_port_read(machine, port);
|
||||||
|
}
|
||||||
|
|
||||||
/* Road Blasters gas pedal */
|
/* Road Blasters gas pedal */
|
||||||
else if (joystick_type == 3)
|
else if (joystick_type == 3)
|
||||||
newval = input_port_read_indexed(machine, 1);
|
newval = input_port_read(machine, "IN1");
|
||||||
|
|
||||||
/* the A4 bit enables/disables joystick IRQs */
|
/* the A4 bit enables/disables joystick IRQs */
|
||||||
joystick_int_enable = ((offset >> 3) & 1) ^ 1;
|
joystick_int_enable = ((offset >> 3) & 1) ^ 1;
|
||||||
@ -268,13 +272,13 @@ static READ16_HANDLER( trakball_r )
|
|||||||
|
|
||||||
if (player == 0)
|
if (player == 0)
|
||||||
{
|
{
|
||||||
posx = (INT8)input_port_read_indexed(machine, 0);
|
posx = (INT8)input_port_read(machine, "IN0");
|
||||||
posy = (INT8)input_port_read_indexed(machine, 1);
|
posy = (INT8)input_port_read(machine, "IN1");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
posx = (INT8)input_port_read_indexed(machine, 2);
|
posx = (INT8)input_port_read(machine, "IN2");
|
||||||
posy = (INT8)input_port_read_indexed(machine, 3);
|
posy = (INT8)input_port_read(machine, "IN3");
|
||||||
}
|
}
|
||||||
|
|
||||||
cur[player][0] = posx + posy;
|
cur[player][0] = posx + posy;
|
||||||
@ -286,7 +290,7 @@ static READ16_HANDLER( trakball_r )
|
|||||||
|
|
||||||
/* Road Blasters steering wheel */
|
/* Road Blasters steering wheel */
|
||||||
else if (trackball_type == 2)
|
else if (trackball_type == 2)
|
||||||
result = input_port_read_indexed(machine, 0);
|
result = input_port_read(machine, "IN0");
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -301,7 +305,7 @@ static READ16_HANDLER( trakball_r )
|
|||||||
|
|
||||||
static READ16_HANDLER( port4_r )
|
static READ16_HANDLER( port4_r )
|
||||||
{
|
{
|
||||||
int temp = input_port_read_indexed(machine, 4);
|
int temp = input_port_read(machine, "F60000");
|
||||||
if (atarigen_cpu_to_sound_ready) temp ^= 0x0080;
|
if (atarigen_cpu_to_sound_ready) temp ^= 0x0080;
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
@ -316,11 +320,11 @@ static READ16_HANDLER( port4_r )
|
|||||||
|
|
||||||
static READ8_HANDLER( switch_6502_r )
|
static READ8_HANDLER( switch_6502_r )
|
||||||
{
|
{
|
||||||
int temp = input_port_read_indexed(machine, 5);
|
int temp = input_port_read(machine, "1820");
|
||||||
|
|
||||||
if (atarigen_cpu_to_sound_ready) temp ^= 0x08;
|
if (atarigen_cpu_to_sound_ready) temp ^= 0x08;
|
||||||
if (atarigen_sound_to_cpu_ready) temp ^= 0x10;
|
if (atarigen_sound_to_cpu_ready) temp ^= 0x10;
|
||||||
if (!(input_port_read_indexed(machine, 4) & 0x0040)) temp ^= 0x80;
|
if (!(input_port_read(machine, "F60000") & 0x0040)) temp ^= 0x80;
|
||||||
|
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
@ -470,19 +474,19 @@ ADDRESS_MAP_END
|
|||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static INPUT_PORTS_START( marble )
|
static INPUT_PORTS_START( marble )
|
||||||
PORT_START /* F20000 */
|
PORT_START_TAG("IN0") /* F20000 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(1)
|
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(1)
|
||||||
|
|
||||||
PORT_START /* F20002 */
|
PORT_START_TAG("IN1") /* F20002 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(1)
|
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(1)
|
||||||
|
|
||||||
PORT_START /* F20004 */
|
PORT_START_TAG("IN2") /* F20004 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(2)
|
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(2)
|
||||||
|
|
||||||
PORT_START /* F20006 */
|
PORT_START_TAG("IN3") /* F20006 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(2)
|
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(2)
|
||||||
|
|
||||||
PORT_START /* F60000 */
|
PORT_START_TAG("F60000") /* F60000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
@ -493,7 +497,7 @@ static INPUT_PORTS_START( marble )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 1820 (sound) */
|
PORT_START_TAG("1820") /* 1820 (sound) */
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||||
@ -505,23 +509,23 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( peterpak )
|
static INPUT_PORTS_START( peterpak )
|
||||||
PORT_START /* F40000 */
|
PORT_START_TAG("IN0") /* F40000 */
|
||||||
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
||||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
|
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
|
||||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
|
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN1") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN2") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN3") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* F60000 */
|
PORT_START_TAG("F60000") /* F60000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
@ -533,7 +537,7 @@ static INPUT_PORTS_START( peterpak )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 1820 (sound) */
|
PORT_START_TAG("1820") /* 1820 (sound) */
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||||
@ -545,23 +549,23 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( indytemp )
|
static INPUT_PORTS_START( indytemp )
|
||||||
PORT_START /* F40000 */
|
PORT_START_TAG("IN0") /* F40000 */
|
||||||
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
||||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
|
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
|
||||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
|
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN1") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN2") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN3") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* F60000 */
|
PORT_START_TAG("F60000") /* F60000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
@ -573,7 +577,7 @@ static INPUT_PORTS_START( indytemp )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 1820 (sound) */
|
PORT_START_TAG("1820") /* 1820 (sound) */
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||||
@ -585,19 +589,19 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( roadrunn )
|
static INPUT_PORTS_START( roadrunn )
|
||||||
PORT_START /* F40000 */
|
PORT_START_TAG("IN0") /* F40000 */
|
||||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
||||||
|
|
||||||
PORT_START /* F40002 */
|
PORT_START_TAG("IN1") /* F40002 */
|
||||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1)
|
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1)
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN2") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN3") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* F60000 */
|
PORT_START_TAG("F60000") /* F60000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
@ -609,7 +613,7 @@ static INPUT_PORTS_START( roadrunn )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 1820 (sound) */
|
PORT_START_TAG("1820") /* 1820 (sound) */
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||||
@ -621,19 +625,19 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
|
|
||||||
static INPUT_PORTS_START( roadblst )
|
static INPUT_PORTS_START( roadblst )
|
||||||
PORT_START /* F20000 */
|
PORT_START_TAG("IN0") /* F20000 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_REVERSE
|
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_REVERSE
|
||||||
|
|
||||||
PORT_START /* F40000 */
|
PORT_START_TAG("IN1") /* F40000 */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(64)
|
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(64)
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN2") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* n/a */
|
PORT_START_TAG("IN3") /* n/a */
|
||||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* F60000 */
|
PORT_START_TAG("F60000") /* F60000 */
|
||||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 )
|
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 )
|
||||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
@ -644,7 +648,7 @@ static INPUT_PORTS_START( roadblst )
|
|||||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )
|
||||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
|
|
||||||
PORT_START /* 1820 (sound) */
|
PORT_START_TAG("1820") /* 1820 (sound) */
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||||
|
@ -374,7 +374,7 @@ static STATE_POSTLOAD( bankselect_postload )
|
|||||||
|
|
||||||
static READ16_HANDLER( switch_r )
|
static READ16_HANDLER( switch_r )
|
||||||
{
|
{
|
||||||
int result = input_port_read_indexed(machine, 1) | (input_port_read_indexed(machine, 2) << 8);
|
int result = input_port_read(machine, "1800") | (input_port_read(machine, "1801") << 8);
|
||||||
|
|
||||||
if (atarigen_cpu_to_sound_ready) result ^= 0x20;
|
if (atarigen_cpu_to_sound_ready) result ^= 0x20;
|
||||||
if (atarigen_sound_to_cpu_ready) result ^= 0x10;
|
if (atarigen_sound_to_cpu_ready) result ^= 0x10;
|
||||||
@ -385,12 +385,12 @@ static READ16_HANDLER( switch_r )
|
|||||||
|
|
||||||
static READ8_HANDLER( switch_6502_r )
|
static READ8_HANDLER( switch_6502_r )
|
||||||
{
|
{
|
||||||
int result = input_port_read_indexed(machine, 0);
|
int result = input_port_read(machine, "1840");
|
||||||
|
|
||||||
if (atarigen_cpu_to_sound_ready) result ^= 0x01;
|
if (atarigen_cpu_to_sound_ready) result ^= 0x01;
|
||||||
if (atarigen_sound_to_cpu_ready) result ^= 0x02;
|
if (atarigen_sound_to_cpu_ready) result ^= 0x02;
|
||||||
if (!has_tms5220 || tms5220_ready_r()) result ^= 0x04;
|
if (!has_tms5220 || tms5220_ready_r()) result ^= 0x04;
|
||||||
if (!(input_port_read_indexed(machine, 2) & 0x80)) result ^= 0x10;
|
if (!(input_port_read(machine, "1801") & 0x80)) result ^= 0x10;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -423,15 +423,20 @@ static WRITE16_HANDLER( adc_strobe_w )
|
|||||||
|
|
||||||
static READ16_HANDLER( adc_r )
|
static READ16_HANDLER( adc_r )
|
||||||
{
|
{
|
||||||
if (which_adc < pedal_count)
|
char port[5];
|
||||||
return ~input_port_read_indexed(machine, 3 + which_adc);
|
|
||||||
|
|
||||||
return input_port_read_indexed(machine, 3 + which_adc) | 0xff00;
|
sprintf(port, "ADC%d", which_adc);
|
||||||
|
if (which_adc < pedal_count)
|
||||||
|
return ~input_port_read(machine, port);
|
||||||
|
|
||||||
|
return input_port_read(machine, port) | 0xff00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static READ8_HANDLER( leta_r )
|
static READ8_HANDLER( leta_r )
|
||||||
{
|
{
|
||||||
|
char port[6];
|
||||||
|
|
||||||
if (pedal_count == -1) /* 720 */
|
if (pedal_count == -1) /* 720 */
|
||||||
{
|
{
|
||||||
/* special thanks to MAME Analog+ for the mapping code */
|
/* special thanks to MAME Analog+ for the mapping code */
|
||||||
@ -443,8 +448,8 @@ static READ8_HANDLER( leta_r )
|
|||||||
static double last_angle;
|
static double last_angle;
|
||||||
static int rotations;
|
static int rotations;
|
||||||
|
|
||||||
int analogx = input_port_read_indexed(machine, 7) - 128;
|
int analogx = input_port_read(machine, "LETA0") - 128;
|
||||||
int analogy = input_port_read_indexed(machine, 8) - 128;
|
int analogy = input_port_read(machine, "LETA1") - 128;
|
||||||
double angle;
|
double angle;
|
||||||
|
|
||||||
/* if the joystick is centered, leave the rest of this alone */
|
/* if the joystick is centered, leave the rest of this alone */
|
||||||
@ -480,7 +485,8 @@ static READ8_HANDLER( leta_r )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return input_port_read_indexed(machine, 7 + (offset & 3));
|
sprintf(port, "LETA%d", (offset & 3));
|
||||||
|
return input_port_read(machine, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ static READ8_HANDLER(attckufo_io_r)
|
|||||||
{
|
{
|
||||||
switch(offset)
|
switch(offset)
|
||||||
{
|
{
|
||||||
case 0: return input_port_read_indexed(machine, 0);
|
case 0: return input_port_read(machine, "DSW");
|
||||||
case 2: return input_port_read_indexed(machine, 1);
|
case 2: return input_port_read(machine, "INPUT");
|
||||||
}
|
}
|
||||||
return 0xff;
|
return 0xff;
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ static ADDRESS_MAP_START( cpu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static INPUT_PORTS_START( attckufo )
|
static INPUT_PORTS_START( attckufo )
|
||||||
PORT_START
|
PORT_START_TAG("DSW")
|
||||||
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
|
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
|
||||||
PORT_DIPSETTING( 0x00, "3" )
|
PORT_DIPSETTING( 0x00, "3" )
|
||||||
PORT_DIPSETTING( 0x01, "4" )
|
PORT_DIPSETTING( 0x01, "4" )
|
||||||
@ -115,7 +115,7 @@ static INPUT_PORTS_START( attckufo )
|
|||||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
|
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
|
|
||||||
PORT_START
|
PORT_START_TAG("INPUT")
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
|
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
|
||||||
|
@ -60,8 +60,8 @@ static READ16_HANDLER( nvram_r )
|
|||||||
|
|
||||||
static READ16_HANDLER( joystick_r )
|
static READ16_HANDLER( joystick_r )
|
||||||
{
|
{
|
||||||
return (((input_port_read_indexed(machine, 0) - 0xf) << 8) |
|
return (((input_port_read(machine, "IN0") - 0xf) << 8) |
|
||||||
((input_port_read_indexed(machine, 1) - 0xf) & 0xff));
|
((input_port_read(machine, "IN1") - 0xf) & 0xff));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,10 +80,12 @@ static WRITE8_HANDLER( gbusters_coin_counter_w )
|
|||||||
/* other bits unused/unknown */
|
/* other bits unused/unknown */
|
||||||
if (data & 0xf8)
|
if (data & 0xf8)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
char baf[40];
|
char baf[40];
|
||||||
logerror("%04x: (ccount) write %02x\n",activecpu_get_pc(), data);
|
|
||||||
sprintf(baf,"ccnt = %02x", data);
|
sprintf(baf,"ccnt = %02x", data);
|
||||||
// popmessage(baf);
|
popmessage(baf);
|
||||||
|
#endif
|
||||||
|
logerror("%04x: (ccount) write %02x\n",activecpu_get_pc(), data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ static void select_controller(UINT8 data)
|
|||||||
|
|
||||||
static CUSTOM_INPUT( multiplexed_controller_r )
|
static CUSTOM_INPUT( multiplexed_controller_r )
|
||||||
{
|
{
|
||||||
char tag[6];
|
char tag[40];
|
||||||
|
|
||||||
sprintf(tag, "IN%s-%d", (const char *)param, controller_select & 0x01);
|
sprintf(tag, "IN%s-%d", (const char *)param, controller_select & 0x01);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ static WRITE8_HANDLER( sspeedr_time_w )
|
|||||||
|
|
||||||
static WRITE8_HANDLER( sspeedr_score_w )
|
static WRITE8_HANDLER( sspeedr_score_w )
|
||||||
{
|
{
|
||||||
char buf[10];
|
char buf[20];
|
||||||
sprintf(buf, "LED%02d", offset);
|
sprintf(buf, "LED%02d", offset);
|
||||||
data = ~data & 15;
|
data = ~data & 15;
|
||||||
output_set_digit_value(offset, ls48_map[data]);
|
output_set_digit_value(offset, ls48_map[data]);
|
||||||
|
@ -108,23 +108,24 @@ static WRITE8_HANDLER( ajax_lamps_w )
|
|||||||
|
|
||||||
READ8_HANDLER( ajax_ls138_f10_r )
|
READ8_HANDLER( ajax_ls138_f10_r )
|
||||||
{
|
{
|
||||||
int data = 0;
|
int data = 0, index;
|
||||||
|
char port[5];
|
||||||
|
|
||||||
switch ((offset & 0x01c0) >> 6){
|
switch ((offset & 0x01c0) >> 6)
|
||||||
|
{
|
||||||
case 0x00: /* ??? */
|
case 0x00: /* ??? */
|
||||||
data = mame_rand(machine);
|
data = mame_rand(machine);
|
||||||
break;
|
break;
|
||||||
case 0x04: /* 2P inputs */
|
case 0x04: /* 2P inputs */
|
||||||
data = input_port_read_indexed(machine, 5);
|
data = input_port_read(machine, "IN2");
|
||||||
break;
|
break;
|
||||||
case 0x06: /* 1P inputs + DIPSW #1 & #2 */
|
case 0x06: /* 1P inputs + DIPSW #1 & #2 */
|
||||||
if (offset & 0x02)
|
index = offset & 0x01;
|
||||||
data = input_port_read_indexed(machine, offset & 0x01);
|
sprintf(port, "%s%d", (offset & 0x02) ? "DSW" : "IN", (offset & 0x02) ? index+1 : index);
|
||||||
else
|
data = input_port_read(machine, port);
|
||||||
data = input_port_read_indexed(machine, 3 + (offset & 0x01));
|
|
||||||
break;
|
break;
|
||||||
case 0x07: /* DIPSW #3 */
|
case 0x07: /* DIPSW #3 */
|
||||||
data = input_port_read_indexed(machine, 2);
|
data = input_port_read(machine, "DSW3");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -121,7 +121,7 @@ WRITE8_HANDLER( arkanoid_68705_ddrC_w )
|
|||||||
|
|
||||||
READ8_HANDLER( arkanoid_68705_input_0_r )
|
READ8_HANDLER( arkanoid_68705_input_0_r )
|
||||||
{
|
{
|
||||||
int res = input_port_read_indexed(machine,0) & 0x3f;
|
int res = input_port_read(machine, "IN0") & 0x3f;
|
||||||
|
|
||||||
/* bit 0x40 comes from the sticky bit */
|
/* bit 0x40 comes from the sticky bit */
|
||||||
if (!z80write) res |= 0x40;
|
if (!z80write) res |= 0x40;
|
||||||
@ -136,11 +136,11 @@ READ8_HANDLER( arkanoid_input_2_r )
|
|||||||
{
|
{
|
||||||
if (arkanoid_paddle_select)
|
if (arkanoid_paddle_select)
|
||||||
{
|
{
|
||||||
arkanoid_paddle_value = input_port_read_indexed(machine,3);
|
arkanoid_paddle_value = input_port_read(machine, "IN3");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
arkanoid_paddle_value = input_port_read_indexed(machine,2);
|
arkanoid_paddle_value = input_port_read(machine, "IN2");
|
||||||
}
|
}
|
||||||
|
|
||||||
return arkanoid_paddle_value;
|
return arkanoid_paddle_value;
|
||||||
|
@ -17,21 +17,21 @@ UINT8 *asteroid_ram1, *asteroid_ram2;
|
|||||||
INTERRUPT_GEN( asteroid_interrupt )
|
INTERRUPT_GEN( asteroid_interrupt )
|
||||||
{
|
{
|
||||||
/* Turn off interrupts if self-test is enabled */
|
/* Turn off interrupts if self-test is enabled */
|
||||||
if (!(input_port_read_indexed(machine, 0) & 0x80))
|
if (!(input_port_read(machine, "IN0") & 0x80))
|
||||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
INTERRUPT_GEN( asterock_interrupt )
|
INTERRUPT_GEN( asterock_interrupt )
|
||||||
{
|
{
|
||||||
/* Turn off interrupts if self-test is enabled */
|
/* Turn off interrupts if self-test is enabled */
|
||||||
if ((input_port_read_indexed(machine, 0) & 0x80))
|
if ((input_port_read(machine, "IN0") & 0x80))
|
||||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
INTERRUPT_GEN( llander_interrupt )
|
INTERRUPT_GEN( llander_interrupt )
|
||||||
{
|
{
|
||||||
/* Turn off interrupts if self-test is enabled */
|
/* Turn off interrupts if self-test is enabled */
|
||||||
if (input_port_read_indexed(machine, 0) & 0x02)
|
if (input_port_read(machine, "IN0") & 0x02)
|
||||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ READ8_HANDLER( asteroid_IN0_r )
|
|||||||
int res;
|
int res;
|
||||||
int bitmask;
|
int bitmask;
|
||||||
|
|
||||||
res=input_port_read_indexed(machine, 0);
|
res=input_port_read(machine, "IN0");
|
||||||
|
|
||||||
bitmask = (1 << offset);
|
bitmask = (1 << offset);
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ READ8_HANDLER( asteroib_IN0_r )
|
|||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
res=input_port_read_indexed(machine, 0);
|
res=input_port_read(machine, "IN0");
|
||||||
|
|
||||||
// if (activecpu_gettotalcycles() & 0x100)
|
// if (activecpu_gettotalcycles() & 0x100)
|
||||||
// res |= 0x02;
|
// res |= 0x02;
|
||||||
@ -79,7 +79,7 @@ READ8_HANDLER( asterock_IN0_r )
|
|||||||
int res;
|
int res;
|
||||||
int bitmask;
|
int bitmask;
|
||||||
|
|
||||||
res=input_port_read_indexed(machine, 0);
|
res=input_port_read(machine, "IN0");
|
||||||
|
|
||||||
bitmask = (1 << offset);
|
bitmask = (1 << offset);
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ READ8_HANDLER( asteroid_IN1_r )
|
|||||||
int res;
|
int res;
|
||||||
int bitmask;
|
int bitmask;
|
||||||
|
|
||||||
res=input_port_read_indexed(machine, 1);
|
res=input_port_read(machine, "IN1");
|
||||||
bitmask = (1 << (offset & 0x7));
|
bitmask = (1 << (offset & 0x7));
|
||||||
|
|
||||||
if (res & bitmask)
|
if (res & bitmask)
|
||||||
@ -122,7 +122,7 @@ READ8_HANDLER( asteroid_DSW1_r )
|
|||||||
int res;
|
int res;
|
||||||
int res1;
|
int res1;
|
||||||
|
|
||||||
res1 = input_port_read_indexed(machine, 2);
|
res1 = input_port_read(machine, "DSW");
|
||||||
|
|
||||||
res = 0xfc | ((res1 >> (2 * (3 - (offset & 0x3)))) & 0x3);
|
res = 0xfc | ((res1 >> (2 * (3 - (offset & 0x3)))) & 0x3);
|
||||||
return res;
|
return res;
|
||||||
@ -182,7 +182,7 @@ READ8_HANDLER( llander_IN0_r )
|
|||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
res = input_port_read_indexed(machine, 0);
|
res = input_port_read(machine, "IN0");
|
||||||
|
|
||||||
if (avgdvg_done())
|
if (avgdvg_done())
|
||||||
res |= 0x01;
|
res |= 0x01;
|
||||||
|
@ -152,7 +152,7 @@ READ8_HANDLER( atarifb_in0_r )
|
|||||||
(sign_x_2 >> 6) |
|
(sign_x_2 >> 6) |
|
||||||
(sign_y_1 >> 5) |
|
(sign_y_1 >> 5) |
|
||||||
(sign_x_1 >> 4) |
|
(sign_x_1 >> 4) |
|
||||||
input_port_read_indexed(machine,0);
|
input_port_read(machine, "IN0");
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -161,14 +161,14 @@ READ8_HANDLER( atarifb_in0_r )
|
|||||||
int new_x,new_y;
|
int new_x,new_y;
|
||||||
|
|
||||||
/* Read player 1 trackball */
|
/* Read player 1 trackball */
|
||||||
new_x = input_port_read_indexed(machine, 3);
|
new_x = input_port_read(machine, "IN3");
|
||||||
if (new_x != counter_x)
|
if (new_x != counter_x)
|
||||||
{
|
{
|
||||||
sign_x_1 = (new_x - counter_x) & 0x80;
|
sign_x_1 = (new_x - counter_x) & 0x80;
|
||||||
counter_x = new_x;
|
counter_x = new_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_y = input_port_read_indexed(machine, 2);
|
new_y = input_port_read(machine, "IN2");
|
||||||
if (new_y != counter_y)
|
if (new_y != counter_y)
|
||||||
{
|
{
|
||||||
sign_y_1 = (new_y - counter_y) & 0x80;
|
sign_y_1 = (new_y - counter_y) & 0x80;
|
||||||
@ -184,7 +184,7 @@ READ8_HANDLER( atarifb_in2_r )
|
|||||||
{
|
{
|
||||||
if ((CTRLD & 0x20)==0x00)
|
if ((CTRLD & 0x20)==0x00)
|
||||||
{
|
{
|
||||||
return input_port_read_indexed(machine,1);
|
return input_port_read(machine, "IN1");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -192,14 +192,14 @@ READ8_HANDLER( atarifb_in2_r )
|
|||||||
int new_x,new_y;
|
int new_x,new_y;
|
||||||
|
|
||||||
/* Read player 2 trackball */
|
/* Read player 2 trackball */
|
||||||
new_x = input_port_read_indexed(machine, 5);
|
new_x = input_port_read(machine, "IN5");
|
||||||
if (new_x != counter_x)
|
if (new_x != counter_x)
|
||||||
{
|
{
|
||||||
sign_x_2 = (new_x - counter_x) & 0x80;
|
sign_x_2 = (new_x - counter_x) & 0x80;
|
||||||
counter_x = new_x;
|
counter_x = new_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_y = input_port_read_indexed(machine, 4);
|
new_y = input_port_read(machine, "IN4");
|
||||||
if (new_y != counter_y)
|
if (new_y != counter_y)
|
||||||
{
|
{
|
||||||
sign_y_2 = (new_y - counter_y) & 0x80;
|
sign_y_2 = (new_y - counter_y) & 0x80;
|
||||||
@ -234,14 +234,14 @@ READ8_HANDLER( atarifb4_in0_r )
|
|||||||
int new_x,new_y;
|
int new_x,new_y;
|
||||||
|
|
||||||
/* Read player 1 trackball */
|
/* Read player 1 trackball */
|
||||||
new_x = input_port_read_indexed(machine, 4);
|
new_x = input_port_read(machine, "IN4");
|
||||||
if (new_x != counter_x)
|
if (new_x != counter_x)
|
||||||
{
|
{
|
||||||
sign_x_1 = (new_x - counter_x) & 0x80;
|
sign_x_1 = (new_x - counter_x) & 0x80;
|
||||||
counter_x = new_x;
|
counter_x = new_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_y = input_port_read_indexed(machine, 3);
|
new_y = input_port_read(machine, "IN3");
|
||||||
if (new_y != counter_y)
|
if (new_y != counter_y)
|
||||||
{
|
{
|
||||||
sign_y_1 = (new_y - counter_y) & 0x80;
|
sign_y_1 = (new_y - counter_y) & 0x80;
|
||||||
@ -257,14 +257,14 @@ READ8_HANDLER( atarifb4_in0_r )
|
|||||||
int new_x,new_y;
|
int new_x,new_y;
|
||||||
|
|
||||||
/* Read player 2 trackball */
|
/* Read player 2 trackball */
|
||||||
new_x = input_port_read_indexed(machine, 6);
|
new_x = input_port_read(machine, "IN6");
|
||||||
if (new_x != counter_x)
|
if (new_x != counter_x)
|
||||||
{
|
{
|
||||||
sign_x_2 = (new_x - counter_x) & 0x80;
|
sign_x_2 = (new_x - counter_x) & 0x80;
|
||||||
counter_x = new_x;
|
counter_x = new_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_y = input_port_read_indexed(machine, 5);
|
new_y = input_port_read(machine, "IN5");
|
||||||
if (new_y != counter_y)
|
if (new_y != counter_y)
|
||||||
{
|
{
|
||||||
sign_y_2 = (new_y - counter_y) & 0x80;
|
sign_y_2 = (new_y - counter_y) & 0x80;
|
||||||
@ -282,7 +282,7 @@ READ8_HANDLER( atarifb4_in2_r )
|
|||||||
{
|
{
|
||||||
if ((CTRLD & 0x40)==0x00)
|
if ((CTRLD & 0x40)==0x00)
|
||||||
{
|
{
|
||||||
return input_port_read_indexed(machine,2);
|
return input_port_read(machine, "IN2");
|
||||||
}
|
}
|
||||||
else if ((CTRLD & 0x60) == 0x60)
|
else if ((CTRLD & 0x60) == 0x60)
|
||||||
/* LD1 and LD2 both high, return Team 2 right player (player 3) */
|
/* LD1 and LD2 both high, return Team 2 right player (player 3) */
|
||||||
@ -291,14 +291,14 @@ READ8_HANDLER( atarifb4_in2_r )
|
|||||||
int new_x,new_y;
|
int new_x,new_y;
|
||||||
|
|
||||||
/* Read player 3 trackball */
|
/* Read player 3 trackball */
|
||||||
new_x = input_port_read_indexed(machine, 8);
|
new_x = input_port_read(machine, "IN8");
|
||||||
if (new_x != counter_x)
|
if (new_x != counter_x)
|
||||||
{
|
{
|
||||||
sign_x_3 = (new_x - counter_x) & 0x80;
|
sign_x_3 = (new_x - counter_x) & 0x80;
|
||||||
counter_x = new_x;
|
counter_x = new_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_y = input_port_read_indexed(machine, 7);
|
new_y = input_port_read(machine, "IN7");
|
||||||
if (new_y != counter_y)
|
if (new_y != counter_y)
|
||||||
{
|
{
|
||||||
sign_y_3 = (new_y - counter_y) & 0x80;
|
sign_y_3 = (new_y - counter_y) & 0x80;
|
||||||
@ -314,14 +314,14 @@ READ8_HANDLER( atarifb4_in2_r )
|
|||||||
int new_x,new_y;
|
int new_x,new_y;
|
||||||
|
|
||||||
/* Read player 4 trackball */
|
/* Read player 4 trackball */
|
||||||
new_x = input_port_read_indexed(machine, 10);
|
new_x = input_port_read(machine, "IN10");
|
||||||
if (new_x != counter_x)
|
if (new_x != counter_x)
|
||||||
{
|
{
|
||||||
sign_x_4 = (new_x - counter_x) & 0x80;
|
sign_x_4 = (new_x - counter_x) & 0x80;
|
||||||
counter_x = new_x;
|
counter_x = new_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_y = input_port_read_indexed(machine, 9);
|
new_y = input_port_read(machine, "IN9");
|
||||||
if (new_y != counter_y)
|
if (new_y != counter_y)
|
||||||
{
|
{
|
||||||
sign_y_4 = (new_y - counter_y) & 0x80;
|
sign_y_4 = (new_y - counter_y) & 0x80;
|
||||||
|
@ -1330,7 +1330,7 @@ static READ8_HANDLER( berabohm_buttons_r )
|
|||||||
if (inp == 4) res = input_port_read(machine, "CONTROL0");
|
if (inp == 4) res = input_port_read(machine, "CONTROL0");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char portname[4];
|
char portname[40];
|
||||||
|
|
||||||
#ifdef PRESSURE_SENSITIVE
|
#ifdef PRESSURE_SENSITIVE
|
||||||
static int counter[4];
|
static int counter[4];
|
||||||
|
@ -321,7 +321,6 @@ static int at_keyboard_charqueue_empty(void);
|
|||||||
void at_keyboard_init(AT_KEYBOARD_TYPE type)
|
void at_keyboard_init(AT_KEYBOARD_TYPE type)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char buf[32];
|
|
||||||
|
|
||||||
memset(&keyboard, 0, sizeof(keyboard));
|
memset(&keyboard, 0, sizeof(keyboard));
|
||||||
keyboard.type = type;
|
keyboard.type = type;
|
||||||
@ -342,6 +341,7 @@ void at_keyboard_init(AT_KEYBOARD_TYPE type)
|
|||||||
/* locate the keyboard ports */
|
/* locate the keyboard ports */
|
||||||
for (i = 0; i < sizeof(keyboard.ports) / sizeof(keyboard.ports[0]); i++)
|
for (i = 0; i < sizeof(keyboard.ports) / sizeof(keyboard.ports[0]); i++)
|
||||||
{
|
{
|
||||||
|
char buf[40];
|
||||||
sprintf(buf, "pc_keyboard_%d", i);
|
sprintf(buf, "pc_keyboard_%d", i);
|
||||||
keyboard.ports[i] = input_port_by_tag(Machine->portconfig, buf);
|
keyboard.ports[i] = input_port_by_tag(Machine->portconfig, buf);
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,10 @@ VIDEO_START( aeroboto )
|
|||||||
|
|
||||||
READ8_HANDLER( aeroboto_in0_r )
|
READ8_HANDLER( aeroboto_in0_r )
|
||||||
{
|
{
|
||||||
return input_port_read_indexed(machine, flip_screen_get() ? 1 : 0);
|
char port[4];
|
||||||
|
|
||||||
|
sprintf(port, "IN%d", flip_screen_get() ? 1 : 0);
|
||||||
|
return input_port_read(machine, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_HANDLER( aeroboto_3000_w )
|
WRITE8_HANDLER( aeroboto_3000_w )
|
||||||
|
@ -225,7 +225,7 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re
|
|||||||
#if 0
|
#if 0
|
||||||
if (input_code_pressed(KEYCODE_X))
|
if (input_code_pressed(KEYCODE_X))
|
||||||
{ /* Display some info on each sprite */
|
{ /* Display some info on each sprite */
|
||||||
char buf[10];
|
char buf[40];
|
||||||
sprintf(buf, "%Xx%X %X",xnum,ynum,(attr>>6)&3);
|
sprintf(buf, "%Xx%X %X",xnum,ynum,(attr>>6)&3);
|
||||||
ui_draw_text(buf, sx, sy);
|
ui_draw_text(buf, sx, sy);
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re
|
|||||||
#if 0
|
#if 0
|
||||||
if (input_code_pressed(KEYCODE_X))
|
if (input_code_pressed(KEYCODE_X))
|
||||||
{ /* Display some info on each sprite */
|
{ /* Display some info on each sprite */
|
||||||
char buf[10];
|
char buf[40];
|
||||||
sprintf(buf, "%Xx%X %X",xnum,ynum,(attr>>6)&3);
|
sprintf(buf, "%Xx%X %X",xnum,ynum,(attr>>6)&3);
|
||||||
ui_draw_text(buf, sx, sy);
|
ui_draw_text(buf, sx, sy);
|
||||||
}
|
}
|
||||||
|
@ -154,9 +154,11 @@ WRITE8_HANDLER( pang_gfxctrl_w )
|
|||||||
{
|
{
|
||||||
logerror("PC %04x: pang_gfxctrl_w %02x\n",activecpu_get_pc(),data);
|
logerror("PC %04x: pang_gfxctrl_w %02x\n",activecpu_get_pc(),data);
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
char baf[40];
|
char baf[40];
|
||||||
sprintf(baf,"%02x",data);
|
sprintf(baf,"%02x",data);
|
||||||
// popmessage(baf);
|
popmessage(baf);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bit 0 is unknown (used, maybe back color enable?) */
|
/* bit 0 is unknown (used, maybe back color enable?) */
|
||||||
|
@ -893,7 +893,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
|||||||
|
|
||||||
#ifdef MAME_DEBUG
|
#ifdef MAME_DEBUG
|
||||||
if (input_code_pressed(KEYCODE_Z)) /* Display some info on each sprite */
|
if (input_code_pressed(KEYCODE_Z)) /* Display some info on each sprite */
|
||||||
{ char buf[10];
|
{ char buf[30];
|
||||||
sprintf(buf, "%02X",/*(s2[2] & ~0x3ff)>>8*/mode>>8);
|
sprintf(buf, "%02X",/*(s2[2] & ~0x3ff)>>8*/mode>>8);
|
||||||
ui_draw_text(buf, sx, sy);
|
ui_draw_text(buf, sx, sy);
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,7 @@ VIDEO_UPDATE( taitojc )
|
|||||||
taitojc_tile_update(screen->machine);
|
taitojc_tile_update(screen->machine);
|
||||||
tilemap_draw(bitmap, cliprect, taitojc_tilemap, 0,0);
|
tilemap_draw(bitmap, cliprect, taitojc_tilemap, 0,0);
|
||||||
|
|
||||||
/*
|
#if 0
|
||||||
if (debug_tex_pal > 0)
|
if (debug_tex_pal > 0)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
@ -309,7 +309,7 @@ VIDEO_UPDATE( taitojc )
|
|||||||
popmessage("%s", string);
|
popmessage("%s", string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user