Add VCS links
[debian-dgen.git] / dgenrc.5
blobe82aab9bacaa8a89cec29b4d171b31cd5c599781
1 .Dd July 26, 2014
2 .Dt DGENRC 5
3 .Os
4 .Sh NAME
5 .Nm dgenrc
6 .Nd file containing settings for
7 .Xr dgen 1
8 .Sh SYNOPSIS
9 $HOME/.dgen/dgenrc
10 .Sh DESCRIPTION
11 The file
12 .Pa $HOME/.dgen/dgenrc
13 is parsed by
14 .Xr dgen 1
15 when the emuator is started. It is used to set controller keys, as well as other
16 characteristics of the emulation. The contents of this file may be overriden
17 with the contents of another similarly-formatted file, via the
18 .Fl r
19 commandline switch.
20 .Sh FILE FORMAT
21 Each rc file consists of an unlimited number of lines, which each have the
22 format 'fieldname = value'. A line may also be a comment, if it begins with the
23 hash mark (#) character.
24 .Pp
25 Each
26 .Ar fieldname
27 is prepended by a name, which identifies the type of this field:
28 .Bl -tag -width bool_*
29 .It Ar key_*
30 A key value. May be set to a key identifier listed in the
31 .Sx KEY IDENTIFIERS
32 section below.
33 .It Ar joy_*
34 A joystick/joypad value. May be set to a joystick identifier listed in the
35 .Sx JOYSTICK IDENTIFIERS
36 section below.
37 .It Ar mou_*
38 A mouse action. May be set to a mouse identifier listed in the
39 .Sx MOUSE IDENTIFIERS
40 section below.
41 .It Ar bool_*
42 A boolean value. "false", "no", and "0" values are taken as false, while
43 "true", "yes", and any number except 0 are taken as true.
44 .It Ar int_*
45 An integer value, greater than or equal to 0.
46 .It Ar str_*
47 A string value, can be empty.
48 .El
49 .Pp
50 Some fields take special value sets, which are addressed in their respective
51 sections. None of the field names or values are case-sensitive.
52 .Pp
53 The fields fall under a few basic groups. They are listed below, with their
54 default values in brackets ([]):
55 .Pp
56 All of them can be modified interactively from the prompt, as described in
57 .Xr dgen 1 .
58 .Sh CONTROLLERS
59 .Bl -tag -width xxxx
60 .It key_pad1_up [up]
61 .It key_pad1_down [down]
62 .It key_pad1_left [left]
63 .It key_pad1_right [right]
64 .It key_pad1_a [a]
65 .It key_pad1_b [s]
66 .It key_pad1_c [d]
67 .It key_pad1_x [q]
68 .It key_pad1_y [w]
69 .It key_pad1_z [e]
70 .It key_pad1_mode [backspace]
71 .It key_pad1_start [return]
72 Map keys to the first Genesis controller. Each of these fields has a
73 corresponding "key_pad2" field, to map to the second controller.
74 .It joy_pad1_up [joystick0-axis1-min]
75 .It joy_pad1_down [joystick0-axis1-max]
76 .It joy_pad1_left [joystick0-axis0-min]
77 .It joy_pad1_right [joystick0-axis0-max]
78 .It joy_pad1_a [joystick0-button0]
79 .It joy_pad1_b [joystick0-button3]
80 .It joy_pad1_c [joystick0-button1]
81 .It joy_pad1_x [joystick0-button6]
82 .It joy_pad1_y [joystick0-button4]
83 .It joy_pad1_z [joystick0-button5]
84 .It joy_pad1_mode [joystick0-button9]
85 .It joy_pad1_start [joystick0-button8]
86 Map joystick/joypad buttons to the first Genesis controller. Each of these
87 fields has a corresponding "joy_pad2" field, to map to the second controller.
88 .It bool_joystick [true]
89 Use joysticks to emulate the controllers. Note that the keyboard keys will
90 still work if this value is set. This field is only available if you have
91 joystick support enabled.
92 .It int_mouse_delay [50]
93 Number of milliseconds to wait after the last mouse motion event to release
94 buttons bound to such events.
95 .El
96 .Sh USER-DEFINED BINDINGS
97 .Bl -tag -width xxxx
98 .It bind_{keysym} Ar action
99 .It bind_{joypad} Ar action
100 .It bind_{mouse} Ar action
101 Defines a new keyboard, joystick/joypad or mouse binding to an arbitrary
102 action. These variables use the
103 .Ar keysym
104 format as defined in
105 .Sx KEY IDENTIFIERS ,
107 .Ar joypad
108 format as defined in
109 .Sx JOYSTICK IDENTIFIERS ,
110 or the
111 .Ar mouse
112 format as defined in
113 .Sx MOUSE IDENTIFIERS .
114 When
115 .Ar action
116 is prefixed with "key_", "joy_" or "mou_", it becomes an alias to the
117 corresponding variable in
118 .Sx CONTROLLERS .
119 Otherwise, it is interpreted as if entered at the prompt, and can be used to
120 modify variables or execute commands (see
121 .Xr dgenrc 5
122 for more information).
123 No bindings are defined by default.
124 .It bind_"{keysym|joypad|mouse} [{keysym|joypad|mouse} [...]]" Ar action
125 Alternate syntax that supports combining several identifiers to perform
126 .Ar action .
127 Controller types can be mixed. Identifiers are separated by spaces. To avoid
128 syntax errors, spaces must be properly escaped or quoted.
130 .Sh AUDIO
131 .Bl -tag -width xxxx
132 .It bool_sound [true]
133 Enable the sound subsystem.
134 .It int_soundrate [44100]
135 Sound frequency to play at, in hertz (Hz).
136 .It int_soundsegs [8]
137 Number of sound segments to use for sound buffering. Lower values guarantee
138 low latency. Increment this only if the sound becomes choppy.
139 .It int_soundsamples [0]
140 Size of the system sound buffer, in samples (samples are the sound unit, sound
141 rate is how many of them are played every second). Specifying 0 automatically
142 choses the safest value. If you experience sound issues int_soundsegs is
143 unable to solve, try to change this. Increasing it will cause noticeable audio
144 lag (it is unfortunately often required on slower machines).
145 .It int_volume [100]
146 Volume level, in percent. Values above 100 cause distorsion.
147 .It key_volume_inc [=]
148 .It key_volume_dec [-]
149 .It joy_volume_inc []
150 .It joy_volume_dec []
151 .It mou_volume_inc []
152 .It mou_volume_dec []
153 Bindings for volume control.
154 .It bool_mjazz [false]
155 MJazz option - puts 2 more FM chips in the Megadrive for a sort of 22 channel
156 sound boost. Can sound good. Slows things down a lot.
158 .Sh VIDEO
159 .Bl -tag -width xxxx
160 .It int_depth [0]
161 Color depth (bits per pixel). Allowed values are 0 (automatic), 8, 15, 16, 24
162 and 32. Ignored in OpenGL mode.
163 .It int_width [-1]
164 .It int_height [-1]
165 Desired window width and height.
166 .It bool_opengl [true]
167 Use the OpenGL renderer, if it is available.
168 .It bool_opengl_stretch [true]
169 Let OpenGL stretch the screen.
170 .It bool_opengl_linear [true]
171 Use GL_LINEAR for textures filtering instead of GL_NEAREST.
172 .It bool_opengl_32bit [true]
173 Use 32 bit textures. They require more memory but are usually faster than 16
174 bit textures.
175 .It bool_opengl_square [false]
176 Use square textures. Wastes a lot of memory but may solve OpenGL
177 initialization failures.
178 .It bool_fullscreen [false]
179 Try to run fullscreen, if possible.
180 .It int_scale [-1]
181 .It int_scale_x [-1]
182 .It int_scale_y [-1]
183 Amount by which to scale the rendered screen from the default resolution. See
184 scaling filters.
185 .It bool_aspect [true]
186 Retain original aspect ratio when resizing window.
187 .It key_fullscreen_toggle [alt-enter]
188 .It joy_fullscreen_toggle []
189 .It mou_fullscreen_toggle []
190 Button to toggle fullscreen mode (this may do nothing if SDL doesn't support
191 fullscreen toggling on your platform.)
192 .It int_info_height [-1]
193 Height of the text area at the bottom of the screen, in pixels. This also
194 affects the font size. Values smaller than the minimum font size make DGen
195 redirect text to stdout instead. The default value of -1 makes DGen choose the
196 proper height.
197 .It bool_fps [false]
198 Display the current number of frames per second.
199 .It bool_buttons [false]
200 Display pressed buttons. Can be used to help configuring them.
201 .It bool_swab [false]
202 Swap bytes in the video output. Sometimes useful when video output is located
203 on a different system. This is implemented as a CTV filter which must be
204 compiled-in to work.
205 .It bool_doublebuffer [true]
206 Toggle double buffering. Enabling this should prevent screen tearing from
207 happening. Disabling this may improve the number of displayed frames per
208 second on some systems.
209 .It bool_screen_thread [false]
210 When enabled, a separate thread is created to offload the displaying of
211 frames. This is only useful on slower machines where flipping video buffers
212 takes time, especially when V-sync is enabled and doing so blocks until the
213 next frame without consuming CPU time (sometimes the case when
214 bool_doublebuffer is enabled). This currently has no effect when OpenGL is
215 enabled and only works if multi-threading support is compiled-in.
217 .Sh SAVE STATES
218 .Bl -tag -width xxxx
219 .It key_slot_X [X]
220 .It joy_slot_X []
221 .It mou_slot_X []
222 Sets the current save-state slot to number X.
223 .It key_slot_next [f8]
224 .It joy_slot_next []
225 .It mou_slot_next []
226 Switch to the next save-slot.
227 .It key_slot_prev [f7]
228 .It joy_slot_prev []
229 .It mou_slot_prev []
230 Switch to the previous save-slot.
231 .It key_save [f2]
232 .It joy_save []
233 .It mou_save []
234 Saves state to the current slot.
235 .It key_load [f3]
236 .It joy_load []
237 .It mou_load []
238 Loads state from the current slot.
240 .Sh MISCELLANEOUS KEYS
241 .Bl -tag -width xxxx
242 .It key_fix_checksum [f1]
243 .It joy_fix_checksum []
244 .It mou_fix_checksum []
245 Fixes the checksum value. Some older games will freeze with a red screen if
246 the ROM has been hacked or modified with Game Genie codes. If it does, pressing
247 this, and resetting should fix the problem.
248 .It key_quit [escape]
249 .It joy_quit []
250 .It mou_quit []
251 Exit DGen or switch to the next ROM on the command-line.
252 .It key_craptv_toggle [f5]
253 .It joy_craptv_toggle []
254 .It mou_craptv_toggle []
255 Toggles Crap-TV image filters. These filters aren't available in 8 bpp mode.
256 .It key_scaling_toggle [f6]
257 .It joy_scaling_toggle []
258 .It mou_scaling_toggle []
259 Toggles scaling algorithms. See scaling_startup below.
260 .It key_reset [tab]
261 .It joy_reset []
262 .It mou_reset []
263 Restart the Genesis emulation.
264 .It key_cpu_toggle [f11]
265 .It joy_cpu_toggle []
266 .It mou_cpu_toggle []
267 Switch CPU emulators. The x86 assembly CPU emulator StarScream is fast, but
268 has glitches which affect a few games. Switching to the slower Musashi core
269 will fix these problems, at a speed penalty.
270 .It key_z80_toggle [f10]
271 .It joy_z80_toggle []
272 .It mou_z80_toggle []
273 Switch Z80 emulators. MZ80 is a bit faster than CZ80, particularly in its
274 assembly version (only available for x86), but CZ80 works with more
275 games. This key can also disable Z80 emulation.
276 .It key_stop [z]
277 .It joy_stop []
278 .It mou_stop []
279 Pause emulation, so you can concentrate on real life for a few seconds. :)
280 .It key_game_genie [f9]
281 .It joy_game_genie []
282 .It mou_game_genie []
283 Enter a Game Genie or Hex code. This key also works in stopped mode.
284 .It key_screenshot [f12]
285 .It joy_screenshot []
286 .It mou_screenshot []
287 Take a screenshot. Not available in 8 bpp mode.
288 .It key_prompt [:]
289 .It joy_prompt []
290 .It mou_prompt []
291 Pause emulation and display interactive prompt. Also works in stopped mode.
292 .It key_debug_enter [`]
293 .It joy_debug_enter []
294 .It mou_debug_enter []
295 Break into the debugger. Only meaningful if debugger support is compiled-in.
297 .Sh PREFERENCES
298 .Bl -tag -width xxxx
299 .It int_hz [60]
300 Video refresh rate. The default is 60 as in NTSC consoles.
301 .It bool_pal [false]
302 When true, a PAL console is emulated. This should be used in combination with
303 int_hz above for 50Hz emulation.
304 .It region [' ']
305 U for America (NTSC), E for Europe (PAL), J for Japan (NTSC), X for Japan
306 (PAL), or empty space for autodetection (the default).
307 Overrides bool_pal and int_hz.
308 .It str_region_order [JUEX]
309 Regions DGen is allowed to emulate when autodetection is enabled, ordered by
310 preference.
311 .It emu_m68k_startup [musa]
312 Useful when both Musashi and StarScream are compiled-in. This option selects
313 the default emulator to use ("musa" for Musashi, "star" for StarScream, "none"
314 for neither). See key_cpu_toggle.
315 .It emu_z80_startup [cz80]
316 Useful when both CZ80 and MZ80 are compiled-in. This option selects the
317 default emulator to use ("cz80", "mz80" or "none", if you want to disable it
318 altogether). See key_z80_toggle.
319 .It bool_autoload [false]
320 Automatically load the saved state from slot 0 when DGen starts.
321 .It bool_autosave [false]
322 Automatically save the saved state to slot 0 upon exit. Setting both of these
323 fields true, you can exit DGen, and automatically start a game where you left
324 off when you start it again.
325 .It bool_autoconf [true]
326 Automatically dump the current configuration to dgenrc.auto before
327 exiting. This file is always loaded before dgenrc at startup.
328 .It bool_frameskip [true]
329 Automatically skip frames, when it is necessary to maintain proper emulation
330 speed. You may want to disable sound or set int_nice to a nonzero
331 value when setting this to false.
332 .It int_nice [0]
333 If set to a non-zero value, DGen will call
334 .Xr usleep 3
335 with the specified parameter
336 after rendering each frame. This will slow the program down (if it is running
337 too fast on your computer), and allow the operating system to reclaim some
338 CPU time.
339 .It ctv_craptv_startup [off]
340 CTV filter to use by default. Available filters are "blur", "scanline",
341 "interlace" and "swab".
342 .It scaling_startup [stretch]
343 Scaler to use when display resolution is larger than original screen.
344 Available filters are "stretch", "scale", "hqx", "hqx stretch", "scale2x",
345 "scale2x stretch" and "none".
346 .It bool_show_carthead [false]
347 Show cartridge header info at startup.
348 .It bool_raw_screenshots [false]
349 Generate unfiltered screenshots.
350 .It str_rom_path ["roms"]
351 Directory where DGen should look for ROMs by default. It's relative to DGen's
352 home directory, unless an absolute path is provided.
354 .Sh DEBUGGING
355 .Bl -tag -width xxxx
356 .It bool_vdp_hide_plane_a [false]
357 .It bool_vdp_hide_plane_b [false]
358 .It bool_vdp_hide_plane_w [false]
359 .It bool_vdp_hide_sprites [false]
360 Hide various planes during frame rendering. Require VDP debugging to be
361 compiled-in.
362 .It bool_vdp_sprites_boxing [false]
363 .It int_vdp_sprites_boxing_fg [0xffff00] (yellow)
364 .It int_vdp_sprites_boxing_bg [0x00ff00] (green)
365 Toggle sprites boxing and configure its colors. Require VDP debugging to be
366 compiled-in. "fg" is for sprites with the high priority bit set, "bg" is for
367 the others. Color format is 0xRRGGBB.
369 .Sh EXAMPLES
370 See the file "sample.dgenrc" in the DGen/SDL distribution.
371 .Sh KEY IDENTIFIERS
372 A key identifier can have the prefixes "shift-", "ctrl-", "alt-" and "meta-",
373 or any combination thereof, to require that the specified modifier be pressed
374 in combination with the key. For example, the identifier "alt-enter" would
375 correspond to holding down the Alt key while pressing Enter.
377 The "shift-" modifier only works with keys that don't generate symbols (such
378 as arrow keys). Otherwise their UTF-8 representation must be used directly.
380 The numbers "0" through "9" ("kp_0" through "kp_9" for the numeric keypad),
381 letters "A" through "Z", and function keys "F1" through "F12" map to their key
382 equivalents.
383 In addition, the following identifiers map to their similarly-labeled key
384 counterparts. Identifiers on the same line map to the same key:
385 .Bd -literal -offset indent
386 escape
387 backspace
389 capslock        caps_lock
390 lshift          shift_l
391 rshift          shift_r
392 lctrl           ctrl_l
393 lmeta           meta_l
394 lalt            alt_l
395 ralt            alt_r
396 rmeta           meta_r
397 rctrl           ctrl_r
398 return          enter
399 space
401 scrollock       scroll_lock
402 numlock         num_lock
404 insert
405 home
406 page_up         pageup
407 delete
409 page_down       pagedown
410 left
411 right
413 down
415 kp_home
416 kp_up
417 kp_pageup       kp_page_up
418 kp_left
419 kp_right
420 kp_end
421 kp_down
422 kp_pagedown     kp_page_down
423 kp_insert
424 kp_delete       kp_period
426 kp_enter
427 kp_divide
428 kp_minus
429 kp_multiply
430 kp_plus
432 .Sh JOYSTICK IDENTIFIERS
433 Like key identifiers, joystick (or joypad) identifiers describe a joystick
434 event. Each detected joystick is numbered starting from 0. Three different
435 event types are supported.
436 .Bl -tag -width xxxx
437 .It Buttons: joystickX-buttonY
438 For joystick/joypad number X, button number Y. "button" can be abbreviated
439 as "b".
440 .It Axes: joystickX-axisY-min, joystickX-axisY-max
441 For joystick/joypad number X, axis number Y, and its position, which is either
442 "min" (also "n", "negative") or "max" (also "p", "positive"). "axis" can be
443 abbreviated as "a".
444 .It Hats: joystickX-hatY-{direction}
445 For joystick/joypad number X, hat number Y and direction. "hat" can be
446 abbreviated as "h". Possible directions are "up", "right", "down", "left".
448 .Sh MOUSE IDENTIFIERS
449 These identifiers describe a mouse event. Each detected mouse is numbered
450 starting from 0. Two different event types are supported.
451 .Bl -tag -width xxxx
452 .It Buttons: mouseX-buttonY
453 For mouse number X, button number Y. "button" can be abbreviated as "b".
454 .It Motions: mouseX-{direction}
455 For mouse number X and direction. Possible directions are "up", "right",
456 "down", "left".
458 .Sh SEE ALSO
459 .Xr dgen 1
460 .Sh AUTHORS
461 This manual page was written by
462 .An Joe Groff Aq joe@pknet.com .
463 .An Updated by zamaz Aq zamaz@users.sourceforge.net .