libSFX.cfg

Summary
libSFX.cfg
AboutThis optional file is used to override the default ROM configuration and some library features.
ROM Header
ROM_TITLEROM title
ROM_MAPMODEROM map mode (4 bits)
ROM_SPEEDROM speed (1 bit)
ROM_CHIPSETChipset (2 bytes)
ROM_ROMSIZEROM size (1 byte)
ROM_RAMSIZERAM size (1 byte)
ROM_EXPRAMSIZEExpansion RAM size (1 byte)
ROM_GAMECODEGame code (4 chars)
ROM_MAKERCODEMaker code (2 chars)
ROM_VERSIONSoftware minor version (1 byte)
ROM_COUNTRYCountry code (1 byte)
libSFX Settings
SFX_JOYAutomatic joypad read-out
SFX_AUTO_READOUT_FIRSTJoypad read-out ordering
SFX_AUTO_READOUTFully disable automatic read-out

About

This optional file is used to override the default ROM configuration and some library features.

If libSFX.cfg is not found in the same directory as the Makefile, the default configuration file is included from $(libsfx_dir)/Configurations/libSFX.cfg.  Any setting not defined will fall back to the default.

ROM Header

ROM_TITLE

ROM title

Must be 21 chars.

define "ROM_TITLE", "TO THE 65816 ON FIRE!"

ROM_MAPMODE

ROM map mode (4 bits)

Make sure that Map.cfg corresponds to the map mode selected.  Common modes∶

$0 = Mode 20/30 (32k/bank "LoROM" mapping)
$1 = Mode 21/31 (64k/bank "HiROM" mapping)
ROM_MAPMODE = $0

ROM_SPEED

ROM speed (1 bit)

$0 = Slow (200ns access)
$1 = Fast (120ns access)
ROM_SPEED = $1

ROM_CHIPSET

Chipset (2 bytes)

$00   = ROM
$01   = ROM+RAM
$02   = ROM+SRAM
$03   = ROM+DSP
$04   = ROM+DSP+RAM
$05   = ROM+DSP+SRAM
$13   = ROM+GSU
$14   = ROM+GSU+RAM
$15   = ROM+GSU+SRAM
$33   = ROM+SA1
$34   = ROM+SA1+RAM
$35   = ROM+SA1+SRAM
$10f3 = ROM+CX4
ROM_CHIPSET = $00

ROM_ROMSIZE

ROM size (1 byte)

$07 =  1 Mbit (128 kB)
$08 =  2 Mbit (256 kB)
$09 =  4 Mbit (512 kB)
$0a =  8 Mbit   (1 MB)
$0b = 16 Mbit   (2 MB)
$0c = 32 Mbit   (4 MB)

Make sure that Map.cfg corresponds to the ROM size selected.

ROM_ROMSIZE = $07

ROM_RAMSIZE

RAM size (1 byte)

$00 = None
$01 =  16 Kbit  (2 kB)
$02 =  32 Kbit  (4 kB)
$03 =  64 Kbit  (8 kB)
$04 = 128 Kbit (16 kB)
$05 = 256 Kbit (32 kB)
...etc
ROM_RAMSIZE = $00

ROM_EXPRAMSIZE

Expansion RAM size (1 byte)

$00 = None
$01 =  16 Kbit  (2 kB)
$02 =  32 Kbit  (4 kB)
$03 =  64 Kbit  (8 kB)
$04 = 128 Kbit (16 kB)
$05 = 256 Kbit (32 kB)
...etc
ROM_EXPRAMSIZE = $00

ROM_GAMECODE

Game code (4 chars)

define "ROM_GAMECODE", "SFXJ"

ROM_MAKERCODE

Maker code (2 chars)

define "ROM_MAKERCODE", "MB"

ROM_VERSION

Software minor version (1 byte)

ROM_VERSION = $00

ROM_COUNTRY

Country code (1 byte)

$00 = Japan
$01 = USA
$02 = Europe/PAL territories
...etc
ROM_COUNTRY = $00

libSFX Settings

SFX_JOY

Automatic joypad read-out

Bitwise OR each joypad to be read: JOY1 | JOY2 | JOY3 | JOY4

Disable by setting SFX_JOY to DISABLE.
To disable all automatic joypad/serial port read-out set SFX_AUTO_READOUT to DISABLE.

Read joypad bits from zero-page locations (16 bits each)∶
* SFX_joy1trig
* SFX_joy1cont
* SFX_joy2trig
* SFX_joy2cont
  ..etc

*trig = bits are on during one frame when buttons are triggered
*cont = bits are held continously as long as buttons are pushed

More info at SFX_joy#cont

SFX_JOY = JOY1 | JOY2

SFX_AUTO_READOUT_FIRST

Joypad read-out ordering

Perform joypad read-out before or after calling soft NMI.

  • NO (default) will call NMI trampoline before automatic joypad read
  • YES will perform automatic joypad read before NMI trampoline call

Note that while YES decreases joypad latency by one frame, it will incur a longer wait state within the NMI handler.

SFX_AUTO_READOUT_FIRST = NO

SFX_AUTO_READOUT

Fully disable automatic read-out

Set to DISABLE to turn off automatic joypad port read-out completely.  May be useful for that special occasion when you add custom serial port code, for instance a MIDI or keyboard interface driver...

SFX_AUTO_READOUT = ENABLE
Joypad continous read-out (word)