Commit 3cbab3ed authored by Stephen Kitt's avatar Stephen Kitt

Imported Upstream version 3.7

parent 0a8a1e66
......@@ -9,7 +9,7 @@
SSSS ttt eeeee llll llll aaaaa
===========================================================================
Release 3.6.1 for Linux, MacOSX and Windows
Release 3.7 for Linux, MacOSX and Windows
===========================================================================
The Atari 2600 Video Computer System (VCS), introduced in 1977, was the
......@@ -21,34 +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.6.1 release of Stella for Linux, Mac OSX and Windows. The
This is the 3.7 release of Stella for Linux, Mac OSX and Windows. The
distributions currently available are:
* Binaries for Windows XP/Vista/7 :
Stella-3.6.1-win32.exe (32-bit EXE installer)
Stella-3.6.1-x64.exe (64-bit EXE installer)
Stella-3.6.1-windows.zip (32/64 bit versions)
Stella-3.7-win32.exe (32-bit EXE installer)
Stella-3.7-x64.exe (64-bit EXE installer)
Stella-3.7-windows.zip (32/64 bit versions)
* Binaries for Windows 98/2000 :
Stella-3.6.1_98_2k-windows.zip (32-bit for Windows 98/2000)
* Binary distribution for MacOSX 32-bit & 64-bit :
Stella-3.6.1-macosx.dmg (32-bit Universal Binary)
Stella-3.6.1_intel-macosx.dmg (32/64-bit Intel/OSX 10.6+)
* Binary distribution for MacOS X 32-bit & 64-bit :
Stella-3.7-macosx.dmg (32-bit Universal Binary)
Stella-3.7_intel-macosx.dmg (32/64-bit Intel/OSX 10.6+)
* Binary distribution in 32-bit & 64-bit Ubuntu DEB format :
stella_3.6.1-1_i386.deb
stella_3.6.1-1_amd64.deb
stella_3.7-1_i386.deb
stella_3.7-1_amd64.deb
* Binary distribution in 32-bit & 64-bit RPM format :
stella-3.6.1-2.i386.rpm
stella-3.6.1-2.x86_64.rpm
stella-3.7-2.i386.rpm
stella-3.7-2.x86_64.rpm
* Source code distribution for all platforms :
stella-3.6.1-src.tar.gz
PLEASE DO NOT WRITE ASKING FOR ROM IMAGES TO USE WITH STELLA! ALL SUCH
REQUESTS WILL BE IGNORED!
stella-3.7-src.tar.gz
Distribution Site
......
......@@ -12,13 +12,85 @@
Release History
===========================================================================
3.6.1 to 3.7: (June 1, 2012)
* Added Blargg TV effects, with presets for Composite, S-video, RGB,
and badly adjusted TV, and well as a custom mode with full
configurability of contrast, brightness, gamma, etc. Many
keyboard shortcuts and commandline arguments were added to support
this; see the documentation for a detailed explanation. These
effects are OpenGL-only. Special thanks to Ian Bogost and the
Georgia Tech Atari Team for the preliminary implementation.
* Updated the CompuMate keyboard handler to recognize more keys on an
actual keyboard, instead of having to remember the weird combinations
used on the original CompuMate keyboard (although those original keys
will continue to work). Related to this, fixed bug whereby
'ghost keys' would be detected by the CompuMate, particularly after
pressing 'Enter' to start a game from the ROM launcher.
* Added emulation for MindLink controller using the mouse; the 'Bionic
Breakthrough' and 'Telepathy' ROMs now work.
* Updated FA2 bankswitch scheme (Star Castle) to emulate load/save
high score functionality to the Harmony cart flash RAM.
* Added ability for ROM launcher to 'descend' into ZIP files when it
contains more than one ROM file. This means you no longer have to
unzip a multi-file archive before using each ROM. Thanks go to Roland
Schabenberger (webOS maintainer) for this idea and sample code.
* Several improvements to the debugger/disassembler:
- The 'resolvedata', 'showaddr' and 'gfxformat' commandline
arguments are renamed to start with 'dis', indicating that
they're used with the built-in disassembler.
- Zero-page code addresses no longer have their high-byte
truncated, and system equates (TIA and I/O registers) are now
properly marked as such.
- The Distella '-r' option (Relocate calls out of address range)
is no longer the default, resulting in output more consistent
with normal usage of Distella. Related to this, added the
'-dis.relocate' commandline argument (and associated UI item)
to toggle this dynamically.
* Fixed bug in EFSC bankswitch scheme state saving; the Superchip RAM
wasn't actually being loaded and saved to state files.
* Improved speed of loading and saving state files, as well as slightly
reducing their size. Because of this, old state files will not work
with this release.
* Replaced commandline argument 'uselauncher' with 'exitlauncher'. The
new option specifies the behaviour of the ROM launcher when exiting
a ROM (always exit to launcher, or only when the launcher was actually
used). This setting can now be changed in the GUI.
* Several updates to the internal properties database:
- 'Juno First' ROMs now use an AtariVox/SaveKey when possible
- 'Astroblast' ROMs now use the paddles by default
- 'Star Castle 2600' ROMs added
* Changed key-combo for enabling TIA objects and collisions to be
toggled on and off with the Alt-period and Shift-Alt-period
respectively (instead of having two separate keys to turn them on
and off).
* When working on the commandline, relative filenames are now
correctly handled (current working directory is used).
* The Windows 98/ME/2000 builds have been discontinued, due to code and
features that are only available on Windows XP/SP3 and later.
* Updated included PNG library to latest stable version.
-Have fun!
3.6 to 3.6.1: (March 30, 2012)
* Extended FA2 bankswitch scheme to handle 28K ROMs (in addition to
the previously supported 24K ROMs).
-Have fun!
3.5.5 to 3.6: (March 16, 2012)
......@@ -1899,7 +1971,7 @@
* A new Windows port has been created, with the GUI based on StellaX.
This is the first new release for Windows since Stella 1.2.
(software mode is not yet optimized; OpenGL mode works much better)
(software mode is not yet optimized; OpenGL mode works much better)
* A new Mac OSX port has been created by Mark Grebe. This is the first new
release for Mac OSX since Stella 1.2.
......
This is release 3.6.1 of Stella. Stella is a multi-platform Atari 2600 VCS
This is release 3.7 of Stella. Stella is a multi-platform Atari 2600 VCS
emulator which allows you to play all of your favourite Atari 2600 games
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
......@@ -9,4 +9,4 @@ the Stella Website at:
Enjoy,
The Stella Team
March 30, 2012
June 1, 2012
stella (3.7-1) stable; urgency=high
* Version 3.7 release
-- Stephen Anthony <stephena@users.sf.net> Fri, 1 Jun 2012 18:38:25 +0200
stella (3.6.1-1) stable; urgency=high
* Version 3.6.1 release
......
......@@ -1084,7 +1084,7 @@ graphically differentiate between RAM and ROM areas.</p>
<p>The ROM listing also contains a context menu, accessible by right-clicking
anywhere in the listing:</p>
<p><img src="graphics/debugger_romcmenu.png"></p>
<p>Currently, there are three options:</p>
<p>The following options are available:</p>
<ul>
<li><b>Save ROM</b>: A textbox will appear for you to enter filename,
and then the ROM will be saved. Note that the filename is considered
......@@ -1103,6 +1103,9 @@ addresses.</li>
<li><b>Toggle GFX binary/hex</b>: Switch between editing GFX and PGFX sections
in either hexidecimal or binary.</li>
<li><b>Toggle address relocation</b>: Corresponds to the Distella '-r' option
(Relocate calls out of address range).</li>
<li><b>Re-disassemble</b>: Self-explanatory; force the current bank to be
disassembled, regardless of whether anything has changed.</li>
</ul>
......
docs/graphics/debugger_romcmenu.png

6.89 KB | W: | H:

docs/graphics/debugger_romcmenu.png

6.71 KB | W: | H:

docs/graphics/debugger_romcmenu.png
docs/graphics/debugger_romcmenu.png
docs/graphics/debugger_romcmenu.png
docs/graphics/debugger_romcmenu.png
  • 2-up
  • Swipe
  • Onion skin
docs/graphics/options_ui.png

4.44 KB | W: | H:

docs/graphics/options_ui.png

4.92 KB | W: | H:

docs/graphics/options_ui.png
docs/graphics/options_ui.png
docs/graphics/options_ui.png
docs/graphics/options_ui.png
  • 2-up
  • Swipe
  • Onion skin
docs/graphics/options_video.png

8.5 KB | W: | H:

docs/graphics/options_video.png

9.04 KB | W: | H:

docs/graphics/options_video.png
docs/graphics/options_video.png
docs/graphics/options_video.png
docs/graphics/options_video.png
  • 2-up
  • Swipe
  • Onion skin
docs/graphics/options_video_tv.png

6.45 KB | W: | H:

docs/graphics/options_video_tv.png

8.33 KB | W: | H:

docs/graphics/options_video_tv.png
docs/graphics/options_video_tv.png
docs/graphics/options_video_tv.png
docs/graphics/options_video_tv.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -14,7 +14,7 @@
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Array.hxx 2318 2011-12-31 21:56:36Z stephena $
// $Id: Array.hxx 2448 2012-04-20 20:47:53Z stephena $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
......@@ -58,6 +58,13 @@ class Array
delete [] _data;
}
void reserve(int capacity)
{
if(capacity <= _capacity)
return;
ensureCapacity(capacity - 128);
}
void push_back(const T& element)
{
ensureCapacity(_size + 1);
......@@ -71,15 +78,6 @@ class Array
_data[_size++] = array._data[i];
}
void push_back_unique(const T& element)
{
if(!contains(element))
{
ensureCapacity(_size + 1);
_data[_size++] = element;
}
}
void insert_at(int idx, const T& element)
{
assert(idx >= 0 && idx <= _size);
......@@ -106,8 +104,6 @@ class Array
return tmp;
}
// TODO: insert, remove, ...
T& operator [](int idx)
{
assert(idx >= 0 && idx < _size);
......@@ -133,7 +129,8 @@ class Array
return *this;
}
unsigned int size() const { return _size; }
unsigned int size() const { return _size; }
unsigned int capacity() const { return _capacity; }
void clear()
{
......@@ -171,15 +168,6 @@ class Array
return _data + _size;
}
bool contains(const T &key) const
{
for (const_iterator i = begin(); i != end(); ++i) {
if (*i == key)
return true;
}
return false;
}
protected:
void ensureCapacity(int new_len)
{
......
......@@ -14,7 +14,7 @@
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FBSurfaceGL.cxx 2318 2011-12-31 21:56:36Z stephena $
// $Id: FBSurfaceGL.cxx 2501 2012-05-26 22:18:13Z stephena $
//============================================================================
#ifdef DISPLAY_OPENGL
......@@ -42,16 +42,12 @@ FBSurfaceGL::FBSurfaceGL(FrameBufferGL& buffer, uInt32 width, uInt32 height)
myTexCoordW = (GLfloat) myImageW / myTexWidth;
myTexCoordH = (GLfloat) myImageH / myTexHeight;
// Based on experimentation, the following are the fastest 16-bit
// formats for OpenGL (on all platforms)
myTexture = SDL_CreateRGBSurface(SDL_SWSURFACE,
myTexWidth, myTexHeight, 16,
#ifdef HAVE_GL_BGRA
0x00007c00, 0x000003e0, 0x0000001f, 0x00000000);
#else
0x0000f800, 0x000007c0, 0x0000003e, 0x00000000);
#endif
myPitch = myTexture->pitch >> 1;
// Create a surface in the same format as the parent GL class
const SDL_PixelFormat& pf = myFB.myPixelFormat;
myTexture = SDL_CreateRGBSurface(SDL_SWSURFACE, myTexWidth, myTexHeight,
pf.BitsPerPixel, pf.Rmask, pf.Gmask, pf.Bmask, pf.Amask);
myPitch = myTexture->pitch / pf.BytesPerPixel;
// Associate the SDL surface with a GL texture object
updateCoords();
......@@ -70,18 +66,18 @@ FBSurfaceGL::~FBSurfaceGL()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurfaceGL::hLine(uInt32 x, uInt32 y, uInt32 x2, uInt32 color)
{
uInt16* buffer = (uInt16*) myTexture->pixels + y * myPitch + x;
uInt32* buffer = (uInt32*) myTexture->pixels + y * myPitch + x;
while(x++ <= x2)
*buffer++ = (uInt16) myFB.myDefPalette[color];
*buffer++ = (uInt32) myFB.myDefPalette[color];
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurfaceGL::vLine(uInt32 x, uInt32 y, uInt32 y2, uInt32 color)
{
uInt16* buffer = (uInt16*) myTexture->pixels + y * myPitch + x;
uInt32* buffer = (uInt32*) myTexture->pixels + y * myPitch + x;
while(y++ <= y2)
{
*buffer = (uInt16) myFB.myDefPalette[color];
*buffer = (uInt32) myFB.myDefPalette[color];
buffer += myPitch;
}
}
......@@ -99,10 +95,10 @@ void FBSurfaceGL::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurfaceGL::drawChar(const GUI::Font* font, uInt8 chr,
void FBSurfaceGL::drawChar(const GUI::Font& font, uInt8 chr,
uInt32 tx, uInt32 ty, uInt32 color)
{
const FontDesc& desc = font->desc();
const FontDesc& desc = font.desc();
// If this character is not included in the font, use the default char.
if(chr < desc.firstchar || chr >= desc.firstchar + desc.size)
......@@ -130,7 +126,7 @@ void FBSurfaceGL::drawChar(const GUI::Font* font, uInt8 chr,
}
const uInt16* tmp = desc.bits + (desc.offset ? desc.offset[chr] : (chr * desc.fbbh));
uInt16* buffer = (uInt16*) myTexture->pixels +
uInt32* buffer = (uInt32*) myTexture->pixels +
(ty + desc.ascent - bby - bbh) * myPitch +
tx + bbx;
......@@ -141,7 +137,7 @@ void FBSurfaceGL::drawChar(const GUI::Font* font, uInt8 chr,
for(int x = 0; x < bbw; x++, mask >>= 1)
if(ptr & mask)
buffer[x] = (uInt16) myFB.myDefPalette[color];
buffer[x] = (uInt32) myFB.myDefPalette[color];
buffer += myPitch;
}
......@@ -151,14 +147,14 @@ void FBSurfaceGL::drawChar(const GUI::Font* font, uInt8 chr,
void FBSurfaceGL::drawBitmap(uInt32* bitmap, uInt32 tx, uInt32 ty,
uInt32 color, uInt32 h)
{
uInt16* buffer = (uInt16*) myTexture->pixels + ty * myPitch + tx;
uInt32* buffer = (uInt32*) myTexture->pixels + ty * myPitch + tx;
for(uInt32 y = 0; y < h; ++y)
{
uInt32 mask = 0xF0000000;
for(uInt32 x = 0; x < 8; ++x, mask >>= 4)
if(bitmap[y] & mask)
buffer[x] = (uInt16) myFB.myDefPalette[color];
buffer[x] = (uInt32) myFB.myDefPalette[color];
buffer += myPitch;
}
......@@ -167,10 +163,10 @@ void FBSurfaceGL::drawBitmap(uInt32* bitmap, uInt32 tx, uInt32 ty,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurfaceGL::drawPixels(uInt32* data, uInt32 tx, uInt32 ty, uInt32 numpixels)
{
uInt16* buffer = (uInt16*) myTexture->pixels + ty * myPitch + tx;
uInt32* buffer = (uInt32*) myTexture->pixels + ty * myPitch + tx;
for(uInt32 i = 0; i < numpixels; ++i)
*buffer++ = (uInt16) data[i];
*buffer++ = (uInt32) data[i];
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
......@@ -260,13 +256,11 @@ void FBSurfaceGL::update()
// and antialiasing
myGL.ActiveTexture(GL_TEXTURE0);
myGL.BindTexture(GL_TEXTURE_2D, myTexID);
myGL.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myTexWidth, myTexHeight,
#ifdef HAVE_GL_BGRA
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
#else
GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1,
#endif
myTexture->pixels);
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, myPitch);
myGL.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myImageW, myImageH,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
myTexture->pixels);
myGL.EnableClientState(GL_VERTEX_ARRAY);
myGL.EnableClientState(GL_TEXTURE_COORD_ARRAY);
......@@ -321,14 +315,11 @@ void FBSurfaceGL::reload()
myGL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
// Create the texture in the most optimal format
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
myTexWidth, myTexHeight, 0,
#ifdef HAVE_GL_BGRA
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
#else
GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1,
#endif
myTexture->pixels);
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, myPitch);
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, myTexWidth, myTexHeight, 0,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
myTexture->pixels);
// Cache vertex and texture coordinates using vertex buffer object
if(myFB.myVBOAvailable)
......
......@@ -14,7 +14,7 @@
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FBSurfaceGL.hxx 2318 2011-12-31 21:56:36Z stephena $
// $Id: FBSurfaceGL.hxx 2438 2012-04-11 16:10:24Z stephena $
//============================================================================
#ifndef FB_SURFACE_GL_HXX
......@@ -44,7 +44,7 @@ class FBSurfaceGL : public FBSurface
void hLine(uInt32 x, uInt32 y, uInt32 x2, uInt32 color);
void vLine(uInt32 x, uInt32 y, uInt32 y2, uInt32 color);
void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color);
void drawChar(const GUI::Font* font, uInt8 c, uInt32 x, uInt32 y, uInt32 color);
void drawChar(const GUI::Font& font, uInt8 c, uInt32 x, uInt32 y, uInt32 color);
void drawBitmap(uInt32* bitmap, uInt32 x, uInt32 y, uInt32 color, uInt32 h = 8);
void drawPixels(uInt32* data, uInt32 x, uInt32 y, uInt32 numpixels);
void drawSurface(const FBSurface* surface, uInt32 x, uInt32 y);
......
This diff is collapsed.
......@@ -14,7 +14,7 @@
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FBSurfaceTIA.hxx 2318 2011-12-31 21:56:36Z stephena $
// $Id: FBSurfaceTIA.hxx 2462 2012-05-08 19:37:04Z stephena $
//============================================================================
#ifndef FB_SURFACE_TIA_HXX
......@@ -39,8 +39,7 @@ class FBSurfaceTIA : public FBSurface
friend class FrameBufferGL;
public:
FBSurfaceTIA(FrameBufferGL& buffer, uInt32 baseWidth, uInt32 baseHeight,
uInt32 imgX, uInt32 imgY, uInt32 imgW, uInt32 imgH);
FBSurfaceTIA(FrameBufferGL& buffer);
virtual ~FBSurfaceTIA();
// TIA surfaces don't implement most of the drawing primitives,
......@@ -56,7 +55,12 @@ class FBSurfaceTIA : public FBSurface
private:
void setTIA(const TIA& tia) { myTIA = &tia; }
void setFilter(const string& name);
void setTIAPalette(const uInt32* palette);
void enableScanlines(bool enable) { myScanlinesEnabled = enable; }
void setScanIntensity(uInt32 intensity);
void setTexInterpolation(bool enable);
void setScanInterpolation(bool enable);
void updateCoords(uInt32 baseH, uInt32 imgX, uInt32 imgY, uInt32 imgW, uInt32 imgH);
void updateCoords();
private:
......@@ -69,9 +73,15 @@ class FBSurfaceTIA : public FBSurface
GLuint myTexID[2], myVBOID;
GLsizei myTexWidth;
GLsizei myTexHeight;
GLuint myBaseW, myBaseH;
GLuint myImageX, myImageY, myImageW, myImageH;
GLfloat myTexCoordW, myTexCoordH;
GLfloat myCoord[32];
GLint myTexFilter[2];
bool myScanlinesEnabled;
GLuint myScanlineIntensityI;
GLfloat myScanlineIntensityF;
};
#endif // DISPLAY_OPENGL
......
This diff is collapsed.
......@@ -14,7 +14,7 @@
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FrameBufferGL.hxx 2318 2011-12-31 21:56:36Z stephena $
// $Id: FrameBufferGL.hxx 2501 2012-05-26 22:18:13Z stephena $
//============================================================================
#ifndef FRAMEBUFFER_GL_HXX
......@@ -34,17 +34,11 @@ class TIA;
#include "bspf.hxx"
#include "FrameBuffer.hxx"
// Make sure we have access to the most common pixel format
// (it isn't available in certain versions of OpenGL ES
#if defined(GL_BGRA) && defined(GL_UNSIGNED_SHORT_1_5_5_5_REV)
#define HAVE_GL_BGRA
#endif
/**
This class implements an SDL OpenGL framebuffer.
@author Stephen Anthony
@version $Id: FrameBufferGL.hxx 2318 2011-12-31 21:56:36Z stephena $
@version $Id: FrameBufferGL.hxx 2501 2012-05-26 22:18:13Z stephena $
*/
class FrameBufferGL : public FrameBuffer
{
......@@ -71,26 +65,26 @@ class FrameBufferGL : public FrameBuffer
*/
static bool loadLibrary(const string& library);
//////////////////////////////////////////////////////////////////////
// The following are derived from public methods in FrameBuffer.hxx
//////////////////////////////////////////////////////////////////////
/**
Return version of the OpenGL library found by the OSystem
(0 indicates that the libary was not loaded successfully).
This will not return a valid version number until setVidMode()
has been called at least once.
Enable/disable phosphor effect.
*/
static float glVersion() { return myGLVersion; }
void enablePhosphor(bool enable, int blend);
/**
Indicates whether GL FBO functionality was detected and enabled.
Enable/disable NTSC filtering effects.
*/
static bool isFBOAvailable() { return myFBOAvailable; }
void enableNTSC(bool enable);
bool ntscEnabled() const { return myFilterType & 0x10; }
//////////////////////////////////////////////////////////////////////
// The following are derived from public methods in FrameBuffer.hxx
//////////////////////////////////////////////////////////////////////
/**
Enable/disable phosphor effect.
Set up the TIA/emulation palette for a screen of any depth > 8.
@param palette The array of colors
*/
void enablePhosphor(bool enable, int blend);
void setTIAPalette(const uInt32* palette);
/**
This method is called to retrieve the R/G/B data from the given pixel.
......@@ -183,12 +177,32 @@ class FrameBufferGL : public FrameBuffer
*/
void postFrameUpdate();
/**
Change scanline intensity and interpolation.
@param relative If non-zero, change current intensity by
'relative' amount, otherwise set to 'absolute'
@return New current intensity
*/
uInt32 enableScanlines(int relative, int absolute = 50);
void enableScanlineInterpolation(bool enable);
private:
enum GLFunctionality {
kGL_BASIC, kGL_VBO, kGL_FBO
kGL_BASIC, kGL_VBO
};
bool loadFuncs(GLFunctionality functionality);
// Enumeration created such that phosphor off/on is in LSB,
// and Blargg off/on is in MSB
enum FilterType {
kNormal = 0x00,
kPhosphor = 0x01,
kBlarggNormal = 0x10,
kBlarggPhosphor = 0x11
};
FilterType myFilterType;
static uInt32 power_of_two(uInt32 input)
{
uInt32 value = 1;
......@@ -209,10 +223,7 @@ class FrameBufferGL : public FrameBuffer
uInt32 myDepth;
// The size of color components for OpenGL
uInt32 myRGB[4];
// The name of the texture filtering to use
string myFilterParamName;
Int32 myRGB[4];
// Indicates that the texture has been modified, and should be redrawn
bool myDirtyFlag;
......@@ -220,11 +231,8 @@ class FrameBufferGL : public FrameBuffer
// Indicates if the OpenGL library has been properly loaded
static bool myLibraryLoaded;
// Indicates the OpenGL version found (0 indicates none)
static float myGLVersion;
// Indicates whether Vertex/Frame Buffer Object functions were properly loaded
static bool myVBOAvailable, myFBOAvailable;
// Indicates whether Vertex Buffer Objects (VBO) are available
static bool myVBOAvailable;
// Structure containing dynamically-loaded OpenGL function pointers
#define OGL_DECLARE(NAME,RET,FUNC,PARAMS) RET (APIENTRY* NAME) PARAMS
......@@ -240,6 +248,7 @@ class FrameBufferGL : public FrameBuffer
OGL_DECLARE(Ortho,void,glOrtho,(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble));
OGL_DECLARE(Viewport,void,glViewport,(GLint, GLint, GLsizei, GLsizei));
OGL_DECLARE(LoadIdentity,void,glLoadIdentity,(void));
OGL_DECLARE(Translatef,void,glTranslatef,(GLfloat,GLfloat,GLfloat));
OGL_DECLARE(EnableClientState,void,glEnableClientState,(GLenum));
OGL_DECLARE(DisableClientState,void,glDisableClientState,(GLenum));
OGL_DECLARE(VertexPointer,void,glVertexPointer,(GLint,GLenum,GLsizei,const GLvoid*));
......
......@@ -14,7 +14,7 @@
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FrameBufferSoft.cxx 2318 2011-12-31 21:56:36Z stephena $
// $Id: FrameBufferSoft.cxx 2488 2012-05-20 18:26:59Z stephena $
//============================================================================
#include <sstream>
......@@ -34,6 +34,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameBufferSoft::FrameBufferSoft(OSystem* osystem)
: FrameBuffer(osystem),
myZoomLevel(2),
myRenderType(kSoftZoom_16),
myTiaDirty(false),
myInUIMode(false),
......@@ -131,7 +132,6 @@ bool FrameBufferSoft::setVidMode(VideoMode& mode)
mode.screen_w = myScreen->w;
mode.screen_h = myScreen->h;
myZoomLevel = mode.gfxmode.zoom;
// FIXME - look at gfxmode directly
// Erase old rects, since they've probably been scaled for
// a different sized screen
......@@ -587,10 +587,10 @@ void FBSurfaceSoft::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 colo
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurfaceSoft::drawChar(const GUI::Font* font, uInt8 chr,
void FBSurfaceSoft::drawChar(const GUI::Font& font, uInt8 chr,
uInt32 tx, uInt32 ty, uInt32 color)
{
const FontDesc& desc = font->desc();