Commit Graph

1607 Commits

Author SHA1 Message Date
stephena 3f81dd2c93 Changed behaviour of 'gl_fsmax' argument again. It's now a boolean,
which only applies to TIA mode (in fullscreen, of course).

Some code/debugging cleanups across the various FrameBuffer classes.

Finally fixed software rendering mode crashes.  It now works just as
well as OpenGL mode, with all dialog positioning working the same in
both.

Reactivated OpenGL filtering (GL_LINEAR and GL_NEAREST).  Only the TIA
image can be changed; the UI dialogs are always using GL_NEAREST).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1579 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-28 21:01:55 +00:00
stephena 829375de34 Fixed yet more positioning issues. Everything seems to be working fine
in OpenGL mode now, and I think I've finally finished the major UI stuff
there.  Now for software mode.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1578 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-28 00:23:21 +00:00
stephena 5b4f9f3781 OK, another large FrameBuffer-related change so that fullscreen,
double-buffered modes don't have flicker.  Basically, the core FrameBuffer
class has been modified to draw dialogs multiple times when necessary,
above and beyond when changes are made (ie, if a new surface is to be
overlaid, all surfaces underneath must be drawn to BOTH buffers in
double-buffered mode first).

Software rendering is currently broken in fullscreen mode, but I know
why.  It's basically the optimizations I try to make for large software
surfaces (the 'isBase' functionality).  This is going to disappear before
the next release.  And in case I haven't mentioned it for a while; I
REALLY HATE software mode.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1577 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-27 23:27:32 +00:00
stephena 4051b523d8 Fixed minor error in mode switching.
Commented out some debugging messages.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1576 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-27 15:56:36 +00:00
stephena 311c0f717f Changed VideoDialog so that it shows the current framebuffer type,
and allows you to change it for the next Stella run, but doesn't
actually change it for this run (since Stella now has to be
restarted for toggling between software and OpenGL mode).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1575 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-26 21:39:17 +00:00
stephena 5147356c96 Re-add support for displaying text in FrameBufferSoft. I've only
tested 32-bit mode for now; more testing to come.

Made changes in OSystem so creating a framebuffer is only ever done
once.  This means that switching between software and OpenGL mode is
no longer dynamic (ie, it can no longer be done while Stella is running).
With the forthcoming changes to VideoDialog, you'll be able to set the
mode to change the next time Stella runs.  It just adds too much
complexity to support dynamic switching, especially when I don't think
many people do it too often.

Updated CommandDialog to be font-resizable (ie, take advantage of the
new UI fonts).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1574 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-26 20:05:17 +00:00
stephena 92b22e3ad7 OK, I decided to take a break from the positioning stuff and work on
something which was the basis for this whole surface restructuring in
the first place; updated fonts in the UI.

Switched out the old normal and larger sized fonts for higher
resolution ones.  The surfaces are now mostly larger than 320x210,
which means 1x TIA zoom mode is no longer allowed (which was actually
disabled some time ago).

I'm getting close to the end of a single surface design to what we have
now; a multi-level surface infrastructure.  This allows higher-res UI's
(which have just been committed), and optimizations for OpenGL TIA
rendering (which were committed over the last week).  In the future,
this will also make it easy to add TIA filters to OpenGL mode (ScalexX,
HQxX, etc).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1573 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-25 23:05:16 +00:00
stephena 843c85c56b Yet more OpenGL positioning fixes.
Fixed compile warning in converting integer values to hex strings in the
debugger.  The resulting code was actually causing crashes in the RIOT
tab of the debugger.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1572 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-24 01:20:06 +00:00
stephena b62755ce70 Some more UI positioning fixes. InputTextDialog's in the debugger are
now correctly positioned, but there's still an issue with ContextMenus
which are used by PromptWidgets.

Finally, we see the first performance improvements in OpenGL TIA
rendering coming from the new 'surface' infrastructure.  Now that TIA and
UI surfaces are rendered separately, we no longer have to double the TIA
width in software; it can be hardware-accelerated (ie, a 160x200 texture
is stretched in hardware).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1571 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-23 18:54:05 +00:00
stephena 039a0b9e36 Some fullscreen positioning fixes for OpenGL mode. It's getting close
to being finished now (thankfully, since I want to move to other parts
of the codebase).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1570 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-21 19:51:35 +00:00
stephena 748325301d Fixed annoying OSX warning that I've been looking at for about 2 years.
It seems the fix for OpenGL issues in OSX do work, so now the OpenGL
code is working the same on all systems again.  So now I can get to
the fullscreen positioning issues ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1569 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-21 00:12:15 +00:00
stephena bf993f9284 Fixed minor warning with newer version of gcc.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1568 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-20 23:42:30 +00:00
stephena 5dc7cba2a8 Hopefully finally fixed the issue of OpenGL texture re-generation whose
behaviour differs between OSX and other systems.

Disabled output of the TIA display while in the debugger; this code
needs to be rewritten.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1567 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-20 23:32:46 +00:00
stephena a8a2689269 I think I've found the issue with OpenGL weirdness in OSX. Now I need
to make sure it doesn't break on other systems.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1566 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-18 23:36:32 +00:00
stephena cb8d35044a Oops, this is a little too agressive with the optimizations.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1565 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-15 17:53:01 +00:00
stephena 54b54aabd6 Switched a bit of code around, because it causes a problem in Vista.
I'm really beginning to tire of the OpenGL stuff right now, since it
seems everything works differently between Linux, OSX and Windows.  And
surprise, surprise, there never seems to be any problems in Linux ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1564 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-15 00:20:11 +00:00
stephena f997bfb7f2 Oops, we have to clean up after ourselves.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1563 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-14 21:51:11 +00:00
stephena c509186c0a Fixed crash with setting the UI palette in OpenGL mode.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1562 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-14 21:44:06 +00:00
stephena 9aa6eb820c A few more fixes for some OpenGL crashes. The allocation/deallocation
of FBSurfaces should belong solely to FrameBuffer, so that different
parts of the code don't try to delete what they don't own.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1561 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-12 18:32:53 +00:00
stephena 203cdaf323 First pass at fixing the 'white texture' issue with OpenGL mode in OSX.
Basically, all textures/surfaces need to be reloaded each time the GL
context changes (which seems to be more often under OSX than on other
systems).  This new code takes care of that.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1560 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-12 15:51:07 +00:00
stephena f599e1611d A little renaming in the GL class. I now know why we're getting white
textures in OSX.  It seems the textures have to be completely reloaded
after the window changes size, even if it's still large enough to hold
the previous textures.  I assume the GL context is being reset each
time SDL_SetVideoMode is called (although this doesn't happen in Linux
or Win32).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1559 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-10 18:11:21 +00:00
stephena f0212fe4de Enable the texrect argument again in OpenGL mode. However, now we're
getting white textures in OSX.  Arrgh ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1558 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-10 17:11:34 +00:00
stephena a3de0dcbaf Finally, I've eliminated the redraw issues in windowed OpenGL mode.
Can you believe it was because of ONE #$&#%&** line of code!

Still TODO, a general cleanup of the positioning code (ie, switching
from windowed to fullscreen & vice-versa) used the 'old' coordinates,
so things often aren't centered.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1557 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-08 18:56:54 +00:00
stephena 86cc191168 Finally getting a chance to look at the OpenGL stuff again.
Fixed crash when displaying 'popup' messages with OpenGL.

Changed OpenGL internal format to be the same as OSX.  Based on my
experimentation and research, this is the fastest format independent
of the platform/operating system.

Updated TODO marking the reload ROM listing functionality as being
complete.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1556 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-12-04 16:53:26 +00:00
stephena f1441f5f1b Added ability to reload the current ROM listing in the ROM launcher to the 'Control-r' key combo (similar to the same key which reloads the ROM while in emulation mode).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1555 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-11-30 17:28:03 +00:00
stephena f9d4bf5873 Update TODO list. I've had these items on an internal TODO list for
some time; I guess it's time to make it public.  I expect to add many
of the top items for the next release (at this point hopefully in
January 2009).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1554 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-11-26 16:22:55 +00:00
stephena 43f26ad3a6 Removed 'PAL' hint for a ROM, since the auto-detection actually correctly
detects it as NTSC.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1553 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-11-24 18:14:44 +00:00
stephena 6d0333800e OpenGL dialog boxes are now centered.
Partial fixes to F8 bankswitching code, also adding hardcoded support
for HES Challenge/Surfers Paradise double cart (the lower bank was
never accessible).  More work is required in this area.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1552 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-11-24 18:02:19 +00:00
stephena a1e91c365d A few gcc 4.3.x changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1551 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-11-02 16:46:05 +00:00
stephena 5b75962511 Fixed some missing includes as reported by M. Lanctot.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1550 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-08-25 23:22:22 +00:00
stephena dbc36a32e2 First pass at fixing OpenGL mode. There are still several issues with
the UI stuff, but at least emulation mode is now working.  But for
some strange reason, starting a ROM from the commandline gives a blank
screen, while it works fine from the ROM launcher.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1549 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-08-05 12:54:47 +00:00
stephena 6ba918320a A few minor API fixes, and a fix for the '-pedantic' argument in GCC.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1548 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-08-04 20:12:23 +00:00
stephena 54b5b79414 Backtracked a little on the new software surfaces rendering code. The
surfaces are still separate and blitted separately, but the actual
screen updates are now done all at once, at the end of the frame (as in
the previous code).  This makes things a little faster, and eliminates
an annoying flicker because of SDL_UpdateRect being called at different
times.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1547 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-08-04 11:56:12 +00:00
stephena 60da49f3ef Fixed issue with randomizing RAM for M6532 and various carts. It seems
that randomization was only done once per game invocation, and not each
time Device::reset() was called (which according to its definition is
when it should be done).  This has the side-effect of fixing A. Davies
notBoulderdash ROM, which didn't work if display-type was set to
auto-detect.

Some fixes for dynamic menus generated by PopUpWidget and its
associated dialog/surfaces.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1546 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-08-01 12:16:00 +00:00
stephena a661d6b804 Some restructuring and cleanup of PopUpWidget/ContextMenu functionality.
Those widgets now take two items per entry; the string to display, and
the one to use (in essence a key/value pair).  This really shortens the
code in quite a few places.

TIA graphical filters are now selectable from the UI, and correctly change
video mode (in TIA mode).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1545 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-07-25 12:41:41 +00:00
stephena b1ac5bd951 Reworked 'fullres' argument to also accept the 'auto' option. In this case,
fullscreen resolutions will be automatically chosen based on the required
size for the window.  The image will be centered and keep the same aspect
ratio, however, so operation will still work correctly on widescreen
monitors.  'Auto' will be the new default.  Otherwise, if a specific
resolution is requested, Stella will try to accomodate it *only* if it fits
into the resolution; otherwise the smallest resolution that fits will be
used.

Removed 'zoom_ui' and 'zoom_tia'.  The UI can now only be at 1x mode.

Aded 'tia_filter' commandline argument, which specifies to the filter
to use when rendering the tia image.  For now, these accept 'zoom1x',
'zoom2x'..., up to 'zoom10x', and duplicate previous behaviour.  Eventually,
Scalexx and HQxx filters may be added.  Still TODO is add this to the UI.

First pass at making the standard build use a minimum of zoom2x for the TIA,
so the UI can be larger and use a better looking font.  There's still work
to do in this area, especially for those ports with limited hardware that
support zoom1x only.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1544 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-07-22 14:54:39 +00:00
stephena 4a7f31b0dc Updated OSX project files for recent build changes. The OSX port doesn't
run at all, since I haven't even started on the OpenGL stuff yet.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1543 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-07-15 09:59:26 +00:00
stephena 04d8449398 Some changes to VideoMode handling. Fullscreen mode isn't working yet,
and OpenGL mode (windowed and fullscreen) isn't working at all.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1542 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-07-04 14:27:17 +00:00
stephena 31447d9a6e Some minor fixes for the Win32 build.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1541 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-06-20 12:19:42 +00:00
stephena 604217009c Partial fixes for InputTextDialog issues in the debugger. They now appear
onscreen, and don't cause a segfault, but there's still a positioning
problem when toggling fullscreen/windowed modes and when the base surface
has 'unusable' area (ie, an 800x600 window centered in a 1024x768 screen).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1540 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-06-19 19:15:44 +00:00
stephena 2e2867cb6e Several updates to the new UI rendering infrastructure. Overlaid frame
stats and general messages are now shown correctly.  ContextMenu and
PopUpWidget are now drawn correctly, and take image 'centering' into
account.  Fixed many 'offset' bugs in rendering surfaces.  Fixed
long-standing issue where pressing Alt-Enter to toggle fullscreen mode
actually passed the Enter to the underlying dialog (it's now properly
swallowed).  Probably many more items I'm forgetting ...

Still TODO is work on other dialogs that aren't centered by default
(InputTextDialog, etc).  My plan is to stabilize these changes and then
fix OpenGL mode, and only after I've achieved parity with 2.6.1 to
actually make use of the new infrastructure (larger fonts, etc).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1539 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-06-19 12:01:31 +00:00
stephena 2bbdcc34d7 Use two columns of entries in ContextMenu if there are more than a
certain number.  This is similar to how the old PopUpDialog worked.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1538 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-06-15 15:44:30 +00:00
stephena 84cd5d1d78 Started huge rework of the FrameBuffer UI. The basic idea is that
in-game dialogs are now rendered into separate surfaces, and then layered
onto the SDL screen when necessary.  The biggest advantage of this is
now each 'window' is separate, and won't be affected by the scaling or
filtering of other windows.  For example, zooming the TIA image no longer
changes the size of UI text overlaid on the TIA.  Similarly, eventually
graphical filters will be added, and filters applied to the TIA won't
affect the UI.

There's too many changes to list, so for now I'll list what doesn't work:
 * OpenGL mode (don't even try it)
 * Several popup dialogs in the debugger
 * RomInfo stuff is completely broken
 * Scanline count and FrameBuffer 'messages' aren't shown
 * Larger fonts - fonts are no longer scaled; we have to use larger ones,
   and update the UI accordingly
 * Probably a lot of other stuff I forgot to mention

This is a huge undertaking, similar in scale to when the UI was first
added in 2.0 release.  So it might take some time for this to stabilize ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1537 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-06-13 13:14:52 +00:00
stephena 340ee7d167 Fixed segfault issues when the SDL video mode cannot be created. This
doesn't happen very often (which is why I didn't notice it before), but
at least now if it *does*  happen, an error message will be printed
instead of just segfaulting.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1536 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-05-30 19:07:55 +00:00
stephena 66ab71a5c6 A few GCC 4.3 fixes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1535 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-05-30 12:06:17 +00:00
stephena b454085e8e Bumped version number for post 2.6.1 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1534 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-05-23 13:03:51 +00:00
stephena fa38c0c26d A few properties updates that I missed in 2.6.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1532 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-05-22 19:34:31 +00:00
stephena 37c1f354dd Made TIA auto-frame detection kick in every 32 frames instead of 64.
Further tweaking to the RIOT timer values.  I reverted to the z26
'0x40000' number, even though I'm not entirely clear why it's being
used.  Without it, several PAL ROMs fail in an infinite loop of
reading from INTIM and checking for zero.  I really hope that's the
last of the RIOT stuff, since I've been looking at it for the past
two months (the AVox and SaveKey issues started there as well).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1531 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-05-22 17:54:54 +00:00
stephena 8d4d5b4563 Hmm, looks like we're still not ready for the 2.6.1 release.
Removed scanline autodetection from the Console startup code.  It makes
more sense to just assume the Console is either NTSC or PAL, and let the
TIA auto-adjust the framerate if necessary.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1530 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-05-21 21:36:18 +00:00
stephena 832fab1ee8 Fix for startup sound issues when using 'framestats' mode.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1529 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2008-05-21 21:01:40 +00:00