RE: Sega XY free play (re-revisited)

From: <David.Fish_at_axcelis.com>
Date: Fri Oct 05 2001 - 13:48:49 EDT

The Great Wheel turns,
It all comes around again...

Here's the coin timer code in Z80 disassembly lang
created during my 'crack' period ;-) To make the
FREEPLAY change, the timing constraints need to be
loosened up. Maybe by changing the byte C8 at location
00A6.

L0095: LD B,#E7 ;INT due to COINA or COINB
L0097: IN A,(#F8) ;Check switch inputs, Active LOW
        AND D ;a = a .AND. /(initial input)
        JR NZ,#00A4 ;Don't JP if switch still pressed

        LD A,#A0 ;small delay
L009E: DEC A
        JR NZ,#009E
        DJNZ #0097 ;keep looking for switch release

        DEC B ;Release Timeout, B = #FF
L00A4: LD A,B ;switch released
        CP #C8 ;time the switch closure period
        JR NC,#00DA ;JP if timeout or period too short

COINOK: CALL #010A ;period OK, CALL COIN_COUNTER_INCR
        LD BC,#04FB ;In_PORT = #FB, DIP switches
        LD L,#00
        LD E,L ;E & L = #00
L00B2: IN A,(C)
        RRA ;Move DIP SW2-1 into E,b1
        RL E ;
        RRA
        RL L ;Move DIP SW2-5 into E,b0
        DEC C
        DJNZ #00B2 ;E(d3-d0) = SW2( 1,2,3,4 )
        LD A,L ;L(d3-d0) = SW2( 5,6,7,8 )
        CP E ;compare the two halves of the switch
        LD HL,#C80D
        JR Z,#00CB ;JP if SW2 positions identical
        BIT 7,D ;Complemented & Masked inputs, D7,6,5 of #F8
        JR NZ,#00CB ;D7 is COINA

        LD A,E ;SW2-1,2,3,4
        INC HL
        INC HL ;HL = #C80F

Good Luck,
Dave

> -----Original Message-----
> From: Jess Askey [mailto:jess@askey.org]
> Sent: Friday, October 05, 2001 12:34 PM
> To: vectorlist@synthcom.com
> Subject: RE: VECTOR: Sega XY free play (re-revisited)
>
>
> Oh man, I had that figured out at some point too but now it
> is long lost
> in my head somewhere. I think MAME would be the easiest way to track
> down the counter settings in the ROM. Just start in debug
> mode, and step
> through the code where it reads the coin switch inputs. I think the
> basic idea of their 'coin jam' code is that if the coin
> switch is closed
> for too long = coin jam
> If the coin switch is not open long enough between closures =
> coin jam.
> The code should poll the switch and increment timers (based on IRQ
> probably) to
> Keep track of these time constraints. I may be totally off on
> this tho,
> Im just guessing based on other coin routines I have seen.
> You can also
> track down the 'coin jam' problem by tracing backwards from the code
> that displays the message on the screen.
>
> jess
>
>
> -----Original Message-----
> From: owner-vectorlist@synthcom.com
> [mailto:owner-vectorlist@synthcom.com] On Behalf Of Mark Jenison
> Sent: Thursday, October 04, 2001 10:50 AM
> To: vectorlist@synthcom.com
> Subject: VECTOR: Sega XY free play (re-revisited)
>
> Ok,
>
> Can someone modify the Eliminator 4-player code to make it easier to
> credit? I believe Jess Askey has a post on the archives
> about how to do
> this, but I don't know anything about disassemblers.
>
> It's like one-byte for heavens sake! Can someone throw me a
> bone here?
>
> --
> Mark Jenison
>
> --------------------------------------------------------------
> ----------
> ---
> ** To UNSUBSCRIBE from vectorlist, send a message with
> "UNSUBSCRIBE" in
> the
> ** message body to vectorlist-request@synthcom.com. Please
> direct other
> ** questions, comments, or problems to neil@synthcom.com.
>
> --------------------------------------------------------------
> -------------
> ** To UNSUBSCRIBE from vectorlist, send a message with
> "UNSUBSCRIBE" in the
> ** message body to vectorlist-request@synthcom.com. Please
> direct other
> ** questions, comments, or problems to neil@synthcom.com.
>
---------------------------------------------------------------------------
** To UNSUBSCRIBE from vectorlist, send a message with "UNSUBSCRIBE" in the
** message body to vectorlist-request@synthcom.com. Please direct other
** questions, comments, or problems to neil@synthcom.com.
Received on Fri Oct 5 10:57:32 2001

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:33:43 EDT