Commit Graph

2668 Commits

Author SHA1 Message Date
stephena 8f2123a5bf Aspect ratio correction is now properly applied to the TIA in windowed
and (simulated) fullscreen mode.

Fullscreen mode is now simulated in that it creates a window that matches
what would appear in fullscreen.  The next thing to do is actually have
the backend create this fullscreen mode correctly.

Changed 'gl_fsscale' to 'tia.fsfill' to more properly indicate what the
option does.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2894 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-02 14:34:12 +00:00
stephena 38b586ae7b Fixed missing initialization of FBSurface attributes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2892 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-14 22:29:53 +00:00
stephena d04c42580b TIA rendering and Blargg/scanline effects are now working again.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2891 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-14 22:04:59 +00:00
stephena b7ae007093 Updated VS project files for recent class additions.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2890 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-13 23:16:54 +00:00
stephena c8b27ec114 Some pretty huge changes right across the board.
Changed pointers to references in c'tor calls, making things a little safer.

Removed FBSurfaceTIA, since it was tied too closely to SDL itself.  Added a
class called TIASurface that is functionally very similar, but is more generic
and accessible by the FrameBuffer directly.  Eventually, this class will take
responsibility for all things related to rendering the TIA image (Blargg TV
effects, phosphor mode, etc).

TIA rendering is currently borked; fixes will follow ...


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2889 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-12 23:34:25 +00:00
stephena d57184a4fc Fixed loading of PNG images in the ROMInfoWidget.
Added fallback to FBSurface::drawSurface() in case certain ports don't
want to implement it natively.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2888 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-09 17:44:04 +00:00
stephena e31274c753 When obtaining FBSurface bounding rects, use references instead of constantly
creating new instances of GUI::Rect.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2887 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-07 20:21:07 +00:00
stephena 3a60412706 Fixed framebuffer overlay display; the messages weren't being scaled correctly.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2886 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-07 20:02:47 +00:00
stephena b068b3299f Removed some obsolete references to OpenGL.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2885 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-07 11:15:00 +00:00
stephena 68df6fe891 Move the scaling, streaming and blending options directly into FBSurfaceSDL2,
making this class more robust, and enabling it to be used for either UI
surfaces or TIA surfaces.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2884 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-04 20:21:16 +00:00
stephena b418d5a4f5 Changed FBSurface API to access/modify source and destination rendering
rectangles.  Now that the underlying rendering is hardware accelerated,
this API more closely matches what is actually occurring.  As well, it
makes things easier comprehend: 'src' rect is the actual surface data,
and 'dst' rect is its final output onscreen (scaling, etc being applied).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2883 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-04 16:59:11 +00:00
stephena 0110cd829e Fixed some minor compile issues, and updated UNIX build files to
actually use SDL2.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2882 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-03 17:48:25 +00:00
stephena bf283001ee Some API comment fixes, and renamed FBSurface::update() to render(),
to more clearly indicate its intent.  It looks like
FBSurface::drawSurface() is essentially the same thing, and will
probably be removed.

Fixed header issue in OSX code, that wasn't detected until moving
to Xcode 5.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2881 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-02 15:58:57 +00:00
stephena 3914b15e9b Yet more upheaval of the FrameBuffer/surface code. Moved most of the
functionality of FBSurfaceUI into FBSurface directly, since there was
absolutely no need of the SDL-specific code to know about underlying
FrameBuffer-specific stuff.  This makes a clear separation between
SDL and the core code, making porting easier in the future.  As a
result, renamed FBSurfaceUI as FBSurfaceSDL2.

Eventually, FBSurfaceTIA will disappear completely, being integrated
into FBSurface and FBSurfaceSDL2.  Again, the logic for drawing the
TIA and using Blargg, etc has absolutely no place in SDL-specific
areas of the code.

When this conversion is complete, I see FrameBufferSDL2 and FBSurfaceSDL2
as being thin wrappers around SDL-specific functions that simply push
pixel data to the video system.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2880 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-02 13:17:24 +00:00
stephena 4654975341 Some updates for compiling in the latest version of Visual Studio (2013).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2879 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-05-01 23:15:17 +00:00
stephena e7719c334e And now that the FrameBuffer class is partially working, time to break
things again :)  Work continues on refactoring the FBSurface code, and
moving thing out of the xxxSDL classes that don't really have anything
to do with SDL.  This will also make it easier to port Stella to other
graphical toolkits.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2878 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-04-30 16:53:21 +00:00
stephena 61689a9563 The TIA windowed zooming modes now work (using Alt-minus and Alt-equals).
Rearranged some of the desktop size code, to be more consistent with the
new API.

Beginning to remove the old assumptions that a smaller screen than 640x480
could be used.  In the 4.0 release, the smallest (internal) screen
supported will actually be 640x480, and if the real desktop can't display
it, then it will be scaled down.  This is one of the nice benefits of
killing pure software rendering support, and letting the hardware just
draw the screen as it likes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2877 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-04-29 14:52:35 +00:00
stephena 0c3b9f1443 OK, just checking in to let everyone know that I haven't abandoned the SDL2
conversion.

There are changes all over the FrameBuffer classes.  Still TODO is
TIA resizing in windowed mode, and all fullscreen modes.  The infrastructure
is close to completion, and it should be pretty easy to get the framebuffer
stuff done in the next week or so.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2876 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-04-28 16:47:10 +00:00
stephena 18a467062a Oops, a few settings changes I forgot in the last commit.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2874 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-12 17:00:52 +00:00
stephena bc9e50f0f1 Updated some documentation.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2873 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-12 16:56:15 +00:00
stephena d0d04948c7 The keyboard now works in TIA emulation mode. Still TODO is get ASCII
characters working, so the UI can be used.

SDL Window events are now sent to the EventHandler core.  For now, only
the window expose event is handled (redraws window if it's been hidden).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2872 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-09 19:22:04 +00:00
stephena 0b3bf4b659 The framebuffer now recognizes double-buffering based on whether the render backend is accelerated, and the refresh method uses this to refresh buffers. This fixes the flashing that appears in OpenGL in Windows and OSX. Interestingly, Direct3D in Windows and OpenGL in Linux didn't exhibit this issue.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2871 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-08 22:57:16 +00:00
stephena c878fd926d More work on FrameBuffer, to fix flashing issues in some renderers.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2870 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-08 22:15:02 +00:00
stephena 28a335b9ea The OSX build files now support (and probably require) Xcode 5!
There's still quite a few issues to fix, but at least it compiles
and runs Stella correctly.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2869 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-08 00:44:30 +00:00
stephena cde5c2ed9c Disabled icon loading completely, since Linux/OSX didn't need it, and Windows uses the icon from the project file.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2868 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-07 22:34:48 +00:00
stephena 9da99f56d2 The 'video' commandline option now allows to select between different
renderer backends (in SDL).  This allows to select software mode (not
recommended) or Direct3D/OpenGL in Windows.

The app icon is now loaded in Windows.

Cleaned up the VideoDialog UI, removing references to double-buffering
and OpenGL-specific settings.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2867 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-07 22:12:39 +00:00
stephena 81347af093 Fixed joystick messages, to properly indicate when no joysticks are present.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2866 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-07 18:19:09 +00:00
stephena 90fbea8286 More fixes to VS project file for SDL2 update.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2865 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-07 17:45:49 +00:00
stephena 2ac3042d09 Updated Windows build scripts for SDL2.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2864 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-06 23:09:27 +00:00
stephena 2a0da329f2 Added FrameBuffer::about(), so we can actually see if hardware acceleration
is being used.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2863 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-06 22:36:31 +00:00
stephena fdf9ed708a Removed concept of 'base' surfaces, which was an optimization for software rendering.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2862 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-02 02:02:00 +00:00
stephena cf50b4f1b6 Updated VS project file to support SDL2. The Windows port is now at the same level as Linux (IOW, it can compile and run, but many things are still broken).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2861 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-02 01:35:37 +00:00
stephena 2d64643d8f A few fixes for texture/scanline filtering.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2860 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-03-01 18:28:57 +00:00
stephena dbddad068c Scanline effects and texture filtering settings are now honoured.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2859 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-28 23:34:50 +00:00
stephena a58fb7165e The 'center' and 'vsync' options are now honoured. Many commandline
options have changed names.  In particular, all tia-related options
now start with 'tia.'.  This includes most of the old options that
started with 'gl_'.

Changed the names of all tv-effects options from starting with 'tv_'
to 'tv.', to match the name changes elsewhere.

Some work on the documentation to reflect the latest changes.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2858 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-28 21:21:50 +00:00
stephena 7bebe7263d Some more work on Blargg scanlines; it's still not correct, but closer
than before.

Fixed compile issue for joystick support (thanks to email from D. Church).
Joystick support still isn't tested, so no guarantees it will work.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2857 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-22 17:31:16 +00:00
stephena ca59c8bd29 A few minor improvements in the SDL TIA handling code.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2856 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-19 21:30:52 +00:00
stephena 6c562f49b8 Blargg effects now work, but the scanlines aren't quite right yet.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2855 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-19 18:57:14 +00:00
stephena a1ea1b0c96 OK, SDL2 is in the building! This is the first pass at porting the code
to SDL2.  For now, there are many things broken, namely keyboard handling
and fullscreen modes.  But the launcher does show up, allows to start a
game and enter/exit the debugger, etc.

The code will only compile on Linux for now, and sometimes maybe not even
then.  Expect breakage on a regular basis over the next month or so.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2854 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-19 15:34:22 +00:00
stephena 46733e32c0 Fixed some minor compile warnings for OSX.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2853 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-17 00:11:01 +00:00
stephena 14c8546ce1 Updated VS project files for new EventHandler class.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2852 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-16 20:52:45 +00:00
stephena b2370205ca Fixed minor compile issue for OSX build, and removed the non-Intel
build files (sorry, there's no PPC support for Stella 4.0 using
SDL2).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2851 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-15 22:55:36 +00:00
stephena 5a48bf0311 Fairly large reorganization of the EventHandler class, separating out
SDL-specific code into its own EventHandlerSDL2 class.  This is part
of a larger reorganization of the codebase, to completely remove
SDL-specific code from src/emucore, and make it easier to port to SDL2.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2850 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-15 21:37:29 +00:00
stephena 32199509b3 Updated internal PNG files to latest release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2848 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-07 00:23:35 +00:00
stephena e7d2b67ceb Updated OSX project file for recent FrameBuffer changes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2847 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-05 23:07:51 +00:00
stephena 45d0740819 Some reorganization of the FrameBuffer classes, to move all SDL-related stuff
into FrameBufferSDL2 only.  This will make conversion to actual SDL2 code much
easier, since it won't be touching any of the core emulation code in src/emucore.
Next TODO is something similar for EventHandler (which uses SDL heavily and is
too tied to a core class).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2846 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-02-05 22:09:57 +00:00
stephena 37b30e7b66 Some cleanups of the FrameBuffer class; 'uipalette' is no longer suported.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2845 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-01-31 16:23:10 +00:00
stephena 53c053a2d9 Ported 3.9.3 changes to trunk.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2844 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-01-20 21:02:20 +00:00
stephena 7c4a0a331d Added new bankswitch code from 3.9.3 (RevEng and CPUWIZ) to trunk.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2837 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-01-17 15:39:11 +00:00
stephena aa5691af8a OK, it looks like I'm back to Stella development, after a several month
break.  First thing to do is update the year.  Happy new year to anyone
reading these commit logs.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2833 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-01-12 17:23:42 +00:00