#                                     #
# Chiki Chiki boys (megatwins) driver #
#                                     #
#                                     #

#                      #
# The name of the game #
#                      #
[general]

GAMENAME    " Chiki Chiki Boys (MegaTwins) "
DIRECTORY   MTWINS
CPSTYPE     CPS1
DATE		1990

#                 #
# The memory map  #
#                 #
[programRegions]

0x000000  0x0FFFFF  MAINROM
0x900000  0x92ffff  VIDEORAM 
0xff0000  0xfFFFFF  MAINRAM

[dataReadByteRegions]

0x000000  0x0FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x915800  0x916000  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1

[dataReadWordRegions]

0x000000  0x0FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x915800  0x916000  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1

[dataWriteByteRegions]

0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x915800  0x916000  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM 1

[dataWriteWordRegions]

0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x915800  0x916000  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM 1

#                                         #
# Protection                              #
#                                         #
[protection]

# If port(PORT) is read, returns (VALUE) #
PORT    0x5e
VALUE   0x0404

#                      #
# Graphics information #
#                      #
[graphics]

# the total size of the graphics roms #
TOTAL 0x200000

# Path                     Size    Where  #
LOAD8 CH_GFX1.ROM 0x80000 0x000000
LOAD8 CH_GFX5.ROM 0x80000 0x080000
LOAD8 CH_GFX3.ROM 0x80000 0x100000
LOAD8 CH_GFX7.ROM 0x80000 0x180000

#               Number of tiles Base addr   Decode info #
DECODECHARS     0x1000          0x030000    0x100000
DECODESPRITES   0x1800          0x000000    0x100000 0x080000
DECODESCROLL2   0x1800          0x040000    0x100000 0x080000
DECODESCROLL3   0x0200          0x070000    0x100000 0x080000 


#                     #
# program information #
#                     #
[program]
ROMSIZE 0x100000

# Type of load path 1                    path 2                       Size    where #
LOADROMEVENODD CHE_30.ROM CHE_35.ROM    0x20000 0x00000
LOADROMEVENODD CHE_31.ROM CHE_36.ROM    0x20000 0x40000
LOADROM16SWAP  CH_32.ROM                0x80000 0x80000


#                        #
# The game configuration #
#                        #
[configuration]

LAYERCONTROL    0x52                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x1000              # scroll1 tile mask(=number of tiles)    #
SCROLL2BASECODE 0x2000              # scroll2 tile base                      #
SCROLL2CODEMASK 0x1800              # scroll2 tile mask(=number of tiles)    #
SCROLL3BASECODE 0x0e00              # scroll3 tile base                      #
SCROLL3CODEMASK 0x0200              # scroll3 tile mask(=number of tiles)    #
PRIORITYMASKS   0x54 0x56 0x58 0x5a # the ports where to read the priorities #
LAYERENABLE 0x08 0x30 0x30 0x00
FORCESCROLLPRIORITY 0xff            # Hack to fix some priority problems btw #
                                    # scroll2 and 3. The folowing values are #
                                    # valid:                                 #
                                    # 0xff: no hack                          #
                                    # 0x01: scroll3 first. Scroll2 after.    #
                                    # 0x00: scroll2 first  Scroll3 after.    #
FORCESCROLL2ON 0                    # 0=no 1=yes #

[z80]
TOTAL 0x10000
LOAD8 CH_09.ROM 0x10000 0x000000 # main rom and banks #

[samples]
TOTAL 0x40000
LOAD8 CH_18.ROM  0x20000 0x00000
LOAD8 CH_19.ROM  0x20000 0x20000


[End]
[verifyRoms]
CH_GFX1.ROM	0xf33ca9d4
CH_GFX5.ROM	0x4ec75f15
CH_GFX3.ROM	0x0ba2047f
CH_GFX7.ROM	0xd85d00d6
CHE_30.ROM	0x9a2a2db1
CHE_35.ROM	0xa7f96b02
CHE_31.ROM	0xbbff8a99
CHE_36.ROM	0x0fa00c39
CH_32.ROM	0x9b70bd41
[End]
