Various fixes to the Taito JC system [Angelo Salese]:

* implemented preliminary object RAM bankswitch, fixes Densya de Go garbage video objects if you coin up during attract mode
* improved inputs in Densya de Go, promoted game to working state;
* fixes analog inputs in Landing Gear;
This commit is contained in:
Angelo Salese 2011-08-21 18:23:47 +00:00
parent 8e4c9ba2e6
commit 4261da17d8
3 changed files with 65 additions and 49 deletions

View File

@ -4365,8 +4365,8 @@ M68KMAKE_OP(cpbcc, 32, ., .)
{
if(CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type))
{
logerror( "%s at %08x: called unimplemented instruction %04x (cpbcc)\n",
m68k->device->tag(), REG_PC - 2, m68k->ir);
//logerror("%s at %08x: called unimplemented instruction %04x (cpbcc)\n",
// m68k->device->tag(), REG_PC - 2, m68k->ir);
return;
}
m68ki_exception_1111(m68k);
@ -4413,8 +4413,8 @@ M68KMAKE_OP(cptrapcc, 32, ., .)
{
if(CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type))
{
logerror("%s at %08x: called unimplemented instruction %04x (cptrapcc)\n",
m68k->device->tag(), REG_PC - 2, m68k->ir);
//logerror("%s at %08x: called unimplemented instruction %04x (cptrapcc)\n",
// m68k->device->tag(), REG_PC - 2, m68k->ir);
return;
}
m68ki_exception_1111(m68k);

View File

@ -340,13 +340,15 @@ Notes:
TODO:
- dendeg2 hangs on init step 10.
- The analog controls don't seem to work in landgear. They work in test mode though.
- landgear has some weird crashes (after playing one round, after a couple of loops in attract mode)
- landgear has some weird crashes (after playing one round, after a couple of loops in attract mode) (needs testing -AS)
- landgear has huge 3d problems on gameplay (CPU comms?)
- dendeg2x usually crashes when starting the game (lots of read and writes to invalid addresses).
- All dendeg games have random wrong textures/palettes.
- All dendeg games have random wrong textures/palettes. (can't see any ... -AS)
- Train board (external sound board with OKI6295) is not emulated.
- dangcurv hangs on its DSP test. DSP execution may be jumping into internal ROM space?
- dangcurv needs correct controls hooking up.
- add idle skips if possible
- dendeg and clones needs output lamps and an artwork for the inputs (helps with the playability);
*/
#include "emu.h"
@ -449,6 +451,7 @@ static READ32_HANDLER ( jc_control_r )
static WRITE32_HANDLER ( jc_control_w )
{
//mame_printf_debug("jc_control_w: %08X, %08X, %08X\n", data, offset, mem_mask);
switch(offset)
{
case 0x3:
@ -457,13 +460,15 @@ static WRITE32_HANDLER ( jc_control_w )
{
input_port_write(space->machine(), "EEPROMOUT", data >> 24, 0xff);
}
else
popmessage("jc_control_w: %08X, %08X, %08X\n", data, offset, mem_mask);
return;
}
default:
popmessage("jc_control_w: %08X, %08X, %08X\n", data, offset, mem_mask);
break;
}
logerror("jc_control_w: %08X, %08X, %08X\n", data, offset, mem_mask);
}
static WRITE32_HANDLER (jc_control1_w)
@ -792,7 +797,7 @@ static WRITE32_HANDLER(f3_share_w)
static WRITE32_HANDLER(jc_output_w)
{
// speed and brake meter outputs in Densya De Go!
//mame_printf_debug("jc_output_w: %d, %d\n", offset, (data >> 16) & 0xffff);
// logerror("jc_output_w: %08x, %08x %08x\n", offset, data,mem_mask);
}
static ADDRESS_MAP_START( taitojc_map, AS_PROGRAM, 32 )
@ -1116,15 +1121,15 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dendeg )
PORT_START("COINS")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit)
PORT_START("START")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
PORT_START( "EEPROMOUT" )
@ -1133,34 +1138,34 @@ static INPUT_PORTS_START( dendeg )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_cs_line)
PORT_START("UNUSED")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) // Horn
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Horn") // Horn
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("BUTTONS")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) // Mascon 5
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Mascon 3
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) // Mascon 1
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Mascon 5") // Mascon 5
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Mascon 3") // Mascon 3
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Mascon 1") // Mascon 1
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) // Mascon 4
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) // Mascon 2
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // Mascon 0
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Mascon 4") // Mascon 4
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Mascon 2") // Mascon 2
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Mascon 0") // Mascon 0
PORT_START("ANALOG1") // Brake
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_NAME("Brake")
INPUT_PORTS_END
static INPUT_PORTS_START( landgear )
PORT_START("COINS")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit)
PORT_START("START")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
PORT_START( "EEPROMOUT" )
@ -1176,28 +1181,26 @@ static INPUT_PORTS_START( landgear )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("ANALOG1") // Lever X
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0xff, 0x00) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) PORT_REVERSE
PORT_START("ANALOG2") // Lever Y
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0xff, 0x00) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_START("ANALOG3") // Throttle
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) PORT_REVERSE
INPUT_PORTS_END
static INPUT_PORTS_START( sidebs )
PORT_START("COINS")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit)
PORT_START("START")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
PORT_START( "EEPROMOUT" )
@ -1207,37 +1210,35 @@ static INPUT_PORTS_START( sidebs )
PORT_START("UNUSED")
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // View button
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("View button")
PORT_START("BUTTONS")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) // Shift down
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) // Shift up
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Shift down")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shift up")
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("ANALOG1") // Steering
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_START("ANALOG2") // Acceleration
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(75) PORT_KEYDELTA(25)
PORT_START("ANALOG3") // Brake
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(75) PORT_KEYDELTA(25)
INPUT_PORTS_END
// TODO
static INPUT_PORTS_START( dangcurv )
PORT_START("COINS")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit)
PORT_START("START")
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xec, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
PORT_START( "EEPROMOUT" )
@ -1827,8 +1828,8 @@ ROM_START( dangcurv )
ROM_END
GAME( 1996, dendeg, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go (Japan)", GAME_NOT_WORKING )
GAME( 1996, dendegx, dendeg, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go Ex (Japan)", GAME_NOT_WORKING )
GAME( 1996, dendeg, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go (Japan)", GAME_IMPERFECT_GRAPHICS )
GAME( 1996, dendegx, dendeg, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go Ex (Japan)", GAME_IMPERFECT_GRAPHICS )
GAME( 1998, dendeg2, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go 2 (Japan)", GAME_NOT_WORKING )
GAME( 1998, dendeg2x, dendeg2, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go 2 Ex (Japan)", GAME_NOT_WORKING )
GAME( 1996, sidebs, 0, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side (Japan)", GAME_IMPERFECT_GRAPHICS )

View File

@ -79,6 +79,14 @@ WRITE32_HANDLER(taitojc_char_w)
// 0x01: -------- --x----- -------- -------- Priority (0 = below 3D, 1 = above 3D)
// 0x01: -------- -------- -xxxxxxx xxxxxxxx VRAM data address
/*
Object RAM is grouped in three different banks (0-0x400 / 0x400-0x800 / 0x800-0xc00),
Initial 6 dwords of each bank aren't for object stuff (individual vregs for each bank?)
0xc00-0xfbf seems to be a clut, while 0xfc0-0xfff is global vregs. 0xfc6 bit 13 is used to swap between
bank 0 and bank 1
It's unknown at current time how bank 2 should show up.
*/
static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT32 w1, UINT32 w2)
{
taitojc_state *state = machine.driver_data<taitojc_state>();
@ -210,6 +218,7 @@ SCREEN_UPDATE( taitojc )
{
taitojc_state *state = screen->machine().driver_data<taitojc_state>();
int i;
UINT16 start_offs;
#if 0
tick++;
@ -228,7 +237,13 @@ SCREEN_UPDATE( taitojc )
bitmap_fill(bitmap, cliprect, 0);
for (i=(0xc00/4)-2; i >= 0; i-=2)
start_offs = state->m_objlist[0xfc4/4] & 0x2000 ? (0x800/4) : (0x400/4);
/* 0xf000 used on Densya de Go disclaimer screen(s) (disable object RAM?) */
if((state->m_objlist[0xfc4/4] & 0x0000ffff) != 0x0000 && (state->m_objlist[0xfc4/4] & 0x0000ffff) != 0x2000 && (state->m_objlist[0xfc4/4] & 0x0000ffff) != 0xf000 )
popmessage("%08x, contact MAMEdev",state->m_objlist[0xfc4/4]);
for (i=start_offs-2; i >= (start_offs-0x400/4); i-=2)
{
UINT32 w1 = state->m_objlist[i + 0];
UINT32 w2 = state->m_objlist[i + 1];
@ -241,7 +256,7 @@ SCREEN_UPDATE( taitojc )
copybitmap_trans(bitmap, state->m_framebuffer, 0, 0, 0, 0, cliprect, 0);
for (i=(0xc00/4)-2; i >= 0; i-=2)
for (i=start_offs-2; i >= (start_offs-0x400/4); i-=2)
{
UINT32 w1 = state->m_objlist[i + 0];
UINT32 w2 = state->m_objlist[i + 1];