#                                     #
# Carrier Air Wing (Japan) driver     #
#                                     #
# Driver by D.W. Raingeard            #
# cinati@caramail.com                 #
#                                     #
#                                     #
#                                     #

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

GAMENAME    " Carrier Air Wing (Japan) "
DIRECTORY   CAWINGJ
PARENT      CAWING
CPSTYPE     CPS1
DATE		1990

#                 #
# The memory map  #
#                 #
[programRegions]
0x000000  0x0FFFFF  MAINROM
0xff0000  0xfFFFFF  MAINRAM

[dataReadByteRegions]

0x000000  0x0FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x91c000  0x91dfff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1
0x915800  0x930000  EXTRARAM  2

[dataReadWordRegions]

0x000000  0x0FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x91c000  0x91dfff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1
0x915800  0x930000  EXTRARAM  2

[dataWriteByteRegions]

0x800100  0x8001ff  VIDEOPORTS
0x91c000  0x91dfff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM 1
0x915800  0x930000  EXTRARAM 2

[dataWriteWordRegions]

0x800100  0x8001ff  VIDEOPORTS
0x91c000  0x91dfff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM 1
0x915800  0x930000  EXTRARAM 2

#                                         #
# Protection                              #
#                                         #
[protection]

# If port(PORT) is read, returns (VALUE) #
PORT    0x40
VALUE   0x0406

#                      #
# Graphics information #
#                      #
[graphics]

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

# Path                     Size    Where  #
LOADROMEVENODD caj24.bin caj17.bin 0x20000 0x000000
LOADROMEVENODD caj25.bin caj18.bin 0x20000 0x040000
LOADROMEVENODD caj09.bin caj01.bin 0x20000 0x080000
LOADROMEVENODD caj10.bin caj02.bin 0x20000 0x0c0000
LOADROMEVENODD caj38.bin caj32.bin 0x20000 0x100000
LOADROMEVENODD caj39.bin caj33.bin 0x20000 0x140000
LOADROMEVENODD caj13.bin caj05.bin 0x20000 0x180000
LOADROMEVENODD caj14.bin caj06.bin 0x20000 0x1c0000


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


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

# Type of load path 1                    path 2                       Size    where #
LOADROMEVENODD cae_30a.rom caj42a.bin  	0x20000 0x00000
LOADROMEVENODD cae_31a.rom cae_36a.rom  0x20000 0x40000
LOADROMEVENODD caj34.bin caj40.bin  	0x20000 0x80000
LOADROMEVENODD caj35.bin caj41.bin  	0x20000 0xc0000


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

LAYERCONTROL    0x4c                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x2000              # scroll1 tile mask(=number of tiles)    #
SCROLL2BASECODE 0x0000              # scroll2 tile base                      #
SCROLL2CODEMASK 0x2000              # scroll2 tile mask(=number of tiles)    #
SCROLL3BASECODE 0x0000              # scroll3 tile base                      #
SCROLL3CODEMASK 0x1000              # scroll3 tile mask(=number of tiles)    #
PRIORITYMASKS   0x4a 0x48 0x46 0x44 # the ports where to read the priorities #
LAYERENABLE     0x10 0x0a 0x0a 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 ca_9.ROM 0x10000 0x000000 # main rom and banks #

[samples]
TOTAL 0x40000
LOAD8 ca_18.ROM  0x20000 0x00000
LOAD8 ca_19.ROM  0x20000 0x20000


[End]
[verifyRoms]
caj24.bin	0xe356aad7
caj17.bin	0x540f2fd8
caj25.bin	0xcdd0204d
caj18.bin	0x29c1d4b1
caj09.bin	0x41b0f9a6
caj01.bin	0x1002d0b8
caj10.bin	0xbf8a5f52
caj02.bin	0x125b018d
caj38.bin	0x2464d4ab
caj32.bin	0x9b5836b3
caj39.bin	0xeea23b67
caj33.bin	0xdde3891f
caj13.bin	0x6f3948b2
caj05.bin	0x207373d7
caj14.bin	0x8458e7d7
caj06.bin	0xcf80e164
cae_30a.rom	0x91fceacd
caj42a.bin	0x039f8362
cae_31a.rom	0xe5b75caf
cae_36a.rom	0xc73fd713
caj34.bin	0x51ea57f4
caj40.bin	0x2ab71ae1
caj35.bin	0x01d71973
caj41.bin	0x3a43b538
[End]
