-
Notifications
You must be signed in to change notification settings - Fork 10
/
Main.h
172 lines (155 loc) · 5.69 KB
/
Main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
* Project 64 - A Nintendo 64 emulator.
*
* (c) Copyright 2001 zilmar ([email protected]) and
* Jabo ([email protected]).
*
* pj64 homepage: www.pj64.net
*
* Permission to use, copy, modify and distribute Project64 in both binary and
* source form, for non-commercial purposes, is hereby granted without fee,
* providing that this license information and copyright notice appear with
* all copies and any derived work.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event shall the authors be held liable for any damages
* arising from the use of this software.
*
* Project64 is freeware for PERSONAL USE only. Commercial users should
* seek permission of the copyright holders first. Commercial use includes
* charging money for Project64 or software derived from Project64.
*
* The copyright holders request that bug fixes and improvements to the code
* should be forwarded to them so if they want them.
*
*/
#ifndef __main_h
#define __main_h
#include "MemTest.h"
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <objbase.h>
#include "Types.h"
#include "win32Timer.h"
#include "Profiling.h"
#include "SettingsAPI.h"
#include "rombrowser.h"
#include "Language.h"
/********* General Defaults **********/
#if (!defined(EXTERNAL_RELEASE))
#define AppVer "Project64 - Build 57"
#define AppName "Project64 (Build 57)"
#else
//#define BETA_VERSION
#define AppVer "Project64 - Version 1.6"
#ifdef BETA_VERSION
#define AppName "Project64 Version 1.6"
#else
#define AppName "Project64 Version 1.6"
#endif
#endif
#define IniName "Project64.rdb"
#define NotesIniName "Project64.rdn"
#define ExtIniName "Project64.rdx"
#define CheatIniName "Project64.cht"
#define LangFileName "Project64.lng"
#define CacheFileName "Project64.cache"
#define Default_AdvancedBlockLink TRUE
#define Default_AutoStart TRUE
#define Default_AutoSleep TRUE
#define Default_DisableRegCaching FALSE
#define Default_RdramSize 0x400000
#define Default_UseIni TRUE
#define Default_AutoZip TRUE
#define Default_LimitFPS TRUE
#define Default_AlwaysOnTop FALSE
#define Default_BasicMode TRUE
#define Default_RememberCheats FALSE
#define Default_RomsToRemember 4
#define Default_RomsDirsToRemember 4
#define LinkBlocks
#define TLB_HACK
/*********** Menu Stuff **************/
#define ID_FILE_RECENT_FILE 1000
#define ID_FILE_RECENT_DIR 1100
#define ID_LANG_SELECT 2000
/************** Core *****************/
#define CPU_Default -1
#define CPU_Interpreter 0
#define CPU_Recompiler 1
#define CPU_SyncCores 2
#define Default_CPU CPU_Recompiler
/*********** GFX Defaults ************/
#define NoOfFrames 7
//#define CFB_READ
/******* Self modifying code *********/
#define ModCode_Default -1
#define ModCode_None 0
#define ModCode_Cache 1
#define ModCode_ProtectedMemory 2
#define ModCode_ChangeMemory 4
#define ModCode_CheckMemoryCache 6
#define ModCode_CheckMemory2 7 // *** Add in Build 53
/********** Counter Factor ***********/
#define Default_CountPerOp 2
/************ Debugging **************/
#define Default_HaveDebugger FALSE
#define Default_AutoMap TRUE
#define Default_ShowUnhandledMemory FALSE
#define Default_ShowTLBMisses FALSE
#define Default_ShowDlistCount FALSE
#define Default_ShowCompileMemory TRUE
#define Default_ShowPifRamErrors FALSE
#define Default_SelfModCheck ModCode_CheckMemory2
//#define Interpreter_StackTest
/************ Profiling **************/
#define Default_ShowCPUPer FALSE
#define Default_ProfilingOn FALSE
#define Default_IndvidualBlock FALSE
/********** Rom Browser **************/
#define Default_UseRB TRUE
#define Default_Rercursion FALSE
#define Default_RomStatus "Unknown"
/************* Logging ***************/
//#define Log_x86Code
/********* Global Variables **********/
extern LARGE_INTEGER Frequency, Frames[NoOfFrames], LastFrame;
extern BOOL HaveDebugger, AutoLoadMapFile, ShowUnhandledMemory, ShowTLBMisses,
ShowDListAListCount, ShowCompMem, Profiling, IndvidualBlock, AutoStart,
AutoSleep, DisableRegCaching, UseIni, UseTlb, UseLinking, RomBrowser,
IgnoreMove, Rercursion, ShowPifRamErrors, LimitFPS, ShowCPUPer, AutoZip,
AutoFullScreen, SystemABL, AlwaysOnTop, BasicMode, DelaySI, RememberCheats,AudioSignal;
extern DWORD CurrentFrame, CPU_Type, SystemCPU_Type, SelfModCheck, SystemSelfModCheck,
RomsToRemember, RomDirsToRemember;
extern HWND hMainWindow, hHiddenWin, hStatusWnd;
extern char CurrentSave[256];
extern HMENU hMainMenu;
extern HINSTANCE hInst;
/******** Function Prototype *********/
DWORD AsciiToHex ( char * HexValue );
void AlwaysOnTopWindow ( HWND hWnd );
void __cdecl DisplayError ( char * Message, ... );
void ChangeWinSize ( HWND hWnd, long width, long height, HWND hStatusBar );
void DisplayFPS ( void );
char* GetExtIniFileName ( void );
char* GetIniFileName ( void );
char* GetLangFileName ( void );
char* GetNotesIniFileName ( void );
int GetStoredWinPos ( char * WinName, DWORD * X, DWORD * Y );
int GetStoredWinSize ( char * WinName, DWORD * Width, DWORD * Height );
void LoadSettings ( void );
void MenuSetText ( HMENU hMenu, int MenuPos, char * Title, char * ShotCut );
void RegisterExtension ( char * Extension, BOOL RegisterWithPj64 );
void SetCurrentSaveState ( HWND hWnd, int State);
void SetupMenu ( HWND hWnd );
//void SetupMenuTitle ( HMENU hMenu, int MenuPos, char * ShotCut, char * Title, char * Language, char * LangFile );
void StoreCurrentWinPos ( char * WinName, HWND hWnd );
void StoreCurrentWinSize ( char * WinName, HWND hWnd );
BOOL TestExtensionRegistered ( char * Extension );
void AboutBox (void);
#ifdef __cplusplus
}
#endif
#endif