Commit Graph

799 Commits

Author SHA1 Message Date
stephena 97081a75ee Added a new DialogContainer class, which contains code common to the Menu
and Browser classes.

Abstracted Menu class into a DialogContainer.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@408 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-04 19:04:47 +00:00
stephena 58e906998a Updated ListWidget class to automatically select an item based on
keypresses.  For example, if you enter 'co', it will automatically
select and move to the "Color/BW TV" item.  This will become very
useful in the ROM launcher, to move very quickly to desired game.

Changed the keys to (de)activate the TIA registers to Alt (z,x,c,v,b,n),
to match their definitions in z26.

Added 'Alt .' to disable all TIA registers, and 'Alt /' to enable all
registers.  Eventually, I'll add the ability to select PF0, PF1, and PF2
separately (instead of treating them all the same, as it's done now).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@407 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-04 00:43:22 +00:00
stephena 2173b7701b Re-added double-click support to the list widget. This will be needed when I
add the ROM launcher, as double-clicking on a game will start it.

More cleanups/re-additions for the ListWidget class.  It now supports more
complete navigation with the keyboard (as opposed to just using the mouse).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@406 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-03 19:11:27 +00:00
stephena 6bc6dedf39 Made sure that any changes made to the game properties dynamically
is actually shown in the game info dialog.

Removed redundant call to some methods.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@405 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-02 22:18:14 +00:00
stephena eb8254d133 Moved game loop into OSystem. Eventually, the only responsibility of the
main function will be to instantiate the initial objects, and clean up
when we're done.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@404 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-02 19:36:05 +00:00
stephena f5684caa4a Cleaned up the FrameBuffer::resize and FrameBuffer::xxxFullscreen API's.
Functionality is exactly the same; but it just uses cleaner code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@403 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-01 20:11:07 +00:00
stephena e768e6f7dd Removed all responsibility of creation and deletion for the FrameBuffer
and Sound classes into OSystem.  This makes the main function a lot smaller.

Re-added developer keys used to change XStart, YStart, Width and Height
properties of the ROM.  I must have done something better this time,
since these keys now work correctly in OpenGL mode as well (they didn't
previous to this).

Cleaned up some code wrt conditional compilation of sound code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@402 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-01 18:57:21 +00:00
stephena b026a1e247 Added ability to dynamically switch between software and OpenGL rendering
modes while still in the emulation (without restarting the currently
running ROM).  Added the 'Alt g' key to do this, but it can also be
activated from the VideoDialog menu.

Except for the 'framerate' option, all video related changes can now be
done dynamically from within Stella.  They can still be specified on the
commandline, but that's no longer required (the framerate option will
be fixed shortly).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@401 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-29 19:05:06 +00:00
stephena 56c69d428a Forgot to include these new files in the last commit. The SoundNull
class is used when compiling Stella without any sound support whatsoever.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@400 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-28 19:30:27 +00:00
stephena c8fd06bc69 Cleaned up the Video and Audio dialog boxes a little, making them waste
as little space as possible.

Added ability to enable/disable sound from within the emulation.  So you
no longer *have* to specify it on the commandline (but you still can, if
you want to).

Changed makefile to conditionally compile sound support.  It makes the app
approx 15KB smaller, if anyone really wants to do that ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@399 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-28 19:28:33 +00:00
stephena db67ba4bb4 Yet more tweaks to the vLine, hLine and Scrollbar stuff. It now looks
(and works) as intended.

Converted many of the OpenGL functions back to similar code in the
corresponding software methods.  So OpenGL mode can now draw text
and bitmaps in GUI mode.  It just wasn't worth the effort to separate
the rendering so much, and all we lose by going back is accelerated
alpha-blending.  Since it's just eye candy anyway, I don't really care.

This is in anticipation of merging the software and OpenGL modes.  Once
that's complete, both FrameBuffer classes will be much smaller, and
we'll be able to switch between software and OpenGL modes while the
program is running.  This is one of the last 'features' that is
currently only accessible from the commandline.  My goal is that one
*shouldn't* have to use the commandline to change options, but the
ability will still be there if they want to.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@398 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-24 20:36:36 +00:00
stephena 44bdcdeaf9 Some more tweaks to the GUI hLine and vLine methods.
Integrated some changes from the ScummVM 0.7,1 codebase wrt the
scrollbar widget.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@397 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-24 01:57:47 +00:00
stephena 5e88a64305 Added key bindings to enable/disable some registers in the TIA. These
key binding may change; I just wanted to see how it would work.  You can
do some funky stuff by changing those registers :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@396 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-21 21:18:37 +00:00
stephena 9fd0aded02 For a change of pace from the GUI stuff, I added the ability to enable/
disable the various bits in the TIA (P0, P1, M0, M1, BL, PL).  The code
works, but isn't yet tied to a key event.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@395 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-21 18:55:15 +00:00
stephena 93563f4929 Accidentally removed the text stating that we're in remap mode, awaiting
a new key event.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@394 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-11 19:02:25 +00:00
stephena 98ff3f1d8e Event remapping/erasing now works! I just have to make the
EventMappingDialog interface a little more user friendly by enabling
PageUp/Down and Up/Down keys to scroll the list.

Then, it's on to the MiscDialog stuff.  And later, after a little more
code cleanup, some serious work ROM launcher.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@393 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-06 23:47:08 +00:00
stephena 04261c129d Don't highlight the mapping buttons if no item has been selected.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@392 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-06 19:50:12 +00:00
stephena c2aba6aa6f More work on the EventHandler and EventMappingDialog classes. The
EventHandler class now contains string mappings for all possible SDL
keys, which should hopefully take care of our international users.

Added 'Map', 'Erase' and 'Cancel' buttons to the EventMappingDialog.
They still don't do much, but it will now be an easy matter to add the
hooks into EventHandler.  You *are* able to scroll through the list
and see which keys are bound to which actions, though.

This approach is *much* cleaner than in previous code.  Now the EventHandler
actually does the remapping; the EventMappingDialog only collects the
events and associated actions and passes them on.  This is much cleaner
than before, when (for example) the FrameBuffer was doing remapping!  What
the hell did the framebuffer have to do with event mapping???


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@391 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-05 00:40:55 +00:00
stephena 9fe7eb8894 Added Event Remapping dialog. It doesn't actually do any remapping yet,
but the hooks are there for it.

Added ScrollBar and ListWidget GUI objects.  These will form the basis
of the new ROM launcher, as well as the memory lister in the debugger.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@390 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-04 02:19:22 +00:00
stephena cad03a19cb Cleaned up event gathering loop and moved it from mainSDL into the
EventHandler class.  Eventually, *all* event-related stuff will move
to this class (which makes sense, considering its name).

Removed all references to joystick stuff for now.  It will be re-added later.

Re-enabled snapshot support.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@389 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-04-03 19:37:32 +00:00
stephena 088210251e Some minor changes to line widths in software mode.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@388 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-28 20:36:39 +00:00
stephena 8d67d0c760 OpenGL mode is working again, except it doesn't yet render any text.
Also took the opportunity to clean up the FrameBuffer classes.  There
was a lot of cruddy code there ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@387 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-28 00:04:54 +00:00
stephena b5fb1d277d Added Game Info Dialog. It basically lists all the relevant information
in the stella.pro file for the particular game.

Added Help Dialog, which gives a description of the most commonly
used non-remappable commands.  This still has to be adapted for OSX
shortcuts.

Finished the Sound Dialog.  Still TODO is remove the requirement for
restarting Stella before sound can be disabled.

All that's left now are the Miscellaneous and Event Remapping Dialogs.
The later will be the hardest, but it will also work a lot better than
in previous versions of Stella.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@386 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-27 03:07:34 +00:00
stephena f3dec28824 Added Audio Dialog and almost finished off Video Dialog.
Currently, some settings don't take effect until Stella restarts.

It's my goal to eventually eliminate many of these. so Stella
is truly no longer a commandline program.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-26 19:26:48 +00:00
stephena 7e3c3de3ce Almost completely finished the Video Dialog interface. Only six more
to go :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@384 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-26 04:19:56 +00:00
stephena a4376c52cf Load config info for the dialog boxes. Otherwise, the settings could
get out of sync when the user changed a settings with a hotkey.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@383 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-15 22:28:05 +00:00
stephena c7383bb103 Added beginnings of VideoDialog box. Things are proceeding nicely ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@382 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-14 04:08:15 +00:00
stephena 24a81a0d11 Added ScummVM font handling code. The font is now proportional,
which means more text can fit onscreen.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@381 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-13 03:38:41 +00:00
stephena b0ec277a94 It's alive! Somewhat at least. Entering menu mode with the TAB key
actually draws the Options Dialog box.  No events are handled yet, but
at least it's a start.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@380 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-12 01:47:15 +00:00
stephena bed46fe840 Yet more in-game GUI changes. It's getting close to compiling, but no
idea on if it will actually work :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@379 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-11 23:36:30 +00:00
stephena 4e129001cd More work on implementing an in-game GUI.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@378 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-03-10 22:59:40 +00:00
stephena 5489ca7248 Starting to add GUI code from ScummVM.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@377 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-27 23:41:19 +00:00
markgrebe f3b4648eac Update for MacOSX version 1.4.2b
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@376 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-27 02:25:25 +00:00
markgrebe c01df20e0a Muted sound during cartridge open and preferences dialogs
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@375 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-26 22:16:37 +00:00
stephena c10b612913 - More restructuring of the event handling code.
- Finally able to quit a game and start another within the same
program invocation (Escape quits current game, Ctrl-Q quits emulator)

 - More tightly integrated SDL into the codebase.  It's about time we
make use of SDL exclusively, and possibly speed up the code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@374 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-25 02:29:38 +00:00
stephena 40dff9964f First stab at starting any number of games from one invocation of Stella.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@373 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-22 20:19:32 +00:00
stephena aa8b0b9bdd OpenGL mode is working again; snapshot and menuing support still MIA.
Rearranged some things from Settings to OSystem, since many things in the
Settings class weren't actually related to settings at all.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@372 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-22 18:41:16 +00:00
stephena f3a31ca452 Hurray, it compiles and runs again. At least in software only mode,
and without snapshot support.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@371 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-22 02:59:54 +00:00
markgrebe ce2974f6a9 Turned optimization on and changed version number
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@370 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-22 01:34:09 +00:00
markgrebe 2e5b873b88 Added change descriptions for MacOSX version 1.4.2a
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@369 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-22 01:33:03 +00:00
stephena 9c42f79392 More huge code reorganizations.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@368 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-21 20:43:53 +00:00
markgrebe c30051b0a3 Fixed Atari_time delay loop time calculator, which was causing a hang when a very large time delay would be sent as a parameter to usleep
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@367 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-21 19:32:07 +00:00
stephena 94d59674ad And so it begins ...
A major restructuring of the framebuffer code, which will eventually
result in an internal GUI and ROM browser ALA ScummVM.

The codebase is severely broken ATM.  It compiles, but that's about it.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@366 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-21 02:23:57 +00:00
stephena 267afcca06 Added a few last minute documentation changes. For the next version, I'm
putting all documentation in the main HTML file, since it's too time
consuming to maintain separate files that say the same thing.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@364 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-19 14:59:58 +00:00
markgrebe aba74d2939 In the init function, set the number of screen modes to zero before they are calculated, as this was causing a problem with the Macintosh version when the game was reset, or a new game was started
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@363 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-18 23:33:32 +00:00
stephena 47f8619ec5 Modified the FrameBuffer::refresh method to take a boolean value
representing whether a refresh should be done immediately or in the
next frame.

Do an immediate refresh just before taking a snapshot, to make sure
any onscreen messages aren't taken as part of the snapshot.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@362 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-18 21:26:31 +00:00
markgrebe a626c5bfbb Added ability to reset current game without reopening the same cartridge
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@361 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-18 05:37:15 +00:00
markgrebe 4bd87ac26c Added ability to reset current game without reopening the same cartridge
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@360 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-18 05:31:48 +00:00
markgrebe 2909cf001d Updated date
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@359 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-18 05:29:49 +00:00
markgrebe 9055dae6a7 Updated version number
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@358 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-02-18 05:28:57 +00:00