~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/MacOSX/Emulator.mm

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2005-07-30 20:42:20 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050730204220-1nl1cg2jkjvy63ry
Tags: 0.9.20050730-1
* New upstream CVS snapshot.
* Build-depend on virtual libsdl-dev (not libsdl1.2-dev).
* Invoke init rules also on clean (to separate better from official
  builds).
* Update URL of upstream source in debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *      Emulator.mm - Class whose actions are attached to GUI widgets in a window,
3
3
 *                                used to control a single Basilisk II emulated Macintosh. 
4
4
 *
5
 
 *      $Id: Emulator.mm,v 1.6 2003/03/26 23:04:46 nigel Exp $
 
5
 *      $Id: Emulator.mm,v 1.11 2005/01/30 21:42:13 gbeauche Exp $
6
6
 *
7
 
 *  Basilisk II (C) 1997-2002 Christian Bauer
 
7
 *  Basilisk II (C) 1997-2005 Christian Bauer
8
8
 *
9
9
 *  This program is free software; you can redistribute it and/or modify
10
10
 *  it under the terms of the GNU General Public License as published by
24
24
#import "Emulator.h"
25
25
#import "EmulatorView.h"
26
26
 
27
 
@implementation Emulator
28
 
 
29
27
#import "sysdeps.h"                     // Types used in Basilisk C++ code
30
28
 
31
29
#import "main_macosx.h"         // Prototypes for QuitEmuNoExit() and InitEmulator()
32
30
#import "misc_macosx.h"         // Some other prototypes
33
31
#import "video_macosx.h"        // Some window/view globals
34
32
 
35
 
#import <adb.h>
36
 
#import <main.h>
37
 
#import <prefs.h>
38
 
#import <timer.h>
 
33
#import "adb.h"
 
34
#import "main.h"
 
35
#import "prefs.h"
 
36
#import "timer.h"
39
37
 
40
 
#undef check()                          // memory.h defines a check macro, clashes with an OS X one?
41
 
#import <cpu_emulation.h>
 
38
#undef check                            // memory.h defines a check macro, clashes with an OS X one?
 
39
#import "cpu_emulation.h"
42
40
 
43
41
#define DEBUG 0
44
 
#import <debug.h>
 
42
#import "debug.h"
 
43
 
 
44
@implementation Emulator
45
45
 
46
46
// NSWindow method, which is invoked via delegation
47
47
 
190
190
 
191
191
- (IBAction) Restart: (id)sender
192
192
{
 
193
        if ( ! running )
 
194
        {
 
195
                running = YES;                                          // Start emulator
 
196
                [self runUpdate];
 
197
                [self Resume: nil];
 
198
        }
 
199
 
193
200
        if ( running )
194
 
//              reset680x0();
 
201
#ifdef UAE_CPU_HAS_RESET
 
202
                reset680x0();
 
203
#else
195
204
        {
196
205
                uaeCreated = NO;
197
206
                [redraw suspend];
219
228
                if ( display_type != DISPLAY_SCREEN )
220
229
                        [redraw resume];
221
230
        }
 
231
#endif
222
232
}
223
233
 
224
234
- (IBAction) Resume: (id)sender
343
353
#endif
344
354
        emul   = [NNThread      new];
345
355
        RTC    = [NNTimer       new];
346
 
        redraw = [NNTimer       new];
 
356
        redraw = [[NNTimer      alloc] initWithAutoRelPool];
347
357
        tick   = [NNTimer       new];
348
358
        xPRAM  = [NNTimer       new];
349
359