Tree [1c196e] master v1.33 /
History



File Date Author Commit
cyclone 2012-12-18 zamaz zamaz [c2c30b] md: implement VDP interrupts properly
cz80 2014-06-22 zamaz zamaz [773f6f] cz80: document Cz80_Set_Ctx()
doc 2013-01-09 Egelmex Egelmex [c4e59f] sdl: add Doxygen comments to sdl.cpp and font.cpp
drz80 2014-06-23 zamaz zamaz [2ed16e] drz80: fix struct DrZ80 documentation
dz80 2014-06-22 zamaz zamaz [c41893] dz80: fix possibly uninitialized variable warning
hqx 2012-03-04 zamaz zamaz [35505f] hqx: remove ^M leftovers
linenoise 2012-12-16 zamaz zamaz [a7dc5b] linenoise: fix "reverse-i-search" flickering in...
musa 2014-06-24 zamaz zamaz [2bde36] musa: fix minor compilation warnings (Clang)
mz80 2014-06-22 zamaz zamaz [3a01c7] mz80: replace malloc() calls with statics
scale2x 2014-06-24 zamaz zamaz [050af6] scale2x: fix minor compilation warnings (Clang)
sdl 2014-07-26 zamaz zamaz [530a29] sdl: do not grab mouse while debugging
star 2013-01-01 zamaz zamaz [836ac1] star: update to StarScream 0.26d
.gitignore 2014-07-24 zamaz zamaz [9e1c81] Update .gitignore
AUTHORS 2014-07-26 zamaz zamaz [1c196e] Update ChangeLog for v1.33
BUGS 2014-06-21 zamaz zamaz [189363] cz80: fix interrupt mode 0
COPYING 2014-06-18 zamaz zamaz [1838ef] dz80: add dZ80 to the build system and fix mino...
ChangeLog 2014-07-26 zamaz zamaz [1c196e] Update ChangeLog for v1.33
Makefile.am 2014-06-18 zamaz zamaz [1838ef] dz80: add dZ80 to the build system and fix mino...
Makefile.asm.am 2011-09-10 zamaz zamaz [cf5504] Configure and makefiles refactoring
NEWS 2011-08-20 zamaz zamaz [93a7e4] Fix automake's complains
README 2008-05-12 tamentis tamentis [7b4de3] Initial revision
autogen.sh 2012-12-09 zamaz zamaz [48eceb] configure: add autogen.sh
ckvp.c 2013-01-01 zamaz zamaz [337dca] doc: fix Doxygen warnings
ckvp.h 2012-12-14 egelmex egelmex [42a31d] ckvp: convert comments to Doxygen style
configure.ac 2014-07-26 zamaz zamaz [1c196e] Update ChangeLog for v1.33
debug.cpp 2014-07-15 zamaz zamaz [df607d] sdl: fix sound (re)initialization
debug.h 2014-06-21 zamaz zamaz [a552d0] debug: refactor to run without Musashi
decode.c 2012-11-13 Egelmex Egelmex [1f3fc3] Add Doxygen comments to decode.c and md.cpp
decode.h 2012-11-13 Egelmex Egelmex [1f3fc3] Add Doxygen comments to decode.c and md.cpp
dgen.1 2014-07-26 zamaz zamaz [1c196e] Update ChangeLog for v1.33
dgen_tobin.1 2011-10-28 zamaz zamaz [9f551d] tobin: rename this utility "dgen_tobin"
dgenrc.5 2014-07-26 zamaz zamaz [1c196e] Update ChangeLog for v1.33
fm.c 2012-12-09 zamaz zamaz [7e605b] fm: implement MJazz
fm.h 2012-12-09 zamaz zamaz [7e605b] fm: implement MJazz
graph.cpp 2008-05-12 tamentis tamentis [7b4de3] Initial revision
joystick.cpp 2014-07-08 zamaz zamaz [e28faa] Fix older GCC compilation warnings
main.cpp 2014-07-15 zamaz zamaz [df607d] sdl: fix sound (re)initialization
md.cpp 2014-07-15 zamaz zamaz [b895bd] Fix minor bugs related to Pico initialization
md.h 2014-07-06 zamaz zamaz [7fe554] fm: improve DAC rendering
mdfr.cpp 2014-07-08 zamaz zamaz [e28faa] Fix older GCC compilation warnings
mem.cpp 2013-08-09 Giuseppe Gatta Giuseppe Gatta [0c1ca8] Add preliminary I/O support for Sega Pico
mem.h 2012-10-25 egelmex egelmex [6cf881] mem: refactoring and commenting mem.cpp
memcpy.h 2011-11-06 zamaz zamaz [9efd26] Remove extra spaces
myfm.cpp 2014-07-15 zamaz zamaz [df607d] sdl: fix sound (re)initialization
pd.h 2014-07-15 zamaz zamaz [df607d] sdl: fix sound (re)initialization
ras-drawplane.h 2013-01-01 zamaz zamaz [599015] ras: ensure data offset from the name table wra...
ras.cpp 2013-01-01 zamaz zamaz [73acdd] ras: add a workaround for a crash caused by GCC...
rc-vars.h 2014-07-14 zamaz zamaz [d5159a] sdl: use input coordinates to control Pico pen ...
rc.cpp 2014-07-26 zamaz zamaz [fda485] rc: add lower bound to int_soundrate
rc.h 2014-07-26 zamaz zamaz [fda485] rc: add lower bound to int_soundrate
romload.c 2012-02-20 zamaz zamaz [b344aa] rc: add "str_rom_path" variable
romload.h 2012-02-20 zamaz zamaz [b344aa] rc: add "str_rom_path" variable
sample.dgenrc 2014-07-14 zamaz zamaz [0815d9] sdl: implement mouse input support
save.cpp 2014-07-07 zamaz zamaz [cd5873] save: import/export missing YM2612 and DAC info...
sn76496.c 2011-11-28 zamaz zamaz [594714] Remove driver.h
sn76496.h 2011-11-06 zamaz zamaz [6ae78d] Improve audio buffer management
sn76496u.c 2011-11-06 zamaz zamaz [6ae78d] Improve audio buffer management
system.c 2014-07-08 zamaz zamaz [31dffb] system: add backward compatibility for old liba...
system.h 2013-02-06 zamaz zamaz [d7cc9d] rc: implement support for arbitrary keysym/joyp...
tobin.c 2011-11-06 zamaz zamaz [b2ac6f] tobin: do not link it with unnecessary libraries
vdp.cpp 2012-12-26 zamaz zamaz [096c2b] ras: fix sprites priority bit handling
x86_ctv.asm 2012-01-29 zamaz zamaz [7b0879] Ensure non-executable stack on ELF targets
x86_memcpy.asm 2012-01-29 zamaz zamaz [7b0879] Ensure non-executable stack on ELF targets
x86_mmx_memcpy.asm 2012-01-29 zamaz zamaz [7b0879] Ensure non-executable stack on ELF targets
x86_tiles.asm 2012-01-29 zamaz zamaz [7b0879] Ensure non-executable stack on ELF targets

Read Me

--------------------------------------------------------------------------------
WHAT IS THIS?
--------------------------------------------------------------------------------
This is DGen/SDL, a semi-fantastic emulator for Unix-esque operating systems
supported by the Simple DirectMedia Layer (SDL) library. It produces a virtual
environment in which Sega Genesis (MegaDrive outside the US) games may run
with fairly accurate audio and video.

--------------------------------------------------------------------------------
HOW DO I INSTALL IT?
--------------------------------------------------------------------------------
You'll need SDL version 1.0 or greater. Fetch it from
http://www.libsdl.org/, and install it. Make sure, if you're
using prepackaged rpm's or deb's, to get both the SDL and SDL-devel packages.

For Intel/AMD/Cyrix CPUs, you'll also need NASM, which can be found at
http://www.web-sites.co.uk/nasm/, in order to utilize the assembler
optimizations. *WARNING*: The NASM that comes prepackaged with RedHat 7.x is
broken! Install the rpm from RedHat 6.x, and it should work. One such rpm can
be found at http://pknet.com/~joe/nasm-0.98-2.i386.rpm.

Now you should be able to build and install DGen like any other
autoconf-using package:

  sh ./configure && make && make install

If you have egcs or GCC >= 2.95, you can give configure the '--with-extra-opt'
switch, which will add some insane optimization to the CFLAGS used to compile
the program, giving the binary a very decent speed boost.

The control configuration and other options available in DGen/SDL are set
through a file dgenrc, which should be in the location $HOME/.dgen/dgenrc.
The sample.dgenrc file in this archive documents all the fields, and so does the
dgenrc(5) manpage. If it doesn't exist, an empty one will be created when
dgen is run.

Now that it's been installed, running 'dgen ROMFILE' should run the Genesis
program contained in ROMFILE. For a list of all the fancy options supported,
run either 'dgen' with no options, or see the dgen(1) manpage for more detail.

--------------------------------------------------------------------------------
IT'S TOO SLOW!
--------------------------------------------------------------------------------
Well, sorry. Here are some ideas to help accelerate it:

 - Lower the value of "int_nice" in your dgenrc. 0 is good for short tempers :-)
 - Turn off sound.
 - Run fullscreen, if possible.
 - Increase int_soundsegs to 16 or (if you're desperate) 32.
 - Buy a faster computer. (sorry, had to say it ;)

--------------------------------------------------------------------------------
IT'S TOO FAST!
--------------------------------------------------------------------------------
I couldn't believe it either, but someone asked me this. If you happen to find
yourself in this unfortunate predicament, here's how to slow it down:

 - Raise the sound rate to 44100Hz. It sounds a LOT better, and is a LOT slower.
 - Increase the value of int_nice in your dgenrc. This is the best way to slow
   things down, since it makes dgen much more CPU friendly.
 - In the game, press the key set to 'dgen_cpu_toggle' (which defaults to F11),
   to use the Musashi CPU core, which is slower and more accurate than
   StarScream.

--------------------------------------------------------------------------------
FREQUENTLY ASKED QUESTIONS
--------------------------------------------------------------------------------
Q: DGen segfaults on startup!
A: The two most common causes of this are a broken NASM, or an absent NASM.
   RedHat 7.x distributions ship with a prepackaged NASM which doesn't work.
   You'll need to use an RPM from a different distribution, or RedHat 6.x.

Q: How do I set up OpenGL mode?
A: OpenGL mode can be activated either from the commandline, or from the dgenrc
   file. Using the '-G XxY' switch will activate OpenGL mode. The switch takes
   the desired resolution as an argument. For example:
	$ dgen -G 640x480 sonic.bin
   will run with a 640x480 screen resolution.

   So that you do not have to type this switch every time you use dgen, you
   can add the following lines to ~/.dgen/dgenrc so that dgen will start in
   OpenGL mode every time:
   	bool_opengl = yes
	int_opengl_width = 640
	int_opengl_height = 480
   int_opengl_width and int_opengl_height can be changed to suit your own
   preferences.

Q: I make dgen setuid-root, and try to run it fullscreen, and all I get is
   a black screen with the game running in the middle of it.
A: You need to have your X server set up with a 320x240 video mode. For XFree86,
   if you have XF86Setup installed (which is more than likely):
   - Close all X sessions you have running.
   - From a console, as root, run "XF86Setup". When asked "Would you like to use
     the existing XF86Config file for defaults?" say Yes.
   - After 30 seconds or so the X server should start in VGA mode, and put you
     in the setup program. Everything else is set up, just click on the
     "Modeselection" button in the top right-hand corner.
   - From the list of possible modes, choose 1024x768 (or whatever mode you use
     regularly), and 320x240 (which is the mode DGen wants). Choose a bits-per-
     pixel from the list on the bottom (DGen works best in 15- or 16-bpp).
   - Press "Done", then "Okay".
   - It should restart the X server. When you see the message
     "Congratulations!...", try pressing CTRL-ALT-KEYPAD+ to switch to your new
     320x240 mode, just to make sure it works. Press CTRL-ALT-KEYPAD- to switch
     back, and press "Save the configuration and exit".
   - Restart your X session. If you use xdm, press CTRL-ALT-BACKSPACE to kill
     the X server and restart it. Fullscreen should work now.

Q: DGen's colors are messed up!
A: Some video cards, such as most Riva cards, use different pixel formats
   for true-color modes. If you use 16-bpp bit depth, try 15- or 32-bpp bit
   depth.

Q: I try compiling, but when I run ./configure, it tells me it can't find
   sdl-config. I installed SDL from the rpm's.
A: You need to install the SDL-devel rpm as well:
   http://www.devolution.com/~slouken/SDL/release/SDL-devel-<version>-1.i386.rpm

Q: Sonic 2 freezes right before the title screen!
A: There is a bug in the StarScream CPU core which causes Sonic 2 to freeze
   at this point. Press F11 to switch to the Musashi core, until you get to 
   the title sequence, then press it again to switch back to StarScream. Save
   a snapshot here, so you don't have to go through it again. :)

--------------------------------------------------------------------------------
BUGS
--------------------------------------------------------------------------------
Of course the chances of finding a bug are unlikely, but if you do, tell me
about it. Send me a patch too, if possible :-) Also, check the FAQ above before
reporting bugs, to see if your question's already been answered.

Enjoy DGen!