#                                     #
# QTono2 driver                       #
#                                     #
# Driver by D.W. Raingeard            #
# cinati@caramail.com                 #
#                                     #

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

GAMENAME    " Quiz Tonosama no Yabou 2 Zenkoku-ban (Japan) "
DIRECTORY   QTONO2
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
0x90c000  0x90ffff  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
0x90c000  0x90ffff  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
0x90c000  0x90ffff  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
0x90c000  0x90ffff  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    0xff
VALUE   0xffff
MULTIPLY 0x40 0x42 0x44 0x46

#                      #
# Graphics information #
#                      #
[graphics]

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

# Path                     Size    Where  #
LOAD8 tn2-01m.3a 0x80000 0x000000
LOAD8 tn2-10m.3c 0x80000 0x080000
LOAD8 tn2-02m.4a 0x80000 0x100000
LOAD8 tn2-11m.4c 0x80000 0x180000
LOAD8 tn2-03m.5a 0x80000 0x200000
LOAD8 tn2-12m.5c 0x80000 0x280000
LOAD8 tn2-04m.6a 0x80000 0x300000
LOAD8 tn2-13m.6c 0x80000 0x380000

#               Number of tiles Base addr   Decode info #
DECODECHARS     0x1000          0x000000    0x200000
DECODESPRITES   0x8000          0x000000    0x200000 0x100000
DECODESCROLL2   0x2000          0x060000    0x200000 0x100000
DECODESCROLL3   0x0800          0x000000    0x200000 0x100000 


#                     #
# program information #
#                     #
[program]

ROMSIZE 0x180000

# Type of load path 1                    path 2                       Size    where #
LOADROMEVENODD tn2j-30.11e tn2j-37.11f  0x20000 0x000000
LOADROMEVENODD tn2j-31.12e tn2j-38.12f  0x20000 0x040000
LOADROMEVENODD tn2j-28.9e  tn2j-35.9f   0x20000 0x080000
LOADROMEVENODD tn2j-29.10e tn2j-36.10f  0x20000 0x0c0000



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

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

[samples]
TOTAL 0x40000
LOAD8 tn2j-18.11c  0x20000 0x000000
LOAD8 tn2j-19.12c  0x20000 0x020000

[End]


[verifyRoms]
tn2-01m.3a	0xcb950cf9
tn2-10m.3c	0xa34ece70
tn2-02m.4a	0xf2016a34
tn2-11m.4c	0xd0edd30b
tn2-03m.5a	0x18a5bf59
tn2-12m.5c	0xe04ff2f4
tn2-04m.6a	0x094e0fb1
tn2-13m.6c	0x426621c3
tn2j-30.11e	0x9226eb5e
tn2j-37.11f	0xd1d30da1
tn2j-31.12e	0x015e6a8a
tn2j-38.12f	0x1f139bcc
tn2j-28.9e	0x86d27f71
tn2j-35.9f	0x7a1ab87d
tn2j-29.10e	0x9c384e99
tn2j-36.10f	0x4c4b2a0a
[End]
