Commit Graph

2692 Commits

Author SHA1 Message Date
stephena a0aa1c8e0a Updated PNG library to latest version.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2918 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-12 16:25:32 +00:00
stephena 6cb3b5c58a Fixed typo in default assignment of key mapping for keypad 0.
It looks like this bug has been present for a long time.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2917 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-11 16:11:10 +00:00
stephena 0b74f63a44 Some more removal of SDL-specific code from the emulation core.
The EventHandler now queries EventHandlerSDL2 for names of keys
instead of keeping a list itself.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2916 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-11 16:06:17 +00:00
stephena 53edeb9171 Text input is now working in the debugger prompt (a rewrite of the
PromptWidget class to use EditableWidget will probably happen after
release 4.0).

All text input now seems to be working as in Stella 3.9.3.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2915 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-10 21:53:02 +00:00
stephena aa6c1b3d58 Text input is now working in all classes inheriting from EditableWidget
(specifically, DataGridWidget and RomListWidget are now working).

More work is required for PromptWidget, since it was created before
EditableWidget existed, and hence duplicates a lot of that classes code.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2914 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-10 21:04:36 +00:00
stephena 90248b2701 First pass at converting text input to the new SDL2 scheme. Basically,
the old way mixed both single-key events and Unicode input into one
method, and the new way separates them (using a new handleText method).

Currently it seems to be working fine in the ROM launcher (yay!, I
can now quickly jump to ROMs by name again).  There are still some
issues in the debugger, which I'll work on next.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2913 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-10 16:43:35 +00:00
stephena d66226c210 Fixed 'magic number' issues when creating a System for the Console.
Technically, the magic numbers are still being used, but now they're
no longer exposed outside the System class by default.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2912 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-09 16:35:19 +00:00
adavie d0092580e0 Bankswitching for ROM banks now working OK.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2911 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-06 23:29:00 +00:00
adavie 68c3c42254 first "working" DASH code
resolved "access" initialisaation. Bizarre stuff and a bit of handwaving magic, but at least it runs the test ROM as a "DASH" version now.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2910 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-06 14:52:10 +00:00
stephena 3ab3c879be Updated VS project file for new DASH bankswitch scheme.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2909 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 17:24:24 +00:00
stephena 80bbfadb4c Fixed grabmouse and show cursor to match Stella 3.9.3 functionality.
Added 'hidecursor' commandline option, to always disable showing the
mouse cursor (useful for fullscreen-only frontends).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2908 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 16:01:45 +00:00
adavie f7f80ff05b fixed shift for ROM bank size
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2907 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 15:29:51 +00:00
adavie f99afe12dd rewrite 3E/3F functionality and optimal usage of ROM when RAM blocks overwrite.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2906 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 14:29:33 +00:00
stephena a583ea7532 Forgot to increase version # in last commit.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2905 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 12:17:23 +00:00
stephena d09ac569e5 Finally have fullscreen/windowed mode switching working.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2904 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-04 12:15:54 +00:00
adavie 053ce36518 fixed a minor bank usage init inconsistency
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2903 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 21:21:11 +00:00
adavie abdd770e38 Adjusted bank() and bankCount() functions according to advice from SA.
removed 'myCurrentBank' -- this has no meaning in this scheme.
Adjusted load() to switch in each bank as it is loaded
removed comment/questions to SA and replaced per advice.
added a few TODO comments.
reformatted some of the comments back, as per discussion

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2902 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 21:17:54 +00:00
adavie cacecbeddd Must remember to build before commits. Sorry.
Fixed erroneous constant duplicate

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2901 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 14:11:01 +00:00
adavie 40c8c81245 autoformatted. still stabilising to stella standard.
Tabs removed, replaced with 2-char spacing. 
constants for bit masking added
corrected the patch code for the bit-allocations for RAM/ROM banks switch


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2900 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 13:53:49 +00:00
adavie 6d6dd7632f modified poke to handle the new bank encoding (a single byte, with the RAM/ROM bit encoded).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2899 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 13:04:35 +00:00
adavie d4bed6da4b Comment fixes, and modifcation to a single hotspot for banswitching.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2898 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 12:06:12 +00:00
adavie 009b36bd5c Modified for a single hotspot, as the bank switching is encoded in the value written to the bank address anyway.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2897 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 12:05:00 +00:00
stephena c774f19fd0 Changed enum back to static const, as per the authors original intent.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2896 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-03 11:39:45 +00:00
stephena e81f2b0ffd Added preliminary support for DASH bankswitching scheme by A. Davie.
This hasn't been tested yet, since no ROMs currently exist.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2895 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2014-06-02 20:41:19 +00:00
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