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

Comparing BasiliskII/src/macos_util.cpp (file contents):
Revision 1.1.1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.6 by jlachmann, 2000-08-20T14:08:39Z

# Line 1 | Line 1
1   /*
2   *  macos_util.cpp - MacOS definitions/utility functions
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2000 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 20 | Line 20
20  
21   #include "sysdeps.h"
22   #include "cpu_emulation.h"
23 + #include "adb.h"
24   #include "main.h"
25   #include "sony.h"
26   #include "disk.h"
# Line 34 | Line 35
35   *  Enqueue QElem to list
36   */
37  
38 < void Enqueue(uint32 elem, uint32 list)
38 > void EnqueueMac(uint32 elem, uint32 list)
39   {
40          WriteMacInt32(elem + qLink, 0);
41          if (!ReadMacInt32(list + qTail)) {
# Line 56 | Line 57 | static bool is_drive_number_free(int num
57          uint32 e = ReadMacInt32(0x308 + qHead);
58          while (e) {
59                  uint32 d = e - dsQLink;
60 <                if (ReadMacInt16(d + dsQDrive) == num)
60 >                if ((int)ReadMacInt16(d + dsQDrive) == num)
61                          return false;
62                  e = ReadMacInt32(e + qLink);
63          }
# Line 86 | Line 87 | void MountVolume(void *fh)
87  
88  
89   /*
89 *  Test if basic MacOS initializations (of the ROM) are done
90 */
91
92 bool HasMacStarted(void)
93 {
94        return ReadMacInt32(0xcfc) == 'WLSC';   // Mac warm start flag
95 }
96
97
98 /*
90   *  Calculate disk image file layout given file size and first 256 data bytes
91   */
92  
# Line 111 | Line 102 | void FileDiskLayout(loff_t size, uint8 *
102                  real_size = size - start_byte;
103          }
104   }
105 +
106 +
107 + uint32 DebugUtil(uint32 Selector)
108 + {
109 +        switch (Selector)
110 +                {
111 +        case duDebuggerGetMax:
112 +                return 3;
113 +        case duDebuggerEnter:
114 +                return 0;
115 +        case duDebuggerExit:
116 +                return 0;
117 +        case duDebuggerPoll:
118 +                ADBInterrupt();
119 +                return 0;
120 +        default:
121 +                return (uint32) paramErr;
122 +                }
123 + }
124 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines