ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Emulator.h
Revision: 1.5
Committed: 2005-01-30T21:42:13Z (19 years, 9 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-19, nigel-build-17
Changes since 1.4: +2 -2 lines
Log Message:
Happy New Year!

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 gbeauche 1.5 * $Id: Emulator.h,v 1.4 2004/01/12 15:29:24 cebix Exp $
6 nigel 1.1 *
7 gbeauche 1.5 * Basilisk II (C) 1997-2005 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     #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 nigel 1.3 - (IBAction) Resume: (id)sender;
64 nigel 1.2 - (IBAction) ScreenHideShow:(NSButton *)sender;
65 nigel 1.1 - (IBAction) Snapshot: (id)sender;
66     - (IBAction) SpeedChange: (NSSlider *)sender;
67 nigel 1.3 - (IBAction) Suspend: (id)sender;
68 nigel 1.1 - (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 nigel 1.3 @end