Difference between revisions of "Homebrew:Multi-Cart Menu"

From veswiki
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
<div id="col1" style="width:35%; float: right">
+
<div id="col1" style="width:437px; float: right">
<div style="border: 1px solid #400; padding: 5px; margin: 5px 0; background: #FFE;">
+
<div style="border: 1px solid #437; padding: 5px; margin: 5px 0; background: #FFE;">
{{#ev:youtube|8WaRTkNbMO8}}
+
{{#ev:youtube|8WaRTkNbMO8|425}}
 
''Demonstration of the menu in the 2009 Multi-Cart.''
 
''Demonstration of the menu in the 2009 Multi-Cart.''
 
</div>
 
</div>
 
</div>
 
</div>
  
Democart 2 was hacked by Sean Riddle into a menu for the Multi-Cart. This was initially made using a hexeditor chaning the op-codes directly rather than disassembly and re-compilation.
+
[[Disassembly:Democart 2|Democart 2]] was hacked by Sean Riddle into a menu for the Multi-Cart. This was initially made using a hexeditor changing the [[Opcode|opcodes]] directly in the binary dump rather than to disassemble and re-compile the code. He lifted the PlaySong routine from another dumped game [[Disassembly:Videocart 24|Pro Football]] and added some well known tones as a fanfare.
 
Later with tools becoming available it was disassembled and more changes could easily be added. The first release version contained several Easter Eggs which also used the LED that the SABA 20 cartridge has, clue in the Multi-Cart binary file is "I like pie".
 
Later with tools becoming available it was disassembled and more changes could easily be added. The first release version contained several Easter Eggs which also used the LED that the SABA 20 cartridge has, clue in the Multi-Cart binary file is "I like pie".
  
Later additions was made by [[User:E5frog|e5frog]] as more games were added to the cartridge.
+
Later additions was made by [[User:E5frog|e5frog]] as more games were added to the cartridge. Cosmetic changes have been made as well as some changes in functionality for a better playing experience.
 +
 
 +
Below is a listing from the Multi-Cart menu as it looked in 2005:
 +
 
 +
 
 +
= Disassembly =
 +
 
 +
= WARNING: Spoiler alert regarding Easter Eggs. =
 +
 
 +
 
 +
<pre>
 +
<nowiki>; menu program for multi-cart built from Saba Schach cart
 +
; the text routines are from demo cart 1; the song code is from Pro Football
 +
; Sean Riddle 2004
 +
; members.cox.net/seanriddle
 +
; last update 12/5/2004
 +
 
 +
Reset: equ $0000
 +
EpromLatch: equ $3000
 +
himenu: equ $27f9
 +
 
 +
org $0800
 +
 
 +
CartridgeStart: db $55                 ; valid cart indicator
 +
                NOP                      ; unused byte
 +
CartridgeEntry: LIS  $0                  ; init the h/w
 +
                OUTS 1
 +
                OUTS 4
 +
                OUTS 5
 +
                OUTS 0
 +
                pi setallpals0
 +
                PI  ClrScrn            ; clear the screen
 +
                DCI  splash
 +
                PI  PrtSent            ; show the title screen
 +
               
 +
                LISU 3
 +
                LISL 2
 +
                LIS 0
 +
                LR (IS)+,A ;init secret to 0
 +
                LIS  $1
 +
                LR  (IS),A              ; init the selected game to #1
 +
 
 +
    dci  song1
 +
    pi playsong               
 +
               
 +
                LIS  $4
 +
                LR  $0,A
 +
                PI  Delay              ; pause on the title screen
 +
               
 +
redraw:
 +
                PI  ClrScrn            ; clear the screen
 +
                DCI  instr
 +
                PI  PrtSent            ; show the instructions
 +
               
 +
menuloop:
 +
                LIS 0 ;reset the speaker
 +
                OUTS 5
 +
    DCI  titles ;blank the line
 +
    PI  PrtSent
 +
    DCI  titles
 +
                LISU 3 ;game #
 +
                LISL 3
 +
                LR  A,(IS)
 +
                adc ;8 bytes per title
 +
                adc
 +
                adc
 +
                adc
 +
                adc
 +
                adc
 +
                adc
 +
                adc
 +
                PI  PrtSent            ; show the current title
 +
               
 +
                PI  GetHC              ; read controllers
 +
                CI  $01                ; right?
 +
                BF  $4,notright ;no
 +
                LISU 3 ;yes
 +
                LISL 3
 +
                LR  A,(IS)
 +
                INC ;next game
 +
                CI  $28
 +
                BF  $4,nottoobig ;past max game?
 +
                LIS  $1 ;yes- start over
 +
nottoobig:      LR  (IS),A ;no
 +
                BF  $0,menuloop ;loop
 +
               
 +
notright:      CI  $02                ; left?
 +
                BF  $4,notleft          ; no
 +
                LISU 3                  ; yes
 +
                LISL 3
 +
                LR  A,(IS)
 +
                COM                      ; previous game
 +
                INC
 +
                COM
 +
                BF  $4,nottoosmall      ; below 0?
 +
                LI  $27                ; yes - set to max
 +
nottoosmall:    LR  (IS),A              ; no
 +
                BF  $0,menuloop        ; loop
 +
               
 +
notleft:        CI  $80                ; down?
 +
                BF  $4,notdown        ; no
 +
               
 +
    DCI  latchvals ;get latchval for game, store in game variable
 +
                LISU 3
 +
                LISL 3
 +
                LR  A,(IS)
 +
adc
 +
                LM
 +
                LR  (IS),A
 +
                DCI  EpromLatch          ; yes-select correct EPROM bank
 +
                JMP  himenu              ; jump to our vector
 +
 
 +
notdown:
 +
LISU 3
 +
LISL 3
 +
LR A,(IS)-
 +
CI 31
 +
bf $4,not31
 +
 
 +
LR A,(IS)
 +
INC
 +
LR (IS),A
 +
CI 4
 +
bf $4,menuloop
 +
 
 +
;secret 1
 +
PI ClrScrn
 +
                LI  $80
 +
                OUTS 5
 +
 
 +
                DCI  secret
 +
                PI  PrtSent
 +
 
 +
lis 3
 +
lisu 3
 +
lisl 1
 +
lr (IS),a
 +
 +
s1loop: lr a,(IS)
 +
pi setallpals0
 +
                LIS  $1
 +
                LR  $0,A
 +
                PI  Delay
 +
pi setallpals1
 +
                LIS  $1
 +
                LR  $0,A
 +
                PI  Delay
 +
pi setallpals2
 +
                LIS  $1
 +
                LR  $0,A
 +
                PI  Delay
 +
pi setallpals3
 +
                LIS  $1
 +
                LR  $0,A
 +
                PI  Delay
 +
lisu 3
 +
lisl 1
 +
                ds (IS)
 +
                bt 2,s1loop
 +
                ;secret 1
 +
               
 +
jmp redraw
 +
 
 +
not31: ci 22
 +
bf $4,not22
 +
LR A,(IS)
 +
INC
 +
LR (IS),A
 +
CI 7
 +
bf $4,menuloop2
 +
 +
;secret 2
 +
                LI  $40
 +
                OUTS 5
 +
                LIS $1
 +
                LR $0,a
 +
                PI delay
 +
 
 +
lis 4
 +
lisu 3
 +
lisl 1
 +
lr (IS),a
 +
 +
s2loop: lr a,(IS)
 +
                dci $3800
 +
                st
 +
                LIS $2
 +
                LR $0,a
 +
                PI delay
 +
                dci $8000
 +
                st
 +
                LIS $2
 +
                LR $0,a
 +
                PI delay
 +
                lisu 3
 +
                lisl 1
 +
                ds (IS)
 +
                bt 2,s2loop
 +
                ;secret 2
 +
               
 +
                bf 4,menuloop2
 +
 +
not22: ci 3
 +
bf $4,menuloop2
 +
LR A,(IS)
 +
INC
 +
LR (IS),A
 +
CI 14
 +
bf $4,menuloop2
 +
 +
;secret 3
 +
dci  song2
 +
pi playsong               
 +
                LIS $1
 +
                LR $0,a
 +
                PI delay
 +
                ;secret 3
 +
 
 +
menuloop2:
 +
jmp menuloop
 +
 
 +
ClrScrn:        LR  K,P
 +
                PI  $0107
 +
                LISU 3
 +
                LISL 7
 +
                LIS  $0
 +
                LR  (IS),A
 +
                LI  $d6
 +
                LR  $3,A
 +
                PI  $00d0
 +
                PI  $011e
 +
                PK
 +
               
 +
PrtSent:        LR  K,P                ; print a "sentence" - from the demo cart code
 +
                PI  $0107
 +
                LIS  $0
 +
                LR  $a,A
 +
                LR  A,$b
 +
                SL  1
 +
                LIS  $e
 +
                BT  1,PS2
 +
                LI  $15
 +
PS2:            LR  $1,A
 +
                LIS  $9
 +
                LR  $2,A
 +
                LM
 +
                LR  $4,A
 +
A0837:          LM
 +
                LR  $0,A
 +
                LR  Q,DC
 +
                DCI  words
 +
                BF  $0,A0851
 +
A084f:          LM
 +
                ADC
 +
A0851:          LR  A,$0
 +
                CM
 +
                BF  $4,A084f
 +
                LM
 +
                LR  $3,A
 +
                AS  $a
 +
                LR  $a,A
 +
                LR  A,$b
 +
                SL  1
 +
                LR  A,$a
 +
                BT  1,A0866
 +
                CI  $0c
 +
                BT  1,A0870
 +
                LI  $15
 +
                BF  $0,A086b
 +
A0866:          CI  $0e
 +
                BT  1,A0870
 +
                LIS  $e
 +
A086b:          LR  $1,A
 +
                LIS  $6
 +
                AS  $2
 +
                LR  $2,A
 +
                LR  A,$3
 +
A0870:          LR  $a,A
 +
A0871:          LM
 +
                XI  $c0
 +
                LR  $0,A
 +
                LR  A,IS
 +
                LR  $9,A
 +
                LISU 4
 +
                LISL 5
 +
                LR  A,$9
 +
                LR  (IS)+,A
 +
                LR  A,$a
 +
                LR  (IS)+,A
 +
                LR  A,$b
 +
                LR  (IS),A
 +
                LR  H,DC
 +
                DCI  bitmaps
 +
                PI  $067c
 +
                LR  DC,H
 +
                LR  A,(IS)-
 +
                LR  $b,A
 +
                LR  A,(IS)-
 +
                LR  $a,A
 +
                LR  A,(IS)
 +
                LR  IS,A
 +
                DS  $3
 +
                BF  $4,A0871
 +
                LIS  $1
 +
                AS  $a
 +
                LR  $a,A
 +
                LR  DC,Q
 +
                LM
 +
                CI  $27
 +
                BF  $4,A08a6
 +
                LR  Q,DC
 +
                OI  $c0
 +
                LR  $0,A
 +
                DCI  bitmaps
 +
                PI  $067c
 +
                LIS  $1
 +
                AS  $a
 +
                LR  $a,A
 +
A08a6:          LR  A,$a
 +
                CI  $0c
 +
                BF  $1,A08b4
 +
                LI  $25
 +
                LR  $0,A
 +
                DCI  bitmaps
 +
                PI  $067c
 +
A08b4:          DS  $4
 +
                LR  DC,Q
 +
                BT  4,A08bb
 +
                JMP  A0837
 +
A08bb:          PI  $011e
 +
                PK
 +
               
 +
             
 +
Delay:          LR  K,P
 +
                LIS  $f
 +
                LR  $5,A
 +
delay1:        PI  $008f
 +
                DS  $0
 +
                BF  $4,delay1
 +
                LR  P,K
 +
                POP
 +
 
 +
 
 +
GetHC:          LIS  $0
 +
                OUTS 1
 +
                OUTS 4
 +
                INS  1
 +
                COM
 +
                BF  $4,gothc
 +
                INS  4
 +
                COM
 +
                BT  4,GetHC
 +
gothc:          POP
 +
 
 +
 
 +
setallpals0:
 +
lis 0
 +
lr 0,a
 +
bf 0,setallpals
 +
setallpals1:
 +
lis 0
 +
lr 0,a
 +
li $80
 +
bf 0,setallpals
 +
setallpals2:
 +
li $80
 +
lr 0,a
 +
lis 0
 +
bf 0,setallpals
 +
setallpals3:
 +
li $80
 +
lr 0,a
 +
setallpals:
 +
lr 1,a
 +
li $7d
 +
com
 +
outs 4
 +
 +
lr a,0
 +
outs 1
 +
 +
li $3f
 +
lr 2,a
 +
saploopl: lr a,2
 +
outs 5
 +
 +
li $60
 +
outs 0
 +
 +
li $50
 +
outs 0
 +
 +
lis 6 ; in bowling 4
 +
lr 4,a
 +
sapdelay: ds 4
 +
bf 4,sapdelay
 +
ds 2
 +
bt 2,saploopl
 +
 
 +
 
 +
li $7e
 +
com
 +
outs 4
 +
 
 +
lr a,1
 +
outs 1
 +
 +
li $3f
 +
lr 2,a
 +
saploopl2: lr a,2
 +
outs 5
 +
 +
li $60
 +
outs 0
 +
 +
li $50
 +
outs 0
 +
 +
lis 6 ; in bowling 4
 +
lr 4,a
 +
sapdelay2: ds 4
 +
bf 4,sapdelay2
 +
ds 2
 +
bt 2,saploopl2
 +
 
 +
pop
 +
 
 +
               
 +
playsong: ;from Pro Football
 +
LIS    3
 +
LR      $4,A
 +
psdly1: INC       
 +
BF      4,psdly1
 +
AM         
 +
LR      $7,A
 +
BT      4,psexit
 +
LM         
 +
LR      $5,A
 +
psloop: LI      $80
 +
OUTS    5 
 +
LR      A,$5
 +
psdly2: INC       
 +
BF      4,psdly2
 +
OUTS    5 
 +
LR      A,$5
 +
psdly3: INC       
 +
BF      4,psdly3
 +
DS      $4
 +
BF      4,psloop
 +
LIS    3
 +
LR      $4,A
 +
DS      $7
 +
BF      4,psloop
 +
BF      0,playsong
 +
psexit: POP       
 +
 
 +
;song format is dur,freq, dur,freq, ..., 0
 +
song1: db $10,$80, $10,$80, $10,$80, $20,$40, 0
 +
song2: db $30,$80, $30,$80, $34,$90, $38,$a0, $38,$a0, $34,$90, $30,$80, $2c,$70, $28,$60, $28,$60, $2c,$70, $30,$80, $45,$80, $16,$70, $58,$70, 0
 +
 
 +
 
 +
;this is what is stored in the latch for each game
 +
 
 +
; Latchvals:
 +
; A12    A17      A16    A15    A14    A13
 +
; 4096  131072  65536  32768  16384  8192
 +
; $1000  $20000  $10000  $8000  $4000  $2000
 +
 
 +
; 64 4kB slots for carts <= 2kB, 32 8kB slots carts < 8kB
 +
 
 +
; a 2kB game is placed in memory between adress $0800-$0fff
 +
; so despite the game uses only 2kB, it uses 4kB of adress space.
 +
 
 +
 
 +
;0 $00000 Menu
 +
;1 $01000 test (colortest)
 +
 
 +
;2 $02000 #1
 +
;3 $03000 #2
 +
 
 +
;4 $04000 #3
 +
;5 $05000 #4
 +
 
 +
;6 $06000 #5
 +
;7 $07000 #6
 +
 
 +
;8 $08000 #7
 +
;9 $09000 #8
 +
 
 +
;10 $0A000 #9
 +
;11 $0B000 #10
 +
 
 +
;12 $0C000 #11
 +
;13 $0D000 #12
 +
 
 +
;14 $0E000 #13
 +
;15 $0F000 #14
 +
 
 +
;16 $10000 #15
 +
;17 $11000 #16
 +
 
 +
;18 $12000 #17
 +
;19 $13000 #18
 +
 
 +
;20 $14000 #19
 +
;21 $15000 #20
 +
 
 +
;22 $16000 #21
 +
;23 $17000 #22
 +
 
 +
;24 $18000 #23
 +
;25 $19000 Alt. BIOS
 +
 
 +
;26 $1A000 #24
 +
;27 $1B000 Pointer for console BIOS
 +
 
 +
;28 $1C000 #25
 +
;29 $1D000
 +
 
 +
;20 $1E000 #26
 +
;31 $1F000
 +
 
 +
;32 $20000 SABA#20
 +
;33 $21000
 +
 
 +
;34 $22000 SABA#1
 +
;35 $23000 SABA#16
 +
 
 +
;36 $24000 Maze 2
 +
;37 $25000 Pinball 2
 +
 
 +
;38 $26000 Lights Out
 +
;39 $27000
 +
 
 +
;40 $28000 Tetris
 +
;41 $29000
 +
 
 +
;42 $2A000 Pac-Man
 +
;43 $2B000
 +
 
 +
;44 $2C000 Democart
 +
;45 $2D000 Democart 2
 +
 
 +
;46 $2F000
 +
;47 $2F000
 +
 
 +
;48 $30000
 +
;49 $31000
 +
 
 +
;50 $32000
 +
;51 $33000
 +
 
 +
;52 $34000
 +
;53 $35000
 +
 
 +
;54 $36000
 +
;55 $37000
 +
 
 +
;56 $38000
 +
;57 $39000
 +
 
 +
;58 $3A000
 +
;59 $3B000
 +
 
 +
;60 $3C000
 +
;61 $3D000
 +
 
 +
;62 $3E000
 +
;63 $3F000
 +
 
 +
 
 +
latchvals: db $00 ;menu code
 +
db  $01,$21,$02,$22,$03,$23,$04,$24 ;first 23 games (each 2K)
 +
db  $05,$25,$06,$26,$07,$27,$08,$28
 +
db $09,$29,$0a,$2a,$0b,$2b,$0c
 +
db $d,$e,$f,$10,$11,$31,$12,$32 ;24,25,26,Schach,1G,16G,Maze2,pin2
 +
db $13,$14,$15,$20,$16,$36 ;Lights,Tetris,Pac,test,DC1,DC2
 +
db $2c,$2d ;BIOS2,BIOS1 (2nd half of cart 24)
 +
;there are currently nine 8K spaces free
 +
 
 +
titles:
 +
db $07,$CE,$CE,$CB,$CE,$CE,$CB,$CE ; blanks
 +
db $06,$CC,$C9,$81,$CB,$A1,$CE,$00 ; game title 1 - TIC-TAC-TOE
 +
db $06,$CC,$C9,$82,$CB,$A2,$CE,$00 ; 2
 +
db $06,$CC,$C9,$83,$CB,$A3,$CE,$00 ; 3
 +
db $06,$CC,$C9,$84,$CB,$A4,$CE,$00 ; 4
 +
db $06,$CC,$C9,$85,$CB,$A5,$CE,$00 ; 5
 +
db $07,$CC,$C9,$86,$CB,$A6,$80,$CE ; 6
 +
db $07,$CC,$C9,$87,$CB,$A6,$A0,$CE ; 7
 +
db $06,$CC,$C9,$88,$CB,$A7,$CE,$00 ; 8
 +
db $06,$CC,$C9,$89,$CB,$A8,$CE,$00 ; 9
 +
db $06,$CC,$C9,$8A,$CB,$A9,$CE,$00 ; 10
 +
db $06,$CC,$C9,$8B,$CB,$AA,$CE,$00 ; 11
 +
db $06,$CC,$C9,$8C,$CB,$AB,$CE,$00 ; 12
 +
db $06,$CC,$C9,$8D,$CB,$AC,$CE,$00
 +
db $06,$CC,$C9,$8E,$CB,$AD,$CE,$00
 +
db $06,$CC,$C9,$8F,$CB,$AE,$CE,$00
 +
db $06,$CC,$C9,$90,$CB,$AF,$CE,$00
 +
db $06,$CC,$C9,$91,$CB,$B0,$CE,$00
 +
db $07,$CC,$C9,$92,$CB,$CC,$B1,$CE
 +
db $06,$CC,$C9,$93,$CB,$B2,$CE,$00
 +
db $06,$CC,$C9,$94,$CB,$B3,$CE,$00
 +
db $06,$CC,$C9,$95,$CB,$B4,$CE,$00
 +
db $06,$CC,$C9,$96,$CB,$B5,$CE,$00
 +
 +
db $06,$CC,$C9,$97,$CB,$B6,$CE,$00
 +
db $06,$CC,$C9,$98,$CB,$B7,$CE,$00
 +
db $06,$CC,$C9,$99,$CB,$B8,$CE,$00 ;25 Casino Poker
 +
db $06,$CC,$C9,$9A,$CB,$B9,$CE,$00 ;26 Alien Invasion
 +
 
 +
db $06,$CC,$C9,$9b,$CB,$BC,$CE,$00 ;29 Schach
 +
db $07,$CC,$C9,$9c,$Cb,$BB,$d9,$80 ;game title 42 - German cart 1
 +
db $06,$CC,$C9,$9d,$CB,$BB,$B1,$00 ;28 German 16
 +
db $06,$CC,$C9,$9e,$CB,$A9,$A0,$00 ; maze 2
 +
db $06,$cc,$c9,$9f,$cb,$df,$a0,$00 ;slot 49 - game 39 Pinball2
 +
db  $06,$cc,$c9,$cf,$cb,$db,$ce,$00 ;lights out
 +
db $06,$CC,$C9,$d0,$CB,$d3,$Cd,$00 ;27 Tetris
 +
db $06,$CC,$C9,$D1,$cb,$de,$ce,$00 ;slot 48 - game 38 PACMAN
 +
db  $06,$cc,$c9,$d2,$cb,$d7,$cb,$00 ; test image 41
 +
db $07,$CC,$C9,$d8,$CB,$BA,$d9,$80 ; democart 1
 +
db $07,$CC,$C9,$da,$CB,$BA,$d9,$a0 ; demo cart 2
 +
db $06,$CC,$C9,$dc,$CB,$d4,$a0,$00 ; bios 2
 +
db $06,$CC,$C9,$dd,$CB,$d4,$80,$00 ;game title 47 - bios 1
 +
 
 +
 
 +
instr: db $15,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CA,$CA,$C2,$C3,$C4,$C5,$CA,$C6,$C7,$CA,$CB,$C3,$C8
 +
;LEFT-RIGHT TO SELECT GAME PUSH DOWN TO START
 +
 +
splash: db $0B,$CB,$BD,$CA,$CA,$BE,$CE,$BF,$CD,$CA,$C0,$C1
 +
;CHANNEL F MULTI-CART BY SEAN RIDDLE
 +
 +
secret:        db  $02,$d5,$d6
 +
               
 +
words: ;ID, len, char, char, ...
 +
db $80,$01,$41 ;1
 +
db $81,$02,$80,$81 ;01
 +
db $82,$02,$80,$82 ;02
 +
db $83,$02,$80,$83
 +
db $84,$02,$80,$84
 +
db $85,$02,$80,$85
 +
db $86,$02,$80,$86
 +
db $87,$02,$80,$87
 +
db $88,$02,$80,$88
 +
db $89,$02,$80,$89
 +
db $8A,$02,$81,$80 ;10
 +
db $8B,$02,$81,$81
 +
db $8C,$02,$81,$82
 +
db $8D,$02,$81,$83
 +
db $8E,$02,$81,$84
 +
db $8F,$02,$81,$85
 +
db $90,$02,$81,$86
 +
db $91,$02,$81,$87
 +
db $92,$02,$81,$88
 +
db $93,$02,$81,$89
 +
db $94,$02,$82,$80
 +
db $95,$02,$82,$81
 +
db $96,$02,$82,$82
 +
db $97,$02,$82,$83
 +
db $98,$02,$82,$84
 +
db $99,$02,$82,$85
 +
db $9A,$02,$82,$86
 +
db $9B,$02,$82,$87
 +
db $9C,$02,$82,$88
 +
db $9D,$02,$82,$89
 +
db $9E,$02,$83,$80
 +
db $9F,$02,$83,$81 ;31
 +
db $A0,$01,$42 ;2
 +
 +
db $A1,$0D,$25,$25,$5E,$52,$4C,$68,$5E,$4A,$4C,$68,$5E,$59,$4E ;  TIC-TAC-TOE
 +
db $A2,$0C,$25,$25,$4D,$4E,$5D,$4E,$5C,$5E,$65,$4F,$59,$62 ;  DESERT FOX
 +
db $A3,$0C,$25,$25,$25,$4B,$56,$4A,$4C,$54,$53,$4A,$4C,$54 ;  BLACKJACK
 +
db $A4,$0B,$25,$25,$25,$5D,$5A,$52,$5E,$4F,$52,$5C,$4E ;  SPITFIRE
 +
db $A5,$0C,$25,$25,$25,$5D,$5A,$4A,$4C,$4E,$65,$61,$4A,$5C ;  SPACE WAR
 +
db $A6,$0B,$25,$25,$57,$4A,$5E,$51,$65,$5B,$5F,$52,$64 ;  MATH QUIZ
 +
db $A7,$0E,$25,$57,$4A,$50,$52,$4C,$65,$58,$5F,$57,$4B,$4E,$5C,$5D ; MAGIC NUMBERS
 +
db $A8,$0C,$25,$25,$25,$4D,$5C,$4A,$50,$65,$5C,$4A,$4C,$4E ;  DRAG RACE
 +
db $A9,$09,$25,$25,$25,$25,$25,$57,$4A,$64,$4E ;    MAZE
 +
db $AA,$0C,$25,$25,$4B,$4A,$4C,$54,$50,$4A,$57,$57,$59,$58 ;  BACKGAMMON
 +
db $AB,$0B,$25,$25,$25,$4B,$4A,$5D,$4E,$4B,$4A,$56,$56 ;  BASEBALL
 +
db $AC,$0C,$25,$25,$25,$5C,$59,$4B,$59,$5E,$65,$61,$4A,$5C ;  ROBOT WAR
 +
db $AD,$0D,$25,$5D,$59,$58,$4A,$5C,$65,$5D,$4E,$4A,$5C,$4C,$51 ; SONAR SEARCH
 +
db $AE,$0D,$25,$57,$4E,$57,$59,$5C,$63,$65,$57,$4A,$5E,$4C,$51 ; MEMORY MATCH
 +
db $AF,$0B,$25,$25,$25,$4D,$59,$4D,$50,$4E,$68,$52,$5E ;  DODGE-IT
 +
db $B0,$0B,$25,$25,$25,$25,$5A,$52,$58,$4B,$4A,$56,$56,$00,$00,$00,$00 ;    PINBALL
 +
db $B1,$07,$51,$4A,$58,$50,$57,$4A,$58 ;HANGMAN
 +
db $B2,$0B,$25,$25,$25,$4C,$51,$4E,$4C,$54,$4E,$5C,$5D ;  CHECKERS
 +
db $B3,$0E,$60,$52,$4D,$4E,$59,$65,$61,$51,$52,$64,$4B,$4A,$56,$56 ;VIDEO WHIZBALL
 +
db $B4,$0B,$25,$25,$25,$25,$4B,$59,$61,$56,$52,$58,$50 ;    BOWLING
 +
db $B5,$0D,$25,$5D,$56,$59,$5E,$65,$57,$4A,$4C,$51,$52,$58,$4E ; SLOT MACHINE
 +
db $B6,$0E,$25,$50,$4A,$56,$4A,$4C,$5E,$52,$4C,$65,$61,$4A,$5C,$5D ; GALACTIC WARS
 +
db $B7,$0D,$25,$5A,$5C,$59,$65,$4F,$59,$59,$5E,$4B,$4A,$56,$56 ; PRO FOOTBALL
 +
db $B8,$0D,$25,$4C,$4A,$5D,$52,$58,$59,$65,$5A,$59,$54,$4E,$5C ; CASINO POKER
 +
db $B9,$0E,$4A,$56,$52,$4E,$58,$65,$52,$58,$60,$4A,$5D,$52,$59,$58 ;ALIEN INVADERS
 +
 +
db $BA,$06,$25,$25,$4D,$4E,$57,$59 ;  DEMO
 +
db  $BB,$06,$50,$4E,$5C,$57,$4A,$58 ;GERMAN
 +
db $BC,$0A,$25,$25,$25,$25,$25,$4C,$51,$4E,$5D,$5D ;    CHESS
 +
db $BD,$09,$0C,$11,$0A,$18,$18,$0E,$16,$25,$0F ;CHANNEL F
 +
db $BE,$0A,$57,$1F,$96,$5E,$12,$A8,$4C,$0A,$9C,$5E ;MULTI-CART
 +
db $BF,$02,$0B,$23 ;BY
 +
db $C0,$04,$9D,$8E,$8A,$98 ;SEAN
 +
db $C1,$06,$9C,$92,$8D,$8D,$96,$8E ;RIDDLE
 +
db $C2,$0A,$16,$0E,$0F,$1E,$28,$1C,$12,$10,$11,$1E ;LEFT-RIGHT
 +
db $C3,$02,$1E,$19 ;TO
 +
db $C4,$06,$1D,$0E,$16,$0E,$0C,$1E ;SELECT
 +
db $C5,$04,$10,$0A,$17,$0E ;GAME
 +
db $C6,$04,$1A,$1F,$1D,$11 ;PUSH
 +
db $C7,$04,$0D,$19,$21,$18 ;DOWN
 +
db $C8,$05,$1D,$1E,$0A,$1C,$1E ;START
 +
db $C9,$04,$8C,$8A,$9C,$9E ;CART <blue>
 +
db $CA,$01,$25 ;1 space
 +
db $CB,$02,$25,$25 ;2 spaces
 +
db $CC,$03,$25,$25,$25 ;3 spaces
 +
db $CD,$04,$25,$25,$25,$25 ;4 spaces
 +
db $CE,$05,$25,$25,$25,$25,$25 ;5 spaces
 +
 +
db $cf,$02,$83,$82 ;32
 +
db $d0,$02,$83,$83 ;33
 +
db $d1,$02,$83,$84 ;34
 +
db $d2,$02,$83,$85 ;35
 +
 +
db $d3,$0a,$25,$25,$25,$25,$5e,$4e,$5e,$5c,$52,$5d ;    TETRIS
 +
db $d4,$08,$25,$25,$25,$25,$4b,$52,$59,$5d ;    BIOS
 +
db $d5,$05,$91,$8e,$96,$96,$99 ;HELLO
 +
db $d6,$07,$4f,$5c,$4e,$4d,$5c,$52,$4c ;FREDRIC
 +
db $d7,$09,$25,$25,$25,$25,$25,$5e,$4e,$5d,$5e ;    TEST
 +
db $d8,$02,$83,$86 ;36
 +
db $d9,$04,$4C,$4A,$5C,$5E ;CART <red>
 +
db $da,$02,$83,$87 ;37
 +
db $db,$0c,$25,$25,$56,$52,$50,$51,$5E,$5D,$25,$59,$5f,$5e ;LIGHTS OUT
 +
 +
db $dc,$02,$83,$88 ;38
 +
db $dd,$02,$83,$89 ;39
 +
db $de,$0b,$25,$25,$25,$25,$5A,$4a,$4c,$68,$57,$4a,$58 ;PACMAN
 +
db $df,$0a,$25,$25,$25,$5A,$52,$58,$4B,$4A,$56,$56 ;    PINBALL2
 +
 
 +
bitmaps: ;5x5 character bitmaps
 +
db $F8,$88,$88,$88,$F8 ;00 0
 +
db $20,$60,$20,$20,$70 ;01 1
 +
db $F8,$08,$F8,$80,$F8
 +
db $F8,$08,$38,$08,$F8
 +
db $88,$88,$F8,$08,$08
 +
db $F8,$80,$F8,$08,$F8
 +
db $F8,$80,$F8,$88,$F8
 +
db $F8,$08,$08,$08,$08
 +
db $F8,$88,$F8,$88,$F8
 +
db $F8,$88,$F8,$08,$F8 ;09 9
 +
db $F8,$88,$F8,$88,$88 ;0a A
 +
db $F8,$48,$78,$48,$F8
 +
db $F8,$80,$80,$80,$F8
 +
db $F8,$48,$48,$48,$F8
 +
db $F8,$80,$E0,$80,$F8
 +
db $F8,$80,$E0,$80,$80
 +
db $F8,$80,$98,$88,$F8 ;10 G
 +
db $88,$88,$F8,$88,$88
 +
db $F8,$20,$20,$20,$F8 ;12 I
 +
db $F8,$20,$20,$A0,$E0
 +
db $90,$A0,$C0,$A0,$90 ;14 K
 +
db $00,$00,$70,$00,$00 ;15 -
 +
db $80,$80,$80,$80,$F8 ;16 L
 +
db $88,$D8,$A8,$88,$88 ;17 M
 +
db $88,$C8,$A8,$98,$88 ;18 N
 +
db $F8,$88,$88,$88,$F8 ;19 O
 +
db $F8,$88,$F8,$80,$80 ;1a P
 +
db $F8,$88,$88,$90,$E8 ;1b Q
 +
db $F8,$88,$F8,$90,$88 ;1c R
 +
db $F8,$80,$F8,$08,$F8 ;1d S
 +
db $F8,$20,$20,$20,$20 ;1e T
 +
db $88,$88,$88,$88,$F8 ;1f U
 +
db $88,$88,$88,$50,$20 ;20 V
 +
db $88,$88,$A8,$D8,$88
 +
db $88,$50,$20,$50,$88
 +
db $88,$88,$F8,$20,$20
 +
db $F8,$10,$20,$40,$F8 ;24 Z
 +
db $00,$00,$00,$00,$00 ;25 space
 +
db $F8,$08,$38,$00,$20 ;26 ?
 +
db $00,$00,$00,$00,$40 ;27 .
 +
db $00,$00,$70,$00,$00 ;28 -
 +
 +
;??? is this used?
 +
db $81,$82,$83,$84,$84
 +
db $29,$1B,$0F,$09,$09,$2B
 +
db $FF,$FF
 +
org $0ff0
 +
db $53,$65,$61,$6e,$20,$52,$69,$64,$64,$6c,$65,$20,$32,$30,$30,$34
 +
 +
; the following code is in the "himenu" file
 +
;org $27f9
 +
;himenu:
 +
; lisu 3 ;load the latch value
 +
; lisl 3
 +
; lr a,(IS)
 +
; st ;set the latch
 +
; jmp Reset ;jump to reset vector- BIOS will start game normally
 +
end
 +
</nowiki></pre>

Latest revision as of 20:07, 20 November 2012

Demonstration of the menu in the 2009 Multi-Cart.

Democart 2 was hacked by Sean Riddle into a menu for the Multi-Cart. This was initially made using a hexeditor changing the opcodes directly in the binary dump rather than to disassemble and re-compile the code. He lifted the PlaySong routine from another dumped game Pro Football and added some well known tones as a fanfare. Later with tools becoming available it was disassembled and more changes could easily be added. The first release version contained several Easter Eggs which also used the LED that the SABA 20 cartridge has, clue in the Multi-Cart binary file is "I like pie".

Later additions was made by e5frog as more games were added to the cartridge. Cosmetic changes have been made as well as some changes in functionality for a better playing experience.

Below is a listing from the Multi-Cart menu as it looked in 2005:


Disassembly

WARNING: Spoiler alert regarding Easter Eggs.

; menu program for multi-cart built from Saba Schach cart
; the text routines are from demo cart 1; the song code is from Pro Football
; Sean Riddle 2004
; members.cox.net/seanriddle
; last update 12/5/2004

Reset: equ $0000
EpromLatch: equ $3000
himenu: equ $27f9

org $0800

CartridgeStart: db	$55	                ; valid cart indicator
                NOP                      ; unused byte
CartridgeEntry: LIS  $0                  ; init the h/w
                OUTS 1
                OUTS 4
                OUTS 5
                OUTS 0
                pi setallpals0
                PI   ClrScrn             ; clear the screen
                DCI  splash
                PI   PrtSent             ; show the title screen
                
                LISU 3
                LISL 2
                LIS 0
                LR 	(IS)+,A				;init secret to 0
                LIS  $1
                LR   (IS),A              ; init the selected game to #1

		    dci  song1
		    pi 	 playsong                
                
                LIS  $4
                LR   $0,A
                PI   Delay               ; pause on the title screen
                
redraw:
                PI   ClrScrn             ; clear the screen
                DCI  instr
                PI   PrtSent             ; show the instructions
                
menuloop:
                LIS	0			;reset the speaker
                OUTS 5
		    DCI  titles			;blank the line
		    PI   PrtSent
		    DCI  titles
                LISU 3					;game #
                LISL 3
                LR   A,(IS)
                adc						;8 bytes per title
                adc
                adc
                adc
                adc
                adc
                adc
                adc
                PI   PrtSent             ; show the current title
                
                PI   GetHC               ; read controllers
                CI   $01                 ; right?
                BF   $4,notright		;no
                LISU 3					;yes
                LISL 3
                LR   A,(IS)
                INC						;next game
                CI   $28
                BF   $4,nottoobig		;past max game?
                LIS  $1					;yes- start over
nottoobig:      LR   (IS),A				;no
                BF   $0,menuloop		;loop
                
notright:       CI   $02                 ; left?
                BF   $4,notleft          ; no
                LISU 3                   ; yes
                LISL 3
                LR   A,(IS)
                COM                      ; previous game
                INC
                COM
                BF   $4,nottoosmall      ; below 0?
                LI   $27                 ; yes - set to max
nottoosmall:    LR   (IS),A              ; no
                BF   $0,menuloop         ; loop
                
notleft:        CI   $80                 ; down?
                BF   $4,notdown         ; no
                
			    DCI  latchvals		;get latchval for game, store in game variable
                LISU 3
                LISL 3
                LR   A,(IS)
				adc
                LM
                LR   (IS),A
                DCI  EpromLatch          ; yes-select correct EPROM bank
                JMP  himenu              ; jump to our vector

notdown:
				LISU 3
				LISL 3
				LR 	A,(IS)-
				CI	31
				bf	$4,not31

				LR 	A,(IS)
				INC
				LR	(IS),A
				CI	4
				bf	$4,menuloop

				;secret 1
				PI 	ClrScrn
                LI   $80
                OUTS 5

                DCI  secret
                PI   PrtSent

				lis 3
				lisu 3
				lisl 1 
				lr (IS),a
				
s1loop:			lr a,(IS)
				pi setallpals0
                LIS  $1
                LR   $0,A
                PI   Delay
				pi setallpals1
                LIS  $1
                LR   $0,A
                PI   Delay
				pi setallpals2
                LIS  $1
                LR   $0,A
                PI   Delay
				pi setallpals3
                LIS  $1
                LR   $0,A
                PI   Delay
				lisu 3
				lisl 1 
                ds (IS)
                bt 2,s1loop
                ;secret 1
                
				jmp redraw

not31:			ci 22
				bf $4,not22
				LR 	A,(IS)
				INC
				LR	(IS),A
				CI	7
				bf	$4,menuloop2
				
				;secret 2
                LI   $40
                OUTS 5
                LIS $1
                LR $0,a
                PI delay

				lis 4
				lisu 3
				lisl 1
				lr (IS),a
				
s2loop:			lr a,(IS)
                dci $3800
                st
                LIS $2
                LR $0,a
                PI delay
                dci $8000
                st
                LIS $2
                LR $0,a
                PI delay
                lisu 3
                lisl 1
                ds (IS)
                bt 2,s2loop
                ;secret 2
                
                bf 4,menuloop2
				
not22:			ci 3
				bf $4,menuloop2
				LR 	A,(IS)
				INC
				LR	(IS),A
				CI	14
				bf	$4,menuloop2
				
				;secret 3
				dci  song2
				pi 	 playsong                
                LIS $1
                LR $0,a
                PI delay
                ;secret 3

menuloop2:				
				jmp menuloop

ClrScrn:        LR   K,P
                PI   $0107
                LISU 3
                LISL 7
                LIS  $0
                LR   (IS),A
                LI   $d6
                LR   $3,A
                PI   $00d0
                PI   $011e
                PK
                
PrtSent:        LR   K,P                 ; print a "sentence" - from the demo cart code
                PI   $0107
                LIS  $0
                LR   $a,A
                LR   A,$b
                SL   1
                LIS  $e
                BT   1,PS2
                LI   $15
PS2:            LR   $1,A
                LIS  $9
                LR   $2,A
                LM
                LR   $4,A
A0837:          LM
                LR   $0,A
                LR   Q,DC
                DCI  words
                BF   $0,A0851
A084f:          LM
                ADC
A0851:          LR   A,$0
                CM
                BF   $4,A084f
                LM
                LR   $3,A
                AS   $a
                LR   $a,A
                LR   A,$b
                SL   1
                LR   A,$a
                BT   1,A0866
                CI   $0c
                BT   1,A0870
                LI   $15
                BF   $0,A086b
A0866:          CI   $0e
                BT   1,A0870
                LIS  $e
A086b:          LR   $1,A
                LIS  $6
                AS   $2
                LR   $2,A
                LR   A,$3
A0870:          LR   $a,A
A0871:          LM
                XI   $c0
                LR   $0,A
                LR   A,IS
                LR   $9,A
                LISU 4
                LISL 5
                LR   A,$9
                LR   (IS)+,A
                LR   A,$a
                LR   (IS)+,A
                LR   A,$b
                LR   (IS),A
                LR   H,DC
                DCI  bitmaps
                PI   $067c
                LR   DC,H
                LR   A,(IS)-
                LR   $b,A
                LR   A,(IS)-
                LR   $a,A
                LR   A,(IS)
                LR   IS,A
                DS   $3
                BF   $4,A0871
                LIS  $1
                AS   $a
                LR   $a,A
                LR   DC,Q
                LM
                CI   $27
                BF   $4,A08a6
                LR   Q,DC
                OI   $c0
                LR   $0,A
                DCI  bitmaps
                PI   $067c
                LIS  $1
                AS   $a
                LR   $a,A
A08a6:          LR   A,$a
                CI   $0c
                BF   $1,A08b4
                LI   $25
                LR   $0,A
                DCI  bitmaps
                PI   $067c
A08b4:          DS   $4
                LR   DC,Q
                BT   4,A08bb
                JMP  A0837
A08bb:          PI   $011e
                PK
                
               
Delay:          LR   K,P
                LIS  $f
                LR   $5,A
delay1:         PI   $008f
                DS   $0
                BF   $4,delay1
                LR   P,K
                POP


GetHC:          LIS  $0
                OUTS 1
                OUTS 4
                INS  1
                COM
                BF   $4,gothc
                INS  4
                COM
                BT   4,GetHC
gothc:          POP


setallpals0:
				lis 0
				lr 0,a
				bf 0,setallpals
setallpals1:
				lis 0
				lr 0,a
				li $80
				bf 0,setallpals
setallpals2:
				li $80
				lr 0,a
				lis 0
				bf 0,setallpals
setallpals3:
				li $80
				lr 0,a
setallpals:
				lr 1,a
				li $7d
				com
				outs 4
		
				lr a,0
				outs 1
		
				li	$3f
				lr	2,a
saploopl:		lr	a,2
				outs	5
		
				li $60
				outs	0
		
				li $50
				outs	0
		
				lis	6	; in bowling 4
				lr	4,a
sapdelay:		ds	4
				bf	4,sapdelay
				ds	2
				bt	2,saploopl	


				li $7e
				com
				outs 4

				lr a,1
				outs 1
		
				li	$3f
				lr	2,a
saploopl2:		lr	a,2
				outs	5
		
				li $60
				outs	0
		
				li $50
				outs	0
		
				lis	6	; in bowling 4
				lr	4,a
sapdelay2:		ds	4
				bf	4,sapdelay2
				ds	2
				bt	2,saploopl2	

				pop

                
playsong:					;from Pro Football
			LIS     3
			LR      $4,A
psdly1:		INC         
			BF      4,psdly1
			AM          
			LR      $7,A
			BT      4,psexit
			LM          
			LR      $5,A
psloop:		LI      $80
			OUTS    5  
			LR      A,$5
psdly2:		INC         
			BF      4,psdly2
			OUTS    5  
			LR      A,$5
psdly3:		INC         
			BF      4,psdly3
			DS      $4
			BF      4,psloop
			LIS     3
			LR      $4,A
			DS      $7
			BF      4,psloop
			BF      0,playsong
psexit:		POP         

				;song format is dur,freq, dur,freq, ..., 0
song1:			db $10,$80, $10,$80, $10,$80, $20,$40, 0
song2:			db $30,$80, $30,$80, $34,$90, $38,$a0, $38,$a0, $34,$90, $30,$80, $2c,$70, $28,$60, $28,$60, $2c,$70, $30,$80, $45,$80, $16,$70, $58,$70, 0


				;this is what is stored in the latch for each game

				; Latchvals: 
				; A12    A17      A16    A15    A14    A13
				; 4096   131072   65536  32768  16384  8192
				; $1000  $20000  $10000  $8000  $4000  $2000

				; 64 4kB slots for carts <= 2kB, 32 8kB slots carts < 8kB

				; a 2kB game is placed in memory between adress $0800-$0fff
				; so despite the game uses only 2kB, it uses 4kB of adress space.


				;0	$00000 Menu 
				;1	$01000 test (colortest)

				;2	$02000 #1
				;3	$03000 #2

				;4	$04000 #3
				;5	$05000 #4

				;6	$06000 #5
				;7	$07000 #6

				;8	$08000 #7
				;9	$09000 #8

				;10	$0A000 #9
				;11	$0B000 #10

				;12	$0C000 #11
				;13	$0D000 #12

				;14	$0E000 #13
				;15	$0F000 #14

				;16	$10000 #15
				;17	$11000 #16

				;18	$12000 #17
				;19	$13000 #18

				;20	$14000 #19	
				;21	$15000 #20

				;22	$16000 #21
				;23	$17000 #22

				;24	$18000 #23
				;25	$19000 Alt. BIOS

				;26	$1A000 #24
				;27	$1B000 Pointer for console BIOS

				;28	$1C000 #25
				;29	$1D000

				;20	$1E000 #26		
				;31	$1F000

				;32	$20000 SABA#20
				;33	$21000

				;34	$22000 SABA#1
				;35	$23000 SABA#16

				;36	$24000 Maze 2
				;37	$25000 Pinball 2

				;38	$26000 Lights Out
				;39	$27000

				;40	$28000 Tetris		
				;41	$29000

				;42	$2A000 Pac-Man
				;43	$2B000

				;44	$2C000 Democart
				;45	$2D000 Democart 2

				;46	$2F000
				;47	$2F000

				;48	$30000
				;49	$31000

				;50	$32000		
				;51	$33000

				;52	$34000
				;53	$35000

				;54	$36000
				;55	$37000

				;56	$38000
				;57	$39000

				;58	$3A000
				;59	$3B000

				;60	$3C000		
				;61	$3D000

				;62	$3E000
				;63	$3F000


latchvals:			db	$00							;menu code
				db  	$01,$21,$02,$22,$03,$23,$04,$24		;first 23 games (each 2K)
				db  	$05,$25,$06,$26,$07,$27,$08,$28
				db	$09,$29,$0a,$2a,$0b,$2b,$0c
				db	$d,$e,$f,$10,$11,$31,$12,$32			;24,25,26,Schach,1G,16G,Maze2,pin2
				db	$13,$14,$15,$20,$16,$36				;Lights,Tetris,Pac,test,DC1,DC2
				db	$2c,$2d						;BIOS2,BIOS1 (2nd half of cart 24)
				;there are currently nine 8K spaces free

titles:
				db	$07,$CE,$CE,$CB,$CE,$CE,$CB,$CE	; blanks
				db	$06,$CC,$C9,$81,$CB,$A1,$CE,$00	; game title 1 - TIC-TAC-TOE
				db	$06,$CC,$C9,$82,$CB,$A2,$CE,$00 ; 2
				db	$06,$CC,$C9,$83,$CB,$A3,$CE,$00 ; 3
				db	$06,$CC,$C9,$84,$CB,$A4,$CE,$00 ; 4
				db	$06,$CC,$C9,$85,$CB,$A5,$CE,$00 ; 5
				db	$07,$CC,$C9,$86,$CB,$A6,$80,$CE ; 6
				db	$07,$CC,$C9,$87,$CB,$A6,$A0,$CE ; 7
				db	$06,$CC,$C9,$88,$CB,$A7,$CE,$00 ; 8
				db	$06,$CC,$C9,$89,$CB,$A8,$CE,$00 ; 9
				db	$06,$CC,$C9,$8A,$CB,$A9,$CE,$00 ; 10
				db	$06,$CC,$C9,$8B,$CB,$AA,$CE,$00 ; 11
				db	$06,$CC,$C9,$8C,$CB,$AB,$CE,$00 ; 12
				db	$06,$CC,$C9,$8D,$CB,$AC,$CE,$00
				db	$06,$CC,$C9,$8E,$CB,$AD,$CE,$00
				db	$06,$CC,$C9,$8F,$CB,$AE,$CE,$00
				db	$06,$CC,$C9,$90,$CB,$AF,$CE,$00
				db	$06,$CC,$C9,$91,$CB,$B0,$CE,$00
				db	$07,$CC,$C9,$92,$CB,$CC,$B1,$CE
				db	$06,$CC,$C9,$93,$CB,$B2,$CE,$00
				db	$06,$CC,$C9,$94,$CB,$B3,$CE,$00
				db	$06,$CC,$C9,$95,$CB,$B4,$CE,$00
				db	$06,$CC,$C9,$96,$CB,$B5,$CE,$00
				
				db	$06,$CC,$C9,$97,$CB,$B6,$CE,$00
				db	$06,$CC,$C9,$98,$CB,$B7,$CE,$00
				db	$06,$CC,$C9,$99,$CB,$B8,$CE,$00	;25 Casino Poker
				db	$06,$CC,$C9,$9A,$CB,$B9,$CE,$00 ;26 Alien Invasion

				db	$06,$CC,$C9,$9b,$CB,$BC,$CE,$00 ;29 Schach
				db	$07,$CC,$C9,$9c,$Cb,$BB,$d9,$80 ;game title 42 - German cart 1
				db	$06,$CC,$C9,$9d,$CB,$BB,$B1,$00 ;28 German 16
				db	$06,$CC,$C9,$9e,$CB,$A9,$A0,$00		; maze 2
				db	$06,$cc,$c9,$9f,$cb,$df,$a0,$00	;slot 49 - game 39 Pinball2
				db  $06,$cc,$c9,$cf,$cb,$db,$ce,$00	;lights out
				db	$06,$CC,$C9,$d0,$CB,$d3,$Cd,$00	;27 Tetris
				db	$06,$CC,$C9,$D1,$cb,$de,$ce,$00	;slot 48 - game 38 PACMAN
				db  $06,$cc,$c9,$d2,$cb,$d7,$cb,$00 ; test image 41
				db	$07,$CC,$C9,$d8,$CB,$BA,$d9,$80		; democart 1
				db	$07,$CC,$C9,$da,$CB,$BA,$d9,$a0		; demo cart 2
				db	$06,$CC,$C9,$dc,$CB,$d4,$a0,$00		; bios 2
				db	$06,$CC,$C9,$dd,$CB,$d4,$80,$00 ;game title 47 - bios 1


instr:			db	$15,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CE,$CA,$CA,$C2,$C3,$C4,$C5,$CA,$C6,$C7,$CA,$CB,$C3,$C8
						;LEFT-RIGHT TO SELECT GAME PUSH DOWN TO START
						
splash:			db	$0B,$CB,$BD,$CA,$CA,$BE,$CE,$BF,$CD,$CA,$C0,$C1
						;CHANNEL F MULTI-CART BY SEAN RIDDLE
						
secret:         db  $02,$d5,$d6
                
words:										;ID, len, char, char, ...
				db	$80,$01,$41				;1
				db	$81,$02,$80,$81			;01
				db	$82,$02,$80,$82			;02
				db	$83,$02,$80,$83
				db	$84,$02,$80,$84
				db	$85,$02,$80,$85
				db	$86,$02,$80,$86
				db	$87,$02,$80,$87
				db	$88,$02,$80,$88
				db	$89,$02,$80,$89
				db	$8A,$02,$81,$80			;10
				db	$8B,$02,$81,$81
				db	$8C,$02,$81,$82
				db	$8D,$02,$81,$83
				db	$8E,$02,$81,$84
				db	$8F,$02,$81,$85
				db	$90,$02,$81,$86
				db	$91,$02,$81,$87
				db	$92,$02,$81,$88
				db	$93,$02,$81,$89
				db	$94,$02,$82,$80
				db	$95,$02,$82,$81
				db	$96,$02,$82,$82
				db	$97,$02,$82,$83
				db	$98,$02,$82,$84
				db	$99,$02,$82,$85
				db	$9A,$02,$82,$86
				db	$9B,$02,$82,$87
				db	$9C,$02,$82,$88
				db	$9D,$02,$82,$89
				db	$9E,$02,$83,$80
				db	$9F,$02,$83,$81			;31
				db	$A0,$01,$42				;2
				
				db	$A1,$0D,$25,$25,$5E,$52,$4C,$68,$5E,$4A,$4C,$68,$5E,$59,$4E		;  TIC-TAC-TOE
				db	$A2,$0C,$25,$25,$4D,$4E,$5D,$4E,$5C,$5E,$65,$4F,$59,$62			;  DESERT FOX
				db	$A3,$0C,$25,$25,$25,$4B,$56,$4A,$4C,$54,$53,$4A,$4C,$54			;   BLACKJACK
				db	$A4,$0B,$25,$25,$25,$5D,$5A,$52,$5E,$4F,$52,$5C,$4E			;   SPITFIRE
				db	$A5,$0C,$25,$25,$25,$5D,$5A,$4A,$4C,$4E,$65,$61,$4A,$5C			;   SPACE WAR
				db	$A6,$0B,$25,$25,$57,$4A,$5E,$51,$65,$5B,$5F,$52,$64			;  MATH QUIZ
				db	$A7,$0E,$25,$57,$4A,$50,$52,$4C,$65,$58,$5F,$57,$4B,$4E,$5C,$5D		; MAGIC NUMBERS
				db	$A8,$0C,$25,$25,$25,$4D,$5C,$4A,$50,$65,$5C,$4A,$4C,$4E			;   DRAG RACE
				db	$A9,$09,$25,$25,$25,$25,$25,$57,$4A,$64,$4E				;     MAZE
				db	$AA,$0C,$25,$25,$4B,$4A,$4C,$54,$50,$4A,$57,$57,$59,$58			;  BACKGAMMON
				db	$AB,$0B,$25,$25,$25,$4B,$4A,$5D,$4E,$4B,$4A,$56,$56			;   BASEBALL
				db	$AC,$0C,$25,$25,$25,$5C,$59,$4B,$59,$5E,$65,$61,$4A,$5C			;   ROBOT WAR
				db	$AD,$0D,$25,$5D,$59,$58,$4A,$5C,$65,$5D,$4E,$4A,$5C,$4C,$51		; SONAR SEARCH
				db	$AE,$0D,$25,$57,$4E,$57,$59,$5C,$63,$65,$57,$4A,$5E,$4C,$51		; MEMORY MATCH
				db	$AF,$0B,$25,$25,$25,$4D,$59,$4D,$50,$4E,$68,$52,$5E			;   DODGE-IT
				db	$B0,$0B,$25,$25,$25,$25,$5A,$52,$58,$4B,$4A,$56,$56,$00,$00,$00,$00	;    PINBALL
				db	$B1,$07,$51,$4A,$58,$50,$57,$4A,$58					;HANGMAN
				db	$B2,$0B,$25,$25,$25,$4C,$51,$4E,$4C,$54,$4E,$5C,$5D			;   CHECKERS
				db	$B3,$0E,$60,$52,$4D,$4E,$59,$65,$61,$51,$52,$64,$4B,$4A,$56,$56		;VIDEO WHIZBALL
				db	$B4,$0B,$25,$25,$25,$25,$4B,$59,$61,$56,$52,$58,$50			;    BOWLING
				db	$B5,$0D,$25,$5D,$56,$59,$5E,$65,$57,$4A,$4C,$51,$52,$58,$4E		; SLOT MACHINE
				db	$B6,$0E,$25,$50,$4A,$56,$4A,$4C,$5E,$52,$4C,$65,$61,$4A,$5C,$5D		; GALACTIC WARS
				db	$B7,$0D,$25,$5A,$5C,$59,$65,$4F,$59,$59,$5E,$4B,$4A,$56,$56		; PRO FOOTBALL
				db	$B8,$0D,$25,$4C,$4A,$5D,$52,$58,$59,$65,$5A,$59,$54,$4E,$5C		; CASINO POKER
				db	$B9,$0E,$4A,$56,$52,$4E,$58,$65,$52,$58,$60,$4A,$5D,$52,$59,$58		;ALIEN INVADERS
				
				db	$BA,$06,$25,$25,$4D,$4E,$57,$59						;  DEMO
				db  $BB,$06,$50,$4E,$5C,$57,$4A,$58						;GERMAN
				db	$BC,$0A,$25,$25,$25,$25,$25,$4C,$51,$4E,$5D,$5D				;     CHESS
				db	$BD,$09,$0C,$11,$0A,$18,$18,$0E,$16,$25,$0F				;CHANNEL F
				db	$BE,$0A,$57,$1F,$96,$5E,$12,$A8,$4C,$0A,$9C,$5E				;MULTI-CART
				db	$BF,$02,$0B,$23								;BY
				db	$C0,$04,$9D,$8E,$8A,$98							;SEAN
				db	$C1,$06,$9C,$92,$8D,$8D,$96,$8E						;RIDDLE
				db	$C2,$0A,$16,$0E,$0F,$1E,$28,$1C,$12,$10,$11,$1E				;LEFT-RIGHT
				db	$C3,$02,$1E,$19								;TO
				db	$C4,$06,$1D,$0E,$16,$0E,$0C,$1E						;SELECT
				db	$C5,$04,$10,$0A,$17,$0E							;GAME
				db	$C6,$04,$1A,$1F,$1D,$11							;PUSH
				db	$C7,$04,$0D,$19,$21,$18							;DOWN
				db	$C8,$05,$1D,$1E,$0A,$1C,$1E						;START
				db	$C9,$04,$8C,$8A,$9C,$9E							;CART <blue>
				db	$CA,$01,$25								;1 space
				db	$CB,$02,$25,$25								;2 spaces
				db	$CC,$03,$25,$25,$25							;3 spaces
				db	$CD,$04,$25,$25,$25,$25							;4 spaces
				db	$CE,$05,$25,$25,$25,$25,$25 						;5 spaces
				
				db	$cf,$02,$83,$82		;32
				db	$d0,$02,$83,$83		;33
				db	$d1,$02,$83,$84		;34
				db	$d2,$02,$83,$85		;35
				
				db	$d3,$0a,$25,$25,$25,$25,$5e,$4e,$5e,$5c,$52,$5d				;    TETRIS
				db	$d4,$08,$25,$25,$25,$25,$4b,$52,$59,$5d					;    BIOS
				db	$d5,$05,$91,$8e,$96,$96,$99						;HELLO
				db	$d6,$07,$4f,$5c,$4e,$4d,$5c,$52,$4c					;FREDRIC
				db	$d7,$09,$25,$25,$25,$25,$25,$5e,$4e,$5d,$5e				;    TEST
				db	$d8,$02,$83,$86		;36
				db	$d9,$04,$4C,$4A,$5C,$5E							;CART <red>
				db	$da,$02,$83,$87		;37
				db	$db,$0c,$25,$25,$56,$52,$50,$51,$5E,$5D,$25,$59,$5f,$5e			;LIGHTS OUT
				
				db	$dc,$02,$83,$88		;38
				db	$dd,$02,$83,$89		;39
				db	$de,$0b,$25,$25,$25,$25,$5A,$4a,$4c,$68,$57,$4a,$58			;PACMAN
				db	$df,$0a,$25,$25,$25,$5A,$52,$58,$4B,$4A,$56,$56				;    PINBALL2

bitmaps:								;5x5 character bitmaps
				db	$F8,$88,$88,$88,$F8	;00 0
				db	$20,$60,$20,$20,$70	;01 1
				db	$F8,$08,$F8,$80,$F8
				db	$F8,$08,$38,$08,$F8
				db	$88,$88,$F8,$08,$08
				db	$F8,$80,$F8,$08,$F8
				db	$F8,$80,$F8,$88,$F8
				db	$F8,$08,$08,$08,$08
				db	$F8,$88,$F8,$88,$F8
				db	$F8,$88,$F8,$08,$F8	;09 9
				db	$F8,$88,$F8,$88,$88	;0a A
				db	$F8,$48,$78,$48,$F8
				db	$F8,$80,$80,$80,$F8
				db	$F8,$48,$48,$48,$F8
				db	$F8,$80,$E0,$80,$F8
				db	$F8,$80,$E0,$80,$80
				db	$F8,$80,$98,$88,$F8	;10 G
				db	$88,$88,$F8,$88,$88
				db	$F8,$20,$20,$20,$F8	;12	I
				db	$F8,$20,$20,$A0,$E0
				db	$90,$A0,$C0,$A0,$90	;14 K
				db	$00,$00,$70,$00,$00	;15 -
				db	$80,$80,$80,$80,$F8	;16 L
				db	$88,$D8,$A8,$88,$88	;17 M
				db	$88,$C8,$A8,$98,$88	;18 N
				db	$F8,$88,$88,$88,$F8	;19 O
				db	$F8,$88,$F8,$80,$80	;1a P
				db	$F8,$88,$88,$90,$E8	;1b Q
				db	$F8,$88,$F8,$90,$88	;1c R
				db	$F8,$80,$F8,$08,$F8	;1d S
				db	$F8,$20,$20,$20,$20	;1e T
				db	$88,$88,$88,$88,$F8	;1f U
				db	$88,$88,$88,$50,$20 ;20 V
				db	$88,$88,$A8,$D8,$88
				db	$88,$50,$20,$50,$88
				db	$88,$88,$F8,$20,$20
				db	$F8,$10,$20,$40,$F8	;24 Z
				db	$00,$00,$00,$00,$00	;25 space
				db	$F8,$08,$38,$00,$20	;26 ?
				db	$00,$00,$00,$00,$40	;27 .
				db	$00,$00,$70,$00,$00	;28 -
	
				;??? is this used?
				db	$81,$82,$83,$84,$84
				db	$29,$1B,$0F,$09,$09,$2B
				db	$FF,$FF
org $0ff0	
				db	$53,$65,$61,$6e,$20,$52,$69,$64,$64,$6c,$65,$20,$32,$30,$30,$34
				
; the following code is in the "himenu" file 				
;org $27f9
;himenu:
;				lisu 3					;load the latch value
;				lisl 3
;				lr a,(IS)
;				st						;set the latch
;				jmp Reset				;jump to reset vector- BIOS will start game normally
	end