First pass at updating the documentation for the impending 3.1

release.  This won't have everything I'd have liked to include,
but the release time has dragged on enough (the last release
was in Sept 2009!).

Some general code cleanups for the OSX port, as well as fixes
to the menus.  The menus contained items that in some cases
weren't actually tied to any event, or showed the wrong
shortcut key.  Also removed some of the more esoteric menu
items, sticking with only the most basic ones (fullscreen vs.
window mode, volume control, etc).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1991 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-04-08 13:11:36 +00:00
parent 56b6e74f04
commit 72b2ddd89b
16 changed files with 426 additions and 383 deletions

View File

@ -13,46 +13,59 @@ feature that no other 2600 debugger has; it's <b>completely</b> cross-platform.<
<h2>Here's a list of what the debugger can do so far:</h2>
<ul>
<li>Display registers and memory</li>
<li>Display registers and memory.</li>
<li>Dump state of TIA and RIOT, with things like joystick directions and
NUSIZx decoded into English (more-or-less).</li>
<li>Change registers/memory, including toggles for flags in P register</li>
<li>Single step/trace</li>
<li>Change registers/memory, including toggles for flags in P register.</li>
<li>Single step/trace.</li>
<li>Breakpoints - break running program and enter debugger when the
Program Counter hits a predefined address. You can set as many
Program Counter hits a predefined address; you can set as many
breakpoints as you want.</li>
<li>Conditional breakpoints - Break running program when some arbitrary
condition is true (e.g. "breakif {a == $7f &amp;&amp; c}" will break when the
Accumulator value is $7f and the Carry flag is true, no matter where
condition is true (e.g. "breakif {a == $7f &amp;&amp; c}" will break when the Accumulator value is $7f and the Carry flag is true, no matter where
in the program this happens). Unlike the cond breaks in PCAE, Stella's
are *fast*: the emulation will run at full speed unless you use lots
of breakif's at the same time, or have a slow CPU.</li>
<li>Watches - View contents of a location/register before every
debugger prompt.</li>
<li>Traps - Like breakpoints, but break on read/write/any access to
*any* memory location.</li>
<li>Frame advance (automatic breakpoint at beginning of next frame)
You can advance multiple frames with one command.</li>
<li>Disassembly</li>
<li>Disassembly from Distella, with support for determining code vs.
data sections.</li>
<li>Support for DASM symbol files (created with DASM's -s option),
including automatically loading symbol files if they're named
romname.sym</li>
<li>Built-in VCS.H symbols, if no symbol file is loaded</li>
<li>Symbolic names in disassembly</li>
<li>Symbolic names accepted as input</li>
<li>Tab completion for commands and symbol names</li>
<li>Built-in VCS.H symbols, if no symbol file is loaded.</li>
<li><strike>Symbolic names in disassembly.</strike> <b>Note:</b> Disabled until a future release</li>
<li>Symbolic names accepted as input.</li>
<li>Tab completion for commands and symbol names.</li>
<li>Graphical editor for RIOT and extended RAM. Acts a lot like a spreadsheet.
Input in hex, with displays for label/decimal/binary for
currently-selected location.</li>
<li>GUI CPU state window</li>
<li>GUI CPU state window.</li>
<!--Cheat system (similar to MAME) (still needs a way to save/load cheats)-->
<li>Reset the 6502</li>
<li>Start emulator in debugger (via command-line option "-debug")</li>
<li>Reset the 6502.</li>
<li>Start emulator in debugger (via command-line option "-debug").</li>
<li>Save CLI session to a text file.</li>
<li>Supports hex, decimal, and binary input and output almost everywhere.
(disassembly is still hex)</li>
<li>Support for bank switching. You can see how many banks a cart has,
and switch banks. There's still more to be done here though.</li>
(disassembly is still hex).</li>
<li>Support for bank switching. You can see how many banks a cart has, and the
currently selected bank.</li>
<li>Registers/memory that get changed by the CPU during debugging are
highlighted when they're displayed.<li>
<li>Scanline advance (like frame advance, break at beginning
@ -80,15 +93,8 @@ feature that no other 2600 debugger has; it's <b>completely</b> cross-platform.<
<li>Perhaps 2 panes in the disassembly window (so you can see 2 parts of the
code at once).</li>
<li>Add bookmark support to disassembly window.</li>
<li>Bankswitch support in the debugger for the few remaining cart types
that aren't supported.</li>
<li>Patch ROM support for a few cart types doesn't work. Must fix.</li>
<li>Source-level debugging: if a DASM .lst file is available, we'll show
the listing in the ROM tab instead of a disassembly. This is already
available in a very crude form ("loadlist" and "list" commands).</li>
<li>More "special variables" for the expression parser.</li>
<li>Possibly a mini-assembler</li>
<li>Support for extra RAM in all remaining cart types.</li>
<li>Possibly support for recording and playing back input files, like
MAME. This isn't a debugger feature per se, but it'll make it easier
to reliably trigger a bug so you can debug it.</li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -10,7 +10,7 @@
<br><br>
<center><h2><b>A multi-platform Atari 2600 VCS emulator</b></h2></center>
<center><h4><b>Release 3.0</b></h4></center>
<center><h4><b>Release 3.1</b></h4></center>
<br><br>
<center><h2><b>User's Guide</b></h2></center>
@ -40,8 +40,8 @@
<br><br><br>
<center><b>February 1999 - September 2009</b></center>
<center><b>The Stella Team</b></center>
<center><b>February 1999 - April 2010</b></center>
<center><b>The Stella Team</b></center>
<center><b><a href="http://stella.sourceforge.net">Stella Homepage</a></b></center>
<br><br><br>
@ -238,6 +238,8 @@
or joysticks</li>
<li>Emulates the CBS BoosterGrip Controller using your computer's keyboard or
joysticks</li>
<li>Emulates the Sega Genesis Controller using your computer's keyboard or
joysticks</li>
<li>Emulates CX-22 / CX-80 style trackballs and Amiga Mouse using your
computer's mouse</li>
<li>Support for real Atari 2600 controllers using the
@ -256,7 +258,7 @@
some games</li>
<li>TIA emulation supports full collision checking, with ability to disable
both TIA sprites and collisions for each object separately</li>
<li>Built-in extensive debugger</li>
<li>Built-in extensive debugger, including the Distella disassembler</li>
<li>Emulation of CRT TV systems with OpenGL shaders, including texturing,
colour bleed, RF noise, and phosphor burn-off</li>
<li>Built-in ROM database with information compiled by RomHunter</li>
@ -887,6 +889,11 @@
saved in the state file. If disabled, no such check is performed.</td>
</tr>
<tr>
<td><pre>-stats &lt;1|0&gt;</pre></td>
<td>Overlay console info on the TIA image during emulation.</td>
</tr>
<tr>
<td><pre>-audiofirst &lt;1|0&gt;</pre></td>
<td>Initialize the audio subsystem before video when emulating a
@ -1013,6 +1020,12 @@
<td>Set the name of the serial port where an AtariVox is connected.</td>
</tr>
<tr>
<td><pre>-maxres &lt;WxH&gt;</pre></td>
<td>Useful for developers, this sets the maximum size of window that
can be created, allowing to simulate testing on 'smaller' systems.</td>
</tr>
<tr>
<td><pre>-help</pre></td>
<td>Prints a help message describing these options, and then
@ -1066,11 +1079,6 @@
<td>Start the emulator with the left joystick button held down.</td>
</tr>
<tr>
<td><pre>-stats &lt;1|0&gt;</pre></td>
<td>Overlay console info on the TIA image during emulation.</td>
</tr>
<tr>
<td><pre>-tiadriven &lt;1|0&gt;</pre></td>
<td>Set unused TIA pins to be randomly driven high or low on a read/peek.</td>
@ -1215,6 +1223,7 @@
<tr><td>GL FS Stretch</td><td>stretch fullscreen OpenGL in emulation mode</td><td>-gl_fsmax</td></tr>
<tr><td>GL VSync</td><td>enable OpenGL vertical synchronization</td><td>-gl_vsync</td></tr>
<tr><td>Grab mouse</td><td>keep mouse in SDL window</td><td>-grabmouse</td></tr>
<tr><td>Show UI messages</td><td>overlay UI messages onscreen</td><td>-uimessages</td></tr>
<tr><td>Center window (*)</td><td>attempt to center SDL window (requires restart)</td><td>-center</td></tr>
<tr><td>Fast SC/AR BIOS</td><td>Skip progress loading bars for SuperCharger ROMs</td><td>-fastscbios</td></tr>
</table>
@ -1705,6 +1714,95 @@
</tr>
</table>
<p><b>Sega Genesis Controller (cannot be remapped, always associated with joystick and booster-grip controllers)</b></p>
<table BORDER=2>
<tr>
<th>Left Pad</th>
<th>Right Pad</th>
</tr>
<tr>
<td>
<table BORDER=1 cellpadding=5>
<tr>
<th>Function</th>
<th>Key</th>
</tr>
<tr>
<td>Pad Up</td>
<td>Same as 'Joy0 Up'</td>
</tr>
<tr>
<td>Pad Down</td>
<td>Same as 'Joy0 Down'</td>
</tr>
<tr>
<td>Pad Left</td>
<td>Same as 'Joy0 Left'</td>
</tr>
<tr>
<td>Pad Right</td>
<td>Same as 'Joy0 Right'</td>
</tr>
<tr>
<td>Button 'B'</td>
<td>Same as 'Joy0 Fire'</td>
</tr>
<tr>
<td>Button 'C'</td>
<td>Same as 'Joy0 Booster'</td>
</tr>
</table>
</td>
<td>
<table BORDER=1 cellpadding=5>
<tr>
<th>Function</th>
<th>Key</th>
</tr>
<tr>
<td>Pad Up</td>
<td>Same as 'Joy1 Up'</td>
</tr>
<tr>
<td>Pad Down</td>
<td>Same as 'Joy1 Down'</td>
</tr>
<tr>
<td>Pad Left</td>
<td>Same as 'Joy1 Left'</td>
</tr>
<tr>
<td>Pad Right</td>
<td>Same as 'Joy1 Right'</td>
</tr>
<tr>
<td>Button 'B'</td>
<td>Same as 'Joy1 Fire'</td>
</tr>
<tr>
<td>Button 'C'</td>
<td>Same as 'Joy1 Booster'</td>
</tr>
</table>
</td>
</tr>
</table>
<p><b>Keypad Controller (can be remapped)</b></p>
<table BORDER=2>
@ -2197,11 +2295,11 @@
<table border="1" cellpadding="4">
<tr><th>Item</th><th>Brief description</th><th>For more information,<br>see Commandline</th></tr>
<tr><td>Stelladaptor X is</td><td>Specifies which virtual port each Stelladaptor uses (See <b>Section 11 - <a href="#Adaptor">Stelladaptor Support</a></b>)</td><td>-sa1 &amp; -sa2</td></tr>
<tr><td>Joy deadzone</td><td>Joystick deadzone area for analog joysticks</td><td>-joydeadzone</td></tr>
<tr><td>Mouse is paddle</td><td>The mouse can emulate either paddle 0, 1, 2, or 3.</td><td>&nbsp;</td></tr>
<tr><td>Paddle speed</td><td>Speed used when emulating a paddle using a digital device</td><td>-pspeed</td></tr>
<tr><td>AVox serial port</td><td>Described in further detail in <b>Section 12 - <a href="#AtariVox">AtariVox/SaveKey Support</a></b> </td><td>-avoxport</td></tr>
<tr><td>Joy deadzone</td><td>Joystick deadzone area for analog joysticks</td><td>-joydeadzone</td></tr>
<tr><td>Paddle speed</td><td>Speed used when emulating a paddle using a digital device</td><td>-pspeed</td></tr>
<tr><td>Allow all 4 ...</td><td>Allow all 4 joystick directions to be pressed simultaneously</td><td>-joyallow4</td></tr>
<tr><td>Use mouse as ...</td><td>Use the mouse for various controllers (paddles, driving, etc)</td><td>-usemouse</td></tr>
</table>
</td>
</tr>
@ -2837,7 +2935,7 @@ Ms Pac-Man (Stella extended codes):
<td>Indicates what type of controller the left player
uses. The value must be <b>BoosterGrip</b>, <b>Driving</b>,
<b>Keyboard</b>, <b>Paddles</b>, <b>Trackball22</b>,
<b>Trackball80</b>, <b>AmigaMouse</b> or <b>Joystick</b>.</td>
<b>Trackball80</b>, <b>AmigaMouse</b>, <b>Genesis</b> or <b>Joystick</b>.</td>
</tr>
<tr>
@ -2846,7 +2944,7 @@ Ms Pac-Man (Stella extended codes):
uses. The value must be <b>BoosterGrip</b>, <b>Driving</b>,
<b>Keyboard</b>, <b>Paddles</b>, <b>Trackball22</b>,
<b>Trackball80</b>, <b>AmigaMouse</b>, <b>AtariVox</b>,
<b>SaveKey</b> or <b>Joystick</b>.</td>
<b>SaveKey</b>, <b>Genesis</b> or <b>Joystick</b>.</td>
</tr>
<tr>

View File

@ -368,6 +368,7 @@ void Settings::usage()
<< " -ctrlcombo <1|0> Use key combos involving the Control key (Control-Q for quit may be disabled!)\n"
<< " -autoslot <1|0> Automatically switch to next save slot when state saving\n"
<< " -md5instate <1|0> ROM MD5 information is saved in a state file, tying the state file to the ROM\n"
<< " -stats <1|0> Overlay console info during emulation\n"
<< " -audiofirst <1|0> Initial audio before video (required for some ATI video cards)\n"
<< " -fastscbios <1|0> Disable Supercharger BIOS progress loading bars\n"
<< " -ssdir <path> The directory to save snapshot files to\n"
@ -393,6 +394,7 @@ void Settings::usage()
<< " -propsfile <file> Full pathname of ROM properties file\n"
<< " -eepromdir <dir> Directory in which to save EEPROM files\n"
<< " -avoxport <name> The name of the serial port where an AtariVox is connected\n"
<< " -maxres <WxH> Used by developers to force the maximum size of the application window\n"
<< " -help Show the text you're now reading\n"
#ifdef DEBUGGER_SUPPORT
<< endl
@ -406,7 +408,6 @@ void Settings::usage()
<< " -holdreset Start the emulator with the Game Reset switch held down\n"
<< " -holdselect Start the emulator with the Game Select switch held down\n"
<< " -holdbutton0 Start the emulator with the left joystick button held down\n"
<< " -stats <1|0> Overlay console info during emulation\n"
<< " -tiadriven <1|0> Drive unused TIA pins randomly value on a read/peek\n"
<< endl
<< " -bs <arg> Sets the 'Cartridge.Type' (bankswitch) property\n"

View File

@ -123,9 +123,9 @@ void AboutDialog::updateStrings(int page, int lines, string& title)
ADD_ATEXT("\\L\\c0"" Bradford W. Mott");
ADD_ATEXT("\\L\\c2"" Original author");
ADD_ATEXT("\\L\\c0"" Stephen Anthony");
ADD_ATEXT("\\L\\c2"" Lead developer, Linux/OSX/Win32 maintainer");
ADD_ATEXT("\\L\\c2"" Lead developer, Linux/MacOS X/Win32 maintainer");
ADD_ATEXT("\\L\\c0"" Mark Grebe");
ADD_ATEXT("\\L\\c2"" Original author for OSX port");
ADD_ATEXT("\\L\\c2"" Original author for MacOS X port");
ADD_ATEXT("\\L\\c0"" Brian Watson");
ADD_ATEXT("\\L\\c2"" Emulation core enhancement, debugger support");
break;

View File

@ -1,14 +1,29 @@
/* AboutBox.h - Header for About Box
window class and support functions for the
Macintosh OS X SDL port of Stella
Mark Grebe <atarimac@cox.net>
*/
/* $Id$ */
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2010 by Bradford W. Mott and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#import <Cocoa/Cocoa.h>
/**
AboutBox window class and support functions for the Macintosh OS X
SDL port of Stella.
@author Mark Grebe <atarimac@cox.net>
*/
@interface AboutBox : NSObject
{
IBOutlet id appNameField;

View File

@ -1,13 +1,23 @@
/* AboutBox.m - AboutBox window
class and support functions for the
Macintosh OS X SDL port of Stella
Mark Grebe <atarimac@cox.net>
*/
/* $Id: AboutBox.m,v 1.2 2005-06-04 02:04:06 markgrebe Exp $ */
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2010 by Bradford W. Mott and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#import "AboutBox.h"
@implementation AboutBox
static AboutBox *sharedInstance = nil;

View File

@ -11,7 +11,7 @@ Copyright © 1995-2010 The Stella Team<br>
<a href="http://stella.sourceforge.net">http://stella.sourceforge.net</a><br>
<br>
Macintosh OS X version:<br>
Copyright © 2007-2009 Stephen Anthony<br>
Copyright © 2007-2010 Stephen Anthony<br>
Copyright © 2005-2006 Mark Grebe<br>
<br></big>
<big>Graphics by Simple DirectMedia Layer library<br>

View File

@ -1,38 +1,44 @@
/* Menus.h - Header for Menus
window class and support functions for the
Macintosh OS X SDL port of Stella
Mark Grebe <atarimac@cox.net>
*/
/* $Id$ */
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2010 by Bradford W. Mott and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#import <Cocoa/Cocoa.h>
@interface Menus : NSObject {
IBOutlet id preferencesMenuItem;
IBOutlet id openMenuItem;
IBOutlet id restartMenuItem;
IBOutlet id savePropsMenuItem;
IBOutlet id screenBiggerMenuItem;
IBOutlet id screenSmallerMenuItem;
IBOutlet id fullScreenMenuItem;
IBOutlet id togglePalletteMenuItem;
IBOutlet id ntscPalMenuItem;
IBOutlet id increaseXStartMenuItem;
IBOutlet id decreaseXStartMenuItem;
IBOutlet id increaseYStartMenuItem;
IBOutlet id decreaseYStartMenuItem;
IBOutlet id increaseWidthMenuItem;
IBOutlet id decreaseWidthMenuItem;
IBOutlet id increaseHeightMenuItem;
IBOutlet id decreaseHeightMenuItem;
IBOutlet id mousePaddle0MenuItem;
IBOutlet id mousePaddle1MenuItem;
IBOutlet id mousePaddle2MenuItem;
IBOutlet id mousePaddle3MenuItem;
IBOutlet id grabMouseMenuItem;
IBOutlet id increaseVolumeMenuItem;
IBOutlet id decreaseVolumeMenuItem;
/**
Menus window class and support functions for the Macintosh OS X
SDL port of Stella.
@author Mark Grebe <atarimac@cox.net>
*/
@interface Menus : NSObject
{
IBOutlet id preferencesMenuItem;
IBOutlet id openMenuItem;
IBOutlet id restartMenuItem;
IBOutlet id screenBiggerMenuItem;
IBOutlet id screenSmallerMenuItem;
IBOutlet id fullScreenMenuItem;
IBOutlet id mousePaddle0MenuItem;
IBOutlet id mousePaddle1MenuItem;
IBOutlet id mousePaddle2MenuItem;
IBOutlet id mousePaddle3MenuItem;
IBOutlet id grabMouseMenuItem;
IBOutlet id increaseVolumeMenuItem;
IBOutlet id decreaseVolumeMenuItem;
}
+ (Menus *)sharedInstance;
@ -43,21 +49,10 @@
- (IBAction)fullScreen:(id)sender;
- (IBAction)openCart:(id)sender;
- (IBAction)restartGame:(id)sender;
- (IBAction)ntscPalMode:(id)sender;
- (IBAction)togglePallette:(id)sender;
- (IBAction)grabMouse:(id)sender;
- (IBAction)xStartPlus:(id)sender;
- (IBAction)xStartMinus:(id)sender;
- (IBAction)yStartPlus:(id)sender;
- (IBAction)yStartMinus:(id)sender;
- (IBAction)widthPlus:(id)sender;
- (IBAction)widthMinus:(id)sender;
- (IBAction)heightPlus:(id)sender;
- (IBAction)heightMinus:(id)sender;
- (IBAction)doPrefs:(id)sender;
- (IBAction)volumePlus:(id)sender;
- (IBAction)volumeMinus:(id)sender;
- (IBAction)saveProps:(id)sender;
- (void)setEmulationMenus;
- (void)setLauncherMenus;
- (void)setOptionsMenus;

View File

@ -1,20 +1,30 @@
/* Menus.m - Menus window
class and support functions for the
Macintosh OS X SDL port of Stella
Mark Grebe <atarimac@cox.net>
*/
/* $Id: Menus.m,v 1.14 2007-01-03 12:59:23 stephena Exp $ */
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2010 by Bradford W. Mott and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#import <Cocoa/Cocoa.h>
#import "SDL.h"
#import "Menus.h"
#import "MenusEvents.h"
#define QZ_m 0x2E
#define QZ_o 0x1F
#define QZ_h 0x04
#define QZ_SLASH 0x2C
#define QZ_m 0x2E
#define QZ_o 0x1F
#define QZ_h 0x04
#define QZ_SLASH 0x2C
extern void macOSXSendMenuEvent(int event);
@ -30,72 +40,77 @@ extern void macOSXSendMenuEvent(int event);
*-----------------------------------------------------------------------------*/
void releaseCmdKeys(NSString *character, int keyCode)
{
NSEvent *event1, *event2;
NSPoint point;
NSEvent *event1, *event2;
NSPoint point;
event1 = [NSEvent keyEventWithType:NSKeyUp location:point modifierFlags:0
timestamp:0.0 windowNumber:0 context:nil characters:character
charactersIgnoringModifiers:character isARepeat:NO keyCode:keyCode];
[NSApp postEvent:event1 atStart:NO];
event1 = [NSEvent keyEventWithType:NSKeyUp location:point modifierFlags:0
timestamp:0.0 windowNumber:0 context:nil characters:character
charactersIgnoringModifiers:character isARepeat:NO keyCode:keyCode];
[NSApp postEvent:event1 atStart:NO];
event2 = [NSEvent keyEventWithType:NSFlagsChanged location:point modifierFlags:0
timestamp:0.0 windowNumber:0 context:nil characters:nil
charactersIgnoringModifiers:nil isARepeat:NO keyCode:0];
[NSApp postEvent:event2 atStart:NO];
event2 = [NSEvent keyEventWithType:NSFlagsChanged location:point modifierFlags:0
timestamp:0.0 windowNumber:0 context:nil characters:nil
charactersIgnoringModifiers:nil isARepeat:NO keyCode:0];
[NSApp postEvent:event2 atStart:NO];
}
void hideApp(void) {
[NSApp hide:nil];
releaseCmdKeys(@"h",QZ_h);
void hideApp(void)
{
[NSApp hide:nil];
releaseCmdKeys(@"h",QZ_h);
}
void showHelp(void) {
[NSApp showHelp:nil];
releaseCmdKeys(@"?",QZ_SLASH);
void showHelp(void)
{
[NSApp showHelp:nil];
releaseCmdKeys(@"?",QZ_SLASH);
}
void miniturizeWindow(void) {
[[NSApp keyWindow] performMiniaturize:nil];
releaseCmdKeys(@"m",QZ_m);
void miniturizeWindow(void)
{
[[NSApp keyWindow] performMiniaturize:nil];
releaseCmdKeys(@"m",QZ_m);
}
void handleMacOSXKeypress(int key) {
switch(key) {
case SDLK_h:
hideApp();
break;
case SDLK_m:
miniturizeWindow();
break;
case SDLK_SLASH:
showHelp();
break;
}
void handleMacOSXKeypress(int key)
{
switch(key)
{
case SDLK_h:
hideApp();
break;
case SDLK_m:
miniturizeWindow();
break;
case SDLK_SLASH:
showHelp();
break;
}
}
void setEmulationMenus(void)
{
[[Menus sharedInstance] setEmulationMenus];
[[Menus sharedInstance] setEmulationMenus];
}
void setLauncherMenus(void)
{
[[Menus sharedInstance] setLauncherMenus];
[[Menus sharedInstance] setLauncherMenus];
}
void setOptionsMenus(void)
{
[[Menus sharedInstance] setOptionsMenus];
[[Menus sharedInstance] setOptionsMenus];
}
void setCommandMenus(void)
{
[[Menus sharedInstance] setCommandMenus];
[[Menus sharedInstance] setCommandMenus];
}
void setDebuggerMenus(void)
{
[[Menus sharedInstance] setDebuggerMenus];
[[Menus sharedInstance] setDebuggerMenus];
}
@ -103,8 +118,9 @@ void setDebuggerMenus(void)
static Menus *sharedInstance = nil;
+ (Menus *)sharedInstance {
return sharedInstance ? sharedInstance : [[self alloc] init];
+ (Menus *)sharedInstance
{
return sharedInstance ? sharedInstance : [[self alloc] init];
}
- (id)init
@ -132,41 +148,41 @@ static Menus *sharedInstance = nil;
- (IBAction) paddleChange:(id) sender
{
switch([sender tag])
{
case 0:
[self pushKeyEvent:SDLK_0:NO:YES];
break;
case 1:
[self pushKeyEvent:SDLK_1:NO:YES];
break;
case 2:
[self pushKeyEvent:SDLK_2:NO:YES];
break;
case 3:
[self pushKeyEvent:SDLK_3:NO:YES];
break;
}
switch([sender tag])
{
case 0:
[self pushKeyEvent:SDLK_0:NO:YES];
break;
case 1:
[self pushKeyEvent:SDLK_1:NO:YES];
break;
case 2:
[self pushKeyEvent:SDLK_2:NO:YES];
break;
case 3:
[self pushKeyEvent:SDLK_3:NO:YES];
break;
}
}
- (IBAction)biggerScreen:(id)sender
{
[self pushKeyEvent:SDLK_EQUALS:NO:YES];
[self pushKeyEvent:SDLK_EQUALS:NO:YES];
}
- (IBAction)smallerScreen:(id)sender
{
[self pushKeyEvent:SDLK_MINUS:NO:YES];
[self pushKeyEvent:SDLK_MINUS:NO:YES];
}
- (IBAction)fullScreen:(id)sender
{
[self pushKeyEvent:SDLK_RETURN:NO:YES];
[self pushKeyEvent:SDLK_RETURN:NO:YES];
}
- (IBAction)openCart:(id)sender
{
[self pushKeyEvent:SDLK_ESCAPE:NO:NO];
[self pushKeyEvent:SDLK_ESCAPE:NO:NO];
// Fixme - This should work like the other keys, but instead
// if you send the LauncherOpen event, it crashes SDL in
// the poll loop.
@ -175,222 +191,112 @@ static Menus *sharedInstance = nil;
- (IBAction)restartGame:(id)sender
{
[self pushKeyEvent:SDLK_r:NO:YES];
}
- (IBAction)ntscPalMode:(id)sender
{
[self pushKeyEvent:SDLK_f:NO:YES];
}
- (IBAction)togglePallette:(id)sender
{
[self pushKeyEvent:SDLK_p:NO:YES];
[self pushKeyEvent:SDLK_r:NO:YES];
}
- (IBAction)grabMouse:(id)sender
{
[self pushKeyEvent:SDLK_g:NO:YES];
}
- (IBAction)xStartPlus:(id)sender
{
[self pushKeyEvent:SDLK_END:YES:YES];
}
- (IBAction)xStartMinus:(id)sender
{
[self pushKeyEvent:SDLK_HOME:YES:YES];
}
- (IBAction)yStartPlus:(id)sender
{
[self pushKeyEvent:SDLK_PAGEUP:YES:YES];
}
- (IBAction)yStartMinus:(id)sender
{
[self pushKeyEvent:SDLK_PAGEDOWN:YES:YES];
}
- (IBAction)widthPlus:(id)sender
{
[self pushKeyEvent:SDLK_END:NO:YES];
}
- (IBAction)widthMinus:(id)sender
{
[self pushKeyEvent:SDLK_HOME:NO:YES];
}
- (IBAction)heightPlus:(id)sender
{
[self pushKeyEvent:SDLK_PAGEUP:NO:YES];
}
- (IBAction)heightMinus:(id)sender
{
[self pushKeyEvent:SDLK_PAGEDOWN:NO:YES];
[self pushKeyEvent:SDLK_g:NO:YES];
}
- (IBAction)doPrefs:(id)sender
{
[self pushKeyEvent:SDLK_TAB:NO:NO];
[self pushKeyEvent:SDLK_TAB:NO:NO];
}
- (IBAction)volumePlus:(id)sender
{
macOSXSendMenuEvent(MENU_VOLUME_INCREASE);
macOSXSendMenuEvent(MENU_VOLUME_INCREASE);
}
- (IBAction)volumeMinus:(id)sender
{
macOSXSendMenuEvent(MENU_VOLUME_DECREASE);
}
- (IBAction)saveProps:(id)sender
{
[self pushKeyEvent:SDLK_s:NO:YES];
macOSXSendMenuEvent(MENU_VOLUME_DECREASE);
}
- (void)setEmulationMenus
{
[preferencesMenuItem setTarget:self];
[openMenuItem setTarget:self];
[restartMenuItem setTarget:self];
[savePropsMenuItem setTarget:self];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[togglePalletteMenuItem setTarget:self];
[ntscPalMenuItem setTarget:self];
[increaseXStartMenuItem setTarget:self];
[decreaseXStartMenuItem setTarget:self];
[increaseYStartMenuItem setTarget:self];
[decreaseYStartMenuItem setTarget:self];
[increaseWidthMenuItem setTarget:self];
[decreaseWidthMenuItem setTarget:self];
[increaseHeightMenuItem setTarget:self];
[decreaseHeightMenuItem setTarget:self];
[mousePaddle0MenuItem setTarget:self];
[mousePaddle1MenuItem setTarget:self];
[mousePaddle2MenuItem setTarget:self];
[mousePaddle3MenuItem setTarget:self];
[grabMouseMenuItem setTarget:self];
[increaseVolumeMenuItem setTarget:self];
[decreaseVolumeMenuItem setTarget:self];
[preferencesMenuItem setTarget:self];
[openMenuItem setTarget:self];
[restartMenuItem setTarget:self];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[mousePaddle0MenuItem setTarget:self];
[mousePaddle1MenuItem setTarget:self];
[mousePaddle2MenuItem setTarget:self];
[mousePaddle3MenuItem setTarget:self];
[grabMouseMenuItem setTarget:self];
[increaseVolumeMenuItem setTarget:self];
[decreaseVolumeMenuItem setTarget:self];
}
- (void)setLauncherMenus
{
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[savePropsMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[togglePalletteMenuItem setTarget:nil];
[ntscPalMenuItem setTarget:nil];
[increaseXStartMenuItem setTarget:nil];
[decreaseXStartMenuItem setTarget:nil];
[increaseYStartMenuItem setTarget:nil];
[decreaseYStartMenuItem setTarget:nil];
[increaseWidthMenuItem setTarget:nil];
[decreaseWidthMenuItem setTarget:nil];
[increaseHeightMenuItem setTarget:nil];
[decreaseHeightMenuItem setTarget:nil];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
}
- (void)setOptionsMenus
{
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[savePropsMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[togglePalletteMenuItem setTarget:nil];
[ntscPalMenuItem setTarget:nil];
[increaseXStartMenuItem setTarget:nil];
[decreaseXStartMenuItem setTarget:nil];
[increaseYStartMenuItem setTarget:nil];
[decreaseYStartMenuItem setTarget:nil];
[increaseWidthMenuItem setTarget:nil];
[decreaseWidthMenuItem setTarget:nil];
[increaseHeightMenuItem setTarget:nil];
[decreaseHeightMenuItem setTarget:nil];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
}
- (void)setCommandMenus
{
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[savePropsMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[togglePalletteMenuItem setTarget:nil];
[ntscPalMenuItem setTarget:nil];
[increaseXStartMenuItem setTarget:nil];
[decreaseXStartMenuItem setTarget:nil];
[increaseYStartMenuItem setTarget:nil];
[decreaseYStartMenuItem setTarget:nil];
[increaseWidthMenuItem setTarget:nil];
[decreaseWidthMenuItem setTarget:nil];
[increaseHeightMenuItem setTarget:nil];
[decreaseHeightMenuItem setTarget:nil];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
}
- (void)setDebuggerMenus
{
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[savePropsMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[togglePalletteMenuItem setTarget:nil];
[ntscPalMenuItem setTarget:nil];
[increaseXStartMenuItem setTarget:nil];
[decreaseXStartMenuItem setTarget:nil];
[increaseYStartMenuItem setTarget:nil];
[decreaseYStartMenuItem setTarget:nil];
[increaseWidthMenuItem setTarget:nil];
[decreaseWidthMenuItem setTarget:nil];
[increaseHeightMenuItem setTarget:nil];
[decreaseHeightMenuItem setTarget:nil];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[fullScreenMenuItem setTarget:self];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];
[mousePaddle2MenuItem setTarget:nil];
[mousePaddle3MenuItem setTarget:nil];
[grabMouseMenuItem setTarget:nil];
[increaseVolumeMenuItem setTarget:nil];
[decreaseVolumeMenuItem setTarget:nil];
}
@end

View File

@ -23,7 +23,7 @@
/**
This class defines UNIX-like OS's (Linux) system specific settings.
This class defines UNIX-like OS's (MacOS X) system specific settings.
@author Mark Grebe
@version $Id$
@ -32,7 +32,7 @@ class OSystemMACOSX : public OSystem
{
public:
/**
Create a new UNIX-specific operating system object
Create a new MACOSX-specific operating system object
*/
OSystemMACOSX();
@ -45,7 +45,7 @@ class OSystemMACOSX : public OSystem
/**
Informs the OSystem of a change in EventHandler state.
*/
virtual void stateChanged(EventHandler::State state);
void stateChanged(EventHandler::State state);
};
#endif

View File

@ -1,15 +1,29 @@
/* Preferences.h - Header for Preferences
class and support functions for the
Macintosh OS X SDL port of Stella
Mark Grebe <atarimac@cox.net>
Based on the Preferences pane of the
TextEdit application.
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2010 by Bradford W. Mott and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
*/
/* $Id$ */
#import <Cocoa/Cocoa.h>
/**
Preferences class and support functions for the Macintosh OS X
SDL port of Stella.
@author Mark Grebe <atarimac@cox.net>
*/
@interface Preferences : NSObject
{
NSUserDefaults *defaults; /* Defaults pointer */

View File

@ -1,17 +1,24 @@
/* Preferences.m - Preferences
class and support functions for the
Macintosh OS X SDL port of Stella
Mark Grebe <atarimac@cox.net>
Based on the Preferences pane of the
TextEdit application.
*/
/* $Id: Preferences.m,v 1.3 2006-02-28 02:17:26 markgrebe Exp $ */
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2010 by Bradford W. Mott and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#import <Cocoa/Cocoa.h>
#import "Preferences.h"
#import "SDL.h"
void prefsSetString(const char* key, const char* value)
{

View File

@ -16,19 +16,7 @@
// $Id$
//============================================================================
#include <cassert>
#include <sstream>
#include <fstream>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "bspf.hxx"
#include "Console.hxx"
#include "EventHandler.hxx"
#include "Version.hxx"
#include "Settings.hxx"
#include "SettingsMACOSX.hxx"

View File

@ -1805,10 +1805,13 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
.,
"$(HOME)/Library/Frameworks",
);
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
VALID_ARCHS = "i386 x86_64";
};