#                                     #
# Megaman driver                      #
#                                     #

[general]

GAMENAME    " Megaman "
DIRECTORY   MEGAMAN
CPSTYPE     CPS1
DATE		1995

#                 #
# 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 0x800000

# Path                     Size    Where  #
LOAD8 rcm_03.ROM 0x80000 0x000000
LOAD8 rcm_07.ROM 0x80000 0x080000
LOAD8 rcm_12.ROM 0x80000 0x100000
LOAD8 rcm_16.ROM 0x80000 0x180000
LOAD8 rcm_01.ROM 0x80000 0x200000
LOAD8 rcm_05.ROM 0x80000 0x280000
LOAD8 rcm_10.ROM 0x80000 0x300000
LOAD8 rcm_14.ROM 0x80000 0x380000
LOAD8 rcm_04.ROM 0x80000 0x400000
LOAD8 rcm_08.ROM 0x80000 0x480000
LOAD8 rcm_13.ROM 0x80000 0x500000
LOAD8 rcm_17.ROM 0x80000 0x580000
LOAD8 rcm_02.ROM 0x80000 0x600000
LOAD8 rcm_06.ROM 0x80000 0x680000
LOAD8 rcm_11.ROM 0x80000 0x700000
LOAD8 rcm_15.ROM 0x80000 0x780000


#               Number of tiles Base addr   Decode info #
DECODECHARS     0x4000          0x000000    0x400000
DECODESPRITES   0xb000          0x000000    0x400000 0x200000
DECODESCROLL2   0x8000          0x100000    0x400000 0x200000
DECODESCROLL3   0x1000          0x180000    0x400000 0x200000 

#                     #
# program information #
#                     #
[program]

ROMSIZE 0x180000

# Type of load path 1                    path 2                       Size    where #
LOADROM16SWAP  rcma_23b.ROM     0x80000 0x000000
LOADROM16SWAP  rcma_22b.ROM     0x80000 0x080000
LOADROM16SWAP  rcma_21a.ROM     0x80000 0x100000


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

LAYERCONTROL    0x66                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x4000              # scroll1 tile mask(=number of tiles)    #
SCROLL2BASECODE 0x0000              # scroll2 tile base                      #
SCROLL2CODEMASK 0x8000              # scroll2 tile mask(=number of tiles)    #
SCROLL3BASECODE 0x0000              # scroll3 tile base                      #
SCROLL3CODEMASK 0x1000              # scroll3 tile mask(=number of tiles)    #
PRIORITYMASKS   0x68 0x6a 0x6c 0x6e # the ports where to read the priorities #
LAYERENABLE 0x02 0x04 0x08 0x30
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 0x20000
LOAD8 rcm_09.rom 0x20000 0x000000 # main rom and banks #

[samples]
TOTAL 0x40000
LOAD8 rcm_18.rom  0x20000 0x00000
LOAD8 rcm_19.rom  0x20000 0x20000

[End]
 
[verifyRoms]
rcm_03.ROM	0x36f3073c
rcm_07.ROM	0x826de013
rcm_12.ROM	0xfed5f203
rcm_16.ROM	0x93d97fde
rcm_01.ROM	0x6ecdf13f
rcm_05.ROM	0x5dd131fd
rcm_10.ROM	0x4dc8ada9
rcm_14.ROM	0x303be3bd
rcm_04.ROM	0x54e622ff
rcm_08.ROM	0xfbff64cf
rcm_13.ROM	0x5069d4a9
rcm_17.ROM	0x92371042
rcm_02.ROM	0x944d4f0f
rcm_06.ROM	0xf0faf813
rcm_11.ROM	0xf2b9ee06
rcm_15.ROM	0x4f2d372f
rcma_23b.ROM	0x61e4a397
rcma_22b.ROM	0x708268c4
rcma_21a.ROM	0x4376ea95
[End]
