model3.c: fixed missing textures in magtruck (nw)

This commit is contained in:
Ville Linde 2014-09-29 20:06:44 +00:00
parent 80acf89723
commit bf5d2bcf28
3 changed files with 22 additions and 12 deletions

View File

@ -5391,7 +5391,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(model3_state::model3_interrupt)
if (scanline == 384)
set_irq_line(0x02, ASSERT_LINE);
else if(scanline == 0)
else
set_irq_line(0x0d, ASSERT_LINE);
}
@ -6010,6 +6010,11 @@ DRIVER_INIT_MEMBER(model3_state,oceanhun)
rom[(0x57995c^4)/4] = 0x60000000; // decrementer
}
DRIVER_INIT_MEMBER(model3_state,magtruck)
{
DRIVER_INIT_CALL(model3_20);
}
/* Model 3 Step 1.0 */
GAME( 1996, vf3, 0, model3_10, model3, model3_state, vf3, ROT0, "Sega", "Virtua Fighter 3 (Revision C)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
@ -6058,7 +6063,7 @@ GAME( 1998, swtrilgy, 0, model3_21, swtrilgy, model3_state, swtrilgy, RO
GAME( 1998, swtrilgya, swtrilgy, model3_21, swtrilgy, model3_state, swtrilga, ROT0, "Sega / LucasArts", "Star Wars Trilogy", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1998, spikeout, 0, model3_21, model3, model3_state, spikeout, ROT0, "Sega", "Spikeout (Revision C)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1998, spikeofe, 0, model3_21, model3, model3_state, spikeofe, ROT0, "Sega", "Spikeout Final Edition", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1998, magtruck, 0, model3_21, model3, model3_state, eca, ROT0, "Sega", "Magical Truck Adventure", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1998, magtruck, 0, model3_21, eca, model3_state, magtruck, ROT0, "Sega", "Magical Truck Adventure", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1999, eca, 0, model3_21, eca, model3_state, eca, ROT0, "Sega", "Emergency Call Ambulance", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1999, ecax, eca, model3_21, eca, model3_state, eca, ROT0, "Sega", "Emergency Call Ambulance (Export)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1999, ecap, eca, model3_21, eca, model3_state, eca, ROT0, "Sega", "Emergency Call Ambulance (US location test?)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )

View File

@ -211,6 +211,7 @@ public:
DECLARE_DRIVER_INIT(oceanhun);
DECLARE_DRIVER_INIT(dayto2pe);
DECLARE_DRIVER_INIT(spikeout);
DECLARE_DRIVER_INIT(magtruck);
DECLARE_DRIVER_INIT(model3_15);
virtual void video_start();
DECLARE_MACHINE_START(model3_10);

View File

@ -749,18 +749,22 @@ void model3_state::real3d_display_list2_dma(UINT32 src, UINT32 dst, int length,
void model3_state::real3d_vrom_texture_dma(UINT32 src, UINT32 dst, int length, int byteswap)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
if((dst & 0xff) == 0) {
UINT32 address, header;
address_space &space = m_maincpu->space(AS_PROGRAM);
if ((dst & 0xff) == 0)
{
for (int i=0; i < length; i+=12)
{
UINT32 address, header;
if (byteswap) {
address = BYTE_REVERSE32(space.read_dword((src+0)));
header = BYTE_REVERSE32(space.read_dword((src+4)));
} else {
address = space.read_dword((src+0));
header = space.read_dword((src+4));
if (byteswap) {
address = BYTE_REVERSE32(space.read_dword((src+i+0)));
header = BYTE_REVERSE32(space.read_dword((src+i+4)));
} else {
address = space.read_dword((src+i+0));
header = space.read_dword((src+i+4));
}
real3d_upload_texture(header, (UINT32*)&m_vrom[address]);
}
real3d_upload_texture(header, (UINT32*)&m_vrom[address]);
}
}