#                                     #
# Capcom world driver                 #
#                                     #

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

GAMENAME    " Capcom World 2 (Japan) "
DIRECTORY   CWORLD2J
CPSTYPE     CPS1
DATE		1992

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

0x000000  0x1FFFFF  MAINROM
0xff0000  0xfFFFFF  MAINRAM

[dataReadByteRegions]

0x000000  0x1FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1
0x915800  0x930000  EXTRARAM  2
0xf18000  0xf19fff  QSOUND1
0xf1e000  0xf1ffff  QSOUND2

[dataReadWordRegions]

0x000000  0x1FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1
0x915800  0x930000  EXTRARAM  2
0xf18000  0xf19fff  QSOUND1
0xf1e000  0xf1ffff  QSOUND2

[dataWriteByteRegions]

0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM 1
0x915800  0x930000  EXTRARAM 2
0xf18000  0xf19fff  QSOUND1
0xf1e000  0xf1ffff  QSOUND2

[dataWriteWordRegions]

0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM 1
0x915800  0x930000  EXTRARAM 2
0xf18000  0xf19fff  QSOUND1
0xf1e000  0xf1ffff  QSOUND2

#                                         #
# Protection                              #
#                                         #
[protection]

# If port(PORT) is read, returns (VALUE) #
PORT    0xff
VALUE   0xffff


#                      #
# Graphics information #
#                      #
[graphics]

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

# Path                     Size    Where  #
LOADROMEVENODD q524.bin q517.bin    0x20000 0x000000
LOADROMEVENODD q525.bin q518.bin    0x20000 0x040000
LOADROMEVENODD q509.bin q501.bin    0x20000 0x080000
LOADROMEVENODD q510.bin q502.bin    0x20000 0x0c0000
LOADROMEVENODD q538.bin q532.bin    0x20000 0x100000
LOADROMEVENODD q539.bin q533.bin    0x20000 0x140000
LOADROMEVENODD q513.bin q505.bin    0x20000 0x180000
LOADROMEVENODD q514.bin q506.bin    0x20000 0x1c0000

#               Number of tiles Base addr   Decode info #
DECODECHARS     0x2000          0x060000    0x100000
DECODESPRITES   0x4000          0x000000    0x100000 0x080000
DECODESCROLL2   0x4000          0x000000    0x100000 0x080000
DECODESCROLL3   0x0400          0x060000    0x100000 0x080000 


#                     #
# program information #
#                     #
[program]

ROMSIZE 0x100000

# Type of load path 1                    path 2                       Size    where #
LOADROMEVENODD q536.bin q542.bin    0x20000 0x00000
LOADROMEVENODD q537.bin q543.bin    0x20000 0x40000
LOADROMEVENODD q534.bin q540.bin    0x20000 0x80000
LOADROMEVENODD q535.bin q541.bin    0x20000 0xc0000



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

LAYERCONTROL    0x60                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x2000              # scroll1 tile mask(=number of tiles)    #
SCROLL2BASECODE 0x0000              # scroll2 tile base                      #
SCROLL2CODEMASK 0x4000              # scroll2 tile mask(=number of tiles)    #
SCROLL3BASECODE 0x0000              # scroll3 tile base                      #
SCROLL3CODEMASK 0x0400              # scroll3 tile mask(=number of tiles)    #
PRIORITYMASKS   0x6e 0x6c 0x6a 0x68 # the ports where to read the priorities #
LAYERENABLE     0x20 0x14 0x14 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 1                    # 0=no 1=yes #

[z80]
TOTAL 0x10000
LOAD8 q523.bin 0x10000 0x000000 # main rom and banks #

[samples]
TOTAL 0x40000
LOAD8 q530.bin  0x20000 0x00000
LOAD8 q531.bin  0x20000 0x20000


[End]
[verifyRoms]
q524.bin	0xb419d139
q517.bin	0xbd3b4d11
q525.bin	0x979237cb
q518.bin	0xc57da03c
q509.bin	0x48496d80
q501.bin	0xc5453f56
q510.bin	0x119e5e93
q502.bin	0xa2cadcbe
q538.bin	0x9c24670c
q532.bin	0x3ef9c7c2
q539.bin	0xa5839b25
q533.bin	0x04d03930
q513.bin	0xc741ac52
q505.bin	0x143e068f
q514.bin	0xa8755f82
q506.bin	0xc92a91fc
q536.bin	0x38a08099
q542.bin	0x4d29b3a4
q537.bin	0xeb547ebc
q543.bin	0x3ef65ea8
q534.bin	0x7fcc1317
q540.bin	0x7f14b7b4
q535.bin	0xabacee26
q541.bin	0xd3654067
[End]
