#                                     #
# Cadillacs and dinosaurs driver      #
#                                     #
#                                     #
# Notes: This game    verifies the    #
# Qsound rams at setup time by writing #
# values to it. It also seems that    #
# 0x1fff in the qsound ram is used    #
# to inform the main cpu of the state #
# of the Qsound engine                #
# 0x77 = ok (since it works with this #
# value)                              #

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

GAMENAME    " Cadillacs And Dinosaurs (Japan) "
DIRECTORY   DINOJ
PARENT      DINO
CPSTYPE     CPS1
DATE		1993

#                 #
# 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 (No multiply protection yet) #
#                                         #
[protection]

# If port(PORT) is read, returns (VALUE) #
PORT    0x4e
VALUE   0x0c00

#                      #
# Graphics information #
#                      #
[graphics]

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

# Path                     Size    Where  #
LOAD8 cd_gfx02.rom 0x80000 0x000000
LOAD8 cd_gfx06.rom 0x80000 0x080000
LOAD8 cd_gfx01.rom 0x80000 0x100000
LOAD8 cd_gfx05.rom 0x80000 0x180000
LOAD8 cd_gfx04.rom 0x80000 0x200000
LOAD8 cd_gfx08.rom 0x80000 0x280000
LOAD8 cd_gfx03.rom 0x80000 0x300000
LOAD8 cd_gfx07.rom 0x80000 0x380000

#               Number of tiles Base addr   Decode info #
DECODECHARS     0x1000          0x000000    0x200000
DECODESPRITES   0x8000          0x000000    0x200000 0x100000
DECODESCROLL2   0x4000          0x080000    0x200000 0x100000
DECODESCROLL3   0x0800          0x0c0000    0x200000 0x100000 


#                     #
# program information #
#                     #
[program]

ROMSIZE 0x180000

# Type of load path 1                    path 2                       Size    where #
LOADROM16SWAP  cdj-23a.8f              0x80000 0x000000
LOADROM16SWAP  cdj-22a.7f              0x80000 0x080000
LOADROM16SWAP  cde_21a.rom              0x80000 0x100000



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

LAYERCONTROL    0x4a                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x1000              # 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 0x0800              # scroll3 tile mask(=number of tiles)    #
PRIORITYMASKS   0x4c 0x4e 0x40 0x42 # the ports where to read the priorities #
LAYERENABLE     0x16 0x16 0x16 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 #


# note: the main rom is encrypted. So this will not work for now #

[z80]
Cd_q.ROM 

[samples]
cd_q1.ROM  0x80000
cd_q2.ROM  0x80000
cd_q3.ROM  0x80000
cd_q4.ROM  0x80000


[End]


[verifyRoms]
cd_gfx02.rom	0x09c8fc2d
cd_gfx06.rom	0xe7599ac4
cd_gfx01.rom	0x8da4f917
cd_gfx05.rom	0x470befee
cd_gfx04.rom	0x637ff38f
cd_gfx08.rom	0x211b4b15
cd_gfx03.rom	0x6c40f603
cd_gfx07.rom	0x22bfb7a3
cdj-23a.8f	0x5f3ece96
cdj-22a.7f	0xa0d8de29
cde_21a.rom	0x66d23de2
[End]
