Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06499 Gameplay Major Always Feb 9, 2017, 13:12 Mar 31, 2017, 18:04
Tester StHiryu View Status Public Platform MAME (Unofficial Binary)
Assigned To cuavas Resolution Fixed OS Windows Vista/7/8 (64-bit)
Status [?] Resolved Driver
Version 0.182 Fixed in Version 0.183 Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 06499: xsleena and clones: Some enemies in the second stage has disappeared
Description According this post in the mameworld forum, there is a regression in Xain'd Sleena. The insects in stage 2 doesn't appear anymore:

http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Number=363359&page=0&view=collapsed&sb=5&o=&fpart=1&vc=1&new=1486652757#Post363343
Steps To Reproduce Start to play, select stage 2 (Lagto Soa), and walk a little: No insects attack us.
Additional Information Provide a video from previous mame version (179) to compare:

Github Commit
Flags
Regression Version 0.182
Affected Sets / Systems xsleena and clones
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
3
User avatar
No.13616
cuavas
Administrator
Feb 10, 2017, 00:37
This is interesting. The game enables the MCU timer interrupt (programmable mode, internal clock source, external input disabled, prescale = 2^7). Before moving to the 68705-with-peripherals, the MCU for this game wasn't receiving timer interrupts at all. Somehow the trigger that spawns these enemies is getting lost now, but I don't know how. I'll investigate it further at some point.
User avatar
No.13617
cuavas
Administrator
Feb 10, 2017, 00:45
The timer interrupt handler is pretty simple, it operates on bytes at $21, $22 and $23:

 1AB tst                                             3D 21
 1AD beq   BA                                         27 0B
 1AF dec                                             3A 22
 1B1 beq   B6                                         27 03
 1B3 bclr  7,TCR                                        1F 09
 1B5 rti                                                80
 1B6 inc                                             3C 23
 1B8 bra   B3                                         20 F9
 1BA bclr  0,PORTB                                      11 01
 1BC bset  0,PORTB                                      10 01
 1BE bra   B3                                         20 F3

Or in C++:

void timer_handler()
{
    if (!*(unsigned char *)0x21)
    {
        PORTB &= 0xfe;
        PORTB |= 0x01;
    }
    else  if (!--*(unsigned char *)0x22)
    {
        ++*(unsigned char *)0x23;
    }
    TCR &= 0x7f
}
User avatar
No.13618
cuavas
Administrator
Feb 10, 2017, 01:14
https://github.com/mamedev/mame/commit/9ae0bf812b54c2a66a2039389cd3f7cfa40851ee - it was a problem with spurious timer overflow interrupts being generated when TDR=0x00.