# SNEmul configuration file
# Please read README before

ROMPath = /SNES ROMS

[Global]
# Those settings are default and overriden by games' settings

# Scaling modes:
# 0 : not scaled, the graphics are displayed without change, but the DS screen
# is too small to display all SNES screen. So a part of the screen is lost (see
# BG3SQuis and YScroll for workarounds).
#
# 2 : full-screen scaled, the SNES screen is displayed entirely onto the DS screen.
# The backgrounds uses a pseudo bi-linear filtering to squish the graphics. 
# Sprites are squished without filtering. Some pixels are lot.
#
# 1 : half scaled mode doesn't scale as much as full-screen does, so the top and bottom
# ranges of the screen are not displayed and sprites are not squished.
Scaled = 0

# BG3Squish and YScroll are only available for not scaled mode :

# BG3Squish : Squish the layer 3 
# 0 -> normal
# 1 -> squish (reduce 16 pixels)
# 2 -> squish more (reduce 32 pixels)
BG3Squish = 0

# YScroll : Vertical Scroll (pixels) of layer 1 and 2 
# 16 -> normal
# 32 -> bottom
# 0 -> top
# 24 -> medium botton (a good choice for many games)
YScroll = 16


# Sound emulation
# 0 -> off (and use SPC700 skipper)
# 1 -> on
Sound = 1

# BGLayer 
# Five digits number: s4321
# "1 2 3 4 s"  mean "BG1 BG2 BG3 BG4 sprite" respectively
# For each digit :
# 1 = enable, 0 = disable 
 
BGLayers = 10111

# BG Priorities selection
# 0 -> automatic
# 1 -> 1, 2, 0, 3
# 2 -> 3, 3, 2, 3
# 3 -> 3, 3, 3, 3
# 4 -> 2, 2, 2, 2 
# 5 -> 1, 1, 1, 1 
# 6 -> 0, 0, 0, 0
# 7 -> 2, 3, 0, 1
# 8 -> 2, 0, 3, 1
# 9 -> 2, 1, 0, 3 
# 10 -> manual (see below)
BGPriorities = 0

# BG Manual Prioritites
# abcd : priority for BG1 BG2 BG3 BG4
# 0 - 3 : the higher the value is, the lower the priority is
# if BG1 and BG2 have the same priority value, BG1 is in front of BG2
BGManualPriority = 1123

# Sprite Priorities
# abcd : priority for the 4 SNES priorities
# 0 - 3 : the higher the value is, the lower the priority is
# The most used values are 1123 or 1223
BGManualPriority = 1123

# BG3 Tile priority line detection
# if set to one, the emulator detects whether the current line has
# more low or high priority tiles, and change the priority of the 
# layer for this line (this only work for BG3 currently)
# This doesn't work for 16 pixels tiles and 64x64 layers
BG3TilePriority = 0

# Double a layer to emulate priority per tile for this layer
# When set to 0 or 1, one of the layer is doubled to the DS's fourth layer
# The high priority tiles are put on the main layer, the low priority tile
# on the back layer. Each layer is not entirely filled. The empty areas are
# filled with the tile BlankTilenumber (see below)
# This doesn't work for 16 pixels tiles and 64x64 layers 
TilePriorityBG = -1

# Number of a blank tile which will be used to fill the empty areas of the
# doubled layer
# 0 is a good value for most games, but some games may need another value, and
# this value may need to change for different parts of the game
# 666 seems ok for Secret Of Mana
BlankTileNumber = 0

# Transparency effects 
# 0 -> Disabled
# 1 -> Enabled
Transparency = 1

# HDMA
# 1 -> enable
# 0 -> disable
HDMA = 1

# Wait for V blank
Vblank = 0

# Speed hacks
# 0 -> No speed hacks
# 1 -> Cycles (reduce the number of cycles par scanline)
# 2 -> Interrupt (Detects interrupt wait loops and skip them)
# 3 -> Cycles + Interrupt
# 4 -> SuperDat (UNINPLEMENTED YET)
SpeedHacks = 0
 

# Fast DMA: Faster implementation of DMA, but maybe buggy
# 0 -> Regular DMA
# 1 -> Faster DMA 
FastDMA = 1

# Sound Port Synchronization hacks
# APU and CPU use 4 ports for exchanging data. Sometimes, games get
# desinchronzied because CPU write too fast or too slow. 
#
# abcdefgh where a,b,c,d,e,f,g,h is 0(off) or 1(on)
#
# abcd control the optional temporizing time before writing to a APU
# port. Of course this slowdown the game emulation.
#
# efgh control a little emulation hack that prevent the main CPU from writing 
# to an APU port until the previous data has been read by the sound CPU
#
# a/e : APU Port 0, b/f : APU Port 1 ... 
#
# Chrono Trigger is better with b=1
# Square games like SOM and FF6(FF3) sound  much better with g=1 and h=1
# Enix games like Illusion of gaia and Terranigma sound better with e=f=g=h=1 

SoundPortSync = 00000000

# External memory pak configuration:
# You can use external memory pack (like Opera RAM, Slot 2 card reader...) to
# increase memory available for emulator.
# There are two modes available for external memory:
#
# MapExtMem = 0 => Use external memory like a disk with paging enabled.
# In this mode, the emulator copy part of the ROM into the DS RAM as the
# the game needs it. It is the fastest method in most games.
#
# MapExtMem = 1 -> Map external memory directly, doesn't use memory paging.
# In this mode, the emulator doesn't copy the ROM into the DS RAM, it uses it
# directly from the external memory. As external memory is much slower than
# DS RAM, it is most of the time the slower method, but if a game uses a large
# range of memory (like graphic intensive game like Mortal Kombat), it can
# be faster than the other method. Some games can crash or refuse to launch,
# because the ROM cannot be locked read-only.
MapExtMem = 1

# Save automatically SRAM when needed
# (May slowdown the emulation)
# 0 : disabled 1 : enabled 
AutoSRAM = 1

[GUI]
# Order for file chooser dialogs :
# 0 -> no order
# 1 -> alphabetical order
FileChooserOrder = 1

# Language of GUI
# -1 -> Use firmware settings
# 0 -> Japanese (Katakana only)
# 1 -> English
# 2 -> French
# 3 -> German
# 4 -> Italian
# 5 -> Spanish 
# 106 -> Portuguese
# 107 -> Catalan
# 108 -> Polish
# 109 -> Dutch
# 110 -> Danish
# 111 -> Swedish (not available yet)
# 112 -> Korean (not available yet)
# 113 -> Simplified Chinese (not available yet)
# 114 -> Russian (not available yet)
# 115 -> Greek (not available yet)

Language = -1

# GAMES list:

# WARNING: AS of 0.5 alpha, crc is computed on first 1Mb for large ROMS(>3Mb)

# When loading a game, SNEmul will search in configuration in order : 
# - Title of the game
# - CRC
# - Filename
# - Alternat. CRC #2
# - Alternat. Title  #2
# - Alternat. CRC #3
# - Alternat. Title #3
# - Alternat. CRC #4
# - Alternat. Title #4
# - Alternat. CRC #5
# - Alternat. Title #5
# So you can associate up to 11 ROM dumps to the same entry 

[TITLE_OF_GAME_OR_FILENAME]
crc = 1020304
crc2 = deadbeef
crc3 = abbababa
crc4 = abcdef01
crc5 = 12345678
title2 = My Name Here (J)
title3 = My Name Here (US)
title4 = My Game
title5 = Hello World

[Secret of MANA]
SoundPortSync = 00000011
TilePriorityBG = 1
BG3TilePriority = 0
BlankTileNumber = 666
SpritePriority = 1223

[FINAL FANTASY 3]
SoundPortSync = 00000011
#TilePriorityBG = 1

[SUPER CASTLEVANIA 4]
SpeedHacks = 2
BG3TilePriority = 1

[VAMPIRES KISS]
SpeedHacks = 1

[DONKEY KONG COUNTRY]
BGPriorities = 3
SpeedHacks = 0
Transparency = 0
Vblank = 1

[CHRONO TRIGGER]
SpeedHacks = 0
SoundPortSync = 01000000

[SUPER MARIOWORLD]
SpeedHacks = 1
#BGPriorities = 1
# Mario is transparent in level selection 
Transparency = 0
BG3Squish = 1
YScroll = 24
Vblank = 1
Sound = 1
Scaled = 0
BGLayers = 10111
BGPriorities = 0
AutoSRAM = 0

[SUPER MARIO ALL_STARS]
YScroll = 24
BG3Squish = 0
Sound = 1
BGLayers = 10111
BGPriorities = 0
Vblank = 0
SpeedHacks = 0

[SUPER BOMBERMAN]
# Need interrupt to start ...
SpeedHacks = 2

[STREETFIGHTER2]
crc = A45CADD6
SpeedHacks = 1
BG3TilePriority = 1

[POPULOUS II]
MouseXAddr = 7A
MouseYAddr = 7C
MouseMode = 2

[MARIOPAINT]
MouseXAddr = 4DC
MouseYAddr = 4DE
MouseMode = 1

[Lemmings 2,The Tribes]
MouseXAddr = C34
MouseYAddr = C35
MouseMode = 1
MouseXOffset = -8
MouseYOffset = -8

[CIVILIZATION]
MouseXAddr = 9D
MouseYAddr = 9F
MouseMode = 1

[Eye of the Beholder]
MouseXAddr = 87
MouseYAddr = 88
MouseMode = 1

[TERRANIGMA P]
TilePriorityBG = -1
BG3TilePriority = 0
BlankTileNumber = 0

[Street Fighter2 Turbo]
TilePriorityBG = -1
BlankTileNumber = 0
BG3TilePriority = 1

[Ogre Battle USA]
BG3Squish = 0
YScroll = 16
Sound = 1
GFXEngine = 0
HDMA = 1
BGLayers = 10111
BGPriorities = 0
Vblank = 0
SpeedHacks = 0
TilePriorityBG = -1
BG3TilePriority = 1
BlankTileNumber = 0
SpritePriority = 1123
BGManualPriority = 0123

[Street Fighter 2]
TilePriorityBG = -1
BG3TilePriority = 1
BlankTileNumber = 0

[MORTAL KOMBAT 3]
BG3Squish = 0
YScroll = 16
Sound = 0
BGLayers = 10111
BGPriorities = 0
Vblank = 0
SpeedHacks = 0
