SIT board: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 1: Line 1:
[[File:Sit.jpg|thumb|400px|Picture by [[User:Hpman]]]]
[[File:Sit.jpg|thumb|400px|Picture by [[User:Hpman]]]]


[[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 SIT board is an original [[extension board]] designed for [[The Irritating Maze]] game. It connects to the [[JAMMA_connector_pinout|JAMMA]] edge, to the [[output port]] ('''CON1'''), and to the various peripherals needed by the game ([[trackball]] controller, lights, air compressor, ticket dispenser...).


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


The 24V input is only used for the discrete flyback diodes on the 2A transistors.
The 24V input ('''CON3''') is only used for the flyback 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 ?).
The inputs from the {{PCB|MV1B}} go through a HC14 inverter except one line (reset ?) before going to the EPM7128 CPLD (the same type used in [[Metal Slug X - Super Vehicle-001]]) which contains at least 2 quadrature decoders and counters, and one 16 bit SIPO register with latch (and maybe another 8bit one ?).


==Communication==
=I/O=


{{8BitRegister|Unused|2|Air jet|1|Card dispenser ?|1|Latch|1|Clock|1|Data|1|Trackball X/Y}}
The {{Reg|REG_POUTPUT}} register is used for output control by the special [[system ROM]].


Special BIOS:
{{8BitRegister| - |2|Air jet|1|Card dispenser ?|1|Latch|1|Clock|1|Data|1|Trackball X/Y select}}


Routine at 1B212: clear outputs 8,0, x16 (32 writes, latch all outputs low)
If [[hardware DIPs|dipswitch]] 2 ON: Card dispenser connected


Routine at 1B322: Read trackball X
=Code=


Routine at 1B342: Read trackball Y
Special system ROM routines:


Dipswitch 2 ON = Card dispenser connected
* $1B212: clear outputs 8,0, x16 (32 writes, latch all outputs low)
 
* $1B322: Read trackball X
1B5C2: Air jet
* $1B342: Read trackball Y
 
* $1B5C2: Air jet
Routine at 1B494: Set outputs
* $1B494: Set outputs:


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

Latest revision as of 18:13, 13 March 2017

Picture by User:Hpman

The SIT board is an original extension board designed for The Irritating Maze game. It connects to the JAMMA edge, to the output port (CON1), and to the various peripherals needed by the game (trackball controller, lights, air compressor, ticket dispenser...).

The additional outputs are organized as:

  • 11x 2A sink outputs made with D1764 60V NPN Darlington transistors (space for 5 more).
  • 8x 500mA sink outputs made with a 2083 Darlington array through resistors.

The 24V input (CON3) is only used for the flyback diodes on the 2A transistors.

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

I/O

The REG_POUTPUT register is used for output control by the special system ROM.

Bit 7 6 5 4 3 2 1 0
Def - Air jetCard dispenser ?LatchClockDataTrackball X/Y select

If dipswitch 2 ON: Card dispenser connected

Code

Special system ROM routines:

  • $1B212: clear outputs 8,0, x16 (32 writes, latch all outputs low)
  • $1B322: Read trackball X
  • $1B342: Read trackball Y
  • $1B5C2: Air jet
  • $1B494: Set outputs:
ROM:0001B494 sub_1B494:
ROM:0001B494                 moveq   #0,d7           ; Start off with D7 cleared      0000 0000 0000 0000
ROM:0001B496                 tst.b   $B22(a5)        ; $10FE22: FLASH LAMP (flag)
ROM:0001B49A                 bne.w   loc_1B4A2
ROM:0001B49E                 bset    #$E,d7          ;                                0a00 0000 0000 0000
ROM:0001B4A2
ROM:0001B4A2 loc_1B4A2:
ROM:0001B4A2                 move.b  $B21(a5),d0     ; $10FE21: COLOR LAMP (2 bits, 000000xx)
ROM:0001B4A6                 beq.w   loc_1B4B2
ROM:0001B4AA                 ror.w   #4,d0
ROM:0001B4AC                 andi.w  #$3000,d0
ROM:0001B4B0                 or.w    d0,d7           ;                                0abb 0000 0000 0000
ROM:0001B4B2
ROM:0001B4B2 loc_1B4B2:
ROM:0001B4B2                 tst.b   $B20(a5)        ; $10FE20: SIDE LAMP (flag)
ROM:0001B4B6                 beq.w   loc_1B4BE
ROM:0001B4BA                 bset    #$B,d7          ;                                0abb c000 0000 0000
ROM:0001B4BE
ROM:0001B4BE loc_1B4BE:
ROM:0001B4BE                 tst.b   $B1F(a5)        ; $10FE1F: TRACK BALL LAMP (flag)
ROM:0001B4C2                 beq.w   loc_1B4CA
ROM:0001B4C6                 bset    #$A,d7          ;                                0abb cd00 0000 0000
ROM:0001B4CA
ROM:0001B4CA loc_1B4CA:
ROM:0001B4CA                 move.w  $B1C(a5),d0     ; $10FE1C: TIMER LAMP (word, 10 bits, 000000xx xxxxxxxx)
ROM:0001B4CE                 andi.w  #$3FF,d0
ROM:0001B4D2                 or.w    d0,d7           ;                                0abb cdee eeee eeee
ROM:0001B4D4                 tst.b   $B29(a5)        ; $10FE29: ? (flag)
ROM:0001B4D8                 beq.w   loc_1B4E0
ROM:0001B4DC                 bset    #$F,d7          ;                                fabb cdee eeee eeee
ROM:0001B4E0
ROM:0001B4E0 loc_1B4E0:
ROM:0001B4E0                 move.b  $B23(a5),d0     ; Copy of $380001
ROM:0001B4E4                 moveq   #$F,d1          ; Shift out 16 bits
ROM:0001B4E6
ROM:0001B4E6 loc_1B4E6:
ROM:0001B4E6                 andi.b  #$31,d0         ; Mask out latch, clock and data bits (00xx000x)
ROM:0001B4EA                 lsr.l   #1,d7
ROM:0001B4EC                 bcc.w   loc_1B4F4
ROM:0001B4F0                 bset    #1,d0           ; Set data bit (00xx00dx)
ROM:0001B4F4
ROM:0001B4F4 loc_1B4F4:
ROM:0001B4F4                 move.b  d0,($380001).l  ; Output data
ROM:0001B4FA                 nop
ROM:0001B4FC                 nop
ROM:0001B4FE                 bset    #2,d0           ; 00xx01dx
ROM:0001B502                 move.b  d0,($380001).l  ; Set clock high
ROM:0001B508                 dbf     d1,loc_1B4E6    ; Loop for all bits
ROM:0001B50C                 nop
ROM:0001B50E                 nop
ROM:0001B510                 andi.b  #$31,d0         ; Mask out latch, clock and data bits (00xx000x)
ROM:0001B514                 bset    #1,d0
ROM:0001B518                 move.b  d0,($380001).l  ; Set data bit (00xx001x)
ROM:0001B51E                 nop
ROM:0001B520                 nop
ROM:0001B522                 bset    #3,d0
ROM:0001B526                 move.b  d0,($380001).l  ; Set latch bit (00xx101x)
ROM:0001B52C                 nop
ROM:0001B52E                 nop
ROM:0001B530                 andi.b  #$31,d0         ; Clear (00xx000x)
ROM:0001B534                 move.b  d0,($380001).l
ROM:0001B53A                 rts