ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/main.cpp
(Generate patch)

Comparing BasiliskII/src/main.cpp (file contents):
Revision 1.4 by cebix, 1999-10-28T15:33:10Z vs.
Revision 1.11 by cebix, 2002-01-15T14:58:32Z

# Line 1 | Line 1
1   /*
2   *  main.cpp - Startup/shutdown code
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 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
# Line 33 | Line 33
33   #include "serial.h"
34   #include "ether.h"
35   #include "clip.h"
36 + #include "adb.h"
37   #include "rom_patches.h"
38   #include "user_strings.h"
39   #include "prefs.h"
# Line 64 | Line 65 | bool InitAll(void)
65   {
66          // Check ROM version
67          if (!CheckROM()) {
68 <                ErrorAlert(GetString(STR_UNSUPPORTED_ROM_TYPE_ERR));
68 >                ErrorAlert(STR_UNSUPPORTED_ROM_TYPE_ERR);
69                  return false;
70          }
71  
# Line 102 | Line 103 | bool InitAll(void)
103          XPRAMInit();
104  
105          // Set boot volume
106 <        int16 i16 = PrefsFindInt16("bootdrive");
106 >        int16 i16 = PrefsFindInt32("bootdrive");
107          XPRAM[0x78] = i16 >> 8;
108          XPRAM[0x79] = i16 & 0xff;
109 <        i16 = PrefsFindInt16("bootdriver");
109 >        i16 = PrefsFindInt32("bootdriver");
110          XPRAM[0x7a] = i16 >> 8;
111          XPRAM[0x7b] = i16 & 0xff;
112  
# Line 132 | Line 133 | bool InitAll(void)
133          // Init clipboard
134          ClipInit();
135  
136 +        // Init ADB
137 +        ADBInit();
138 +
139          // Init audio
140          AudioInit();
141  
# Line 139 | Line 143 | bool InitAll(void)
143          if (!VideoInit(ROMVersion == ROM_VERSION_64K || ROMVersion == ROM_VERSION_PLUS || ROMVersion == ROM_VERSION_CLASSIC))
144                  return false;
145  
146 +        // Set default video mode
147 +        XPRAM[0x56] = 0x42;     // 'B'
148 +        XPRAM[0x57] = 0x32;     // '2'
149 +        XPRAM[0x58] = DepthToAppleMode(VideoMonitor.mode.depth);
150 +        XPRAM[0x59] = 0;
151 +
152   #if EMULATED_68K
153          // Init 680x0 emulation (this also activates the memory system which is needed for PatchROM())
154          if (!Init680x0())
# Line 147 | Line 157 | bool InitAll(void)
157  
158          // Install ROM patches
159          if (!PatchROM()) {
160 <                ErrorAlert(GetString(STR_UNSUPPORTED_ROM_TYPE_ERR));
160 >                ErrorAlert(STR_UNSUPPORTED_ROM_TYPE_ERR);
161                  return false;
162          }
163  
# Line 182 | Line 192 | void ExitAll(void)
192          // Exit audio
193          AudioExit();
194  
195 +        // Exit ADB
196 +        ADBExit();
197 +
198          // Exit clipboard
199          ClipExit();
200  
# Line 205 | Line 218 | void ExitAll(void)
218          DiskExit();
219          SonyExit();
220   }
221 +
222 +
223 + /*
224 + *  Display error/warning alert given the message string ID
225 + */
226 +
227 + void ErrorAlert(int string_id)
228 + {
229 +        ErrorAlert(GetString(string_id));
230 + }
231 +
232 + void WarningAlert(int string_id)
233 + {
234 +        WarningAlert(GetString(string_id));
235 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines