Commit Graph

41 Commits

Author SHA1 Message Date
stephena f58a258b94 Added 'Frame Advance' and 'Exit' buttons to the DebuggerDialog. Advancing
the frame by 1 can be very useful, in that you can change a memory location,
do a frame advance, and then see any results graphically.

Eventually the trace and step will work the same way, and show changes
to the scanline as it's being drawn.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@518 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-17 17:34:01 +00:00
stephena 008c49e507 More copyright fixes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@508 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-16 01:11:29 +00:00
stephena 780422bd42 More GUI infrastructure changes. I'm hoping to have the CheatWidget
complete by tomorrow evening.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@493 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-14 01:11:48 +00:00
stephena 35f9b5b0e4 Totally reworked the font subsystem. Fonts now belong to OSystem instead
of the FrameBuffer (since fonts should only be created once, and the
FrameBuffer is deleted and re-created many times).

Added a default font to the Widget class, as well as a setFont() method.
So each widget can individually choose its own font.

Added a monospaced font.  It's currently used only in the PromptDialog,
but due to the above changes, it can be used anywhere.

Tweaked some keys in the PromptDialog.  Shift-(Home, End, PageUp, PageDown)
now control the scrollbar, and without shift, those keys control the current
line editing/navigation.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@473 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-06-08 18:45:09 +00:00
stephena 57246c69a9 Fixed regression whereby the overlay images were appearing when a snapshot
was taken.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@457 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-31 17:57:50 +00:00
stephena e6e91f3522 Made sure aspect ratio is taken into account when checking for maximum size
of SDL screen.

Still TODO is change OpenGL mode so that aspect ratio and non-integral scaling
are not used when in debugger or launcher mode (ie, when we know the absolute
coordinates of the screen).  We do this since those modes are mostly GUI-based,
and the GUI doesn't look quite right when using OpenGL scaling.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@456 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-30 16:25:47 +00:00
stephena 6706fb41f7 Reworked FrameBuffer::update() and FrameBuffer::refresh(). Sometimes the
mediasource and overlay need to redrawn independently of each other.

Added mouse and joystick events passing to the debugger.

Fixed bug whereby if a settings file didn't exist, the default mapping
for a joystick wasn't being done.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@449 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-28 17:25:41 +00:00
stephena 46f3e463d9 Re-added joystick support.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@438 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-25 23:22:11 +00:00
stephena 61d3922e70 Added a ProgressDialog class, which shows a sliderwidget that represents the
progress of some activity.

Some additions to the LauncherDialog.  When populating the ROM list by
directly examining the ROM files, it now uses a ProgressDialog to show
the current status (since this operation sometimes take a long time).

The last selected ROM is now re-selected when starting Stella.

Some minor code refactoring to take into account zipped ROM support
(yes, its coming soon).

Re-added paddle support.  Still TODO is tweak the sensitivity of mouse
movements.  Also still TODO is re-add joystick support.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@427 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-17 18:42:23 +00:00
stephena 0567bb6d94 Fixed some 32->64 bit bugs; many more fixes are coming (thanks to B. Watson).
Added commandline options to change almost all properties of a ROM.  Very
useful for developers who constantly change these features but don't want
to re-generate a new stella.pro entry each time.  Thanks again to B. Watson
for original idea and partial implementation.

Fixed problem with events getting 'stuck' when changing states.  For
example, one could be playing a game and, while pressing "Left", exit
the game.  Then, when another game is started, the left direction would
still be selected.  This is a side-effect of Stella initially being a
"one game per launch" application.

For similar reasons as the previous step, fixed problem whereby a
messagebox seen just before ending one game was showing up in the next
game as well.  Still TODO is make sure the sound buffer is cleared
before each new game (sometimes you can hear some sounds from a
previous game).

Further tweaked the '-framerate' commandline argument to override the
defaults when used, but never be saved to the settings file.

Renamed '-altpro' commandline argument back to '-pro', and moved it into
the DEVELOPER_SUPPORT area.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@421 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-12 18:45:21 +00:00
stephena 781f8b8d2e Implemented BrowserDialog functionality. That means we can now browse
for the correct ROM folder, and the folders contents will be shown in the
listview.

Still TODO is modify GameList so that it contains all relevant info for
a ROM.  Then, the listview will contain the actual names of the ROMS
(as specified in stella.pro) instead of their on-disk filenames.  And at
that point, we can actually start a game directly from that listview.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@417 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-10 19:20:45 +00:00
stephena 16ee1f8e7f Fixed some uninitialized pointers that were causing segfaults at strange
times.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@414 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-08 17:38:23 +00:00
stephena cf08dc29cd Cleaned up the LauncherDialog a little.
Removed the saving of TIAbit on/off into the state files.  These
are debugging tools, and aren't really part of a state file (and hence
shouldn't be saved with a state file).  Now, whenever a state is
(re)loaded, the TIABits are all turned back on.  That means the state
files are still compatible with Stella 1.4.2.

Added "Enter/exit menu mode" and "Enter launcher mode" to the remappable
events.  They default to 'Tab' and 'Escape', respectively.  While you
can add new mappings for these events, those defaults can't be removed
(otherwise, it would be possible for a user to disable menu mode, and
never be able to get back into the menu to fix the problem).

Fixed some problems with the overall state machine.  Sometimes the cursor
was hidden when it shouldn't have been, and vice versa.

Fixed crash when toggling between software and OpenGL while in ROM
launcher mode.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@413 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-06 22:50:15 +00:00
stephena e5df395075 Moved the main processing loop out of mainSDL and into OSystem::mainLoop().
Also, moved creation of new console into OSystem::createConsole.

Added hooks for browser mode (coming soon).

Added Ctrl-r to reload the currently loaded ROM.  It has the nice side
effect of testing whether another ROM can be reloaded while the emulation
is running.  Since this was successful, adding the ROM browser mode will
be very easy.

Added ability to actually change the framerate from the VideoDialog.

Reworked FrameBuffer::setPalette to be called only when a new console
is created (and we know that MediaSource::palette() is defined).

When toggling between NTSC/PAL mode, the video framerate is now toggled
between 50 and 60 (still TODO is change the audio framerate).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@410 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2005-05-05 00:10:49 +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 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 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 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 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 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 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
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 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
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 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
stephena 0f0625d9fe Cleaned up the SDL event gathering loop. It now almost exclusively
makes use of switch/case statements instead of the slower if/elseif
structure.  Hopefully this will fix event problems some users were
experiencing.

The Control or Alt button can actually now be used in event remapping.
Due to the old event handling, the Control key could be assigned to
an event but would never actually be usable.

Removed the option to remap the exit event (for now), since I haven't
figured out a way to remap it *back* to 'Escape' if that mapping is
ever removed.

Added beginning of support for Stella to automatically determine the
correct framerate based on ROM format type.  The final version of this
will probably wait until Stella 1.5.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@329 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-07-28 23:54:39 +00:00
stephena e060f52112 Added the Event::Quit event to the remapping menu. This was requested by
quite a few people.  The only problem is that if you ever erase the 'Escape'
mapping for Event::Quit, there's no way to add it back, since while in menu
remap mode, the Escape key is used to erase an entry.  It can't be assigned
to any event.  So if you erase it, you'll have to delete the stellarc/
stella.ini file.  I can see this generating quite a few questions ...

Reworked the sound code for PAL games.  Now they sound just as good as NTSC.
Still TODO is research the correct speed for playing PAL games, since 60 fps
seems too fast.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@328 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-07-22 01:54:08 +00:00
stephena 5b6f1c5f5e Reworked the OpenGL class yet again. I figured out how to fix the problems
in Windows without all the invasive changes, so I reverted most of it.

Snapshots are now fully working in both software/OpenGL and windowed/fullscreen
modes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@278 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-06-23 03:43:47 +00:00
stephena db6d064ebf Reworked the fullscreen OpenGL mode. Finally, Windows fullscreen OpenGL
works!

Still to do is scale the OpenGL text to the current screen size.  Right now,
it still shows up very small (and not centered).  Also, fullscreen OpenGL
snapshots aren't quite working right yet.  Both of these are easy to fix.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@276 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-06-23 00:15:32 +00:00
stephena 464972cc31 Added snapshot support for both software and OpenGL modes. Snapshots
are now created from the framebuffer() instead of directly from the
Mediasource.

Removed all snapshot-related code from the Console, since it didn't
really belong there.  A static snapshot object is now created each
time a snapshot is done (in the EventHandler).

These changes should make it easier for those ports (like MacOSX) that
have native PNG-saving support to not use *any* of the snapshot code
at all.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@275 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-06-20 23:30:48 +00:00
stephena 120dd7b268 Re-enabled saving of the event remappings to the rc-file.
Moved the refresh() method to FrameBuffer::refresh(), since
all ports may need it.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@219 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-24 14:51:06 +00:00
stephena b15698ff2e Broke the dependency between the FrameBuffer and Sound classes
wrt to the MediaSource.

Previously, in the main run loop for a port, you had to call
FrameBuffer::update and then
Sound::updateSound(FrameBuffer::MediaSource).  Now, you can call
FrameBuffer::update() and then Sound::update().  But since the
ordering here is important, I've introduced a Console::update()
that does it all.  So the main run loop for each port just
got a bit simpler.

Also changed around the Snapshot class a bit.  All this is to
reinforce the fact that the MediaSource is owned by the core,
and the FrameBuffer, Sound, and Snapshot classes make use of
it.  Previously, it seemed as if the FrameBuffer owned the
MediaSource.

I'm finding all these little inconsistencies because of
writing the Porting.txt document, and trying to explain
why something is being done a certain way (and if I
can't explain it, I rewrite it).  So if for no other
reason, the Porting.txt document has already been
valuable.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@214 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-19 15:57:11 +00:00
stephena 9d2e1cfcc0 Changed the behaviour of pause() wrt the FrameBuffer. Now the base
FrameBuffer class is paused, and *it* notifies the child class of
this event.  Previously, the code for pausing the parent class
had to be provided by the child, meaning that if the derived
classes of FrameBuffer didn't provide it, then the emulation
core would not pause.  This is exactly what happened to me
in the Windows version, and I spent 10 minutes trying to figure
out why pause wasn't working :)


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@204 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-12 19:36:25 +00:00
stephena fc96e5b0d8 Integrated the SDL software and OpenGL modes into stella.sdl.
You can now select the video backend with '-video soft' or
'-video gl'.

Cleaned up the menu text lines that were longer than the
current display width.  These lines are now truncated and
have a '...' appended to them.  The menu modes are now more
tolerant of display sizes.  So (for example), if some port
uses a 640 pixel wide framebuffer, the menu will now resize
and fully take advantage of all available space.

I've looked at the Windows code, but I still haven't mustered
the strength to work on it.  It will basically be a complete
rewrite of sound, video, and input classes.  And I'm not
looking forward to it ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@201 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-09 23:53:20 +00:00
stephena 8239748980 Huge changes across the map. Lets see if I can remember it all ...
There is now an SDL OpenGL port with filtering and alpha-blending.
It's a work in progress right now, but is already quite stable.
It's not as optimized as the software version yet, but this will
change as well.  For now, you have to compile the SDL version in
either normal software mode or OpenGL mode.  This will change
before the 1.4 release.

When entering menu mode, the emulation is now suspended.  And when
pause is pressed, you can't enter menu mode.  Because of these changes,
CPU use has dropped dramatically when viewing menus.  This will benefit
all ports, since menus are now redrawn only when necessary, instead of
at the current framerate.

For a reference, on a Pentium-IV 2.4GHz, the software SDL version
maxes CPU usage at 9%, and the SDL OpenGL version at 13.5%.  This is
at 60 fps and a zoomlevel of 4.  While some small improvements can
(possibly) be made to the OpenGL version, I think we'll soon be hitting
the glass ceiling.

Work on the Porting.txt document is progressing, and I estimate it to
be 45% complete.

The Windows version still doesn't compile, and I still haven't looked
at it.  Rest assured that it will be done before 1.4.  There will be
a simultaneous release, even if the Linux versions are finished.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@200 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-06 22:22:33 +00:00
stephena d098cb1207 Too many changes to list here specifically.
The major changes are a stabilization of the core code.  There should
be much fewer major core changes from now on.

Updated the SDL port to the latest core changes.  Next I'll start on the
Windows port.

There are still many optimizations left to do.  Specifically, when using
the SDL port on a Pentium4 2.4GHz, normal mode results in 4% CPU usage,
while menu mode makes it jump to 46%.  This must be improved.

The porters guide is a work-in-progress, and not yet available.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@199 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-10-26 19:40:39 +00:00
stephena c7233b35b0 Too many changes to document here. The codebase is currently
heavily broken pending a rewrite of the Framebuffer class.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@198 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-10-17 18:02:16 +00:00