1 /*****************************************************************************
2 ** $Source: /cygdrive/d/Private/_SVNROOT/bluemsx/blueMSX/Src/Emulator/Emulator.h,v $
3 **
4 ** $Revision: 1.12 $
5 **
6 ** $Date: 2008-03-30 18:38:40 $
7 **
8 ** More info: http://www.bluemsx.com
9 **
10 ** Copyright (C) 2003-2006 Daniel Vik
11 **
12 ** This program is free software; you can redistribute it and/or modify
13 ** it under the terms of the GNU General Public License as published by
14 ** the Free Software Foundation; either version 2 of the License, or
15 ** (at your option) any later version.
16 **
17 ** This program is distributed in the hope that it will be useful,
18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ** GNU General Public License for more details.
21 **
22 ** You should have received a copy of the GNU General Public License
23 ** along with this program; if not, write to the Free Software
24 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 **
26 ******************************************************************************
27 */
28 #ifndef EMULATOR_H
29 #define EMULATOR_H
30 
31 #include "MsxTypes.h"
32 #include "Properties.h"
33 #include "AudioMixer.h"
34 
35 typedef enum { EMU_RUNNING, EMU_PAUSED, EMU_STOPPED, EMU_SUSPENDED, EMU_STEP, EMU_STEP_BACK } EmuState;
36 
37 void emulatorInit(Properties* properties, Mixer* mixer);
38 void emulatorExit();
39 
40 void emuEnableSynchronousUpdate(int enable);
41 
42 void emulatorSetFrequency(int logFrequency, int* frequency);
43 void emulatorRestartSound();
44 void emulatorSuspend();
45 void emulatorResume();
46 void emulatorDoResume();
47 void emulatorRestart();
48 void emulatorStart(const char* stateName);
49 void emulatorStop();
50 void emulatorSetMaxSpeed(int enable);
51 int  emulatorGetMaxSpeed();
52 void emulatorPlayReverse(int enable);
53 int  emulatorGetPlayReverse();
54 int emulatorGetCpuOverflow();
55 int emulatorGetSyncPeriod();
56 EmuState emulatorGetState();
57 void emulatorSetState(EmuState state);
58 UInt32 emulatorGetCpuSpeed();
59 UInt32 emulatorGetCpuUsage();
60 void emulatorResetMixer();
61 int emulatorGetCurrentScreenMode();
62 
63 #endif
64 
65