DGENRC(5)

NAME
dgenrc - file containing settings for dgen(1)

SYNOPSIS
$HOME/.dgen/dgenrc

DESCRIPTION
The file $HOME/.dgen/dgenrc is parsed by dgen(1) when the emuator is started. It is used to set controller keys, as well as other characteristics of the emulation. The contents of this file may be overriden with the contents of another similarly-formatted file, via the -r commandline switch.

FILE FORMAT
Each rc file consists of an unlimited number of lines, which each have the format 'fieldname = value'. A line may also be a comment, if it begins with the hash mark (#) character.

Each fieldname is prepended by a name, which identifies the type of this field:

key_*
    A key value. May be set to a key identifier listed in the KEY INDENTIFIERS section below.

bool_*
    A boolean value. "false", "no", and "0" values are taken as false, while "true", "yes", and any number except 0 are taken as true.

int_*
    An integer value, greater than or equal to 0.

Some fields take special value sets, which are addressed in their respective sections. None of the field names or values are case-sensitive.

The fields fall under a few basic groups. They are listed below, with their default values in brackets ([]):

CONTROLLERS

key_pad1_up [up]

key_pad1_down [down]

key_pad1_left [left]

key_pad1_right [right]

key_pad1_a [a]

key_pad1_b [s]

key_pad1_c [d]

key_pad1_x [q]

key_pad1_y [w]

key_pad1_z [e]

key_pad1_mode [backspace]

key_pad1_start [return]
    Map keys to the first Genesis controller. Each of these fields has a corresponding "key_pad2" field, to map to the second controller.

bool_joystick [false]
    Use joysticks to emulate the controllers. Note that the keyboard keys will still work if this value is set. This field is only available if you have joystick support enabled.

int_joystick1_dev [0]

int_joystick2_dev [1]
    Select which joystick device to use. Parameter is an integer passed to SDL_JoystickOpen().

joypadX_bY
    Maps button number Y, on joystick X to a Genesis controller button. Valid button values are "a", "b", "c", "x", "y", "z", "mode", and "start". Joystick 1 will always emulate controller 1, and joystick 2 will always emulate controller 2.

AUDIO

bool_sound [true]
    Enable the sound subsystem.

int_soundrate [22050]
    Sound frequency to play at, in hertz (Hz).

int_soundsegs [8]
    Number of sound segments to use for sound buffering. Lower values guarantee low latency. Increment this only if the sound becomes choppy.

int_soundsamples [0]
    Size of the system sound buffer, in samples (samples are the sound unit, sound rate is how many of them are played every second). Specifying 0 automatically choses the safest value. If you experience sound issues int_soundsegs is unable to solve, try to change this. Increasing it will cause noticeable audio lag (it is unfortunately often required on slower machines).

VIDEO

int_depth [0]
    Color depth (bits per pixel). Allowed values are 0 (automatic), 8, 15, 16, 24 and 32. Ignored in OpenGL mode.

bool_opengl [true]
    Use the OpenGL renderer, if it is available.

int_opengl_width [640]
    The width of the OpenGL window to use.

int_opengl_height [480]
    The height of the OpenGL window to use.

bool_opengl_ratio [true]
    Retain original aspect ratio when resizing OpenGL window.

bool_opengl_linear [true]
    Use GL_LINEAR for textures filtering instead of GL_NEAREST.

bool_opengl_32bit [false]
    Use 32 bit textures. The only reason you may want to try this option is if somehow 16 bit textures don't work properly.

bool_opengl_swap [false]
    Swap textures endianness. Sometimes useful when video output is located on a different system.

bool_fullscreen [false]
    Try to run fullscreen, if possible.

int_scale [1]
    Amount by which to scale the window from the default 320x240 resolution. This does not affect the OpenGL renderer; it only has effect if the software renderer is in use.

key_fullscreen_toggle [alt-enter]
    Key to toggle fullscreen mode (this may do nothing if SDL doesn't support fullscreen toggling on your platform.)

SAVE STATES

key_slot_X [X]
    Sets the current save-state slot to number X.

key_save [f2]
    Saves state to the current slot.

key_load [f3]
    Loads state from the current slot.

MISCELLANEOUS KEYS

key_fix_checksum [f1]
    Fixes the checksum value. Some older games will freeze with a red screen if the ROM has been hacked or modified with Game Genie codes. If it does, pressing this, and resetting should fix the problem.

key_quit [escape]
    Exit DGen.

key_craptv_toggle [f5]
    Toggles Crap-TV image filters. These filters aren't available in 8 bpp mode.

key_reset [tab]
    Restart the Genesis emulation.

key_cpu_toggle [f11]
    Switch CPU emulators. The x86 assembly CPU emulator StarScream is fast, but has glitches which affect a few games. Switching to the slower Musashi core will fix these problems, at a speed penalty.

key_z80_toggle [f10]
    Switch Z80 emulators. MZ80 is a bit faster than CZ80, particularly in its assembly version (only available for x86), but CZ80 works with more games. This key can also disable Z80 emulation.

key_stop [z]
    Pause emulation, so you can concentrate on real life for a few seconds. :)

key_game_genie [f9]
    Enter a Game Genie or Hex code. This key also works in stopped mode.

key_screenshot [f12]
    Take a screenshot. Not available in 8 bpp mode.

PREFERENCES

emu_m68k_startup [musa]
    Useful when both Musashi and StarScream are compiled-in. This option selects the default emulator to use ("musa" for Musashi, "star" for StarScream, "none" for neither). See key_cpu_toggle.

emu_z80_startup [cz80]
    Useful when both CZ80 and MZ80 are compiled-in. This option selects the default emulator to use ("cz80", "mz80" or "none", if you want to disable it altogether). See key_z80_toggle.

bool_autoload [false]
    Automatically load the saved state from slot 0 when DGen starts.

bool_autosave [false]
    Automatically save the saved state to slot 0 upon exit. Setting both of these fields true, you can exit DGen, and automatically start a game where you left off when you start it again.

bool_frameskip [true]
    Automatically skip frames, when it is necessary to maintain proper emulation speed. You may want to disable sound or set int_nice to a nonzero value when setting this to false.

bool_fullscreen [false]
    Run in fullscreen mode, if it is available.

int_scale [1]
    Amount by which to scale the window. Setting this to 2 will double the dimensions of the window, 3 will triple it, and so on. It must be a positive integer.

bool_opengl [false]
    Use OpenGL mode to render the screen, if available.

int_opengl_width [640]
    Width of the OpenGL resolution to use.

int_opengl_height [480]
    Height of the OpenGL resolution to use.

int_nice [0]
    If set to a non-zero value, DGen will call usleep(3) with the specified parameter after rendering each frame. This will slow the program down (if it is running too fast on your computer), and allow the operating system to reclaim some CPU time.

ctv_craptv_startup [off]
    CTV filter to use by default. Available filters are "blur", "scanline" and "interlace".

bool_show_carthead [false]
    Show cartridge header info at startup.

EXAMPLES
See the file "sample.dgenrc" in the DGen/SDL distribution.

KEY IDENTIFIERS
A key identifier can have the prefixes "shift-", "ctrl-", "alt-" and "meta-", or any combination thereof, to require that the specified modifier be pressed in combination with the key. For example, the identifier "alt-enter" would correspond to holding down the Alt key while pressing Enter.

The numbers "0" through "9" ("kp_0" through "kp_9" for the numeric keypad), letters "A" through "Z", and function keys "F1" through "F12" map to their key equivalents. In addition, the following identifiers map to their similarly-labeled key counterparts. Identifiers on the same line map to the same key:

    escape
    backspace
    tab
    capslock	caps_lock
    lshift		shift_l
    rshift		shift_r
    lctrl		ctrl_l
    lmeta		meta_l
    lalt		alt_l
    ralt		alt_r
    rmeta		meta_r
    rctrl		ctrl_r
    return		enter
    space
    scrollock	scroll_lock
    numlock		num_lock
    insert
    home
    page_up		pageup
    delete
    end
    page_down	pagedown
    left
    right
    up
    down
    kp_home
    kp_up
    kp_pageup	kp_page_up
    kp_left
    kp_right
    kp_end
    kp_down
    kp_pagedown	kp_page_down
    kp_insert
    kp_delete	kp_period
    kp_enter
    kp_divide
    kp_minus
    kp_multiply
    kp_plus
    `	~
    -	_
    =	+
    	|
    [	{
    ]	}
    :	;
    ,	<
    .	>
    /	?

SEE ALSO
dgen(1)

AUTHORS
This manual page was written by Joe Groff <joe@pknet.com>. Updated by zamaz <zamaz@users.sourceforge.net>.