37 |
|
#import <prefs.h> |
38 |
|
#import <timer.h> |
39 |
|
|
40 |
< |
#undef check() // memory.h defines a check macro, which clashes with an OS X one? |
40 |
> |
#undef check() // memory.h defines a check macro, clashes with an OS X one? |
41 |
|
#import <cpu_emulation.h> |
42 |
|
|
43 |
< |
#define DEBUG 1 |
43 |
> |
#define DEBUG 0 |
44 |
|
#import <debug.h> |
45 |
|
|
46 |
|
// NSWindow method, which is invoked via delegation |
120 |
|
- (NSSlider *) speed { return speed; } |
121 |
|
- (NSWindow *) window { return win; } |
122 |
|
|
123 |
– |
//#define DEBUG 1 |
124 |
– |
//#include <debug.h> |
123 |
|
|
124 |
|
// Update some UI elements |
125 |
|
|
182 |
|
|
183 |
|
[emul terminate]; QuitEmuNoExit(); |
184 |
|
|
185 |
< |
emul = [[NNThread alloc] init]; |
185 |
> |
emul = [NNThread new]; |
186 |
|
[emul perform:@selector(emulThread) of:self]; |
187 |
|
[emul start]; |
188 |
|
|
312 |
|
[NSThread detachNewThreadSelector:(SEL)"" toTarget:nil withObject:nil]; |
313 |
|
//emul = [[NNThread alloc] initWithAutoReleasePool]; |
314 |
|
#endif |
315 |
< |
emul = [[NNThread alloc] init]; |
316 |
< |
RTC = [[NNTimer alloc] init]; |
317 |
< |
redraw = [[NNTimer alloc] init]; |
318 |
< |
tick = [[NNTimer alloc] init]; |
319 |
< |
xPRAM = [[NNTimer alloc] init]; |
315 |
> |
emul = [NNThread new]; |
316 |
> |
RTC = [NNTimer new]; |
317 |
> |
redraw = [NNTimer new]; |
318 |
> |
tick = [NNTimer new]; |
319 |
> |
xPRAM = [NNTimer new]; |
320 |
|
|
321 |
|
[emul perform:@selector(emulThread) of:self]; |
322 |
|
[RTC repeat:@selector(RTCinterrupt) of:self |
358 |
|
- (void) emulThread |
359 |
|
{ |
360 |
|
extern uint8 *RAMBaseHost, *ROMBaseHost; |
361 |
< |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
361 |
> |
NSAutoreleasePool *pool = [NSAutoreleasePool new]; |
362 |
|
|
363 |
|
InitEmulator(); |
364 |
|
|