ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/Prefs.h
Revision: 1.1
Committed: 2003-07-01T17:09:43Z (20 years, 9 months ago) by cebix
Content type: text/plain
Branch: MAIN
Log Message:
imported files

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * Prefs.h - Global preferences
3     *
4     * Frodo (C) 1994-1997,2002 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 (BeOS)
51     enum {
52     DISPTYPE_WINDOW, // BWindow
53     DISPTYPE_SCREEN // BWindowScreen
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 LatencyMin; // Min msecs ahead of sound buffer (Win32)
86     int LatencyMax; // Max msecs ahead of sound buffer (Win32)
87     int LatencyAvg; // Averaging interval in msecs (Win32)
88     int ScalingNumerator; // Window scaling numerator (Win32)
89     int ScalingDenominator; // Window scaling denominator (Win32)
90    
91     bool SpritesOn; // Sprite display is on
92     bool SpriteCollisions; // Sprite collision detection is on
93     bool Joystick1On; // Joystick connected to port 1 of host
94     bool Joystick2On; // Joystick connected to port 2 of host
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 HideCursor; // Hide mouse cursor when visible (Win32)
104     bool DirectSound; // Use direct sound (instead of wav) (Win32)
105     bool ExclusiveSound; // Use exclusive mode with direct sound (Win32)
106     bool AutoPause; // Auto pause when not foreground app (Win32)
107     bool PrefsAtStartup; // Show prefs dialog at startup (Win32)
108     bool SystemMemory; // Put view work surface in system mem (Win32)
109     bool AlwaysCopy; // Always use a work surface (Win32)
110     bool SystemKeys; // Enable system keys and menu keys (Win32)
111     bool ShowLEDs; // Show LEDs (Win32)
112    
113     #ifdef __mac__
114     void ChangeDisks(void);
115     #endif
116    
117     #ifdef WIN32
118     private:
119     static BOOL CALLBACK StandardDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
120     static BOOL CALLBACK WIN32DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
121     BOOL DialogProc(int page, HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
122     void SetupControls(int page);
123     void SetValues(int page);
124     void GetValues(int page);
125     void BrowseForDevice(int id);
126    
127     static Prefs *edit_prefs;
128     static char *edit_prefs_name;
129     static HWND hDlg;
130     #endif
131     };
132    
133    
134     // These are the active preferences
135     extern Prefs ThePrefs;
136    
137     // Theses are the preferences on disk
138     extern Prefs ThePrefsOnDisk;
139    
140     #endif