From fa9951e95f560729819a36050a233bfa9932f928 Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 31 Aug 2013 13:49:19 +0000 Subject: [PATCH] Final updates for 3.9.2 release. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2822 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- Announce.txt | 24 ++--- Changes.txt | 6 +- debian/changelog | 7 ++ src/common/Version.hxx | 2 +- src/common/bspf.hxx | 18 +++- src/debugger/gui/TiaOutputWidget.cxx | 2 +- src/debugger/gui/TiaZoomWidget.cxx | 137 +++++++++++++++++---------- src/debugger/gui/TiaZoomWidget.hxx | 10 +- src/macosx/Info-Stella.plist | 2 +- src/unix/stella.spec | 5 +- src/win32/stella.rc | 8 +- 11 files changed, 147 insertions(+), 74 deletions(-) diff --git a/Announce.txt b/Announce.txt index e1349e045..872455817 100644 --- a/Announce.txt +++ b/Announce.txt @@ -9,7 +9,7 @@ SSSS ttt eeeee llll llll aaaaa =========================================================================== - Release 3.9.1 for Linux, MacOSX and Windows + Release 3.9.2 for Linux, MacOSX and Windows =========================================================================== The Atari 2600 Video Computer System (VCS), introduced in 1977, was the @@ -21,28 +21,28 @@ all of your favourite Atari 2600 games again! Stella was originally developed for Linux by Bradford W. Mott, however, it has been ported to a number of other platforms and is currently maintained by Stephen Anthony. -This is the 3.9.1 release of Stella for Linux, Mac OSX and Windows. The +This is the 3.9.2 release of Stella for Linux, Mac OSX and Windows. The distributions currently available are: * Binaries for Windows XP/Vista/7/8 : - Stella-3.9.1-win32.exe (32-bit EXE installer) - Stella-3.9.1-x64.exe (64-bit EXE installer) - Stella-3.9.1-windows.zip (32/64 bit versions) + Stella-3.9.2-win32.exe (32-bit EXE installer) + Stella-3.9.2-x64.exe (64-bit EXE installer) + Stella-3.9.2-windows.zip (32/64 bit versions) * Binary distribution for MacOS X 32-bit & 64-bit : - Stella-3.9.1-macosx.dmg (32-bit Universal Binary) - Stella-3.9.1_intel-macosx.dmg (32/64-bit Intel/OSX 10.6+) + Stella-3.9.2-macosx.dmg (32-bit Universal Binary) + Stella-3.9.2_intel-macosx.dmg (32/64-bit Intel/OSX 10.6+) * Binary distribution in 32-bit & 64-bit Ubuntu DEB format : - stella_3.9.1-1_i386.deb - stella_3.9.1-1_amd64.deb + stella_3.9.2-1_i386.deb + stella_3.9.2-1_amd64.deb * Binary distribution in 32-bit & 64-bit RPM format : - stella-3.9.1-2.i386.rpm - stella-3.9.1-2.x86_64.rpm + stella-3.9.2-2.i386.rpm + stella-3.9.2-2.x86_64.rpm * Source code distribution for all platforms : - stella-3.9.1-src.tar.gz + stella-3.9.2-src.tar.gz Distribution Site diff --git a/Changes.txt b/Changes.txt index 5887c16f4..eb7710b7d 100644 --- a/Changes.txt +++ b/Changes.txt @@ -12,7 +12,7 @@ Release History =========================================================================== -3.9.1 to 3.9.2: (August xx, 2013) +3.9.1 to 3.9.2: (August 31, 2013) * Improved parsing of the DASM lst file for the debugger disassembly; it sometimes missed constant declarations. @@ -31,6 +31,10 @@ * Renamed 'debuggerres' argument to 'dbg.res'. All future debugger- specific options will start with 'dbg.'. + * The TIA 'zoom' area in the debugger now supports scrolling the + mouse wheel (currently up/down only, as I don't have a sideways + scrolling mouse to test with). + -Have fun! diff --git a/debian/changelog b/debian/changelog index c3daaa802..fe91d392b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +stella (3.9.2-1) stable; urgency=high + + * Version 3.9.2 release + + -- Stephen Anthony Sat, 31 Aug 2013 11:13:43 -0230 + + stella (3.9.1-1) stable; urgency=high * Version 3.9.1 release diff --git a/src/common/Version.hxx b/src/common/Version.hxx index 164b736d4..2ec584deb 100644 --- a/src/common/Version.hxx +++ b/src/common/Version.hxx @@ -22,7 +22,7 @@ #include -#define STELLA_VERSION "3.9.2_beta1" +#define STELLA_VERSION "3.9.2" #define STELLA_BUILD atoi("$Rev$" + 6) #endif diff --git a/src/common/bspf.hxx b/src/common/bspf.hxx index d3cd6dafd..f92943071 100644 --- a/src/common/bspf.hxx +++ b/src/common/bspf.hxx @@ -131,6 +131,14 @@ inline int BSPF_compareIgnoreCase(const string& s1, const string& s2) return strcasecmp(s1.c_str(), s2.c_str()); #endif } +inline int BSPF_compareIgnoreCase(const char* s1, const char* s2) +{ +#if defined WIN32 && !defined __GNUG__ + return _stricmp(s1, s2); +#else + return strcasecmp(s1, s2); +#endif +} // Test whether the first string starts with the second one (case insensitive) inline bool BSPF_startsWithIgnoreCase(const string& s1, const string& s2) @@ -141,6 +149,14 @@ inline bool BSPF_startsWithIgnoreCase(const string& s1, const string& s2) return strncasecmp(s1.c_str(), s2.c_str(), s2.length()) == 0; #endif } +inline bool BSPF_startsWithIgnoreCase(const char* s1, const char* s2) +{ +#if defined WIN32 && !defined __GNUG__ + return _strnicmp(s1, s2, strlen(s2)) == 0; +#else + return strncasecmp(s1, s2, strlen(s2)) == 0; +#endif +} // Test whether two strings are equal (case insensitive) inline bool BSPF_equalsIgnoreCase(const string& s1, const string& s2) @@ -163,7 +179,7 @@ inline bool BSPF_endsWithIgnoreCase(const string& s1, const string& s2) if(s1.length() >= s2.length()) { const char* end = s1.c_str() + s1.length() - s2.length(); - return BSPF_equalsIgnoreCase(end, s2.c_str()); + return BSPF_compareIgnoreCase(end, s2.c_str()) == 0; } return false; } diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index 3bd3860ab..31158a5aa 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -45,7 +45,7 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font, l.push_back("Fill to scanline", "scanline"); l.push_back("Set breakpoint", "bp"); l.push_back("Set zoom position", "zoom"); - l.push_back("Toggle fixed debug colors", "fixed"); + l.push_back("Toggle fixed debug colors (from beam pos)", "fixed"); myMenu = new ContextMenu(this, font, l); } diff --git a/src/debugger/gui/TiaZoomWidget.cxx b/src/debugger/gui/TiaZoomWidget.cxx index be9422696..34461f957 100644 --- a/src/debugger/gui/TiaZoomWidget.cxx +++ b/src/debugger/gui/TiaZoomWidget.cxx @@ -34,11 +34,11 @@ TiaZoomWidget::TiaZoomWidget(GuiObject* boss, const GUI::Font& font, CommandSender(boss), myMenu(NULL) { - _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; + _flags = WIDGET_ENABLED | WIDGET_CLEARBG | + WIDGET_RETAIN_FOCUS | WIDGET_TRACK_MOUSE; _bgcolor = _bgcolorhi = kDlgColor; // Use all available space, up to the maximum bounds of the TIA image - // Width myst _w = BSPF_min(w, 320); _h = BSPF_min(h, 260); @@ -48,10 +48,10 @@ TiaZoomWidget::TiaZoomWidget(GuiObject* boss, const GUI::Font& font, myZoomLevel = 2; myNumCols = ((_w - 4) >> 1) / myZoomLevel; myNumRows = (_h - 4) / myZoomLevel; - myXoff = 0; - myYoff = 0; - myXCenter = myNumCols >> 1; - myYCenter = myNumRows >> 1; + myXOff = myYOff = 0; + + myMouseMoving = false; + myXClick = myYClick = 0; // Create context menu for zoom levels VariantList l; @@ -76,11 +76,9 @@ void TiaZoomWidget::loadConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TiaZoomWidget::setPos(int x, int y) { - // Center zoom on given x,y point - myXCenter = x >> 1; - myYCenter = y; - -//cerr << " ==> myXCenter = " << myXCenter << ", myYCenter = " << myYCenter << endl; + // Center on given x,y point + myXOff = (x >> 1) - (myNumCols >> 1); + myYOff = y - (myNumRows >> 1); recalc(); } @@ -92,8 +90,8 @@ void TiaZoomWidget::zoom(int level) return; myZoomLevel = level; - myNumCols = ((_w - 4) >> 1) / myZoomLevel; - myNumRows = (_h - 4) / myZoomLevel; + myNumCols = ((_w - 4) >> 1) / myZoomLevel; + myNumRows = (_h - 4) / myZoomLevel; recalc(); } @@ -101,46 +99,85 @@ void TiaZoomWidget::zoom(int level) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TiaZoomWidget::recalc() { + const int tw = instance().console().tia().width(), + th = instance().console().tia().height(); + // Don't go past end of framebuffer - const int width = instance().console().tia().width(), - height = instance().console().tia().height(); + myXOff = BSPF_clamp(myXOff, 0, tw - myNumCols); + myYOff = BSPF_clamp(myYOff, 0, th - myNumRows); - // Figure out the bounding rectangle for the current center coords - const int xoff = myNumCols >> 1, - yoff = myNumRows >> 1; - - if(myXCenter < xoff) - myXCenter = xoff; - else if(myXCenter + xoff >= width) - myXCenter = width - xoff - 1; - else if(myYCenter < yoff) - myYCenter = yoff; - else if(myYCenter + yoff >= height) - myYCenter = height - yoff - 1; - - // Only redraw when necessary - int oldXoff = myXoff, oldYoff = myYoff; - myXoff = BSPF_max(0, myXCenter - (myNumCols >> 1)); - myYoff = BSPF_max(0, myYCenter - (myNumRows >> 1)); - if(oldXoff != myXoff || oldYoff != myYoff) - { - setDirty(); draw(); -//cerr << " OLD ==> myXoff: " << oldXoff << ", myYoff = " << oldYoff << endl; -//cerr << " NEW ==> myXoff: " << myXoff << ", myYoff = " << myYoff << endl << endl; - } + setDirty(); draw(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TiaZoomWidget::handleMouseDown(int x, int y, int button, int clickCount) { - // Grab right mouse button for zoom context menu - if(button == 2) + // Button 1 is for 'drag'/movement of the image + // Button 2 is for context menu + if(button == 1) + { + // Indicate mouse drag started/in progress + myMouseMoving = true; + myXClick = x; + myYClick = y; + } + else if(button == 2) { // Add menu at current x,y mouse location myMenu->show(x + getAbsX(), y + getAbsY()); } } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void TiaZoomWidget::handleMouseUp(int x, int y, int button, int clickCount) +{ + myMouseMoving = false; +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void TiaZoomWidget::handleMouseWheel(int x, int y, int direction) +{ + if(direction > 0) + handleEvent(Event::UIDown); + else + handleEvent(Event::UIUp); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void TiaZoomWidget::handleMouseMoved(int x, int y, int button) +{ + // TODO: Not yet working - finish for next release +#if 0 + if(myMouseMoving) + { + if(x < 0 || y < 0 || x > _w || y > _h) + return; + + int diffx = ((x - myXClick) >> 1);// / myZoomLevel; + int diffy = (y - myYClick);// / myZoomLevel; +// myXClick = x; +// myYClick = y; + + + +//cerr << diffx << " " << diffy << endl; + + + myXOff -= diffx; + myYOff -= diffy; + + recalc(); +// cerr << x << ", " << y << endl; + } +#endif +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void TiaZoomWidget::handleMouseLeft(int button) +{ + myMouseMoving = false; +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool TiaZoomWidget::handleEvent(Event::Type event) { @@ -149,35 +186,35 @@ bool TiaZoomWidget::handleEvent(Event::Type event) switch(event) { case Event::UIUp: - myYCenter -= 4; + myYOff -= 4; break; case Event::UIDown: - myYCenter += 4; + myYOff += 4; break; case Event::UILeft: - myXCenter -= 2; + myXOff -= 2; break; case Event::UIRight: - myXCenter += 2; + myXOff += 2; break; case Event::UIPgUp: - myYCenter = 0; + myYOff = 0; break; case Event::UIPgDown: - myYCenter = 260; + myYOff = _h; break; case Event::UIHome: - myXCenter = 0; + myXOff = 0; break; case Event::UIEnd: - myXCenter = 320; + myXOff = _w; break; default: @@ -230,9 +267,9 @@ void TiaZoomWidget::drawWidget(bool hilite) scanoffset = width * scany + scanx; int x, y, col, row; - for(y = myYoff, row = 0; y < myNumRows+myYoff; ++y, row += hzoom) + for(y = myYOff, row = 0; y < myNumRows+myYOff; ++y, row += hzoom) { - for(x = myXoff, col = 0; x < myNumCols+myXoff; ++x, col += wzoom) + for(x = myXOff, col = 0; x < myNumCols+myXOff; ++x, col += wzoom) { uInt32 idx = y*width + x; uInt32 color = currentFrame[idx] | (idx > scanoffset ? 1 : 0); diff --git a/src/debugger/gui/TiaZoomWidget.hxx b/src/debugger/gui/TiaZoomWidget.hxx index 3e54dd455..921dc4a55 100644 --- a/src/debugger/gui/TiaZoomWidget.hxx +++ b/src/debugger/gui/TiaZoomWidget.hxx @@ -39,6 +39,10 @@ class TiaZoomWidget : public Widget, public CommandSender protected: void handleMouseDown(int x, int y, int button, int clickCount); + void handleMouseUp(int x, int y, int button, int clickCount); + void handleMouseWheel(int x, int y, int direction); + void handleMouseMoved(int x, int y, int button); + void handleMouseLeft(int button); bool handleEvent(Event::Type event); void handleCommand(CommandSender* sender, int cmd, int data, int id); @@ -54,8 +58,10 @@ class TiaZoomWidget : public Widget, public CommandSender int myZoomLevel; int myNumCols, myNumRows; - int myXoff, myYoff; - int myXCenter, myYCenter; + int myXOff, myYOff; + + bool myMouseMoving; + int myXClick, myYClick; }; #endif diff --git a/src/macosx/Info-Stella.plist b/src/macosx/Info-Stella.plist index 1d6ff13b3..1225f3e58 100644 --- a/src/macosx/Info-Stella.plist +++ b/src/macosx/Info-Stella.plist @@ -53,7 +53,7 @@ CFBundleSignature StLa CFBundleVersion - 3.9.1 + 3.9.2 NSMainNibFile SDLMain.nib NSPrincipalClass diff --git a/src/unix/stella.spec b/src/unix/stella.spec index d063c38fc..294046547 100644 --- a/src/unix/stella.spec +++ b/src/unix/stella.spec @@ -1,5 +1,5 @@ %define name stella -%define version 3.9.1 +%define version 3.9.2 %define rel 1 %define enable_gl 1 @@ -108,6 +108,9 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version} %_datadir/icons/large/%{name}.png %changelog +* Sat Aug 31 2013 Stephen Anthony 3.9.2-1 +- Version 3.9.2 release + * Wed Aug 21 2013 Stephen Anthony 3.9.1-1 - Version 3.9.1 release diff --git a/src/win32/stella.rc b/src/win32/stella.rc index fbcb40c82..c5c0da387 100755 --- a/src/win32/stella.rc +++ b/src/win32/stella.rc @@ -36,8 +36,8 @@ IDI_ICON ICON "stella.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,9,1,0 - PRODUCTVERSION 3,9,1,0 + FILEVERSION 3,9,2,0 + PRODUCTVERSION 3,9,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -55,12 +55,12 @@ BEGIN VALUE "Comments", "The multi-platform Atari 2600 emulator. Stella is released under the GPLv2." VALUE "CompanyName", "The Stella Team (http://stella.sourceforge.net)" VALUE "FileDescription", "Stella" - VALUE "FileVersion", "3.9.1" + VALUE "FileVersion", "3.9.2" VALUE "InternalName", "Stella" VALUE "LegalCopyright", "Copyright (C) 1995-2013 The Stella Team" VALUE "OriginalFilename", "Stella.exe" VALUE "ProductName", "Stella" - VALUE "ProductVersion", "3.9.1" + VALUE "ProductVersion", "3.9.2" END END BLOCK "VarFileInfo"