DGENRC(5)
๐ NAME ๐ โ DGENRC(5) ๐
okay so bestie, welcome to the File Formats Manual page for DGENRC(5) โ itโs literally all about dgenrc, the file containing settings for dgen(1). โจ
๐ SYNOPSIS ๐
$HOME/.dgen/dgenrc
๐ฆ DESCRIPTION ๐ฆ
The file $HOME/.dgen/dgenrc is parsed by dgen(1) when the emulator is started. Itโs used to set controller keys, as well as other characteristics of the emulation. The contents of this file may be overridden 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 IDENTIFIERSโ section below.joy_*โ a joystick/joypad value. May be set to a joystick identifier listed in the โJOYSTICK IDENTIFIERSโ section below.mou_*โ a mouse action. May be set to a mouse identifier listed in the โMOUSE IDENTIFIERSโ 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.str_*โ a string value, can be empty.
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 ([]):
All of them can be modified interactively from the prompt, as described in dgen(1).
๐ฎ CONTROLLERS ๐ฎ
key_pad1_upโ default:upkey_pad1_downโ default:downkey_pad1_leftโ default:leftkey_pad1_rightโ default:rightkey_pad1_aโ default:akey_pad1_bโ default:skey_pad1_cโ default:dkey_pad1_xโ default:qkey_pad1_yโ default:wkey_pad1_zโ default:ekey_pad1_modeโ default:backspacekey_pad1_startโ default:return
Map keys to the first Genesis controller. Each of these fields has a corresponding key_pad2 field, to map to the second controller. ๐น๏ธ
joy_pad1_upโ default:joystick0-axis1-minjoy_pad1_downโ default:joystick0-axis1-maxjoy_pad1_leftโ default:joystick0-axis0-minjoy_pad1_rightโ default:joystick0-axis0-maxjoy_pad1_aโ default:joystick0-button0joy_pad1_bโ default:joystick0-button3joy_pad1_cโ default:joystick0-button1joy_pad1_xโ default:joystick0-button6joy_pad1_yโ default:joystick0-button4joy_pad1_zโ default:joystick0-button5joy_pad1_modeโ default:joystick0-button9joy_pad1_startโ default:joystick0-button8
Map joystick/joypad buttons to the first Genesis controller. Each of these fields has a corresponding joy_pad2 field, to map to the second controller.
bool_joystickโ default:true. 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_mouse_delayโ default:50. Number of milliseconds to wait after the last mouse motion event to release buttons bound to such events.
โจ USER-DEFINED BINDINGS โจ
bind_{keysym} actionbind_{joypad} actionbind_{mouse} action
Defines a new keyboard, joystick/joypad or mouse binding to an arbitrary action. These variables use the keysym format as defined in โKEY IDENTIFIERSโ, the joypad format as defined in โJOYSTICK IDENTIFIERSโ, or the mouse format as defined in โMOUSE IDENTIFIERSโ. When action is prefixed with "key_", "joy_" or "mou_", it becomes an alias to the corresponding variable in โCONTROLLERSโ. Otherwise, it is interpreted as if entered at the prompt, and can be used to modify variables or execute commands (see dgenrc(5) for more information). No bindings are defined by default. ๐
bind_"{keysym|joypad|mouse} [{keysym|joypad|mouse} [...]]" actionโ alternate syntax that supports combining several identifiers to perform action. Controller types can be mixed. Identifiers are separated by spaces. To avoid syntax errors, spaces must be properly escaped or quoted.
๐ง AUDIO ๐ง
bool_soundโ default:true. Enable the sound subsystem.int_soundrateโ default:44100. Sound frequency to play at, in hertz (Hz).int_soundsegsโ default: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โ default: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). Specifying0automatically choses the safest value. If you experience sound issuesint_soundsegsis unable to solve, try to change this. Increasing it will cause noticeable audio lag (it is unfortunately often required on slower machines).int_volumeโ default:100. Volume level, in percent. Values above 100 cause distorsion.key_volume_incโ default:=key_volume_decโ default:-joy_volume_incโ default:[]joy_volume_decโ default:[]mou_volume_incโ default:[]mou_volume_decโ default:[]
Bindings for volume control. ๐
bool_mjazzโ default:false. MJazz option - puts 2 more FM chips in the Megadrive for a sort of 22 channel sound boost. Can sound good. Slows things down a lot.
๐ผ๏ธ VIDEO ๐ผ๏ธ
int_depthโ default:0. Color depth (bits per pixel). Allowed values are0(automatic),8,15,16,24and32. Ignored in OpenGL mode.int_widthโ default:-1int_heightโ default:-1
Desired window width and height.
bool_openglโ default:true. Use the OpenGL renderer, if it is available.bool_opengl_stretchโ default:true. Let OpenGL stretch the screen.bool_opengl_linearโ default:true. UseGL_LINEARfor textures filtering instead ofGL_NEAREST.bool_opengl_32bitโ default:true. Use 32 bit textures. They require more memory but are usually faster than 16 bit textures.bool_opengl_squareโ default:false. Use square textures. Wastes a lot of memory but may solve OpenGL initialization failures.bool_fullscreenโ default:false. Try to run fullscreen, if possible.int_scaleโ default:-1int_scale_xโ default:-1int_scale_yโ default:-1
Amount by which to scale the rendered screen from the default resolution. See scaling filters.
bool_aspectโ default:true. Retain original aspect ratio when resizing window.key_fullscreen_toggleโ default:alt-enterjoy_fullscreen_toggleโ default:[]mou_fullscreen_toggleโ default:[]
Button to toggle fullscreen mode (this may do nothing if SDL doesn't support fullscreen toggling on your platform.)
int_info_heightโ default:-1. Height of the text area at the bottom of the screen, in pixels. This also affects the font size. Values smaller than the minimum font size make DGen redirect text tostdoutinstead. The default value of-1makes DGen choose the proper height.bool_fpsโ default:false. Display the current number of frames per second.bool_buttonsโ default:false. Display pressed buttons. Can be used to help configuring them.bool_swabโ default:false. Swap bytes in the video output. Sometimes useful when video output is located on a different system. This is implemented as a CTV filter which must be compiled-in to work.bool_doublebufferโ default:true. Toggle double buffering. Enabling this should prevent screen tearing from happening. Disabling this may improve the number of displayed frames per second on some systems.bool_screen_threadโ default:false. When enabled, a separate thread is created to offload the displaying of frames. This is only useful on slower machines where flipping video buffers takes time, especially when V-sync is enabled and doing so blocks until the next frame without consuming CPU time (sometimes the case whenbool_doublebufferis enabled). This currently has no effect when OpenGL is enabled and only works if multi-threading support is compiled-in.
๐พ SAVE STATES ๐พ
key_slot_Xโ default:Xjoy_slot_Xโ default:[]mou_slot_Xโ default:[]
Sets the current save-state slot to number X.
key_slot_nextโ default:f8joy_slot_nextโ default:[]mou_slot_nextโ default:[]
Switch to the next save-slot.
key_slot_prevโ default:f7joy_slot_prevโ default:[]mou_slot_prevโ default:[]
Switch to the previous save-slot.
key_saveโ default:f2joy_saveโ default:[]mou_saveโ default:[]
Saves state to the current slot.
key_loadโ default:f3joy_loadโ default:[]mou_loadโ default:[]
Loads state from the current slot.
๐ ๏ธ MISCELLANEOUS KEYS ๐ ๏ธ
key_fix_checksumโ default:f1joy_fix_checksumโ default:[]mou_fix_checksumโ default:[]
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โ default:escapejoy_quitโ default:[]mou_quitโ default:[]
Exit DGen or switch to the next ROM on the command-line.
key_craptv_toggleโ default:f5joy_craptv_toggleโ default:[]mou_craptv_toggleโ default:[]
Toggles Crap-TV image filters. These filters aren't available in 8 bpp mode.
key_scaling_toggleโ default:f6joy_scaling_toggleโ default:[]mou_scaling_toggleโ default:[]
Toggles scaling algorithms. See scaling_startup below.
key_resetโ default:tabjoy_resetโ default:[]mou_resetโ default:[]
Restart the Genesis emulation.
key_cpu_toggleโ default:f11joy_cpu_toggleโ default:[]mou_cpu_toggleโ default:[]
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โ default:f10joy_z80_toggleโ default:[]mou_z80_toggleโ default:[]
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โ default:zjoy_stopโ default:[]mou_stopโ default:[]
Pause emulation, so you can concentrate on real life for a few seconds. :)
key_game_genieโ default:f9joy_game_genieโ default:[]mou_game_genieโ default:[]
Enter a Game Genie or Hex code. This key also works in stopped mode.
key_screenshotโ default:f12joy_screenshotโ default:[]mou_screenshotโ default:[]
Take a screenshot. Not available in 8 bpp mode.
key_promptโ default::joy_promptโ default:[]mou_promptโ default:[]
Pause emulation and display interactive prompt. Also works in stopped mode.
key_debug_enterโ default: `joy_debug_enterโ default:[]mou_debug_enterโ default:[]
Break into the debugger. Only meaningful if debugger support is compiled-in.
๐ PREFERENCES ๐
Okay bestie, this is where you set the whole vibe before DGen even gets going โจ Each preference key has its default in brackets, and yes, weโre keeping every single one.
int_hz[60]โ video refresh rate. The default is60, just like NTSC consoles.bool_pal[false]โ whentrue, a PAL console is emulated. This should be used in combination withint_hzabove for50Hzemulation.region[' ']โUfor America (NTSC),Efor Europe (PAL),Jfor Japan (NTSC),Xfor Japan (PAL), or empty space for autodetection (the default). Overridesbool_palandint_hz.str_region_order[JUEX]โ the regions DGen is allowed to emulate when autodetection is enabled, ordered by preference.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). Seekey_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). Seekey_z80_toggle.bool_autoload[false]โ automatically load the saved state from slot0when DGen starts.bool_autosave[false]โ automatically save the saved state to slot0upon exit. Set both of these fields totrue, and you can exit DGen and automatically start a game where you left off when you start it again.bool_autoconf[true]โ automatically dump the current configuration todgenrc.autobefore exiting. This file is always loaded beforedgenrcat startup.bool_frameskip[true]โ automatically skip frames when it is necessary to maintain proper emulation speed. You may want to disable sound or setint_niceto a nonzero value when setting this tofalse.int_nice[0]โ if set to a non-zero value, DGen will callusleep(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","interlace"and"swab".scaling_startup[stretch]โ scaler to use when display resolution is larger than original screen. Available filters are"stretch","scale","hqx","hqx stretch","scale2x","scale2x stretch"and"none".bool_show_carthead[false]โ show cartridge header info at startup.bool_raw_screenshots[false]โ generate unfiltered screenshots.str_rom_path["roms"]โ directory where DGen should look for ROMs by default. Itโs relative to DGenโs home directory, unless an absolute path is provided.
๐ ๏ธ DEBUGGING ๐ ๏ธ
These are the hidey debug options, bestie. The hide-options hide various planes during frame rendering, and they require VDP debugging to be compiled-in ๐
bool_vdp_hide_plane_a[false]bool_vdp_hide_plane_b[false]bool_vdp_hide_plane_w[false]bool_vdp_hide_sprites[false]โ hide various planes during frame rendering. Requires VDP debugging to be compiled-in.
The next three toggle sprites boxing and configure its colors. They require VDP debugging to be compiled-in. "fg" is for sprites with the high priority bit set, "bg" is for the others. Color format is 0xRRGGBB ๐จ
bool_vdp_sprites_boxing[false]int_vdp_sprites_boxing_fg[0xffff00](yellow)int_vdp_sprites_boxing_bg[0x00ff00](green)
๐ธ EXAMPLES ๐ธ
See the file "sample.dgenrc" in the DGen/SDL distribution. Itโs giving โjust copy the homework but change it a littleโ energy, except itโs literally meant for that ๐
โจ๏ธ 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 "shift-" modifier only works with keys that donโt generate symbols (such as arrow keys). Otherwise their UTF-8 representation must be used directly. No cap.
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
๐ฎ JOYSTICK IDENTIFIERS ๐ฎ
Like key identifiers, joystick (or joypad) identifiers describe a joystick event. Each detected joystick is numbered starting from 0. Three different event types are supported, bestie:
- Buttons:
joystickX-buttonYโ for joystick/joypad numberX, button numberY."button"can be abbreviated as"b". - Axes:
joystickX-axisY-min,joystickX-axisY-maxโ for joystick/joypad numberX, axis numberY, and its position, which is either"min"(also"n","negative") or"max"(also"p","positive")."axis"can be abbreviated as"a". - Hats:
joystickX-hatY-{direction}โ for joystick/joypad numberX, hat numberYand direction."hat"can be abbreviated as"h". Possible directions are"up","right","down","left".
๐ฑ๏ธ MOUSE IDENTIFIERS ๐ฑ๏ธ
These identifiers describe a mouse event. Each detected mouse is numbered starting from 0. Two different event types are supported ๐ญ
- Buttons:
mouseX-buttonYโ for mouse numberX, button numberY."button"can be abbreviated as"b". - Motions:
mouseX-{direction}โ for mouse numberXand direction. Possible directions are"up","right","down","left".
๐ SEE ALSO ๐
๐ AUTHORS ๐
This manual page was written by Joe Groff <joe@pknet.com>. Updated by zamaz <zamaz@users.sourceforge.net>.
Okay thatโs a wrap, bestie ๐ซถ This one comes from Debian, dated July 26, 2014, and itโs DGENRC(5) ๐โจ
๐ฆ where this page comes from
- arch rolling: dgen-sdl 1.33-6 ยท BSD
- nixos 26.05: dgen-sdl 1.33
- nixpkgs unstable: dgen-sdl 1.33
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms