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 xain.cpp
Version 0.182 Fixed in Version 0.183 Build 64-bit
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:
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:

Regression Version 0.182
Affected Sets / Systems xsleena and clones
Attached Files
There are no relationship linked to this issue.
User avatar
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
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
Feb 10, 2017, 01:14 - it was a problem with spurious timer overflow interrupts being generated when TDR=0x00.