ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Emulator.h
Revision: 1.1
Committed: 2002-03-16T04:00:04Z (22 years, 8 months ago) by nigel
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-10
Log Message:
Initial revision of Mac OS X port code. Uses Objective-C++. Needs Mac OS 10.1

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     * $Id$
6     *
7     * Basilisk II (C) 1997-2001 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) Suspend: (id)sender;
62     - (IBAction) PowerKey: (id)sender;
63     - (IBAction) Restart: (id)sender;
64     - (IBAction) Snapshot: (id)sender;
65     - (IBAction) SpeedChange: (NSSlider *)sender;
66     - (IBAction) Resume: (id)sender;
67     - (IBAction) Terminate: (id)sender;
68     - (IBAction) ToggleState: (NSButton *)sender;
69     - (IBAction) ZapPRAM: (id)sender;
70    
71     - (void) createThreads;
72     - (void) exitThreads;
73    
74     - (void) emulThread; // Thread for processor emulator
75     - (void) RTCinterrupt; // Emulator real time clock update
76     - (void) redrawScreen; // Draw emulator screen in window
77     - (void) tickInterrupt; // Draw emulator screen in window
78     - (void) xPRAMbackup; // PRAM watchdog
79    
80     @end