SIT board



Extension board for the trackball used with The Irritating Maze. Connects to the JAMMA edge, to the output port, and to the various boards used by the game (for lights, air compressor, ticket mechanism...).

The outputs are organized as:
 * 16 2A sink outputs made with D1764 60V NPN Darlington transistors (only 11 populated).
 * 8 500mA sink outputs made with a 2083 Darlington array through resistors.

The 24V input is only used for the discrete clamp diodes on the 2A transistors.

The inputs from the MV1B go through a HC14 inverter except one (reset ?) before going to the EPM7128 CPLD (the same used in Metal Slug X - Super Vehicle-001) which contains at least 2 quadrature decoders and counters, one 16bit SIPO register with latch (and maybe another 8bit one ?).

Communication
Special BIOS:

Routine at 1B212: clear outputs 8,0, x16 (32 writes, latch all outputs low)

Routine at 1B322: Read trackball X

Routine at 1B342: Read trackball Y

Dipswitch 2 ON = Card dispenser connected

1B5C2: Air jet

Routine at 1B494: Set outputs

ROM:0001B494 sub_1B494: ROM:0001B494                moveq   #0,d7           ; D7=0 ROM:0001B496                tst.b   $B22(a5)        ; 0/1/FF (10FE22) FLASH LAMP ROM:0001B49A                bne.w   loc_1B4A2       ; If $B22(a5)=0, D7 |= $4000                   0a00 0000 0000 0000 ROM:0001B49E                bset    #$E,d7 ROM:0001B4A2 ROM:0001B4A2 loc_1B4A2: ROM:0001B4A2                move.b  $B21(a5),d0     ; 000000xx COLOR LAMP ROM:0001B4A6                beq.w   loc_1B4B2 ROM:0001B4AA                ror.w   #4,d0 ROM:0001B4AC                andi.w  #$3000,d0 ROM:0001B4B0                or.w    d0,d7           ; If $B21(a5)>0, D7 |= ($B21(a5)<<12 & $3000)  0abb 0000 0000 0000 ROM:0001B4B2 ROM:0001B4B2 loc_1B4B2: ROM:0001B4B2                tst.b   $B20(a5)        ; 0/1/FF SIDE LAMP ROM:0001B4B6                beq.w   loc_1B4BE ROM:0001B4BA                bset    #$B,d7          ; If $B20(a5)>0, D7 |= $0800                   0abb c000 0000 0000 ROM:0001B4BE ROM:0001B4BE loc_1B4BE: ROM:0001B4BE                tst.b   $B1F(a5)        ; 0/1/FF TRACK BALL LAMP ROM:0001B4C2                beq.w   loc_1B4CA ROM:0001B4C6                bset    #$A,d7          ; If $B1F(a5)>0, D7 |= $0400                   0abb cd00 0000 0000 ROM:0001B4CA ROM:0001B4CA loc_1B4CA: ROM:0001B4CA                move.w  $B1C(a5),d0     ; 000000xx xxxxxxxx TIMER LAMP ROM:0001B4CE                andi.w  #$3FF,d0 ROM:0001B4D2                or.w    d0,d7           ; D7 |= ($B1C(a5) & $3FF)                      0abb cdee eeee eeee ROM:0001B4D4                tst.b   $B29(a5)        ; 0/1/FF ROM:0001B4D8                beq.w   loc_1B4E0 ROM:0001B4DC                bset    #$F,d7          ; If $B29(a5)>0, D7 |= $8000                   fabb cdee eeee eeee ROM:0001B4E0 ROM:0001B4E0 loc_1B4E0: ROM:0001B4E0                move.b  $B23(a5),d0     ; Mirror of $380001 ROM:0001B4E4                moveq   #$F,d1          ; 16 bits ROM:0001B4E6 ROM:0001B4E6 loc_1B4E6: ROM:0001B4E6                andi.b  #$31,d0         ; 00xx000x ROM:0001B4EA                lsr.l   #1,d7 ROM:0001B4EC                bcc.w   loc_1B4F4 ROM:0001B4F0                bset    #1,d0           ; 00xx00dx ROM:0001B4F4 ROM:0001B4F4 loc_1B4F4: ROM:0001B4F4                move.b  d0,($380001).l  ; Data set ROM:0001B4FA                nop ROM:0001B4FC                nop ROM:0001B4FE                bset    #2,d0           ; 00xx01dx ROM:0001B502                move.b  d0,($380001).l  ; Clock ROM:0001B508                dbf     d1,loc_1B4E6 ROM:0001B50C                nop ROM:0001B50E                nop ROM:0001B510                andi.b  #$31,d0 ROM:0001B514                bset    #1,d0 ROM:0001B518                move.b  d0,($380001).l  ; 00xx001x ROM:0001B51E                nop ROM:0001B520                nop ROM:0001B522                bset    #3,d0           ; 00xx101x ROM:0001B526                move.b  d0,($380001).l  ; Latch ROM:0001B52C                nop ROM:0001B52E                nop ROM:0001B530                andi.b  #$31,d0         ; 00xx000x ROM:0001B534                move.b  d0,($380001).l ROM:0001B53A                 rts