#                                     #
# 3wonders driver                     #
#                                     #

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

GAMENAME    " Wonder 3 (Japan) "
DIRECTORY   WONDER3
PARENT      3WONDERS
CPSTYPE     CPS1
DATE		1991

#                 #
# 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
0x914000  0x915fff  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
0x914000  0x915fff  PALETTERAM 
0x900000  0x92ffff  VIDEORAM 
0xf1c006  0xf1c007  EEPROM
0xff0000  0xfFFFFF  MAINRAM
0x860000  0x8603ff  EXTRARAM  1
0x915800  0x930000  EXTRARAM  2

[dataWriteByteRegions]

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

[dataWriteWordRegions]

0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  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        0x72
VALUE       0x0800
MULTIPLY    0x4e 0x4c 0x4a 0x48

#                      #
# Graphics information #
#                      #
[graphics]

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

# Path                     Size    Where  #
LOAD8 3wonders.01 0x80000 0x000000
LOAD8 3wonders.02 0x80000 0x080000
LOAD8 3wonders.05 0x80000 0x100000
LOAD8 3wonders.06 0x80000 0x180000
LOAD8 3wonders.03 0x80000 0x200000
LOAD8 3wonders.04 0x80000 0x280000
LOAD8 3wonders.07 0x80000 0x300000
LOAD8 3wonders.08 0x80000 0x380000

#               Number of tiles Base addr   Decode info #
DECODECHARS     0x4000          0x140000    0x100000
DECODESPRITES   0x8000          0x000000    0x200000 0x100000
DECODESCROLL2   0x4000          0x080000    0x200000 0x100000 
DECODESCROLL3   0x2000          0x000000    0x200000 0x100000 


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

# Type of load path 1                    path 2                       Size    where #
LOADROMEVENODD rtj36.bin rtj42.bin  0x20000 0x00000
LOADROMEVENODD rtj37.bin rtj43.bin  0x20000 0x40000
LOADROMEVENODD 3wonders.28 3wonders.33  0x20000 0x80000
LOADROMEVENODD rtj35.bin rtj41.bin  0x20000 0xc0000



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

LAYERCONTROL    0x68                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x4000              # 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 0x2000              # scroll3 tile mask(=number of tiles)    #
PRIORITYMASKS   0x66 0x64 0x62 0x60 # the ports where to read the priorities #
LAYERENABLE     0x20 0x04 0x08 0x12
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 rt23.bin 0x10000 0x000000 # main rom and banks #

[samples]
TOTAL 0x40000
LOAD8 3wonders.18  0x20000 0x00000
LOAD8 3wonders.19  0x20000 0x20000


[End]
[verifyRoms]
3wonders.01	0x902489d0
3wonders.02	0xe9a034f4
3wonders.05	0x86aef804
3wonders.06	0x13cb0e7c
3wonders.03	0xe35ce720
3wonders.04	0xdf0eea8b
3wonders.07	0x4f057110
3wonders.08	0x1f055014
rtj36.bin	0xe3741247
rtj42.bin	0xb4baa117
rtj37.bin	0xa1f677b0
rtj43.bin	0x85337a47
3wonders.28	0x054137c8
3wonders.33	0x7264cb1b
rtj35.bin	0xe72f9ea3
rtj41.bin	0xa11ee998
[End]
