MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

Mamesick
Troll Lamer
Reged: 09/21/03
Posts: 1649
Loc: Italy
Send PM
Re: Actually is fixed here on my PC....
06/19/15 09:20 PM



Code:

TIMER_DEVICE_CALLBACK_MEMBER(megasys1_state::megasys1A_scanline_kazan)
{
int scanline = param;

if(scanline == 240) // vblank clear all lines
{
m_maincpu->set_input_line(3, CLEAR_LINE);
m_maincpu->set_input_line(2, CLEAR_LINE);
m_maincpu->set_input_line(1, CLEAR_LINE);
}

if(scanline == 0)
m_maincpu->set_input_line(1, ASSERT_LINE);

if(scanline == 128)
m_maincpu->set_input_line(2, ASSERT_LINE);

if(scanline == 192) // completely a guess
m_maincpu->set_input_line(3, ASSERT_LINE);
}


and with this line commented out in original source enabled again:

Code:

m_rom_maincpu[0x00006e/2] = 0x0420; // the only game that does not like lev 3 interrupts


NOTE 1: this code breaks ALL other games in the driver, so it should be implemented only for Kazan.
NOTE 2: it's a bit hacky, expecially the m_rom_maincpu patch. Though, it's necessary otherwise the game crash after the boot. This patch was enabled before the bug appeared and then commented out.

EDIT for Developers: the usage of HOLD_LINE with scanlines timers should be deprecated in favour of ASSERT_LINE and CLEAR_LINE. Probably my implementation is not 100% correct but hey, it took me an hour of investigations "fix" a 7 years old bug.

Edited by Mamesick (06/19/15 09:27 PM)







Entire thread
Subject Posted by Posted on
* Is ninja kazan\iga ninjytsuden fixed ? Solstar 06/18/15 09:14 PM
. * Re: Actually is fixed here on my PC.... Mamesick  06/19/15 09:20 PM
. * Re: Is ninja kazan\iga ninjytsuden fixed ? gamez fan  06/18/15 10:06 PM
. * Re: Is ninja kazan\iga ninjytsuden fixed ? Mamesick  06/19/15 02:50 PM
. * Re: Is ninja kazan\iga ninjytsuden fixed ? Big Karnak  06/19/15 02:15 PM
. * Re: Is ninja kazan\iga ninjytsuden fixed ? RobbbertModerator  06/19/15 04:45 PM
. * Re: Is ninja kazan\iga ninjytsuden fixed ? Big Karnak  06/20/15 04:50 AM
. * Re: Is ninja kazan\iga ninjytsuden fixed ? gamez fan  06/20/15 02:59 PM
. * Re: Is ninja kazan\iga ninjytsuden fixed ? MooglyGuy  06/22/15 09:59 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 315 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2003