ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Emulator.h
Revision: 1.6
Committed: 2008-01-01T09:40:32Z (16 years, 6 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
Changes since 1.5: +2 -2 lines
Log Message:
Happy New Year!

File Contents

# Content
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 * $Id: Emulator.h,v 1.5 2005/01/30 21:42:13 gbeauche Exp $
6 *
7 * Basilisk II (C) 1997-2008 Christian Bauer
8 *
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 #import <Cocoa/Cocoa.h>
25 #import "EmulatorView.h"
26 #import "NNThread.h"
27
28 @interface Emulator : NSObject
29 {
30 NNThread *emul; // Run emulThread
31 NNTimer *RTC, // Invoke RTCinterrupt
32 *redraw, // Invoke redrawScreen
33 *tick, // Invoke tickInterrupt
34 *xPRAM; // Invoke xPRAMbackup
35
36 BOOL uaeCreated, // Has thread created the emulator environment?
37 running; // Is the emulator currently grinding away?
38 float redrawDelay; // Seconds until next screen update
39
40 // UI elements that this class changes the state of
41
42 IBOutlet NSProgressIndicator *barberPole;
43 IBOutlet NSButton *runOrPause;
44 IBOutlet EmulatorView *screen;
45 IBOutlet NSSlider *speed;
46 IBOutlet NSWindow *win;
47 }
48
49 // The following allow the Controller and PrefsEditor classes to access our internal data
50
51 - (BOOL) isRunning;
52 - (BOOL) uaeCreated;
53 - (EmulatorView *) screen;
54 - (NSSlider *) speed;
55 - (NSWindow *) window;
56
57 - (void) runUpdate; // Update some UI elements
58
59 - (IBAction) Benchmark: (id)sender;
60 - (IBAction) Interrupt: (id)sender;
61 - (IBAction) PowerKey: (id)sender;
62 - (IBAction) Restart: (id)sender;
63 - (IBAction) Resume: (id)sender;
64 - (IBAction) ScreenHideShow:(NSButton *)sender;
65 - (IBAction) Snapshot: (id)sender;
66 - (IBAction) SpeedChange: (NSSlider *)sender;
67 - (IBAction) Suspend: (id)sender;
68 - (IBAction) Terminate: (id)sender;
69 - (IBAction) ToggleState: (NSButton *)sender;
70 - (IBAction) ZapPRAM: (id)sender;
71
72 - (void) createThreads;
73 - (void) exitThreads;
74
75 - (void) emulThread; // Thread for processor emulator
76 - (void) RTCinterrupt; // Emulator real time clock update
77 - (void) redrawScreen; // Draw emulator screen in window
78 - (void) tickInterrupt; // Draw emulator screen in window
79 - (void) xPRAMbackup; // PRAM watchdog
80
81 @end