Commit Graph

4519 Commits

Author SHA1 Message Date
stephena f8cf40361c Beginning of support for key remapping in the core. For now, only the
SDL version has been changed (not fully), and it doesn't actually do
any remapping yet :)

The new class 'EventHandler' will receive all events and will dispatch
them to the core.  The frontends will no longer deal with events
directly, but will convert them from native format (SDL, X, DOS, etc.)
to core events.  The actual remapping will be taken care of in the core,
and each frontend will never know about it.

For those frontends that don't wish to take advantage of core remapping,
they can still use the 'Event' class directly.

Eventually, this will be extended to the joystick code as well, but I
don't think it would be wise to remap the mouse.

One thing that has changed is that it will no longer be possible for
one key event to activate more than one core event.  It doesn't make
sense to do it, and I'm not sure the original code actually worked
anyway.  One core event can be mapped to more that one key event,
however (Joystick fire 0 could be activated by Joy button 0, Space,
Left Ctrl, etc).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@173 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-03 20:10:58 +00:00
stephena ec407e7c60 Applied patch from Daniel Richard G. (with modifications) concerning the
default behaviour of the volume settings.  Now, if no volume settings
have been specified, this means that changing the volume is disabled,
and the volume won't be changed on program start or exit.  Specifying '-1'
for the volume will have the same effect.

This is the new default behaviour.  If you want a different volume, you
now have to specify it.

Updated the documentation concerning using '-volume -1'.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@172 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-25 03:12:55 +00:00
bwmott 69d189c15f Updated text files with information for the 1.3 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@170 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-17 19:07:04 +00:00
bwmott 9fa22953d9 Updated documentation for the 1.3 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@169 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-17 19:02:48 +00:00
bwmott 1c69f95546 Voch's latest stella.pro file.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@168 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-17 05:23:51 +00:00
bwmott 7c1c6549f4 Add vga.o target for DOS port.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@167 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-17 05:20:18 +00:00
bwmott 2b0b275655 A number of changes have been made to the DOS code:
* Variables and functions accessed during interrupt service routines
    are properly locked to ensure they are in physical memory.

  * The emulation can be synchronized with the VSYNC of the video
    card instead of using the system timer.  The is the default
    behavior when running under Windows NT/2000/XP since the DJGPP
    system timer functions do not operate correctly under these
    operating systems.

  * New routines have been added to setup the graphics modes.  The
    new modes should run at 60Hz instead of the standard 70Hz for
    the 320x200 mode.

  * The stella profile is search for in the current working directory
    as well as the $STELLA_HOME directory.

  * When loading a ROM it is looked for in the current working directory,
    $STELLA_HOME/ROMS, and finally $STELLA_HOME.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@166 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-17 05:17:42 +00:00
bwmott 2a66c0ea9a Updated the fragment size and the high water mark for the sample queue
so that sound works better under Windows NT/2000/XP systems.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@165 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-17 05:09:21 +00:00
bwmott 28572bbff3 Modified the autodetect routine to include a search for 3F style
bankswitching as suggested by Adam Wozniak.  This allows most of
the demos/homebrew games being created using this method to work
without a stella.pro file entry.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@164 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-02-17 04:59:54 +00:00
bwmott 8d530f38a2 Added state saving and loading using the F9, F10, and F11 keys. The
game state is stored in a 'state' sub-directory of the current working
directory or in a 'state' sub-directory of the directory specified by
the 'STELLA_HOME' environment variable if it is set.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@163 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-01-08 05:19:07 +00:00
bwmott 7ca813cc1b Fixed a bug reported by Erik Eid in the stella@biglist.com during August
2002 regarding the difficulty switches being reversed.  It looks like
this bug was introduced in the 1.0 release of Stella (only took 4 years
to find and fix it :-)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@162 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-16 06:24:18 +00:00
bwmott 897604d379 Added code to the bankswitching type auto-detect method so that ROMs
which are 10,495 or 10,240 bytes in length are considered to be DPC
based games.  This should allow hacks of Pitfall II to work.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@161 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-15 05:49:04 +00:00
bwmott ab92e184cd Updated the default value for the "Display.Height" property from 38 to 34.
Looks like this works better for games when the stella.pro file is missing.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@160 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-15 05:13:19 +00:00
bwmott 280d42d0e4 Changed the timer so that it has a random value after a reset. This fixes
the issue with the robots in Berzerk always appearing in the same pattern
when the game starts.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@159 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-15 04:58:14 +00:00
bwmott 603f72d9b4 Added code so that the "Cartridge.MD5" property is always set once the
console is created.  If properties are not found for the ROM then the
MD5 value will be set to the MD5 value of the ROM.  This allows the
"-showinfo" command line option to display the MD5 checksum of unknown
games...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@158 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-15 04:40:55 +00:00
bwmott 890db3b3e5 Fixed a bug regarding resizing the window using the '-' and '=' keys. The
call to resize the window needed to be after the call which tells the
window manager the maximum size of the window.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@157 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-15 04:10:56 +00:00
stephena c41a53ac7c Some small code cleanups in preparation for the 1.3 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@156 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-05 16:46:14 +00:00
stephena fd2dc1e33b Fixed bug in the saving of pictures with a PAL palette.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@155 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-05 16:44:56 +00:00
stephena bbc5ada9e6 Added an error function that prints an error and frees any resources.
Removes some duplication of code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@154 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-05 16:43:57 +00:00
stephena 1dea24d7cc Using -showinfo 0 will not show any non-urgent messages. Errors are still
shown, and cannot be turned off.

Barring any errors encountered in memory allocation (etc.), using
-showinfo 0 will not output ANYTHING to the console.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@153 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-01 17:06:18 +00:00
stephena 39516ebe4e Documentation for the latest changes that were made.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@152 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-01 16:24:24 +00:00
stephena 79769a946c Fixed load/save state support for the few remaining Cartridge types.
Some of these haven't been extensively tested, so YMMV.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@151 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-01 15:59:47 +00:00
stephena 45d2942722 Updated makefile to selectively build ALSA backend into X11 and SDL ports.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@150 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-01 02:14:01 +00:00
stephena 00515a2ba2 Updated X11 and SDL ports to make use of the new ALSA sound backend.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@149 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-01 02:13:14 +00:00
stephena 9feac30d84 Added ALSA v0.9 API sound backend to the X11 and SDL versions.
This is BETA code and should be thoroughly tested.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@148 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-12-01 02:12:26 +00:00
bwmott 22b69558ce Fixed some typos in the loading of the sound registers in the state
loading routine.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@147 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-19 04:33:48 +00:00
bwmott c1043e2dc9 Added code to handle the music mode data fetchers in the DPC chip so that
all of the Pitfall II music is played now that the TIA sound routines can
handle it.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@146 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-19 04:29:21 +00:00
stephena ca438890ff Updated the manual with the latest code changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@145 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-13 16:41:24 +00:00
stephena 6a8a689e85 Created a new Sound class that does almost nothing :) Useful for
compiling (or running) Stella with no sound support whatsoever.

Added ability to compile multiple sound backends into the X11 and SDL
versions, and to dynamically select from among them at run-time.  For
now, the X11 version can't use the SDL sound core.  This is in
preparation for the ALSA sound backend, which may or may not make it
into Stella 1.3.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@144 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-13 16:19:21 +00:00
bwmott 39dd0d716f Changed the upper and lower bounds on the sample queue so that there's
a little more room for error.  Also added a call to SDL_Delay in the
blocking section of the updateSound method so that it doesn't hog the CPU.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@143 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-13 05:01:31 +00:00
bwmott f9c3e778c8 Updated the DOS port to use the new sound routines in the core. Also
switched to a new set of low-level Sound Blaster routines which appear
to provide better Sound Blaster support and the ability to auto-detect
sound card settings.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@142 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-13 03:47:55 +00:00
stephena b93d8d186d When saving snapshots, now the messages are printed to the screen (instead
of stderr).

Fixed the X11 version wrt to merging changes into the main properties file.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@141 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-12 01:50:06 +00:00
stephena b2fdecf86e Removed unnecessary reference to <algorithm>.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@140 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-12 01:02:16 +00:00
stephena b5f3c6b225 Added ability to specify "Dmerge" in the INI file.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@139 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 22:14:56 +00:00
stephena af8b8c82f7 Added ability to use either the X11 or SDL sound code. As of now,
the X11 sound code is more mature.

Changed all occurrences of ::close() to ::closeDevice().


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@138 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 22:09:07 +00:00
stephena e4f94c55c9 Changed SoundSDL::close() to SoundSDL::closeDevice() to match the SoundX11
class.  Couldn't use close(), since that is a C-style function called in
the SoundX11 code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@137 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 22:07:35 +00:00
stephena 9e45aa1ada Introduced the SoundX11::closeDevice() method so that the SoundX11 and
SoundSDL classes are drop-in replacements for each other.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 22:03:00 +00:00
stephena b7f0d2cf79 Added option to use either the OSS or SDL sound backend in the SDL version.
As of now, the OSS sound code is a bit more mature than the SDL code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@135 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 22:01:28 +00:00
stephena 48cef96017 Fixed the clicking sound that occured when '-accurate 0' was specified
and Pause was pressed.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@134 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 21:11:48 +00:00
stephena a84abcb1bf Modified to process the -Dmerge commandline argument.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@133 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 02:56:27 +00:00
stephena 943a4669d3 Added -Dmerge commandline argument, which specifies whether or not
we want to merge any properties changes into the PropertiesSet.

In the X11 and SDL versions, this option also tells the Properties::load()
method to load the properties into memory, since we can't do a merge
unless the properties are stored in memory.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@132 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 02:55:16 +00:00
stephena 25bde6512e Added PropertiesSet::merge() method, which merges the given Properties object
into the current PropertiesSet.  This method also accepts a filename specifying
where to save this PropertiesSet to, and a boolean representing whether we want
to actually save the properties on exit.

Cleaned up some variable names, and set some bas initializers in the constructor.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@131 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 02:52:02 +00:00
stephena d876ee0766 Added an extra newline character to the Properties::save() method so
that when a Properties object is saved to a properties file, that file
looks more like the default stella.pro.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@130 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 02:49:02 +00:00
stephena 009884dad4 Removed all DEVELOPER_SUPPORT #ifdef's from the code. The methods will now
be compiled into the core.  It's up to the GUI's to call (or not call) the
DEVELOPER methods.

Changed the behaviour of Console::saveProperties() in that it now accepts a
boolean variable 'merge', which if true, will make a call to
PropertiesSet::merge() and indicate that these properties are to be saved
into a stella.pro file.

If merge is false, it simply saves the properties to the specified file
(as before).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@129 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 02:46:34 +00:00
bwmott 470de4f24a Updated the SDL sound code so that the main thread and the sound thread
stay synchronized with each other.  Also added code to disable the audio
if the driver doesn't support "real time" audio (under linux this usually
means a sound server is running).  This code appears to be working almost
as well as the X11 sound code under the 1.2.5 release of SDL.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@128 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-11 02:07:21 +00:00
stephena 5d592bdfa3 Updated the documentation with information about the new
DEVELOPER_SUPPORT options.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@127 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-10 20:46:58 +00:00
stephena 2dbef125e8 Got rid of some extra DEVELOPER_SUPPORT commandline options that
aren't implemented yet.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@126 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-10 19:43:17 +00:00
stephena 4d149d7885 Updated X11 and SDL ports to make use of the new DEVELOPER_SUPPORT
stuff.  These are availble only if DEVELOPER_SUPPORT as been defined.

The keys are as follows:

Alt+s:    Save the current properties to your home directory named as
          "Cartridge.Name".pro, with all spaces in the filename
          converted to underscore.

Alt+f:    Toggle between NTSC and PAL modes, and update the palette
          accordingly.

PageUp / PageDown:  Increase / decrease the "Display.YStart" variable.

Alt+PageUp / Alt+PageDown:  Increase / decrease the "Display.Height" variable.

Home / End:  Increase / decrease the "Display.XStart" variable.

Alt+Home / Alt+End:  Increase / decrease the "Display.Width" variable.


Also, cleaned up the code a bit wrt C functions.  Got rid of all sprintf
C-style functions, and used C++ style sstream instead.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@125 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-10 19:18:35 +00:00
stephena a12078de97 Made sure that when properties are saved in Console::saveProperties,
all spaces are removed from the filename.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@124 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-10 19:05:57 +00:00
stephena 3dbc0b7193 Modified the commandline parsing to accept the following options:
-Dformat  (changes Display.Format)
-Dxstart  (changes Display.XStart)
-Dystart  (changes Display.YStart)
-Dwidth   (changes Display.Width)
-Dheight  (changes Display.Height)

These are only activated if 'DEVELOPER_SUPPORT' is defined.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@123 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-10 00:27:26 +00:00