ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/Prefs.h
Revision: 1.5
Committed: 2004-01-12T15:13:20Z (20 years, 9 months ago) by cebix
Content type: text/plain
Branch: MAIN
Changes since 1.4: +1 -1 lines
Log Message:
Happy New Year!

File Contents

# Content
1 /*
2 * Prefs.h - Global preferences
3 *
4 * Frodo (C) 1994-1997,2002-2004 Christian Bauer
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #ifndef _PREFS_H
22 #define _PREFS_H
23
24
25 // Drive types
26 enum {
27 DRVTYPE_DIR, // 1541 emulation in host file system
28 DRVTYPE_D64, // 1541 emulation in .d64 file
29 DRVTYPE_T64 // 1541 emulation in .t64 file
30 };
31
32
33 // SID types
34 enum {
35 SIDTYPE_NONE, // SID emulation off
36 SIDTYPE_DIGITAL, // Digital SID emulation
37 SIDTYPE_SIDCARD // SID card
38 };
39
40
41 // REU sizes
42 enum {
43 REU_NONE, // No REU
44 REU_128K, // 128K
45 REU_256K, // 256K
46 REU_512K // 512K
47 };
48
49
50 // Display types
51 enum {
52 DISPTYPE_WINDOW, // Window
53 DISPTYPE_SCREEN // Fullscreen
54 };
55
56
57 // Preferences data
58 class Prefs {
59 public:
60 Prefs();
61 bool ShowEditor(bool startup, char *prefs_name);
62 void Check(void);
63 void Load(char *filename);
64 bool Save(char *filename);
65
66 bool operator==(const Prefs &rhs) const;
67 bool operator!=(const Prefs &rhs) const;
68
69 int NormalCycles; // Available CPU cycles in normal raster lines
70 int BadLineCycles; // Available CPU cycles in Bad Lines
71 int CIACycles; // CIA timer ticks per raster line
72 int FloppyCycles; // Available 1541 CPU cycles per line
73 int SkipFrames; // Draw every n-th frame
74
75 int DriveType[4]; // Type of drive 8..11
76
77 char DrivePath[4][256]; // Path for drive 8..11
78
79 char ViewPort[256]; // Size of the C64 screen to display (Win32)
80 char DisplayMode[256]; // Video mode to use for full screen (Win32)
81
82 int SIDType; // SID emulation type
83 int REUSize; // Size of REU
84 int DisplayType; // Display type (BeOS)
85 int Joystick1Port; // Port that joystick 1 is connected to (0 = no joystick, all other values are system dependant)
86 int Joystick2Port; // Port that joystick 2 is connected to
87 int LatencyMin; // Min msecs ahead of sound buffer (Win32)
88 int LatencyMax; // Max msecs ahead of sound buffer (Win32)
89 int LatencyAvg; // Averaging interval in msecs (Win32)
90 int ScalingNumerator; // Window scaling numerator (Win32)
91 int ScalingDenominator; // Window scaling denominator (Win32)
92
93 bool SpritesOn; // Sprite display is on
94 bool SpriteCollisions; // Sprite collision detection is on
95 bool JoystickSwap; // Swap joysticks 1<->2
96 bool LimitSpeed; // Limit speed to 100%
97 bool FastReset; // Skip RAM test on reset
98 bool CIAIRQHack; // Write to CIA ICR clears IRQ
99 bool MapSlash; // Map '/' in C64 filenames
100 bool Emul1541Proc; // Enable processor-level 1541 emulation
101 bool SIDFilters; // Emulate SID filters
102 bool DoubleScan; // Double scan lines (BeOS, if DisplayType == DISPTYPE_SCREEN)
103 bool JoystickGeekPort; // Enable GeekPort joystick adapter
104 bool HideCursor; // Hide mouse cursor when visible (Win32)
105 bool DirectSound; // Use direct sound (instead of wav) (Win32)
106 bool ExclusiveSound; // Use exclusive mode with direct sound (Win32)
107 bool AutoPause; // Auto pause when not foreground app (Win32)
108 bool PrefsAtStartup; // Show prefs dialog at startup (Win32)
109 bool SystemMemory; // Put view work surface in system mem (Win32)
110 bool AlwaysCopy; // Always use a work surface (Win32)
111 bool SystemKeys; // Enable system keys and menu keys (Win32)
112 bool ShowLEDs; // Show LEDs (Win32)
113
114 #ifdef __mac__
115 void ChangeDisks(void);
116 #endif
117
118 #ifdef WIN32
119 private:
120 static BOOL CALLBACK StandardDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
121 static BOOL CALLBACK WIN32DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
122 BOOL DialogProc(int page, HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
123 void SetupControls(int page);
124 void SetValues(int page);
125 void GetValues(int page);
126 void BrowseForDevice(int id);
127
128 static Prefs *edit_prefs;
129 static char *edit_prefs_name;
130 static HWND hDlg;
131 #endif
132 };
133
134
135 // These are the active preferences
136 extern Prefs ThePrefs;
137
138 // Theses are the preferences on disk
139 extern Prefs ThePrefsOnDisk;
140
141 #endif