#                                     #
# Quiz and dragons driver             #
#                                     #
# Driver by D.W. Raingeard            #
# cinati@caramail.com                 #
#                                     #

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

GAMENAME    " Quiz And Dragons "
DIRECTORY   QAD
CPSTYPE     CPS1
DATE		1992

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

0x000000  0x0FFFFF  MAINROM
0xff0000  0xfFFFFF  MAINRAM

[dataReadByteRegions]

0x000000  0x0FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x800176  0x800177  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM
0x942000  0x942800  ROWSCROLLRAM
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
0x800176  0x800177  INPUTPORT1
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM
0x942000  0x942800  ROWSCROLLRAM
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1
0x915800  0x930000  EXTRARAM  2

[dataWriteByteRegions]

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

[dataWriteWordRegions]

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

#                                         #
# 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 qdu_24.rom qdu_17.rom 0x20000 0x000000
LOADROMEVENODD qdu_09.rom qdu_01.rom 0x20000 0x080000
LOADROMEVENODD qdu_38.rom qdu_32.rom 0x20000 0x100000
LOADROMEVENODD qdu_13.rom qdu_05.rom 0x20000 0x180000

#               Number of tiles Base addr   Decode info #
DECODECHARS     0x1000          0x000000    0x100000
DECODESPRITES   0x1800          0x000000    0x100000 0x080000
DECODESCROLL2   0x2000          0x000000    0x100000 0x080000
DECODESCROLL3   0x0400          0x020000    0x100000 0x080000 


#                     #
# program information #
#                     #
[program]
ROMSIZE 0x80000

# Type of load path 1                    path 2                       Size    where #
LOADROMEVENODD qdu_36a.rom qdu_42a.rom   0x20000 0x00000
LOADROMEVENODD qdu_37a.rom qdu_43a.rom  0x20000 0x40000


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

LAYERCONTROL    0x6c                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x8000              # 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 0x0400              # scroll3 tile mask(=number of tiles)    #
PRIORITYMASKS   0x6a 0x68 0x66 0x64 # the ports where to read the priorities #
LAYERENABLE 0x14 0x02 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 0                    # 0=no 1=yes #

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

[samples]
TOTAL 0x40000
LOAD8 qdu_30.rom  0x20000 0x00000
LOAD8 qdu_31.rom  0x20000 0x20000


[End]
[verifyRoms]
[end]
