ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Emulator.h
Revision: 1.7
Committed: 2008-12-09T18:03:35Z (15 years, 6 months ago) by asvitkine
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -1 lines
Log Message:
some changes to make Basillisk build better on Leopard

File Contents

# User Rev Content
1 nigel 1.1 /*
2     * Emulator.h - Class whose actions are attached GUI widgets in a window,
3     * used to control a single Basilisk II emulated Macintosh.
4     *
5 asvitkine 1.7 * $Id: Emulator.h,v 1.6 2008/01/01 09:40:32 gbeauche Exp $
6 nigel 1.1 *
7 gbeauche 1.6 * Basilisk II (C) 1997-2008 Christian Bauer
8 nigel 1.1 *
9     * This program is free software; you can redistribute it and/or modify
10     * it under the terms of the GNU General Public License as published by
11     * the Free Software Foundation; either version 2 of the License, or
12     * (at your option) any later version.
13     *
14     * This program is distributed in the hope that it will be useful,
15     * but WITHOUT ANY WARRANTY; without even the implied warranty of
16     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17     * GNU General Public License for more details.
18     *
19     * You should have received a copy of the GNU General Public License
20     * along with this program; if not, write to the Free Software
21     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22     */
23    
24 asvitkine 1.7 #import <Carbon/Carbon.h>
25 nigel 1.1 #import <Cocoa/Cocoa.h>
26     #import "EmulatorView.h"
27     #import "NNThread.h"
28    
29     @interface Emulator : NSObject
30     {
31     NNThread *emul; // Run emulThread
32     NNTimer *RTC, // Invoke RTCinterrupt
33     *redraw, // Invoke redrawScreen
34     *tick, // Invoke tickInterrupt
35     *xPRAM; // Invoke xPRAMbackup
36    
37     BOOL uaeCreated, // Has thread created the emulator environment?
38     running; // Is the emulator currently grinding away?
39     float redrawDelay; // Seconds until next screen update
40    
41     // UI elements that this class changes the state of
42    
43     IBOutlet NSProgressIndicator *barberPole;
44     IBOutlet NSButton *runOrPause;
45     IBOutlet EmulatorView *screen;
46     IBOutlet NSSlider *speed;
47     IBOutlet NSWindow *win;
48     }
49    
50     // The following allow the Controller and PrefsEditor classes to access our internal data
51    
52     - (BOOL) isRunning;
53     - (BOOL) uaeCreated;
54     - (EmulatorView *) screen;
55     - (NSSlider *) speed;
56     - (NSWindow *) window;
57    
58     - (void) runUpdate; // Update some UI elements
59    
60     - (IBAction) Benchmark: (id)sender;
61     - (IBAction) Interrupt: (id)sender;
62     - (IBAction) PowerKey: (id)sender;
63     - (IBAction) Restart: (id)sender;
64 nigel 1.3 - (IBAction) Resume: (id)sender;
65 nigel 1.2 - (IBAction) ScreenHideShow:(NSButton *)sender;
66 nigel 1.1 - (IBAction) Snapshot: (id)sender;
67     - (IBAction) SpeedChange: (NSSlider *)sender;
68 nigel 1.3 - (IBAction) Suspend: (id)sender;
69 nigel 1.1 - (IBAction) Terminate: (id)sender;
70     - (IBAction) ToggleState: (NSButton *)sender;
71     - (IBAction) ZapPRAM: (id)sender;
72    
73     - (void) createThreads;
74     - (void) exitThreads;
75    
76     - (void) emulThread; // Thread for processor emulator
77     - (void) RTCinterrupt; // Emulator real time clock update
78     - (void) redrawScreen; // Draw emulator screen in window
79     - (void) tickInterrupt; // Draw emulator screen in window
80     - (void) xPRAMbackup; // PRAM watchdog
81    
82 nigel 1.3 @end