mirror of https://github.com/stella-emu/stella.git
- Beginings of support for MacOS X. That's right boys and girls, there's
an OSX port on the way. - Added z26 palette support. Use Control-P to switch between the three available color palettes. - Special thanks go to Mark Grebe for all the above changes. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@238 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
27c957b45f
commit
cc9a03f512
|
@ -13,7 +13,7 @@
|
|||
## See the file "license" for information on usage and redistribution of
|
||||
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
##
|
||||
## $Id: makefile,v 1.50 2004-04-20 21:07:35 stephena Exp $
|
||||
## $Id: makefile,v 1.51 2004-04-21 16:27:14 stephena Exp $
|
||||
##============================================================================
|
||||
|
||||
##============================================================================
|
||||
|
@ -43,9 +43,6 @@ OPTIMIZATIONS =
|
|||
### change to number of CPU's you have
|
||||
NUMBER_CPU = 1
|
||||
|
||||
### you want a 6507 trace written to stdout
|
||||
# DEBUG = 1
|
||||
|
||||
##============================================================================
|
||||
## All done, type make to get a list of frontends
|
||||
## No configurable options below this line ...
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Settings.hxx,v 1.11 2003-11-24 01:14:38 stephena Exp $
|
||||
// $Id: Settings.hxx,v 1.12 2004-04-21 16:27:18 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef SETTINGS_HXX
|
||||
|
@ -32,7 +32,7 @@ class Console;
|
|||
This class provides an interface for accessing frontend specific settings.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: Settings.hxx,v 1.11 2003-11-24 01:14:38 stephena Exp $
|
||||
@version $Id: Settings.hxx,v 1.12 2004-04-21 16:27:18 stephena Exp $
|
||||
*/
|
||||
class Settings
|
||||
{
|
||||
|
@ -51,12 +51,12 @@ class Settings
|
|||
/**
|
||||
This method should be called to load the current settings from an rc file.
|
||||
*/
|
||||
void loadConfig();
|
||||
virtual void loadConfig();
|
||||
|
||||
/**
|
||||
This method should be called to save the current settings to an rc file.
|
||||
*/
|
||||
void saveConfig();
|
||||
virtual void saveConfig();
|
||||
|
||||
/**
|
||||
This method should be called to load the arguments from the commandline.
|
||||
|
@ -234,16 +234,6 @@ class Settings
|
|||
// The full pathname of the settings file for output
|
||||
string mySettingsOutputFilename;
|
||||
|
||||
private:
|
||||
// Copy constructor isn't supported by this class so make it private
|
||||
Settings(const Settings&);
|
||||
|
||||
// Assignment operator isn't supported by this class so make it private
|
||||
Settings& operator = (const Settings&);
|
||||
|
||||
// Test whether the given setting is present in the array
|
||||
bool contains(const string& key);
|
||||
|
||||
// Structure used for storing settings
|
||||
struct Setting
|
||||
{
|
||||
|
@ -255,11 +245,22 @@ class Settings
|
|||
// Pointer to a dynamically allocated array of settings
|
||||
Setting* mySettings;
|
||||
|
||||
// Current capacity of the settings array
|
||||
unsigned int myCapacity;
|
||||
|
||||
// Size of the settings array (i.e. the number of <key,value> pairs)
|
||||
unsigned int mySize;
|
||||
|
||||
// Test whether the given setting is present in the array
|
||||
bool contains(const string& key);
|
||||
|
||||
|
||||
private:
|
||||
// Copy constructor isn't supported by this class so make it private
|
||||
Settings(const Settings&);
|
||||
|
||||
// Assignment operator isn't supported by this class so make it private
|
||||
Settings& operator = (const Settings&);
|
||||
|
||||
// Current capacity of the settings array
|
||||
unsigned int myCapacity;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: TIA.cxx,v 1.29 2004-04-20 21:07:47 stephena Exp $
|
||||
// $Id: TIA.cxx,v 1.30 2004-04-21 16:27:30 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -1637,7 +1637,7 @@ inline void TIA::updateFrameScanline(uInt32 clocksToUpdate, uInt32 hpos)
|
|||
myFramePointer = ending;
|
||||
|
||||
// Add sound bytes to the sound queue every scanline
|
||||
mySound.update(); //FIXME
|
||||
mySound.update();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -3126,14 +3126,144 @@ const uInt32 TIA::ourPALPalette11[256] = {
|
|||
0x000000, 0x000000, 0x242424, 0x242424,
|
||||
0x484848, 0x484848, 0x6d6d6d, 0x6d6d6d,
|
||||
0x919191, 0x919191, 0xb6b6b6, 0xb6b6b6,
|
||||
0xdadada, 0xdadada, 0xffffff, 0xffffff
|
||||
0xdadada, 0xdadada, 0xffffff, 0xff4ffff // FIXME - check this out
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const uInt32 TIA::ourNTSCPaletteZ26[256] = { 0 }; // FIXME
|
||||
const uInt32 TIA::ourNTSCPaletteZ26[256] = {
|
||||
0x000000, 0x000000, 0x505050, 0x505050,
|
||||
0x646464, 0x646464, 0x787878, 0x787878,
|
||||
0x8c8c8c, 0x8c8c8c, 0xa0a0a0, 0xa0a0a0,
|
||||
0xb4b4b4, 0xb4b4b4, 0xc8c8c8, 0xc8c8c8,
|
||||
0x445400, 0x445400, 0x586800, 0x586800,
|
||||
0x6c7c00, 0x6c7c00, 0x809000, 0x809000,
|
||||
0x94a414, 0x94a414, 0xa8b828, 0xa8b828,
|
||||
0xbccc3c, 0xbccc3c, 0xd0e050, 0xd0e050,
|
||||
0x673900, 0x673900, 0x7b4d00, 0x7b4d00,
|
||||
0x8f6100, 0x8f6100, 0xa37513, 0xa37513,
|
||||
0xb78927, 0xb78927, 0xcb9d3b, 0xcb9d3b,
|
||||
0xdfb14f, 0xdfb14f, 0xf3c563, 0xf3c563,
|
||||
0x7b2504, 0x7b2504, 0x8f3918, 0x8f3918,
|
||||
0xa34d2c, 0xa34d2c, 0xb76140, 0xb76140,
|
||||
0xcb7554, 0xcb7554, 0xdf8968, 0xdf8968,
|
||||
0xf39d7c, 0xf39d7c, 0xffb190, 0xffb190,
|
||||
0x7d122c, 0x7d122c, 0x912640, 0x912640,
|
||||
0xa53a54, 0xa53a54, 0xb94e68, 0xb94e68,
|
||||
0xcd627c, 0xcd627c, 0xe17690, 0xe17690,
|
||||
0xf58aa4, 0xf58aa4, 0xff9eb8, 0xff9eb8,
|
||||
0x730871, 0x730871, 0x871c85, 0x871c85,
|
||||
0x9b3099, 0x9b3099, 0xaf44ad, 0xaf44ad,
|
||||
0xc358c1, 0xc358c1, 0xd76cd5, 0xd76cd5,
|
||||
0xeb80e9, 0xeb80e9, 0xff94fd, 0xff94fd,
|
||||
0x5d0b92, 0x5d0b92, 0x711fa6, 0x711fa6,
|
||||
0x8533ba, 0x8533ba, 0x9947ce, 0x9947ce,
|
||||
0xad5be2, 0xad5be2, 0xc16ff6, 0xc16ff6,
|
||||
0xd583ff, 0xd583ff, 0xe997ff, 0xe997ff,
|
||||
0x401599, 0x401599, 0x5429ad, 0x5429ad,
|
||||
0x683dc1, 0x683dc1, 0x7c51d5, 0x7c51d5,
|
||||
0x9065e9, 0x9065e9, 0xa479fd, 0xa479fd,
|
||||
0xb88dff, 0xb88dff, 0xcca1ff, 0xcca1ff,
|
||||
0x252593, 0x252593, 0x3939a7, 0x3939a7,
|
||||
0x4d4dbb, 0x4d4dbb, 0x6161cf, 0x6161cf,
|
||||
0x7575e3, 0x7575e3, 0x8989f7, 0x8989f7,
|
||||
0x9d9dff, 0x9d9dff, 0xb1b1ff, 0xb1b1ff,
|
||||
0x0f3480, 0x0f3480, 0x234894, 0x234894,
|
||||
0x375ca8, 0x375ca8, 0x4b70bc, 0x4b70bc,
|
||||
0x5f84d0, 0x5f84d0, 0x7398e4, 0x7398e4,
|
||||
0x87acf8, 0x87acf8, 0x9bc0ff, 0x9bc0ff,
|
||||
0x04425a, 0x04425a, 0x18566e, 0x18566e,
|
||||
0x2c6a82, 0x2c6a82, 0x407e96, 0x407e96,
|
||||
0x5492aa, 0x5492aa, 0x68a6be, 0x68a6be,
|
||||
0x7cbad2, 0x7cbad2, 0x90cee6, 0x90cee6,
|
||||
0x044f30, 0x044f30, 0x186344, 0x186344,
|
||||
0x2c7758, 0x2c7758, 0x408b6c, 0x408b6c,
|
||||
0x549f80, 0x549f80, 0x68b394, 0x68b394,
|
||||
0x7cc7a8, 0x7cc7a8, 0x90dbbc, 0x90dbbc,
|
||||
0x0f550a, 0x0f550a, 0x23691e, 0x23691e,
|
||||
0x377d32, 0x377d32, 0x4b9146, 0x4b9146,
|
||||
0x5fa55a, 0x5fa55a, 0x73b96e, 0x73b96e,
|
||||
0x87cd82, 0x87cd82, 0x9be196, 0x9be196,
|
||||
0x1f5100, 0x1f5100, 0x336505, 0x336505,
|
||||
0x477919, 0x477919, 0x5b8d2d, 0x5b8d2d,
|
||||
0x6fa141, 0x6fa141, 0x83b555, 0x83b555,
|
||||
0x97c969, 0x97c969, 0xabdd7d, 0xabdd7d,
|
||||
0x344600, 0x344600, 0x485a00, 0x485a00,
|
||||
0x5c6e14, 0x5c6e14, 0x708228, 0x708228,
|
||||
0x84963c, 0x84963c, 0x98aa50, 0x98aa50,
|
||||
0xacbe64, 0xacbe64, 0xc0d278, 0xc0d278,
|
||||
0x463e00, 0x463e00, 0x5a5205, 0x5a5205,
|
||||
0x6e6619, 0x6e6619, 0x827a2d, 0x827a2d,
|
||||
0x968e41, 0x968e41, 0xaaa255, 0xaaa255,
|
||||
0xbeb669, 0xbeb669, 0xd2ca7d, 0xd2ca7d
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const uInt32 TIA::ourPALPaletteZ26[256] = { 0 }; // FIXME
|
||||
const uInt32 TIA::ourPALPaletteZ26[256] = {
|
||||
0x000000, 0x000000, 0x4c4c4c, 0x4c4c4c,
|
||||
0x606060, 0x606060, 0x747474, 0x747474,
|
||||
0x888888, 0x888888, 0x9c9c9c, 0x9c9c9c,
|
||||
0xb0b0b0, 0xb0b0b0, 0xc4c4c4, 0xc4c4c4,
|
||||
0x000000, 0x000000, 0x4c4c4c, 0x4c4c4c,
|
||||
0x606060, 0x606060, 0x747474, 0x747474,
|
||||
0x888888, 0x888888, 0x9c9c9c, 0x9c9c9c,
|
||||
0xb0b0b0, 0xb0b0b0, 0xc4c4c4, 0xc4c4c4,
|
||||
0x533a00, 0x533a00, 0x674e00, 0x674e00,
|
||||
0x7b6203, 0x7b6203, 0x8f7617, 0x8f7617,
|
||||
0xa38a2b, 0xa38a2b, 0xb79e3f, 0xb79e3f,
|
||||
0xcbb253, 0xcbb253, 0xdfc667, 0xdfc667,
|
||||
0x1b5800, 0x1b5800, 0x2f6c00, 0x2f6c00,
|
||||
0x438001, 0x438001, 0x579415, 0x579415,
|
||||
0x6ba829, 0x6ba829, 0x7fbc3d, 0x7fbc3d,
|
||||
0x93d051, 0x93d051, 0xa7e465, 0xa7e465,
|
||||
0x6a2900, 0x6a2900, 0x7e3d12, 0x7e3d12,
|
||||
0x925126, 0x925126, 0xa6653a, 0xa6653a,
|
||||
0xba794e, 0xba794e, 0xce8d62, 0xce8d62,
|
||||
0xe2a176, 0xe2a176, 0xf6b58a, 0xf6b58a,
|
||||
0x075b00, 0x075b00, 0x1b6f11, 0x1b6f11,
|
||||
0x2f8325, 0x2f8325, 0x439739, 0x439739,
|
||||
0x57ab4d, 0x57ab4d, 0x6bbf61, 0x6bbf61,
|
||||
0x7fd375, 0x7fd375, 0x93e789, 0x93e789,
|
||||
0x741b2f, 0x741b2f, 0x882f43, 0x882f43,
|
||||
0x9c4357, 0x9c4357, 0xb0576b, 0xb0576b,
|
||||
0xc46b7f, 0xc46b7f, 0xd87f93, 0xd87f93,
|
||||
0xec93a7, 0xec93a7, 0xffa7bb, 0xffa7bb,
|
||||
0x00572e, 0x00572e, 0x106b42, 0x106b42,
|
||||
0x247f56, 0x247f56, 0x38936a, 0x38936a,
|
||||
0x4ca77e, 0x4ca77e, 0x60bb92, 0x60bb92,
|
||||
0x74cfa6, 0x74cfa6, 0x88e3ba, 0x88e3ba,
|
||||
0x6d165f, 0x6d165f, 0x812a73, 0x812a73,
|
||||
0x953e87, 0x953e87, 0xa9529b, 0xa9529b,
|
||||
0xbd66af, 0xbd66af, 0xd17ac3, 0xd17ac3,
|
||||
0xe58ed7, 0xe58ed7, 0xf9a2eb, 0xf9a2eb,
|
||||
0x014c5e, 0x014c5e, 0x156072, 0x156072,
|
||||
0x297486, 0x297486, 0x3d889a, 0x3d889a,
|
||||
0x519cae, 0x519cae, 0x65b0c2, 0x65b0c2,
|
||||
0x79c4d6, 0x79c4d6, 0x8dd8ea, 0x8dd8ea,
|
||||
0x5f1588, 0x5f1588, 0x73299c, 0x73299c,
|
||||
0x873db0, 0x873db0, 0x9b51c4, 0x9b51c4,
|
||||
0xaf65d8, 0xaf65d8, 0xc379ec, 0xc379ec,
|
||||
0xd78dff, 0xd78dff, 0xeba1ff, 0xeba1ff,
|
||||
0x123b87, 0x123b87, 0x264f9b, 0x264f9b,
|
||||
0x3a63af, 0x3a63af, 0x4e77c3, 0x4e77c3,
|
||||
0x628bd7, 0x628bd7, 0x769feb, 0x769feb,
|
||||
0x8ab3ff, 0x8ab3ff, 0x9ec7ff, 0x9ec7ff,
|
||||
0x451e9d, 0x451e9d, 0x5932b1, 0x5932b1,
|
||||
0x6d46c5, 0x6d46c5, 0x815ad9, 0x815ad9,
|
||||
0x956eed, 0x956eed, 0xa982ff, 0xa982ff,
|
||||
0xbd96ff, 0xbd96ff, 0xd1aaff, 0xd1aaff,
|
||||
0x2a2b9e, 0x2a2b9e, 0x3e3fb2, 0x3e3fb2,
|
||||
0x5253c6, 0x5253c6, 0x6667da, 0x6667da,
|
||||
0x7a7bee, 0x7a7bee, 0x8e8fff, 0x8e8fff,
|
||||
0xa2a3ff, 0xa2a3ff, 0xb6b7ff, 0xb6b7ff,
|
||||
0x000000, 0x000000, 0x4c4c4c, 0x4c4c4c,
|
||||
0x606060, 0x606060, 0x747474, 0x747474,
|
||||
0x888888, 0x888888, 0x9c9c9c, 0x9c9c9c,
|
||||
0xb0b0b0, 0xb0b0b0, 0xc4c4c4, 0xc4c4c4,
|
||||
0x000000, 0x000000, 0x4c4c4c, 0x4c4c4c,
|
||||
0x606060, 0x606060, 0x747474, 0x747474,
|
||||
0x888888, 0x888888, 0x9c9c9c, 0x9c9c9c,
|
||||
0xb0b0b0, 0xb0b0b0, 0xc4c4c4, 0xc4c4c4
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
TIA::TIA(const TIA& c)
|
||||
|
|
|
@ -596,8 +596,11 @@ void Tia_process (register unsigned char *buffer, register uint16 n)
|
|||
Samp_n_cnt += Samp_n_max;
|
||||
|
||||
/* calculate the latest output value and place in buffer */
|
||||
#ifdef MAC_OSX
|
||||
*(buffer++) = (outvol_0 + outvol_1)/2 + 128;
|
||||
#else
|
||||
*(buffer++) = outvol_0 + outvol_1;
|
||||
|
||||
#endif
|
||||
/* and indicate one less byte to process */
|
||||
n--;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferSDL.cxx,v 1.12 2004-04-20 21:08:03 stephena Exp $
|
||||
// $Id: FrameBufferSDL.cxx,v 1.13 2004-04-21 16:27:34 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -179,8 +179,7 @@ uInt32 FrameBufferSDL::maxWindowSizeForScreen()
|
|||
if(!x11Available)
|
||||
return 4;
|
||||
|
||||
/* Every UNIX except Darwin with Cocoa. */
|
||||
#if UNIX && (!__APPLE__)
|
||||
#ifdef UNIX
|
||||
// Otherwise, lock the screen and get the width and height
|
||||
myWMInfo.info.x11.lock_func();
|
||||
Display* theX11Display = myWMInfo.info.x11.display;
|
||||
|
@ -221,6 +220,7 @@ void FrameBufferSDL::setWindowAttributes()
|
|||
name << "Stella: \"" << myConsole->properties().get("Cartridge.Name") << "\"";
|
||||
SDL_WM_SetCaption(name.str().c_str(), "stella");
|
||||
|
||||
#ifndef MAC_OSX
|
||||
// Set the window icon
|
||||
uInt32 w, h, ncols, nbytes;
|
||||
uInt32 rgba[256], icon[32 * 32];
|
||||
|
@ -273,4 +273,5 @@ void FrameBufferSDL::setWindowAttributes()
|
|||
32 * 4, 0xFF0000, 0x00FF00, 0x0000FF, 0xFF000000);
|
||||
SDL_WM_SetIcon(surface, (unsigned char *) mask);
|
||||
SDL_FreeSurface(surface);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue