Mednafen
--------
Mednafen is a multi-system emulator.

The Jolly Good API port of Mednafen is designed for use with content for:
  Atari Lynx
  Nintendo Virtual Boy
  NEC PC Engine/TurboGrafx-16/SuperGrafx
  NEC PC Engine CD/TurboDuo
  NEC PC-FX
  Sony PlayStation
  Sega Mega Drive/Genesis
  Sega Saturn
  Super Nintendo Entertainment System/Super Famicom
  SNK Neo Geo Pocket Color
  Bandai WonderSwan/Color

Source for the emulator core is unmodified from upstream sources.

Confirm bugs exist in upstream before reporting bugs to upstream, or may your
pillow be forever infested with slugs.

Compiling
---------
Make sure you have The Jolly Good API's header files installed. If you did
not install them, you will be required to include their path in CXXFLAGS.

GNU Make's default behaviour for compiling C++ sources is to use g++. If your
platform of choice uses an unpatched GNU Make, you will need to override the
CXX implicit variable if you wish to use a different compiler.

This emulator core also has external dependencies:
  libFLAC, libzstd, lzo, zlib

Options:
  DISABLE_MODULE - Set to a non-zero value to disable building the module.
  ENABLE_STATIC_JG - Set to a non-zero value to build a static JG archive.
  ENABLE_AVX - Set to a non-zero value to enable GNU-style AVX inline assembly.
  USE_EXTERNAL_TRIO - Set non-zero to use an external trio ( Requires >= 1.17 ).

Linux:
  make

macOS:
  make

BSD:
  gmake

Windows (MSYS2):
(From repository root)
  cd include
  rm mednafen
  ln -s ../src mednafen
  cd ../jollygood
  make

Cross Compile:
(For example compiling on Linux for MinGW)
  AR=x86_64-w64-mingw32-ar \
  CC=x86_64-w64-mingw32-cc \
  CXX=x86_64-w64-mingw32-c++ \
  CC_FOR_BUILD=x86_64-pc-linux-gnu-cc \
  PKG_CONFIG=x86_64-w64-mingw32-pkg-config \
  STRIP=x86_64-w64-mingw32-strip \
  make

The build will be output to "mednafen/". This directory may be used as is
locally by copying it to your local "cores" directory, or may be installed
system-wide using the "install" target specified in the Makefile.

Input Devices
-------------
The Jolly Good API port of Mednafen uses a game database to determine which
input devices must be plugged in. The following input devices are currently
supported:

Mega Drive
  6 Button Control Pad

PC Engine Family
  TurboPad

PC-FX
  PC-FX Control Pad

PlayStation
  DualShock
  GunCon
  Justifier
  Multitap

SNES
  SNES Control Pad
  SNES Mouse

Saturn
  Control Pad
  3D Control Pad
  Multi-Player Adaptor
  Virtua Gun/Stunner

Lynx
Neo Geo Pocket Color
Virtual Boy
WonderSwan

Settings
--------
fip_check = 1
0 = Disable File Include Path Check, 1 = Enable File Include Path Check

pce_fast = 0
0 = Disable (Accurate Mode), 1 = Enable (Fast Mode)

ps1_portswap = 0
0 = Disable, 1 = Enable

ss3dpad_disable = 0
0 = Enable 3D Pad, 1 = Disable 3D Pad

vb_palette = 0
0 = Red/Black (2D), 1 = White/Black (2D), 2 = Magenta/Black (2D),
3 = Red/Blue, 4 = Red/Cyan, 5 = Red/Electric Cyan,
6 = Red/Green, 7 = Green/Magenta, 8 = Yellow/Blue

wswan_byear = 1989
N = Birth Year

wswan_bmonth = 6
N = Birth Month

wswan_bmonth = 23
N = Birth Day

wswan_blood = 2
0 = A, 1 = B, 2 = O, 3 = AB

wswan_sex = 0
0 = Female, 1 = Male
