Added an alternate way of emulating the M6532 timer functionality. The

new code seems to contradict some documentation on the timer behaviour,
but does work with all ROMs I've tested (it even fixes a few ROMs that
didn't work before).  I'm not sure if the documentation is incorrect;
more testing and feedback is needed.

Bumped version number and documentation for 2.5.1 release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1459 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2008-04-08 19:17:26 +00:00
parent 547da610d4
commit 2350a5c3f5
11 changed files with 97 additions and 148 deletions

View File

@ -9,7 +9,7 @@
SSSS ttt eeeee llll llll aaaaa SSSS ttt eeeee llll llll aaaaa
=============================================================================== ===============================================================================
Release 2.5 for Linux, Mac OSX and Windows Release 2.5.1 for Linux, Mac OSX and Windows
=============================================================================== ===============================================================================
The Atari 2600 Video Computer System (VCS), introduced in 1977, was the most The Atari 2600 Video Computer System (VCS), introduced in 1977, was the most
@ -21,23 +21,23 @@ of your favorite Atari 2600 games again! Stella was originally developed for
Linux by Bradford W. Mott, however, it has been ported to a number of other Linux by Bradford W. Mott, however, it has been ported to a number of other
platforms. platforms.
This is the 2.5 release of Stella for Linux, Mac OSX, Windows and GP2X. This is the 2.5.1 release of Stella for Linux, Mac OSX, Windows and GP2X.
Distributions for other operating systems will appear as they become available. Distributions for other operating systems will appear as they become available.
The distributions currently available are: The distributions currently available are:
* Binary distribution in 32-bit RPM format for Linux (stella-2.5-1.i586.rpm) * Binary distribution in 32-bit RPM format for Linux (stella-2.5.1-1.i586.rpm)
* Binary distribution in 32-bit Ubuntu DEB format (stella_2.5-1_i386.deb) * Binary distribution in 32-bit Ubuntu DEB format (stella_2.5.1-1_i386.deb)
* Binary distribution in 64-bit Ubuntu DEB format (stella_2.5-1_amd64.deb) * Binary distribution in 64-bit Ubuntu DEB format (stella_2.5.1-1_amd64.deb)
* Binary distribution for Mac OSX (StellaOSX2.5.dmg.gz) * Binary distribution for Mac OSX (StellaOSX2.5.1.dmg.gz)
* Binary installer (exe) for Windows (stella-2.5-win32.exe) * Binary installer (exe) for Windows (stella-2.5.1-win32.exe)
* Binary zip for Windows (stella-2.5-win32.zip) * Binary zip for Windows (stella-2.5.1-win32.zip)
* Source code distribution for all platforms (stella-2.5-src.tar.gz) * Source code distribution for all platforms (stella-2.5.1-src.tar.gz)
PLEASE DO NOT WRITE ASKING FOR ROM IMAGES TO USE WITH STELLA! ALL SUCH PLEASE DO NOT WRITE ASKING FOR ROM IMAGES TO USE WITH STELLA! ALL SUCH
REQUESTS WILL BE IGNORED! REQUESTS WILL BE IGNORED!

View File

@ -12,6 +12,37 @@
Release History Release History
=============================================================================== ===============================================================================
2.5 to 2.5.1: (April 9, 2008)
* Fixed M6532 RIOT timer emulation. More testing is needed, but the
changes so far have fixed several ROMs that didn't work before.
* Fixed issue with weird characters in the debugger disassembly when
loading .lst files.
* Fixed bug where entering the debugger for 4A50 and E0 carts caused
the ROM to be frozen afterwords.
* Removed logic whereby starting a ROM from something other than the
built-in launcher wouldn't allow the user to go back to the ROM launcher.
* Fixed bug (hopefully) with the app icon not showing on the Stella window.
Further testing is needed, since I can't duplicate the error myself.
* Fixed default snapshot folder issues; the folder will now be
automatically created in the same place as state folders, ini files,
etc (whereever that may be for your platform).
* Re-added 'lastrom' functionality, where Stella will remember and
auto-select the last ROM that was successfully launched in the ROM
launcher.
* For Stella developers, fixed SpeakJet emulation so it compiles again.
No improvements have been made to the emulation itself, though.
-Have fun!
2.4.2 to 2.5: (March 28, 2008) 2.4.2 to 2.5: (March 28, 2008)
* Added RomInfo widget to the ROM launcher, which shows properties * Added RomInfo widget to the ROM launcher, which shows properties
@ -107,8 +138,6 @@
* Updated configure script for cross-compiling Win32 version in Linux. * Updated configure script for cross-compiling Win32 version in Linux.
-Have fun!
2.4.1 to 2.4.2: (September 17, 2007) 2.4.1 to 2.4.2: (September 17, 2007)

View File

@ -12,7 +12,7 @@
License Information and Copyright Notice License Information and Copyright Notice
=============================================================================== ===============================================================================
Copyright (C) 1995-2007 Bradford W. Mott <bwmott@acm.org> and the Stella Team Copyright (C) 1995-2008 Bradford W. Mott <bwmott@acm.org> and the Stella Team
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software

View File

@ -1,4 +1,4 @@
This is release 2.5 of Stella. Stella is a multi-platform Atari 2600 VCS This is release 2.5.1 of Stella. Stella is a multi-platform Atari 2600 VCS
emulator which allows you to play all of your favorite Atari 2600 games emulator which allows you to play all of your favorite Atari 2600 games
on your PC. You'll find the Stella Users Manual in the docs subdirectory. on your PC. You'll find the Stella Users Manual in the docs subdirectory.
If you'd like to verify that you have the latest release of Stella visit If you'd like to verify that you have the latest release of Stella visit
@ -9,4 +9,4 @@ the Stella Website at:
Enjoy, Enjoy,
The Stella Team The Stella Team
March 28, 2008 April 9, 2008

View File

@ -10,7 +10,7 @@
<br><br> <br><br>
<center><h2><b>A multi-platform Atari 2600 VCS emulator</b></h2></center> <center><h2><b>A multi-platform Atari 2600 VCS emulator</b></h2></center>
<center><h4><b>Release 2.5</b></h4></center> <center><h4><b>Release 2.5.1</b></h4></center>
<br><br> <br><br>
<center><h2><b>User's Guide</b></h2></center> <center><h2><b>User's Guide</b></h2></center>
@ -39,7 +39,7 @@
<br><br><br> <br><br><br>
<center><b>February 1999 - March 2008</b></center> <center><b>February 1999 - April 2008</b></center>
<center><b>The Stella Team</b></center> <center><b>The Stella Team</b></center>
<center><b><a href="http://stella.sourceforge.net">Stella Homepage</a></b></center> <center><b><a href="http://stella.sourceforge.net">Stella Homepage</a></b></center>
@ -220,101 +220,34 @@
Sega Dreamcast, Unix, and Windows. Sega Dreamcast, Unix, and Windows.
</p> </p>
<h2><b>New in Release 2.5</b></h2> <h2><b>New in Release 2.5.1</b></h2>
<ul> <ul>
<li>Added RomInfo widget to the ROM launcher, which shows properties <li>Fixed M6532 RIOT timer emulation. More testing is needed, but the
information and a snapshot of the currently selected ROM. Updated the UI changes so far have fixed several ROMs that didn't work before.</li>
and added '-romviewer' commandline argument to activate this setting.
Note that the ROM launcher will have to be sized at least 640x480 for this
to be used. Also note that the snapshots must be in 1x mode with a
maximum size of 320x260. This will be expanded on in a future release.</li>
<li>Added ROM audit functionality, whereby ROMs can be physically renamed <li>Fixed issue with weird characters in the debugger disassembly when
according to their properties' name.</li> loading .lst files.</li>
<li>Added bankswitching support for 0840, SB, X07 and 4A50. A special thanks <li>Fixed bug where entering the debugger for 4A50 and E0 carts caused
to Eckhard Stolberg for much help in this area.</li> the ROM to be frozen afterwords.</li>
<li>Removed "non-browse" functionality from the ROM launcher; it now always <li>Removed logic whereby starting a ROM from something other than the
uses browse/filesystem mode. The previous 'pretty' names can now be built-in launcher wouldn't allow the user to go back to the ROM launcher.</li>
seen by renaming all your ROMs with the new ROM audit feature.</li>
<li>Huge overhaul of controller handling and Stelladaptor support, making it <li>Fixed bug (hopefully) with the app icon not showing on the Stella window.
much easier to add new controller types in a future release.</li> Further testing is needed, since I can't duplicate the error myself.</li>
<li>Fixed paddle issues in Night Driver; paddle emulation speed should be <li>Fixed default snapshot folder issues; the folder will now be
much better.</li> automatically created in the same place as state folders, ini files,
etc (whereever that may be for your platform).</li>
<li>Fixed several 6507 emulation bugs related to BCD handling.</li> <li>Re-added 'lastrom' functionality, where Stella will remember and
auto-select the last ROM that was successfully launched in the ROM
launcher.</li>
<li>Updated ROM properties based on info from RomHunter.</li> <li>For Stella developers, fixed SpeakJet emulation so it compiles again.
No improvements have been made to the emulation itself, though.</li>
<li>ROM properties can now be edited from the ROM launcher; you no longer
have to start a ROM to do so.</li>
<li>Added support for configurable font to ROM launcher (currently only
'small' and 'large'). Updated the UI and added -launcherfont' commandline
argument to change this setting.</li>
<li>Added SECAM, NTSC50, PAL60 and SECAM60 to the list of formats that can
be used. Also, switching between these modes with 'Ctrl-f' now switches
the palette only; the number of scanlines won't change.</li>
<li>Fixed crash when switching between software and OpenGL mode with a
Stelladaptor plugged in.</li>
<li>Added '-tiafloat' commandline argument, which determines whether or not
the TIA pins are in a 'floating' state. This is useful for testing on
certain CMOS EPROM chips where the unused TIA pins on a read are not
floating but pulled high.</li>
<li>Fixed issue in debugger where once a .sym file was loaded, it was used
in all ROMs loaded after that.</li>
<li>Fixed issue in debugger where equate names weren't showing up in the RAM
and CPU widgets. Note that this still isn't perfect, and needs support
from DASM for proper functionality.</li>
<li>Updated state file format, creating smaller files (and in preparation
for state rewinding in a future release). Old state saves will no longer
work.</li>
<li>Added '-bs' commandline argument, which is an alias for '-type' (which
is still present).</li>
<li>Removed -pXspeed' commandline arguments, and replaced them with a
single '-pspeed'.</li>
<li>Removed '-paddle' commandline argument. The paddle currently emulated
by the mouse can still be changed with Ctrl-0..3 or within the UI, but
the setting is no longer saved.</li>
<li>Reworked UI for specifying that the console ports have been swapped,
hopefully making it easier to understand.</li>
<li>Added 'Ctrl-c' & 'Ctrl-v' to EditTextWidgets, allowing to copy and paste
the text widget contents. More work in this area is coming in a future
release.</li>
<li>Added 'Ctrl-leftarrow' and 'Ctrl-rightarrow' to EditTextWidgets, to move
to the first character of previous and next words (respectively).</li>
<li>For the Win32 port: fixed OpenGL crashes in Vista. Graphical updates
are still slower in Vista compared to XP, though.</li>
<li>For the Win32 port: default folder for Stella config files is now
'My Documents\Stella'; this can be disabled if necessary. This should
fix issues with losing settings when launching Stella from an IDE,
and the creation of stella.ini and 'state' directories in many
different places.</li>
<li>For the Win32 port: several fixes to the Visual Studio project files,
allowing building in debug or release mode, for both i386 and x86_64.
The project files have been upgraded to Visual Studio 2008, and Stella
can now be built and distributed without the VS runtime libraries.</li>
<li>Updated configure script for cross-compiling Win32 version in Linux.</li>
</ul> </ul>
<p> <p>

View File

@ -13,13 +13,13 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Version.hxx,v 1.34 2008-03-28 23:29:13 stephena Exp $ // $Id: Version.hxx,v 1.35 2008-04-08 19:17:26 stephena Exp $
//============================================================================ //============================================================================
#ifndef VERSION_HXX #ifndef VERSION_HXX
#define VERSION_HXX #define VERSION_HXX
#define STELLA_BASE_VERSION "2.5.1_cvs" #define STELLA_BASE_VERSION "2.5.1"
#ifdef NIGHTLY_BUILD #ifdef NIGHTLY_BUILD
#define STELLA_VERSION STELLA_BASE_VERSION "pre-" NIGHTLY_BUILD #define STELLA_VERSION STELLA_BASE_VERSION "pre-" NIGHTLY_BUILD

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: M6532.cxx,v 1.16 2008-03-31 00:59:30 stephena Exp $ // $Id: M6532.cxx,v 1.17 2008-04-08 19:17:26 stephena Exp $
//============================================================================ //============================================================================
#include <assert.h> #include <assert.h>
@ -163,44 +163,28 @@ uInt8 M6532::peek(uInt16 addr)
case 0x04: // Timer Output case 0x04: // Timer Output
case 0x06: case 0x06:
{ {
uInt32 cycles = mySystem->cycles() - 1; uInt32 timer = myTimer - (mySystem->cycles() - myCyclesWhenTimerSet);
uInt32 delta = cycles - myCyclesWhenTimerSet;
Int32 timer = (Int32)myTimer - (Int32)(delta >> myIntervalShift) - 1;
// See if the timer has expired yet? // See if the timer has expired yet?
if(timer >= 0) // Note that this constant comes from z26, and corresponds to
// 256 intervals of T1024T (ie, the maximum that the timer
// should hold)
if(!(timer & 0x40000))
{ {
return (uInt8)timer; return (timer >> myIntervalShift) & 0xff;
} }
else else
{ {
timer = (Int32)(myTimer << myIntervalShift) - (Int32)delta - 1; myTimerReadAfterInterrupt = true;
myCyclesWhenInterruptReset = mySystem->cycles();
if((timer <= -2) && !myTimerReadAfterInterrupt) return timer & 0xff;
{
// Indicate that timer has been read after interrupt occured
myTimerReadAfterInterrupt = true;
myCyclesWhenInterruptReset = mySystem->cycles();
}
if(myTimerReadAfterInterrupt)
{
Int32 offset = myCyclesWhenInterruptReset -
(myCyclesWhenTimerSet + (myTimer << myIntervalShift));
timer = (Int32)myTimer - (Int32)(delta >> myIntervalShift) - offset;
}
return (uInt8)timer;
} }
} }
case 0x05: // Interrupt Flag case 0x05: // Interrupt Flag
case 0x07: case 0x07:
{ {
uInt32 cycles = mySystem->cycles() - 1; Int32 timer = myTimer - (mySystem->cycles() - myCyclesWhenTimerSet);
uInt32 delta = cycles - myCyclesWhenTimerSet;
Int32 timer = (Int32)myTimer - (Int32)(delta >> myIntervalShift) - 1;
if((timer >= 0) || myTimerReadAfterInterrupt) if((timer >= 0) || myTimerReadAfterInterrupt)
return 0x00; return 0x00;
@ -289,29 +273,29 @@ void M6532::poke(uInt16 addr, uInt8 value)
} }
else if((addr & 0x17) == 0x14) // Write timer divide by 1 else if((addr & 0x17) == 0x14) // Write timer divide by 1
{ {
myTimer = value;
myIntervalShift = 0; myIntervalShift = 0;
myTimer = value << myIntervalShift;
myCyclesWhenTimerSet = mySystem->cycles(); myCyclesWhenTimerSet = mySystem->cycles();
myTimerReadAfterInterrupt = false; myTimerReadAfterInterrupt = false;
} }
else if((addr & 0x17) == 0x15) // Write timer divide by 8 else if((addr & 0x17) == 0x15) // Write timer divide by 8
{ {
myTimer = value;
myIntervalShift = 3; myIntervalShift = 3;
myTimer = value << myIntervalShift;
myCyclesWhenTimerSet = mySystem->cycles(); myCyclesWhenTimerSet = mySystem->cycles();
myTimerReadAfterInterrupt = false; myTimerReadAfterInterrupt = false;
} }
else if((addr & 0x17) == 0x16) // Write timer divide by 64 else if((addr & 0x17) == 0x16) // Write timer divide by 64
{ {
myTimer = value;
myIntervalShift = 6; myIntervalShift = 6;
myTimer = value << myIntervalShift;
myCyclesWhenTimerSet = mySystem->cycles(); myCyclesWhenTimerSet = mySystem->cycles();
myTimerReadAfterInterrupt = false; myTimerReadAfterInterrupt = false;
} }
else if((addr & 0x17) == 0x17) // Write timer divide by 1024 else if((addr & 0x17) == 0x17) // Write timer divide by 1024
{ {
myTimer = value;
myIntervalShift = 10; myIntervalShift = 10;
myTimer = value << myIntervalShift;
myCyclesWhenTimerSet = mySystem->cycles(); myCyclesWhenTimerSet = mySystem->cycles();
myTimerReadAfterInterrupt = false; myTimerReadAfterInterrupt = false;
} }

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# $Id: stella.SlackBuild,v 1.9 2008-03-26 00:52:05 stephena Exp $ # $Id: stella.SlackBuild,v 1.10 2008-04-08 19:17:26 stephena Exp $
# stella.SlackBuild for Stella 2.x, B. Watson, 2005 # stella.SlackBuild for Stella 2.x, B. Watson, 2005
@ -13,7 +13,7 @@ die() {
exit 1 exit 1
} }
VERSION=2.5 VERSION=2.5.1
ARCH=${ARCH-i486} ARCH=${ARCH-i486}
BUILD=1 BUILD=1

View File

@ -1,5 +1,5 @@
%define name stella %define name stella
%define version 2.5 %define version 2.5.1
%define rel 1 %define rel 1
%define enable_gl 1 %define enable_gl 1
@ -107,6 +107,9 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
%_datadir/icons/large/%{name}.png %_datadir/icons/large/%{name}.png
%changelog %changelog
* Wed Apr 9 2008 Stephen Anthony <stephena@users.sf.net> 2.5.1-1
- Version 2.5.1 release
* Fri Mar 28 2008 Stephen Anthony <stephena@users.sf.net> 2.5-1 * Fri Mar 28 2008 Stephen Anthony <stephena@users.sf.net> 2.5-1
- Version 2.5 release - Version 2.5 release

View File

@ -8,7 +8,7 @@
AppName=Stella AppName=Stella
AppVerName=Stella 2.5 AppVerName=Stella 2.5.1
AppPublisher=Bradford W. Mott and the Stella team AppPublisher=Bradford W. Mott and the Stella team
@ -22,7 +22,7 @@ DefaultDirName={pf}\Stella
DefaultGroupName=Stella DefaultGroupName=Stella
OutputBaseFilename=stella-2.5-win32 OutputBaseFilename=stella-2.5.1-win32
Compression=lzma Compression=lzma
@ -44,13 +44,13 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
[Files] [Files]
Source: "C:\Users\stephena\src\stella\stella-2.5\Stella.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "C:\Users\stephena\src\stella\stella-2.5.1\Stella.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\stephena\src\stella\stella-2.5\zlibwapi.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "C:\Users\stephena\src\stella\stella-2.5.1\zlibwapi.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\stephena\src\stella\stella-2.5\SDL.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "C:\Users\stephena\src\stella\stella-2.5.1\SDL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\stephena\src\stella\stella-2.5\docs\*"; DestDir: "{app}\docs"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "C:\Users\stephena\src\stella\stella-2.5.1\docs\*"; DestDir: "{app}\docs"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files

View File

@ -36,8 +36,8 @@ IDI_ICON ICON "stella.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,5,0,0 FILEVERSION 2,5,1,0
PRODUCTVERSION 2,5,0,0 PRODUCTVERSION 2,5,1,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -55,12 +55,12 @@ BEGIN
VALUE "Comments", "The multi-platform Atari 2600 emulator. Stella is released under the GPL." VALUE "Comments", "The multi-platform Atari 2600 emulator. Stella is released under the GPL."
VALUE "CompanyName", "Bradford W. Mott and the Stella team (http://stella.sourceforge.net)" VALUE "CompanyName", "Bradford W. Mott and the Stella team (http://stella.sourceforge.net)"
VALUE "FileDescription", "Stella" VALUE "FileDescription", "Stella"
VALUE "FileVersion", "2.5" VALUE "FileVersion", "2.5.1"
VALUE "InternalName", "Stella" VALUE "InternalName", "Stella"
VALUE "LegalCopyright", "Copyright (C) 1995-2008 B. Mott & the Stella team" VALUE "LegalCopyright", "Copyright (C) 1995-2008 B. Mott & the Stella team"
VALUE "OriginalFilename", "Stella.exe" VALUE "OriginalFilename", "Stella.exe"
VALUE "ProductName", "Stella" VALUE "ProductName", "Stella"
VALUE "ProductVersion", "2.5" VALUE "ProductVersion", "2.5.1"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"