#                                     #
# Pang 3 driver (Japan)               #
#                                     #
#                                     #
# Note: the eeprom port is among the  #
# video registers...                  #

[general]

GAMENAME    " Pang! 3 (Japan) "
DIRECTORY   PANG3J
PARENT      PANG3
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
0x80017a  0x80017b  EEPROM     
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM
0x91c000  0x91c7ff  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM
0x860000  0x8603ff  EXTRARAM 1 
0x915800  0x930000  EXTRARAM 2 
0xf18000  0xf19fff  QSOUND1     
0xf1e000  0xf1ffff  QSOUND2    
0xff0000  0xfFFFFF  MAINRAM
0x916000  0x930000  EXTRARAM 1 

[dataReadWordRegions]

0x000000  0x1FFFFF  MAINROM
0x800000  0x800001  INPUTPORT2
0x800010  0x800011  INPUTPORT2
0x800018  0x80001f  INPUTPORT1
0x80017a  0x80017b  EEPROM     
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM
0x91c000  0x91c7ff  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM
0x860000  0x8603ff  EXTRARAM 1 
0x915800  0x930000  EXTRARAM 2 
0xf18000  0xf19fff  QSOUND1     
0xf1e000  0xf1ffff  QSOUND2    
0xff0000  0xfFFFFF  MAINRAM
0x916000  0x930000  EXTRARAM 1 

[dataWriteByteRegions]

0x80017a  0x80017b  EEPROM     
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM
0x91c000  0x91c7ff  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM
0x860000  0x8603ff  EXTRARAM 1 
0x915800  0x930000  EXTRARAM 2 
0xf18000  0xf19fff  QSOUND1     
0xf1e000  0xf1ffff  QSOUND2    
0xff0000  0xfFFFFF  MAINRAM
0x916000  0x930000  EXTRARAM 1 

[dataWriteWordRegions]

0x80017a  0x80017b  EEPROM     
0x800100  0x8001ff  VIDEOPORTS
0x914000  0x915fff  PALETTERAM
0x91c000  0x91c7ff  ROWSCROLLRAM
0x900000  0x92ffff  VIDEORAM
0x860000  0x8603ff  EXTRARAM 1 
0x915800  0x930000  EXTRARAM 2 
0xf18000  0xf19fff  QSOUND1     
0xf1e000  0xf1ffff  QSOUND2    
0xff0000  0xfFFFFF  MAINRAM
0x916000  0x930000  EXTRARAM 1 

#            #
# Protection #
#            #
[protection]

# If port(PORT) is read, returns (VALUE) #
PORT    0xff
VALUE   0xffff

#                      #
# Graphics information #
#                      #
[graphics]

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

# Path                     Size    Where  #
LOAD8 pa3-01m.2c 0x200000 0x000000
LOAD8 pa3-07m.2f 0x200000 0x200000


#               Number of tiles Base addr   Decode info #
DECODECHARS      0x4000          0x180000    0x200000
DECODESPRITESX   0x6000          0x000000    0x200000 0x100000
DECODESCROLL2X   0x8000          0x000000    0x200000 0x100000
DECODESCROLL3X   0x2000          0x000000    0x200000 0x100000 

#                     #
# program information #
#                     #
[program]

ROMSIZE 0x100000

# Type of load path 1                    path 2                       Size    where #
LOADROM16SWAP  pa3j-17.11l      0x80000 0x000000
LOADROM16SWAP  pa3j-16.10l      0x80000 0x080000


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

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

[samples]
TOTAL 0x40000
LOAD8 pa3-05.10d 0x20000 0x00000
LOAD8 pa3-06.11d 0x20000 0x20000

[End]
  
[verifyRoms]
pa3-01m.2c	0x068a152c
pa3-07m.2f	0x3a4a619d
pa3j-17.11l	0x21f6e51f
pa3j-16.10l	0xca1d7897
[End]
