mirror of https://github.com/stella-emu/stella.git
Reverted OpenGL framebuffer code to 16-bit colour, and removed blending
for phosphor effects. It's just not ready to go yet, more research is needed, and I just don't have the time to fix it. Besides, it's been two months since the last release, and I need a vacation. Because of this, the release date is changed to May 25. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2494 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
b200260d85
commit
3a2865981a
|
@ -12,7 +12,7 @@
|
|||
Release History
|
||||
===========================================================================
|
||||
|
||||
3.6.1 to 3.7: (June 1, 2012)
|
||||
3.6.1 to 3.7: (May 25, 2012)
|
||||
|
||||
* Added Blargg TV effects, with presets for Composite, S-video, RGB,
|
||||
and badly adjusted TV, and well as a custom mode with full
|
||||
|
|
|
@ -9,4 +9,4 @@ the Stella Website at:
|
|||
Enjoy,
|
||||
|
||||
The Stella Team
|
||||
June 1, 2012
|
||||
May 25, 2012
|
||||
|
|
|
@ -2,7 +2,7 @@ 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
|
||||
-- Stephen Anthony <stephena@users.sf.net> Fri, 25 May 2012 18:38:25 +0200
|
||||
|
||||
|
||||
stella (3.6.1-1) stable; urgency=high
|
||||
|
|
|
@ -66,18 +66,18 @@ FBSurfaceGL::~FBSurfaceGL()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceGL::hLine(uInt32 x, uInt32 y, uInt32 x2, uInt32 color)
|
||||
{
|
||||
uInt32* buffer = (uInt32*) myTexture->pixels + y * myPitch + x;
|
||||
uInt16* buffer = (uInt16*) myTexture->pixels + y * myPitch + x;
|
||||
while(x++ <= x2)
|
||||
*buffer++ = (uInt32) myFB.myDefPalette[color];
|
||||
*buffer++ = (uInt16) myFB.myDefPalette[color];
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceGL::vLine(uInt32 x, uInt32 y, uInt32 y2, uInt32 color)
|
||||
{
|
||||
uInt32* buffer = (uInt32*) myTexture->pixels + y * myPitch + x;
|
||||
uInt16* buffer = (uInt16*) myTexture->pixels + y * myPitch + x;
|
||||
while(y++ <= y2)
|
||||
{
|
||||
*buffer = (uInt32) myFB.myDefPalette[color];
|
||||
*buffer = (uInt16) myFB.myDefPalette[color];
|
||||
buffer += myPitch;
|
||||
}
|
||||
}
|
||||
|
@ -126,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));
|
||||
uInt32* buffer = (uInt32*) myTexture->pixels +
|
||||
uInt16* buffer = (uInt16*) myTexture->pixels +
|
||||
(ty + desc.ascent - bby - bbh) * myPitch +
|
||||
tx + bbx;
|
||||
|
||||
|
@ -137,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] = (uInt32) myFB.myDefPalette[color];
|
||||
buffer[x] = (uInt16) myFB.myDefPalette[color];
|
||||
|
||||
buffer += myPitch;
|
||||
}
|
||||
|
@ -147,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)
|
||||
{
|
||||
uInt32* buffer = (uInt32*) myTexture->pixels + ty * myPitch + tx;
|
||||
uInt16* buffer = (uInt16*) 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] = (uInt32) myFB.myDefPalette[color];
|
||||
buffer[x] = (uInt16) myFB.myDefPalette[color];
|
||||
|
||||
buffer += myPitch;
|
||||
}
|
||||
|
@ -163,10 +163,10 @@ void FBSurfaceGL::drawBitmap(uInt32* bitmap, uInt32 tx, uInt32 ty,
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FBSurfaceGL::drawPixels(uInt32* data, uInt32 tx, uInt32 ty, uInt32 numpixels)
|
||||
{
|
||||
uInt32* buffer = (uInt32*) myTexture->pixels + ty * myPitch + tx;
|
||||
uInt16* buffer = (uInt16*) myTexture->pixels + ty * myPitch + tx;
|
||||
|
||||
for(uInt32 i = 0; i < numpixels; ++i)
|
||||
*buffer++ = (uInt32) data[i];
|
||||
*buffer++ = (uInt16) data[i];
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -259,7 +259,7 @@ void FBSurfaceGL::update()
|
|||
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,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
myGL.EnableClientState(GL_VERTEX_ARRAY);
|
||||
|
@ -318,7 +318,7 @@ void FBSurfaceGL::reload()
|
|||
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,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
// Cache vertex and texture coordinates using vertex buffer object
|
||||
|
|
|
@ -89,7 +89,7 @@ void FBSurfaceTIA::update()
|
|||
uInt8* previousFrame = myTIA->previousFrameBuffer();
|
||||
uInt32 width = myTIA->width();
|
||||
uInt32 height = myTIA->height();
|
||||
uInt32* buffer = (uInt32*) myTexture->pixels;
|
||||
uInt16* buffer = (uInt16*) myTexture->pixels;
|
||||
|
||||
// TODO - Eventually 'phosphor' won't be a separate mode, and will become
|
||||
// a post-processing filter by blending several frames.
|
||||
|
@ -103,7 +103,7 @@ void FBSurfaceTIA::update()
|
|||
{
|
||||
uInt32 pos = screenofsY;
|
||||
for(uInt32 x = 0; x < width; ++x)
|
||||
buffer[pos++] = (uInt32) myFB.myDefPalette[currentFrame[bufofsY + x]];
|
||||
buffer[pos++] = (uInt16) myFB.myDefPalette[currentFrame[bufofsY + x]];
|
||||
|
||||
bufofsY += width;
|
||||
screenofsY += myPitch;
|
||||
|
@ -121,7 +121,7 @@ void FBSurfaceTIA::update()
|
|||
for(uInt32 x = 0; x < width; ++x)
|
||||
{
|
||||
const uInt32 bufofs = bufofsY + x;
|
||||
buffer[pos++] = (uInt32)
|
||||
buffer[pos++] = (uInt16)
|
||||
myFB.myAvgPalette[currentFrame[bufofs]][previousFrame[bufofs]];
|
||||
}
|
||||
bufofsY += width;
|
||||
|
@ -132,8 +132,7 @@ void FBSurfaceTIA::update()
|
|||
|
||||
case FrameBufferGL::kBlarggNTSC:
|
||||
{
|
||||
myFB.myNTSCFilter.blit_8888
|
||||
(currentFrame, width, height, buffer, myTexture->pitch);
|
||||
myFB.myNTSCFilter.blit(currentFrame, width, height, buffer, myTexture->pitch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +146,7 @@ void FBSurfaceTIA::update()
|
|||
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, myPitch);
|
||||
myGL.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myBaseW, myBaseH,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
if(myFB.myVBOAvailable)
|
||||
|
@ -232,7 +231,7 @@ void FBSurfaceTIA::reload()
|
|||
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,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
// Scanline texture (@ index 1)
|
||||
|
@ -242,11 +241,11 @@ void FBSurfaceTIA::reload()
|
|||
myGL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
myGL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
|
||||
static uInt32 const scanline[2] = { 0x00000000, 0xff000000 };
|
||||
static uInt16 const scanline[4] = { 0x0000, 0x0000, 0x8000, 0x0000 };
|
||||
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, 2);
|
||||
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 2, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
scanline);
|
||||
|
||||
// Cache vertex and texture coordinates using vertex buffer object
|
||||
|
|
|
@ -48,8 +48,8 @@ FrameBufferGL::FrameBufferGL(OSystem* osystem)
|
|||
// It's done this way (vs directly accessing a FBSurfaceGL object)
|
||||
// since the structure may be needed before any FBSurface's have
|
||||
// been created
|
||||
SDL_Surface* s = SDL_CreateRGBSurface(SDL_SWSURFACE, 1, 1, 32,
|
||||
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
|
||||
SDL_Surface* s = SDL_CreateRGBSurface(SDL_SWSURFACE, 1, 1,16,
|
||||
0x00007c00, 0x000003e0, 0x0000001f, 0x00000000);
|
||||
|
||||
myPixelFormat = *(s->format);
|
||||
SDL_FreeSurface(s);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#define STELLA_VERSION "3.7_beta3"
|
||||
#define STELLA_VERSION "3.7_beta4"
|
||||
#define STELLA_BUILD atoi("$Rev$" + 6)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -70,7 +70,7 @@ class NTSCFilter
|
|||
|
||||
// Reinitialises the NTSC filter (automatically called after settings
|
||||
// have changed)
|
||||
void updateFilter()
|
||||
inline void updateFilter()
|
||||
{
|
||||
atari_ntsc_init(&myFilter, &mySetup, myTIAPalette);
|
||||
}
|
||||
|
@ -104,19 +104,11 @@ class NTSCFilter
|
|||
// output buffer
|
||||
// In the current implementation, the source pitch is always the
|
||||
// same as the actual width
|
||||
void blit_1555(uInt8* src_buf, int src_width, int src_height,
|
||||
uInt16* dest_buf, long dest_pitch)
|
||||
inline void blit(uInt8* src_buf, int src_width, int src_height,
|
||||
uInt16* dest_buf, long dest_pitch)
|
||||
{
|
||||
atari_ntsc_blit_1555(&myFilter, src_buf, src_width,
|
||||
src_width, src_height,
|
||||
dest_buf, dest_pitch);
|
||||
}
|
||||
void blit_8888(uInt8* src_buf, int src_width, int src_height,
|
||||
uInt32* dest_buf, long dest_pitch)
|
||||
{
|
||||
atari_ntsc_blit_8888(&myFilter, src_buf, src_width,
|
||||
src_width, src_height,
|
||||
dest_buf, dest_pitch);
|
||||
atari_ntsc_blit(&myFilter, src_buf, src_width, src_width, src_height,
|
||||
dest_buf, dest_pitch);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -99,11 +99,10 @@ void atari_ntsc_init( atari_ntsc_t* ntsc, atari_ntsc_setup_t const* setup,
|
|||
}
|
||||
}
|
||||
|
||||
void atari_ntsc_blit_1555( atari_ntsc_t const* ntsc, atari_ntsc_in_t const* atari_in,
|
||||
void atari_ntsc_blit( atari_ntsc_t const* ntsc, atari_ntsc_in_t const* atari_in,
|
||||
long in_row_width, int in_width, int in_height,
|
||||
void* rgb_out, long out_pitch )
|
||||
{
|
||||
typedef unsigned short atari_ntsc_out_t;
|
||||
int const chunk_count = (in_width - 1) / atari_ntsc_in_chunk;
|
||||
while ( in_height-- )
|
||||
{
|
||||
|
@ -147,52 +146,3 @@ void atari_ntsc_blit_1555( atari_ntsc_t const* ntsc, atari_ntsc_in_t const* atar
|
|||
rgb_out = (char*) rgb_out + out_pitch;
|
||||
}
|
||||
}
|
||||
|
||||
void atari_ntsc_blit_8888( atari_ntsc_t const* ntsc, atari_ntsc_in_t const* atari_in,
|
||||
long in_row_width, int in_width, int in_height,
|
||||
void* rgb_out, long out_pitch )
|
||||
{
|
||||
typedef unsigned int atari_ntsc_out_t;
|
||||
int const chunk_count = (in_width - 1) / atari_ntsc_in_chunk;
|
||||
while ( in_height-- )
|
||||
{
|
||||
atari_ntsc_in_t const* line_in = atari_in;
|
||||
ATARI_NTSC_BEGIN_ROW( ntsc, atari_ntsc_black, line_in[0] );
|
||||
atari_ntsc_out_t* restrict line_out = (atari_ntsc_out_t*) rgb_out;
|
||||
int n;
|
||||
++line_in;
|
||||
|
||||
for ( n = chunk_count; n; --n )
|
||||
{
|
||||
/* order of input and output pixels must not be altered */
|
||||
ATARI_NTSC_COLOR_IN( 0, ntsc, line_in[0] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 0, line_out[0] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 1, line_out[1] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 2, line_out[2] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 3, line_out[3] );
|
||||
|
||||
ATARI_NTSC_COLOR_IN( 1, ntsc, line_in[1] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 4, line_out[4] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 5, line_out[5] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 6, line_out[6] );
|
||||
|
||||
line_in += 2;
|
||||
line_out += 7;
|
||||
}
|
||||
|
||||
/* finish final pixels */
|
||||
ATARI_NTSC_COLOR_IN( 0, ntsc, atari_ntsc_black );
|
||||
ATARI_NTSC_RGB_OUT_8888( 0, line_out[0] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 1, line_out[1] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 2, line_out[2] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 3, line_out[3] );
|
||||
|
||||
ATARI_NTSC_COLOR_IN( 1, ntsc, atari_ntsc_black );
|
||||
ATARI_NTSC_RGB_OUT_8888( 4, line_out[4] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 5, line_out[5] );
|
||||
ATARI_NTSC_RGB_OUT_8888( 6, line_out[6] );
|
||||
|
||||
atari_in += in_row_width;
|
||||
rgb_out = (char*) rgb_out + out_pitch;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define ATARI_NTSC_H
|
||||
|
||||
typedef unsigned char atari_ntsc_in_t;
|
||||
typedef unsigned short atari_ntsc_out_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -65,10 +66,7 @@ void atari_ntsc_init( atari_ntsc_t* ntsc, atari_ntsc_setup_t const* setup,
|
|||
/* Filters one or more rows of pixels. Input pixels are 8-bit Atari palette colors.
|
||||
In_row_width is the number of pixels to get to the next input row. Out_pitch
|
||||
is the number of *bytes* to get to the next output row. */
|
||||
void atari_ntsc_blit_1555( atari_ntsc_t const* ntsc, atari_ntsc_in_t const* atari_in,
|
||||
long in_row_width, int in_width, int in_height,
|
||||
void* rgb_out, long out_pitch );
|
||||
void atari_ntsc_blit_8888( atari_ntsc_t const* ntsc, atari_ntsc_in_t const* atari_in,
|
||||
void atari_ntsc_blit( atari_ntsc_t const* ntsc, atari_ntsc_in_t const* atari_in,
|
||||
long in_row_width, int in_width, int in_height,
|
||||
void* rgb_out, long out_pitch );
|
||||
|
||||
|
@ -103,7 +101,6 @@ enum { atari_ntsc_black = 0 }; /* palette index for black */
|
|||
|
||||
/* Generates output in the specified 16-bit format (x = junk bits).
|
||||
1555: xRRRRRGG GGGBBBBB (1-5-5-5 16-bit RGB)
|
||||
8888: RRRRRRRR GGGGGGGG BBBBBBBB (8-8-8-8 32-bit RGB)
|
||||
native: xxxRRRRR RRRxxGGG GGGGGxxB BBBBBBBx (native internal format)
|
||||
*/
|
||||
#define ATARI_NTSC_RGB_OUT_1555( index, rgb_out ) {\
|
||||
|
|
|
@ -108,7 +108,7 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
|
|||
%_datadir/icons/large/%{name}.png
|
||||
|
||||
%changelog
|
||||
* Fri Jun 1 2012 Stephen Anthony <stephena@users.sf.net> 3.7-1
|
||||
* Fri May 25 2012 Stephen Anthony <stephena@users.sf.net> 3.7-1
|
||||
- Version 3.7 release
|
||||
|
||||
* Fri Mar 16 2012 Stephen Anthony <stephena@users.sf.net> 3.6-1
|
||||
|
|
Loading…
Reference in New Issue