#                                     #
# Dynasty wars (japan) driver         #
#                                     #

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

GAMENAME    " Dynasty Wars (Japan) "
DIRECTORY   DWJ
CPSTYPE     CPS1
DATE		1989

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

[dataWriteByteRegions]

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

[dataWriteWordRegions]

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

#                                         #
# Protection                              #
#                                         #
[protection]

PORT    0xff
VALUE   0xffff

#                      #
# Graphics information #
#                      #
[graphics]

# the total size of the graphics roms #
TOTAL 0x400000
USEALTERNATEPIXELFORMAT
# Path                     Size    Where  #
LOADROMEVENODD 24.BIN 17.BIN 0x20000 0x000000
LOADROMEVENODD 25.BIN 18.BIN 0x20000 0x040000
LOADROMEVENODD 26.BIN 19.BIN 0x20000 0x080000
LOADROMEVENODD 27.BIN 20.BIN 0x20000 0x0c0000
LOADROMEVENODD 09.BIN 01.BIN 0x20000 0x100000
LOADROMEVENODD 10.BIN 02.BIN 0x20000 0x140000
LOADROMEVENODD 11.BIN 03.BIN 0x20000 0x180000
LOADROMEVENODD 12.BIN 04.BIN 0x20000 0x1c0000
LOADROMEVENODD 38.BIN 32.BIN 0x20000 0x200000
LOADROMEVENODD 39.BIN 33.BIN 0x20000 0x240000
LOADROMEVENODD 28.BIN 21.BIN 0x20000 0x280000
LOADROMEVENODD 29.BIN 22.BIN 0x20000 0x2c0000
LOADROMEVENODD 13.BIN 05.BIN 0x20000 0x300000
LOADROMEVENODD 14.BIN 06.BIN 0x20000 0x340000
LOADROMEVENODD 15.BIN 07.BIN 0x20000 0x380000
LOADROMEVENODD 16.BIN 08.BIN 0x20000 0x3c0000

DECODECHARS     0x2000          0x060000    0x200000
DECODESPRITES   0x4000          0x000000    0x200000 0x100000
DECODESCROLL2   0x4000          0x080000    0x200000 0x100000
DECODESCROLL3   0x0800          0x080000    0x200000 0x100000 


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

# Type of load path 1                    path 2                       Size    where #
LOADROMEVENODD 36.BIN 42.BIN    0x20000 0x00000
LOADROMEVENODD 37.BIN 43.BIN    0x20000 0x40000
LOADROMEVENODD 34.BIN 40.BIN    0x20000 0x80000
LOADROMEVENODD 35.BIN 41.BIN    0x20000 0xc0000


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

LAYERCONTROL    0x6c                # Layer control port                     #
SCROLL1BASECODE 0x0000              # scroll1 tile base                      #
SCROLL1CODEMASK 0x2000              # 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   0x66 0x70 0x68 0x72 # 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 0                    # 0=no 1=yes #

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

[samples]
TOTAL 0x40000
LOAD8 30.bin  0x20000 0x00000
LOAD8 31.bin  0x20000 0x20000

[end]
[verifyRoms]
24.BIN	0xc6909b6f
17.BIN	0x2e2f8320
25.BIN	0x152ea74a
18.BIN	0x1833f932
26.BIN	0x07fc714b
19.BIN	0x7114e5c6
27.BIN	0xa27e81fa
20.BIN	0x002796dc
09.BIN	0xc3e83c69
01.BIN	0x187b2886
10.BIN	0xff28f8d0
02.BIN	0xcc83c02f
11.BIN	0x29eaf490
03.BIN	0x7bf51337
12.BIN	0x38652339
04.BIN	0x4951bc0f
38.BIN	0xcd7923ed
32.BIN	0x21a0a453
39.BIN	0xbc09b360
33.BIN	0x89de1533
28.BIN	0xaf62bf07
21.BIN	0x523f462a
29.BIN	0x6b41f82d
22.BIN	0x52145369
13.BIN	0x0273d87d
05.BIN	0x339378b8
14.BIN	0x18fb232c
06.BIN	0x6f9edd75
15.BIN	0xd36cdb91
07.BIN	0xe04af054
16.BIN	0x381608ae
08.BIN	0xb475d4e9
36.BIN	0x1a516657
42.BIN	0x12a290a0
37.BIN	0x932fc943
43.BIN	0x872ad76d
34.BIN	0x8f663d00
40.BIN	0x1586dbf3
35.BIN	0x9db93d7a
41.BIN	0x1aae69a4
[End]
