This commit is contained in:
Colin Klipsch 2006-10-20 05:41:32 +00:00
parent 1195235253
commit 6fb1258ce1
32 changed files with 281 additions and 227 deletions

View File

@ -18,9 +18,6 @@
283EDFBA0A8BAE2100065960 /* MU-OpenGLContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 283EDFB90A8BAE2100065960 /* MU-OpenGLContext.m */; }; 283EDFBA0A8BAE2100065960 /* MU-OpenGLContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 283EDFB90A8BAE2100065960 /* MU-OpenGLContext.m */; };
285BF27F0A926BE7003F6BAC /* A2DiskDrive.m in Sources */ = {isa = PBXBuildFile; fileRef = 285BF27C0A926BB2003F6BAC /* A2DiskDrive.m */; }; 285BF27F0A926BE7003F6BAC /* A2DiskDrive.m in Sources */ = {isa = PBXBuildFile; fileRef = 285BF27C0A926BB2003F6BAC /* A2DiskDrive.m */; };
2861690D0A9A06A200E398F8 /* MU-UserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 2861690C0A9A06A200E398F8 /* MU-UserDefaults.m */; }; 2861690D0A9A06A200E398F8 /* MU-UserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 2861690C0A9A06A200E398F8 /* MU-UserDefaults.m */; };
287233460A878017006AA610 /* common.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 287233450A878017006AA610 /* common.xcconfig */; };
2872334C0A87802F006AA610 /* debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 2872334B0A87802F006AA610 /* debug.xcconfig */; };
287233500A878041006AA610 /* release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 2872334F0A878041006AA610 /* release.xcconfig */; };
2872364D0A87AF06006AA610 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287236480A87AF06006AA610 /* AudioUnit.framework */; }; 2872364D0A87AF06006AA610 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287236480A87AF06006AA610 /* AudioUnit.framework */; };
2872364E0A87AF06006AA610 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287236490A87AF06006AA610 /* CoreAudio.framework */; }; 2872364E0A87AF06006AA610 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287236490A87AF06006AA610 /* CoreAudio.framework */; };
287236500A87AF06006AA610 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2872364B0A87AF06006AA610 /* OpenGL.framework */; }; 287236500A87AF06006AA610 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2872364B0A87AF06006AA610 /* OpenGL.framework */; };
@ -77,17 +74,21 @@
280F4D370A89017C000B3B80 /* PrefsPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrefsPanel.m; sourceTree = "<group>"; }; 280F4D370A89017C000B3B80 /* PrefsPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrefsPanel.m; sourceTree = "<group>"; };
280F4D380A89017C000B3B80 /* ScreenView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenView.h; sourceTree = "<group>"; }; 280F4D380A89017C000B3B80 /* ScreenView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenView.h; sourceTree = "<group>"; };
280F4D390A89017C000B3B80 /* ScreenView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenView.m; sourceTree = "<group>"; }; 280F4D390A89017C000B3B80 /* ScreenView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenView.m; sourceTree = "<group>"; };
28179BED0AB2029E00686944 /* XCode.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XCode.txt; sourceTree = "<group>"; }; 281E621B0AE58D7E00C222E9 /* _Notes-to-self.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "_Notes-to-self.txt"; sourceTree = "<group>"; };
2818CD090AA4C9790002F245 /* Notes-to-self.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Notes-to-self.txt"; sourceTree = "<group>"; }; 281E621C0AE58D7E00C222E9 /* Read-me-first.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "Read-me-first.html"; sourceTree = "<group>"; };
281E621D0AE58D7E00C222E9 /* To-do-Cocoa.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "To-do-Cocoa.txt"; sourceTree = "<group>"; };
281E621E0AE58D7E00C222E9 /* To-do-LibAppleII.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "To-do-LibAppleII.txt"; sourceTree = "<group>"; };
281E621F0AE58D7E00C222E9 /* XCode-project.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "XCode-project.txt"; sourceTree = "<group>"; };
2835D3360A9794D1002E018A /* Audio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Audio.m; sourceTree = "<group>"; }; 2835D3360A9794D1002E018A /* Audio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Audio.m; sourceTree = "<group>"; };
2835D33B0A9795B9002E018A /* Actions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Actions.m; sourceTree = "<group>"; }; 2835D33B0A9795B9002E018A /* Actions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Actions.m; sourceTree = "<group>"; };
283EDFB90A8BAE2100065960 /* MU-OpenGLContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MU-OpenGLContext.m"; sourceTree = "<group>"; }; 283EDFB90A8BAE2100065960 /* MU-OpenGLContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MU-OpenGLContext.m"; sourceTree = "<group>"; };
285BF2460A926901003F6BAC /* CPU-Macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPU-Macros.h"; sourceTree = "<group>"; }; 285BF2460A926901003F6BAC /* CPU-Macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPU-Macros.h"; sourceTree = "<group>"; };
285BF27C0A926BB2003F6BAC /* A2DiskDrive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = A2DiskDrive.m; sourceTree = "<group>"; }; 285BF27C0A926BB2003F6BAC /* A2DiskDrive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = A2DiskDrive.m; sourceTree = "<group>"; };
2861690C0A9A06A200E398F8 /* MU-UserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MU-UserDefaults.m"; sourceTree = "<group>"; }; 2861690C0A9A06A200E398F8 /* MU-UserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MU-UserDefaults.m"; sourceTree = "<group>"; };
287233450A878017006AA610 /* common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = common.xcconfig; sourceTree = "<group>"; }; 286BC21D0AE7C88C0061357D /* Version-History.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Version-History.txt"; sourceTree = "<group>"; };
2872334B0A87802F006AA610 /* debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = debug.xcconfig; sourceTree = "<group>"; }; 286BC2C40AE685EE00A01672 /* release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = release.xcconfig; sourceTree = "<group>"; };
2872334F0A878041006AA610 /* release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = release.xcconfig; sourceTree = "<group>"; }; 286BC2C50AE685EE00A01672 /* debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = debug.xcconfig; sourceTree = "<group>"; };
286BC2C60AE685EE00A01672 /* common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = common.xcconfig; sourceTree = "<group>"; };
287233810A87859D006AA610 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = "<group>"; }; 287233810A87859D006AA610 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = "<group>"; };
287236470A87AF06006AA610 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; }; 287236470A87AF06006AA610 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
287236480A87AF06006AA610 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; }; 287236480A87AF06006AA610 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
@ -105,8 +106,6 @@
28736F0F0A94F6700013975E /* Printing.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = Printing.l; sourceTree = "<group>"; }; 28736F0F0A94F6700013975E /* Printing.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = Printing.l; sourceTree = "<group>"; };
2878B28C0A93ABBC0084BF5E /* MU-Object.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MU-Object.m"; sourceTree = "<group>"; }; 2878B28C0A93ABBC0084BF5E /* MU-Object.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MU-Object.m"; sourceTree = "<group>"; };
287D19910AB4920B00CCB6E2 /* MyDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = "<group>"; }; 287D19910AB4920B00CCB6E2 /* MyDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = "<group>"; };
288B38700A9604DF00D20934 /* To-do-Cocoa.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "To-do-Cocoa.txt"; sourceTree = "<group>"; };
288B38710A9604DF00D20934 /* To-do-LibAppleII.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "To-do-LibAppleII.txt"; sourceTree = "<group>"; };
288D488E0A8CEB6400327F4A /* ROM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ROM.m; sourceTree = "<group>"; }; 288D488E0A8CEB6400327F4A /* ROM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ROM.m; sourceTree = "<group>"; };
289663F10A90111700A49F71 /* AboutBoxPanel1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AboutBoxPanel1.png; sourceTree = "<group>"; }; 289663F10A90111700A49F71 /* AboutBoxPanel1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AboutBoxPanel1.png; sourceTree = "<group>"; };
289663F20A90111700A49F71 /* Application.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Application.icns; sourceTree = "<group>"; }; 289663F20A90111700A49F71 /* Application.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Application.icns; sourceTree = "<group>"; };
@ -196,6 +195,19 @@
path = Cocoa; path = Cocoa;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
281E621A0AE58D7E00C222E9 /* Notes */ = {
isa = PBXGroup;
children = (
286BC21D0AE7C88C0061357D /* Version-History.txt */,
281E621B0AE58D7E00C222E9 /* _Notes-to-self.txt */,
281E621C0AE58D7E00C222E9 /* Read-me-first.html */,
281E621D0AE58D7E00C222E9 /* To-do-Cocoa.txt */,
281E621E0AE58D7E00C222E9 /* To-do-LibAppleII.txt */,
281E621F0AE58D7E00C222E9 /* XCode-project.txt */,
);
path = Notes;
sourceTree = "<group>";
};
2835D3350A9794D1002E018A /* MyDocument */ = { 2835D3350A9794D1002E018A /* MyDocument */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -209,10 +221,13 @@
287231B70A877A8E006AA610 /* Source */ = { 287231B70A877A8E006AA610 /* Source */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
286BC2C40AE685EE00A01672 /* release.xcconfig */,
286BC2C50AE685EE00A01672 /* debug.xcconfig */,
286BC2C60AE685EE00A01672 /* common.xcconfig */,
287233810A87859D006AA610 /* Prefix.pch */,
280F4D2D0A89017C000B3B80 /* Cocoa */, 280F4D2D0A89017C000B3B80 /* Cocoa */,
2872382C0A87B16B006AA610 /* LibAppleII */, 2872382C0A87B16B006AA610 /* LibAppleII */,
28F52FE20A87D7DF00BE8D0C /* Misc */, 28F52FE20A87D7DF00BE8D0C /* Misc */,
287233810A87859D006AA610 /* Prefix.pch */,
); );
path = Source; path = Source;
sourceTree = "<group>"; sourceTree = "<group>";
@ -248,17 +263,6 @@
path = A2Computer; path = A2Computer;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
288B386F0A9604DF00D20934 /* Notes */ = {
isa = PBXGroup;
children = (
2818CD090AA4C9790002F245 /* Notes-to-self.txt */,
288B38700A9604DF00D20934 /* To-do-Cocoa.txt */,
288B38710A9604DF00D20934 /* To-do-LibAppleII.txt */,
28179BED0AB2029E00686944 /* XCode.txt */,
);
path = Notes;
sourceTree = "<group>";
};
289663F00A90111700A49F71 /* More-Resources */ = { 289663F00A90111700A49F71 /* More-Resources */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -300,10 +304,7 @@
2A37F4AAFDCFA73011CA2CEA /* Catakig */ = { 2A37F4AAFDCFA73011CA2CEA /* Catakig */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
288B386F0A9604DF00D20934 /* Notes */, 281E621A0AE58D7E00C222E9 /* Notes */,
287233450A878017006AA610 /* common.xcconfig */,
2872334B0A87802F006AA610 /* debug.xcconfig */,
2872334F0A878041006AA610 /* release.xcconfig */,
287231B70A877A8E006AA610 /* Source */, 287231B70A877A8E006AA610 /* Source */,
2A37F4B8FDCFA73011CA2CEA /* Resources */, 2A37F4B8FDCFA73011CA2CEA /* Resources */,
2A37F4C3FDCFA73011CA2CEA /* Frameworks */, 2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
@ -379,9 +380,6 @@
8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */, 8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */,
8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */, 8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */,
8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */, 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */,
287233460A878017006AA610 /* common.xcconfig in Resources */,
2872334C0A87802F006AA610 /* debug.xcconfig in Resources */,
287233500A878041006AA610 /* release.xcconfig in Resources */,
289663F90A90111700A49F71 /* AboutBoxPanel1.png in Resources */, 289663F90A90111700A49F71 /* AboutBoxPanel1.png in Resources */,
289663FA0A90111700A49F71 /* Application.icns in Resources */, 289663FA0A90111700A49F71 /* Application.icns in Resources */,
289663FB0A90111700A49F71 /* DDriveLights.icns in Resources */, 289663FB0A90111700A49F71 /* DDriveLights.icns in Resources */,
@ -466,14 +464,14 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
C05733C808A9546B00998B17 /* Debug */ = { C05733C808A9546B00998B17 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 2872334B0A87802F006AA610 /* debug.xcconfig */; baseConfigurationReference = 286BC2C50AE685EE00A01672 /* debug.xcconfig */;
buildSettings = { buildSettings = {
}; };
name = Debug; name = Debug;
}; };
C05733C908A9546B00998B17 /* Release */ = { C05733C908A9546B00998B17 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 2872334F0A878041006AA610 /* release.xcconfig */; baseConfigurationReference = 286BC2C40AE685EE00A01672 /* release.xcconfig */;
buildSettings = { buildSettings = {
}; };
name = Release; name = Release;

View File

@ -7,13 +7,17 @@
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>29</key> <key>29</key>
<string>130 771 396 44 0 0 1152 842 </string> <string>27 680 349 44 0 0 1024 746 </string>
</dict> </dict>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>446.1</string> <string>446.1</string>
<key>IBOldestOS</key> <key>IBOldestOS</key>
<integer>3</integer> <integer>3</integer>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>8J135</string> <string>8L127</string>
</dict> </dict>
</plist> </plist>

Binary file not shown.

View File

@ -22,14 +22,14 @@
LANGUAGE = ObjC; LANGUAGE = ObjC;
OUTLETS = { OUTLETS = {
mA2 = A2Computer; mA2 = A2Computer;
mDDrive0 = NSControl; mDDrive0 = NSTextField;
mDDrive1 = NSControl; mDDrive1 = NSTextField;
mModelEmblem = NSTextField; mModelEmblem = NSTextField;
mPrSessionAddSuffix = NSControl; mPrSessionAddSuffix = NSButton;
mPrSessionFilter = NSControl; mPrSessionFilter = NSControl;
mPrSessionSize = NSTextField; mPrSessionSize = NSTextField;
mPrSessionView = NSView; mPrSessionView = NSView;
mSaveImageAddSuffix = NSControl; mSaveImageAddSuffix = NSButton;
mSaveImageTypes = NSControl; mSaveImageTypes = NSControl;
mSaveImageView = NSView; mSaveImageView = NSView;
mScreen = ScreenView; mScreen = ScreenView;

View File

@ -9,7 +9,7 @@
<key>43</key> <key>43</key>
<string>395 499 318 123 0 0 1152 842 </string> <string>395 499 318 123 0 0 1152 842 </string>
<key>56</key> <key>56</key>
<string>397 468 314 186 0 0 1152 842 </string> <string>73 424 314 196 0 0 1152 842 </string>
</dict> </dict>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>446.1</string> <string>446.1</string>

Binary file not shown.

View File

@ -2,7 +2,8 @@
/Scale 30 def /Scale 30 def
/Inch 72 Scale mul def /Inch 72 Scale mul def
/PageHeight Inch 11 mul def /PageHeight Inch 11 mul def
%/CR-does-LF false def /CR-implies-LF false def
/ToFontCode 16#300 string def
/kfItalics 16#001 def /kfItalics 16#001 def
/kfUnderline 16#002 def /kfUnderline 16#002 def
@ -14,7 +15,6 @@
/kfDblStrike 16#080 def /kfDblStrike 16#080 def
/kfSubscript 16#100 def /kfSubscript 16#100 def
/kfSuperscript 16#200 def /kfSuperscript 16#200 def
/ToFontCode 16#300 string def
0 1 16#2FF { 0 1 16#2FF {
ToFontCode exch dup ToFontCode exch dup

View File

@ -6,7 +6,7 @@ body { margin: 1em; background-color: white; }
</style> </head> <body> </style> </head> <body>
<p> <p>
For anyone browsing Catakig's source code, hoping to make some sense of it, here's a brief summary . . . For anyone reading Catakig's source code, hoping to make some sense of it, here's a brief summary . . .
<h3>FILE (DIS-)ORGANIZATION</h3> <h3>FILE (DIS-)ORGANIZATION</h3>
@ -20,7 +20,10 @@ The source code is grouped into three major parts:
</ol> </ol>
<p> <p>
Part 1 depends on parts 2 & 3. Part 2 depends on part 3. Part 1 is allowed to have Cocoa-specific code, whereas the other two are meant to be portable, and should rely only on <i>FoundationKit</i>, <i>AppKit</i>, and standard Unix APIs. Part 1 depends on parts 2 & 3. Part 2 depends on part 3. Part 1 is allowed
to have Cocoa-specific code, whereas the other two are meant to be portable,
and should rely only on <i>FoundationKit</i>, <i>AppKit</i>, standard
Unix APIs, and other common toolkits.
<p> <p>
File <b>Prefix.pch</b> is the project's pre-compiled header file. Its content is File <b>Prefix.pch</b> is the project's pre-compiled header file. Its content is
implicitly included by every source file. implicitly included by every source file.
@ -34,7 +37,7 @@ Documentation of the source code is pretty scant right now. Most methods do hav
<p> <p>
Adhere as much as possible to POSIX, OpenGL, and the common subset of Cocoa and GNUStep. Maybe port someday to generic Linux/BSD + GNUStep platforms. OpenAL might be a another good standard, for audio output. Adhere as much as possible to POSIX, OpenGL, and the common subset of Cocoa and GNUStep. Maybe port someday to generic Linux/BSD + GNUStep platforms. OpenAL might be a another good standard, for audio output.
<p> <p>
Target MacOS X 10.3, and avoid 10.4+ features. (Occasionally review this decision though.) It would be nice to support 10.2 as well, as I was trying to do initially, but it seems time to move on. Note that MacOS X on Intel must always at least version 10.4. For MacOS X platforms, target 10.3 and avoid 10.4+ features. (Occasionally review this decision though.) It would be nice to support 10.2 as well, as I was trying to do initially, but it seems time to move on. Note that MacOS X on Intel is always at least 10.4.
<p> <p>
For now, don't bother supporting arbitrary Apple II peripherals in arbitrary slot configurations. Rather, aim for a "canonical" Apple II with the same feature set across all models. These features are: For now, don't bother supporting arbitrary Apple II peripherals in arbitrary slot configurations. Rather, aim for a "canonical" Apple II with the same feature set across all models. These features are:
@ -52,37 +55,37 @@ slot #2, but this can be used to talk to the Mockingboard D. Supporting modems
<h3>NAMING CONVENTIONS IN THE SOURCE</h3> <h3>NAMING CONVENTIONS IN THE SOURCE</h3>
<p> <p>
In general, identifiers are in mixed-case form (e.g. "doItNow") -- except C pre-processor macros, which follow the ancient C tradition of being all uppercase, with words separated by underscores ("DO_IT_NOW"). In general, identifiers are in mixed-case form (e.g. "doItNow") -- except C pre-processor macros, which follow the ancient C tradition of being all uppercase with words separated by underscores ("DO_IT_NOW").
<p> <p>
All LibAppleII identifiers in the publicly visible scope, except enum constants, begin with "A2". All LibAppleII identifiers in the publicly visible scope, except enum constants, begin with "A2".
<p> <p>
Enumeration constants begin with "kf" when they're flags (integers having a single 1 bit, e.g. 0x400), "ks" when bit-shift values (0 to 31), "km" when bit-masks (e.g. 0x3FF), and just "k" otherwise. Public enumeration constants also have "A2" in their prefix. Flag and shift enum values are often defined in pairs: e.g. "kfALTZP" and "ksALTZP". Enumeration constants begin with "kf" when they're flags (integers having a single 1 bit, e.g. 0x400), "ks" when bit-shift values (0 to 31), "km" when bit-masks (e.g. 0x3FF), and just "k" otherwise. Public enumeration constants in LibAppleII also have "A2" in their prefix. Flag and shift values often come in associated pairs: e.g. "kfALTZP" and "ksALTZP".
<p> <p>
Names of object instance variables begin with "m" and are mixed-case ("mFavoriteColor"). This convention seems to go against popular Objective-C practice, but I don't care. It helps me. Names of object instance variables begin with "m" and are mixed-case (e.g. "mFavoriteColor"). This seems to go against popular Objective-C practice, but I don't care. It helps me.
<p> <p>
Methods supplied by the author that don't exist in the standard class Methods supplied by the author that don't exist in the standard class
libraries have capitalized names. For example: "InputChar" and not libraries have capitalized names. For example: "InputChar" and not
"inputChar" -- but on the other hand "keyDown" and not "KeyDown". In other "inputChar" -- but on the other hand "keyDown" and not "KeyDown". In other
words, lower-cased methods will have some pre-defined purpose in the system words, lower-cased methods will have some pre-defined purpose through class
libraries, because of class inheritance, whereas the upper-cased methods are entirely inheritance, whereas the upper-cased methods are
new additions. Again, this is a personal convention that helps me. new additions. Again, this is a personal convention that helps me.
<p> <p>
Methods begining with an underscore ( _ ) are considered private to the class, Methods begining with an underscore ( _ ) are considered private to the class,
for internal use only. Objective-C has no "private" attribute like C++ does and for internal use only. Objective-C has no "private" attribute like C++ does
to enforce this behavior however. Any Objective-C message can be sent to to enforce this behavior however. Any Objective-C message can be sent to
any object at any time. But the underscore alerts the reader that the method any object at any time. But the underscore alerts the reader that the method
isn't supposed to be called from just anywhere. isn't supposed to be called by just anybody.
<h3>CODING HABITS OF THE AUTHOR THAT WILL ANNOY YOU</h3> <h3>CODING HABITS OF THE AUTHOR THAT WILL ANNOY YOU</h3>
<p> <p>
Hard tabs are used in the source, and are expected to be 4 spaces wide. Hard tabs are used throughout the source, and are expected to be 4 spaces wide.
Might switch to soft tabs (all spaces) at some point. Might switch to soft tabs (all spaces) at some point.
<p> <p>
The author often exploits the fact that C literal strings are arrays The author often exploits the fact that C literal strings are arrays
of constant characters, that C characters can also serve as small of constant characters, that C characters can also serve as small
integers, and that therefore short literal strings make handy little integers, and that therefore short literal strings make handy little
in-line lookup tables of small integers. For example: in-line lookup tables of small integers. Here's an example:
<pre> <pre>
number_of_one_bits = "\0\1\1\2\1\2\2\3"[n] number_of_one_bits = "\0\1\1\2\1\2\2\3"[n]
@ -101,7 +104,7 @@ for-loop variables in-line; (2) initializing structure fields by name
instead of by position. The first one is pretty well known, but use of the second feature doesn't seem very widespread and might be a surprise to some. instead of by position. The first one is pretty well known, but use of the second feature doesn't seem very widespread and might be a surprise to some.
<p> <p>
The author prefers using "and", "or", and "not" over "&&", "||" and "!". The author prefers using "and", "or", and "not" over "&&", "||" and "!".
Macros defining these pseudo-keywords are in the header <b>Prefix.pch</b>. Macros defining these pseudo-keywords are in <b>Prefix.pch</b>.
<p align=right><i> <p align=right><i>
Colin K.<br>Oct. 2006 Colin K.<br>Oct. 2006

View File

@ -3,12 +3,13 @@
* Let user pick the colors of color video. Or, NTSC vs. PAL. * Let user pick the colors of color video. Or, NTSC vs. PAL.
* Checkbox for cassette tape audio output. * Checkbox for cassette tape audio output.
* Skip lines in monochrome/color video (two separate checkboxes). * Allow skipping lines in monochrome/color video (two separate checkboxes).
* Checkbox for Mockingboard (when implemented). * Checkbox for Mockingboard (when implemented).
* Checkbox for disk drive sound effects (when implemented). * Checkbox for disk drive sound effects (when implemented).
* "Start Apple IIs with power already on" checkbox. * "Start Apple IIs with power already on" checkbox.
* Sound volume control in application? * Sound volume control in application?
* Add "success" and "failure" feedback beeps, with ability to disable. * Add "success" and "failure" feedback beeps, with ability to disable.
* Add more control over paddle buttons.
* Mouse-joystick mapping assumes only one screen, the main one. * Mouse-joystick mapping assumes only one screen, the main one.
Should instead range over the entire desktop. Should instead range over the entire desktop.
@ -18,21 +19,20 @@
* Make dashboard into a drawer? A toolbar? Anyway, let user hide it. * Make dashboard into a drawer? A toolbar? Anyway, let user hide it.
* Optionally show annunciator lights in dashboard. Not on IIc though. * Optionally show annunciator lights in dashboard. Not on IIc though.
* Need per-window preferences? * Need per-window preferences?
* Are we capturing screens in the best way? * Are we capturing screens in the best and fastest way?
* Drag & Drop disk slots * Drag & Drop disk slots
* File filtering is slow when opening disk images.
* Add sound recording.
* Add QuickTime movie recording.
==== Miscellany ==== ==== Miscellany ====
* Internationalize displayed text. * Internationalize all displayed text.
* Add built-in help pages: HTML or PDF * Add built-in help pages: HTML or PDF
* Add sound recording. * Support real joysticks, via HID & IOKit.
* Add QuickTime movie recording.
* Support real joysticks, via IOKit.
* Add more control over paddle buttons.
* Use third-party Cocoa kits? OmniGroup's? * Use third-party Cocoa kits? OmniGroup's?
* Rethink error handling and reporting! Add Log window? * Rethink error handling and reporting! Use exceptions? Add Log window?
* Add built-in PDF/HTML help.
* Would Xcode build phases be useful? * Would Xcode build phases be useful?
* Use zlib 1.2.3? nulib? * Use zlib 1.2.3? nulib?
* Add OSX icons for '.rom', '.hdv' files. Others? * Add OSX icons for '.rom', '.hdv' files. Others?

View File

@ -12,7 +12,6 @@
* Find quicker Z-flag query expression? (Rethink ZF flag.) * Find quicker Z-flag query expression? (Rethink ZF flag.)
* Use rotated opcodes: op<<6 | op>>2 ? * Use rotated opcodes: op<<6 | op>>2 ?
* Keep A in a local variable? * Keep A in a local variable?
* Implement old 6502 ADC & SBC behavior (different flags than 65c02)
* Video floater bytes not correct yet. * Video floater bytes not correct yet.
* On ][ and ][+, RESET should not affect the language card state. * On ][ and ][+, RESET should not affect the language card state.
* Keep 'scanLine' in upper bits of 't', instead of extra variable. * Keep 'scanLine' in upper bits of 't', instead of extra variable.
@ -27,15 +26,14 @@
* Implement the "bizarre" (and useless) GR video mode? * Implement the "bizarre" (and useless) GR video mode?
* Simulate color burst for text in graphics mode. * Simulate color burst for text in graphics mode.
* Implement Videx 80-column card for IIo and IIp models? * Implement Videx 80-column card for IIo and IIp models?
* Eliminate need to scale array index by 4 when using 'vpix' tables?
==== Audio ==== ==== Audio ====
* There are glitches in the audio output.
* Add Mockingboard emulation. * Add Mockingboard emulation.
* Add sound effects to printer and disk drive activity. * Add sound effects to printer and disk drive activity.
* Support cassette tape input? Probably not worth it. * Support cassette tape input? Probably not worth it.
* There are occasional pops in the audio output.
==== Disk Drives & Image Files ==== ==== Disk Drives & Image Files ====
@ -52,6 +50,8 @@
possible drive contents: none, read-only, read-write. possible drive contents: none, read-only, read-write.
* Failure to load a drive should _not_ empty it? * Failure to load a drive should _not_ empty it?
* Need to regularize NIB tracks when loading? * Need to regularize NIB tracks when loading?
* Reduce number of temporary files needed. Use just one for both floppy
drives and the printer session.
==== Printer ==== ==== Printer ====

28
Notes/Version-History.txt Normal file
View File

@ -0,0 +1,28 @@
==== 2.00b3, 2006-10-20 ====
Fixed broken ROM scanning on many Mac models. [Now using 'crc32' instead of
'adler32', both from 'zlib'. Also reverted back to C FILE pointers after
having tried NSInputStreams to no great advantage.]
Added recognition of Revision-00 IIc ROM.
Improved intelligence of the memory card firmware in slot 4. Added more
error detection. Implemented more authentic behavior when the memory
isn't there (when the user has selected "Extra RAM: None").
Fixed some bad code in the printer firmware that mangled CR behavior and
other character output. This bug affected pre-IIc models only.
In the "Save Printer Session" dialog, the "Add suffix" checkbox had no
actual effect. Fixed.
Fixed IIe memory mapping behavior in the $C100-C7FF area.
Removed bogus menu commands related to document files. The saving and
restoring of Apple II states isn't supported yet. Also removed the "Help"
menu, as there is no in-line help yet.
==== 2.00b2, 2006-10-17 ====
The first (advertised) public release.

View File

@ -18,7 +18,10 @@ whole folder into the project.
For Resources, everything in folder "More-Resources". Again, just drag and For Resources, everything in folder "More-Resources". Again, just drag and
drop into the project's "Resources" group. drop into the project's "Resources" group.
The '.xcconfig' files are used to set target configuration options, instead of XCode's dialog interface to them. File 'debug.xcconfig' is for the Debug target, file 'release.xcconfig' is for the Release target, and both incorporate 'common.xcconfig'. The '.xcconfig' files are used to set target configuration options, instead
of XCode's dialog interface to them. File 'debug.xcconfig' is for the Debug
target, file 'release.xcconfig' is for the Release target, and both
incorporate 'common.xcconfig'.
==== Linked frameworks ==== ==== Linked frameworks ====

View File

@ -99,7 +99,7 @@
{ {
BOOL hasROM = [A2Computer ModelHasROM:[cell tag]]; BOOL hasROM = [A2Computer ModelHasROM:[cell tag]];
[cell setBackgroundColor:(hasROM? nil : warnColor)]; [cell setBackgroundColor:(hasROM? nil : warnColor)]; // 10.4 only!!
} }
// Run the "New Apple II" dialog. // Run the "New Apple II" dialog.

View File

@ -1,7 +1,7 @@
/* Catakig-Cocoa.h /* Catakig-Cocoa.h
Primary header for source files of the MacOS X application. Primary header for source files of the MacOS X application. Not used
Not used by lower-level libraries. by lower-level libraries.
*/ */
#import "MyUtils.h" #import "MyUtils.h"
#import "LibAppleII.h" #import "LibAppleII.h"

View File

@ -12,12 +12,12 @@
IBOutlet NSView* mSaveImageView; IBOutlet NSView* mSaveImageView;
IBOutlet NSControl* mSaveImageTypes; IBOutlet NSControl* mSaveImageTypes;
IBOutlet NSControl* mSaveImageAddSuffix; IBOutlet NSButton* mSaveImageAddSuffix;
IBOutlet NSView* mPrSessionView; IBOutlet NSView* mPrSessionView;
IBOutlet NSControl* mPrSessionFilter; IBOutlet NSControl* mPrSessionFilter;
IBOutlet NSTextField* mPrSessionSize; IBOutlet NSTextField* mPrSessionSize;
IBOutlet NSControl* mPrSessionAddSuffix; IBOutlet NSButton* mPrSessionAddSuffix;
int mRunState; // low 2 bits: speed; higher bits: pause level int mRunState; // low 2 bits: speed; higher bits: pause level
int mFileFilter; int mFileFilter;

View File

@ -100,7 +100,7 @@
NSString* extensions[/*NSBitmapImageFileType*/] = NSString* extensions[/*NSBitmapImageFileType*/] =
{ @"tiff", @"bmp", @"gif", @"jpeg", @"png" }; { @"tiff", @"bmp", @"gif", @"jpeg", @"png" };
if ([mSaveImageAddSuffix intValue] == NSOnState) if ([mSaveImageAddSuffix state] == NSOnState)
fpath = [fpath stringByAppendingPathExtension: fpath = [fpath stringByAppendingPathExtension:
extensions[fileType]]; extensions[fileType]];
@ -154,6 +154,11 @@
NSString* fpath = [panel filename]; NSString* fpath = [panel filename];
int filter = [mPrSessionFilter selectedTag]; int filter = [mPrSessionFilter selectedTag];
NSString* extensions[] = {@"txt", @"ps", @"raw"};
if ([mPrSessionAddSuffix state] == NSOnState)
fpath = [fpath stringByAppendingPathExtension:
extensions[filter]];
if ([mA2 SavePrintSessionAs:filter toFile:fpath]) if ([mA2 SavePrintSessionAs:filter toFile:fpath])
{ {
@ -161,7 +166,7 @@
return; return;
} }
BeepFor(NO); // and alert!! BeepFor(NO); // and put up an alert!!
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
/* class A2Computer /* class A2Computer
An object representing an Apple II computer. Methods in this source An object representing an Apple II computer. Methods in this source
file are for object allocation, deallocation, initialization, and file do object allocation, initialization, deallocation, and
serialization. (eventually) serialization.
*/ */
#import "LibAppleII-Priv.h" #import "LibAppleII-Priv.h"
#import "A2DiskDrive.h" #import "A2DiskDrive.h"
@ -25,7 +25,7 @@
[A2Computer setVersion:1]; //?? [A2Computer setVersion:1]; //??
mlock(&A2T, sizeof(A2T)); mlock(&A2T, sizeof(A2T));
[NSTimer scheduledTimerWithTimeInterval:0.75 [NSTimer scheduledTimerWithTimeInterval:0.45
target: [A2Computer class] target: [A2Computer class]
selector: @selector(_UpdateClock:) selector: @selector(_UpdateClock:)
userInfo: nil userInfo: nil
@ -57,8 +57,10 @@
mHalts = kfHaltNoPower | kfHaltReset; mHalts = kfHaltNoPower | kfHaltReset;
mMemorySize = sizeof(A2Memory); mMemorySize = sizeof(A2Memory);
mPrinter.session = tmpfile(); mPrinter.session = tmpfile();
mSlinky.mask = (1L << A2G.defaultExtraRAM) - 1; mSlinky.mask = (1UL << A2G.defaultExtraRAM) - 1;
mSlinky.base = &mSlinky.nowhere; mSlinky.rNowhere = 0xA0;
mSlinky.rBase = &mSlinky.rNowhere;
mSlinky.wBase = &mSlinky.wNowhere;
if (mSlinky.mask != 0) if (mSlinky.mask != 0)
mMemorySize += (mSlinky.mask + 1); mMemorySize += (mSlinky.mask + 1);
@ -68,7 +70,8 @@
return [self Release]; return [self Release];
if (mSlinky.mask != 0) if (mSlinky.mask != 0)
mSlinky.base = (uint8_t*)mMemory + sizeof(A2Memory); mSlinky.rBase = mSlinky.wBase =
(uint8_t*)mMemory + sizeof(A2Memory);
// Create the disk drives, and give every one a track buffer to // Create the disk drives, and give every one a track buffer to
// work with. // work with.
@ -89,20 +92,27 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
- (void)_TestThePrinter // called only for debugging!! - (void)_TestThePrinter:(BOOL)sampleOutput
{ {
fputs( // Called only for debugging!!
"---------1---------2---------3---------4"
"---------5---------6---------7---------8\r\n\r\n"
" !\"#$%&'()*+,-./0123456789:;<=>?\r\n"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\r\n"
"`abcdefghijklmnopqrstuvwxyz{|}~\r\n\r\n"
"\x1B\x34Hello world!\x1B@\r\n", mPrinter.session);
fprintf(mPrinter.session,
"\x1BK\x07%c\1\2\3\4\5\6\7 |\r\n", 0);
for (int i = 0; i < 100; ++i)
fprintf(mPrinter.session, "%d\t%d\r\n", i, i*i);
if (sampleOutput)
{
fputs(
"---------1---------2---------3---------4"
"---------5---------6---------7---------8\r\n\r\n"
" !\"#$%&'()*+,-./0123456789:;<=>?\r\n"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\r\n"
"`abcdefghijklmnopqrstuvwxyz{|}~\r\n\r\n"
"\x1B\x34Hello world!\x1B@\r\n", mPrinter.session);
fprintf(mPrinter.session,
"\x1BK\x07%c\1\2\3\4\5\6\7 |\r\n", 0);
for (int i = 0; i < 100; ++i)
fprintf(mPrinter.session, "%d\t%d\r\n", i, i*i);
}
[self SavePrintSessionAs:kA2PFVerbatim
toFile:@"/Users/klipsch/Desktop/printout.raw"];
[self SavePrintSessionAs:kA2PFPlain [self SavePrintSessionAs:kA2PFPlain
toFile:@"/Users/klipsch/Desktop/printout.txt"]; toFile:@"/Users/klipsch/Desktop/printout.txt"];
[self SavePrintSessionAs:kA2PFEpsonToPS [self SavePrintSessionAs:kA2PFEpsonToPS
@ -113,7 +123,7 @@
- (void)dealloc - (void)dealloc
{ {
// [self _TestThePrinter]; // [self _TestThePrinter:NO];
for (int dd = 4; --dd >= 0;) for (int dd = 4; --dd >= 0;)
[mIWM[dd>>1].drive[dd&1] release]; [mIWM[dd>>1].drive[dd&1] release];

View File

@ -321,9 +321,7 @@ CASE(BF):
CASE(C0): d = mSlinky.pos; DONE; CASE(C0): d = mSlinky.pos; DONE;
CASE(C1): d = mSlinky.pos >> 8; DONE; CASE(C1): d = mSlinky.pos >> 8; DONE;
CASE(C2): d = mSlinky.pos >> 16 | 0xF0; DONE; CASE(C2): d = mSlinky.pos >> 16 | 0xF0; DONE;
CASE(C3): d = mSlinky.base[mSlinky.pos++ & mSlinky.mask]; DONE; CASE(C3): d = mSlinky.rBase[mSlinky.pos++ & mSlinky.mask]; DONE;
CASE(CE): d = (mSlinky.mask + 1) >> 9; DONE;
CASE(CF): d = (mSlinky.mask + 1) >> (9+8); DONE; CASE(CF): d = (mSlinky.mask + 1) >> (9+8); DONE;
#else // write phase #else // write phase
@ -331,16 +329,14 @@ CASE(BF):
CASE(C0): mSlinky.pos = mSlinky.pos & 0xFFFF00 | d; DONE; CASE(C0): mSlinky.pos = mSlinky.pos & 0xFFFF00 | d; DONE;
CASE(C1): mSlinky.pos = mSlinky.pos & 0xFF00FF | d<< 8; DONE; CASE(C1): mSlinky.pos = mSlinky.pos & 0xFF00FF | d<< 8; DONE;
CASE(C2): mSlinky.pos = mSlinky.pos & 0x00FFFF | d<<16; DONE; CASE(C2): mSlinky.pos = mSlinky.pos & 0x00FFFF | d<<16; DONE;
CASE(C3): mSlinky.base[mSlinky.pos++ & mSlinky.mask] = d; DONE; CASE(C3): mSlinky.wBase[mSlinky.pos++ & mSlinky.mask] = d; DONE;
CASE(CE):
CASE(CF): // fall thru CASE(CF): // fall thru
#endif #endif
CASE(C4): CASE(C5): CASE(C6): CASE(C7): CASE(C4): CASE(C5): CASE(C6): CASE(C7):
CASE(C8): CASE(C9): CASE(CA): CASE(CB): CASE(C8): CASE(C9): CASE(CA): CASE(CB):
CASE(CC): CASE(CD): CASE(CC): CASE(CD): CASE(CE):
DONE_F; DONE_F;
//-------------------------------------------------- $C0D0-EF (IWMs) //-------------------------------------------------- $C0D0-EF (IWMs)
@ -391,8 +387,8 @@ CASE(BF):
// Arrive at R_Remap or W_Remap with 'd' equal to the new value for // Arrive at R_Remap or W_Remap with 'd' equal to the new value for
// 'mFlags'. Arrive at R_Flag with 'd' equal to one of the 'ks' // 'mFlags'. Arrive at R_Flag with 'd' equal to one of the 'ks'
// flag constants. Arrive at R_Floater7 with 'd' having a significant // flag constants. Arrive at R_Floater7 with 'd' having a value to
// bit 7. // return in bit 7.
#if READ_PHASE #if READ_PHASE

View File

@ -20,7 +20,7 @@ enum
DFLAG(0, D) DFLAG(0, D)
DFLAG(1, C) DFLAG(1, C)
DFLAG(2, V) DFLAG(2, V)
DFLAG(3, ZF) // when ZF = 1, forces Z = 1 DFLAG(3, ZF) // when ZF = 1, forces Z to read as 1
DFLAG(4, LSB) DFLAG(4, LSB)
kfCD = kfC | kfD, kfCD = kfC | kfD,
@ -44,7 +44,7 @@ static uint32_t gSpkrOut[kA2SamplesPerStep + kTapRatio - 1];
static void FillMemoryMapRow(int8_t map[0x81], uint32_t f, BOOL wmap) static void FillMemoryMapRow(int8_t map[0x81], uint32_t f, BOOL wmap)
{/* {/*
Utility function used by +_InitCPU (below) to initialize one row of a Utility function used by +_InitCPU (below) to initialize one row of a
memory mapping table -- either 'A2T.rmaps' or 'A2T.wmaps'. memory mapping table, either 'A2T.rmaps' or 'A2T.wmaps'.
*/ */
#define ORAM(BANK) \ #define ORAM(BANK) \
offsetof(A2Memory, RAM[page>>5][BANK][page<<8 & 0x1F00]) offsetof(A2Memory, RAM[page>>5][BANK][page<<8 & 0x1F00])
@ -88,24 +88,14 @@ static void FillMemoryMapRow(int8_t map[0x81], uint32_t f, BOOL wmap)
} }
else // setting read-map on IIe or earlier else // setting read-map on IIe or earlier
{ {
int c3rom = f>>ksC3ROM & 1; int cx3rom = f>>ksC3ROM & 3;
BOOL c8_internal;
PUT_PAGES(0xD0, 0xFF, OROM(0)); PUT_PAGES(0xC8, 0xFF, OROM(0));
PUT_PAGES(0xC0, 0xC7, OROM(!cxrom)); PUT_PAGES(0xC0, 0xC7, OROM(cxrom ^ 1));
PUT_PAGES(0xC3, 0xC3, OROM(!cxrom & c3rom)); PUT_PAGES(0xC2, 0xC3, OROM("\2\1\0\0"[cx3rom]));
if (cxrom) // CXROM on, C3ROM irrelevant if (cx3rom == 1 or (cx3rom == 0 and hotSlot != 3))
c8_internal = YES; PUT_PAGES(0xC8, 0xCF, OROM(1) + 0x800*hotSlot);
else if (c3rom) // CXROM off, C3ROM on
c8_internal = NO;
else // CXROM and C3ROM both off
c8_internal = YES; //!! (hotSlot == 3);
if (c8_internal)
PUT_PAGES(0xC8, 0xCF, OROM(0));
else
PUT_PAGES(0xC8, 0xCF, OROM(1) + 0x800*(hotSlot-1));
} }
if (f & (wmap? kfLCWRThi : kfLCRD)) // then $D0-FF sees LC RAM if (f & (wmap? kfLCWRThi : kfLCRD)) // then $D0-FF sees LC RAM
@ -149,7 +139,7 @@ static BOOL InitADC_SBC(void)
FILE* fin; FILE* fin;
fin = fopen([[[[NSBundle mainBundle] bundlePath] fin = fopen([[[[NSBundle mainBundle] bundlePath]
stringByAppendingPathComponent:@"../ADSBC.dat"] stringByAppendingPathComponent:@"../../ADSBC.dat"]
fileSystemRepresentation], "rb"); fileSystemRepresentation], "rb");
if (fin == NULL) if (fin == NULL)
return NO; return NO;
@ -204,15 +194,15 @@ static BOOL InitADC_SBC(void)
memcpy(A2T.tADCo, A2T.tADC, sizeof(A2T.tADC)); memcpy(A2T.tADCo, A2T.tADC, sizeof(A2T.tADC));
memcpy(A2T.tSBCo, A2T.tSBC, sizeof(A2T.tSBC)); memcpy(A2T.tSBCo, A2T.tSBC, sizeof(A2T.tSBC));
if (NO) for (int i = 256; i < LENGTH(A2T.tADCo); i += 2) for (int i = 256; i < LENGTH(A2T.tADCo); i += 2)
{ {
A2T.tADCo[i+1] = A2T.tADCo[i+1] =
A2T.tADCo[i ] & 0xFF00 | A2T.tADC[i ] & 0xFF00 |
A2T.tADCo[i+1] & 0x00FF; A2T.tADC[i+1] & 0x00FF;
A2T.tSBCo[i+1] = A2T.tSBCo[i+1] =
A2T.tSBCo[i ] & 0xFF00 | A2T.tSBC[i ] & 0xFF00 |
A2T.tSBCo[i+1] & 0x00FF; A2T.tSBC[i+1] & 0x00FF;
} }
} }
@ -620,6 +610,7 @@ static BOOL InitADC_SBC(void)
for (int i = kTapRatio-1; --i >= 0;) for (int i = kTapRatio-1; --i >= 0;)
gSpkrOut[i] = (gSpkrOut + kA2SamplesPerStep)[i]; gSpkrOut[i] = (gSpkrOut + kA2SamplesPerStep)[i];
t = A2T.audio.flat; t = A2T.audio.flat;
for (int i = kA2SamplesPerStep; --i >= 0;) for (int i = kA2SamplesPerStep; --i >= 0;)
(gSpkrOut + kTapRatio - 1)[i] = t; (gSpkrOut + kTapRatio - 1)[i] = t;

View File

@ -1,6 +1,6 @@
/* class A2Computer (category Printing) /* class A2Computer (category Printing)
*/ */
%option 7bit never-interactive noyywrap prefix="A2Printing_" %option 7bit never-interactive batch noyywrap prefix="A2Printing_"
%x EpsonRX %x EpsonRX
%{ -------------------------------------------------------------------------- %{ --------------------------------------------------------------------------
@ -24,7 +24,7 @@ static void EpsonText(BOOL trailingRubouts)
if (ch == '(' or ch == ')' or ch == '\\') if (ch == '(' or ch == ')' or ch == '\\')
fputc('\\', yyout); fputc('\\', yyout);
fputc(ch, yyout); putc(ch, yyout);
} }
fputs(") T", yyout); fputs(") T", yyout);
} }
@ -102,19 +102,19 @@ ANY3 {ANY}{3}
fprintf(yyout, " %d C-%c", yyleng, yytext[0] | '@'); fprintf(yyout, " %d C-%c", yyleng, yytext[0] | '@');
} }
[\x20-\x7E]+\x18+ ; [\x20-\x7E]+\x18+ ; // cancel buffer
[\x20-\x7E]+\x7F+ EpsonText(YES); [\x20-\x7E]+\x7F+ EpsonText(YES);
[\x20-\x7E]+ EpsonText(NO); [\x20-\x7E]+ EpsonText(NO);
{ESC}[*]{ANY3} | {ESC}[*]{ANY3} |
{ESC}[ef]{ANY2} | {ESC}[ef]{ANY2} |
{ESC}[-SRUWms]{ANY} | {ESC}[-SRUWms]{ANY} |
{ESC}{ANY} ; // invalid sequences, skipped {ESC}{ANY} ; // invalid sequences, skipped
} }
<INITIAL>{ <INITIAL>{
[\r\n\t\v\f]+ | [\n\t\v\f]+ |
[\x20-\x7E]+ ECHO; [\x20-\x7E]+ ECHO;
} }
<*>{ <*>{

View File

@ -10,15 +10,15 @@
static struct // the ROM repository static struct // the ROM repository
{ {
uint8_t uint8_t
bogus[0x100], // These are init'd with 'myROM.h'. bogus[0x100], // These are init'd with file 'myROM.h'.
printer[0x100], printer[0x100],
clock[0x100], clock[0x100],
Slinky[0x100], memory[0x100],
DiskII[0x100], DiskII[0x100],
SSCX[0x700], SSC[0x100], SSCX[0x700], SSC[0x100],
IIeSerialX[0x700], IIeSerial[0x100], IIeSerialX[0x700], IIeSerial[0x100],
SlinkyX[0x800], Slinky[0x100], SlinkyX[0x800],
Mouse[0x100], // MouseX[0x800], Mouse[0x100], // MouseX[0x800],
// PIC[0x100], // PIC[0x100],
// ThunderClock[0x100], ThunderClockX[0x800], // ThunderClock[0x100], ThunderClockX[0x800],
@ -82,8 +82,8 @@ static struct // the ROM repository
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
- (void)_InstallPeripheralROM:(unsigned)slotNum - (void)_InstallPeripheralROM:(unsigned)slotNum
:(const uint8_t*)slotROM // size 256 :(const uint8_t [/*0x100*/])slotROM
:(const uint8_t*)expansionROM // size 2048 :(const uint8_t [/*0x800*/])expansionROM
{/* {/*
Private utility method for importing a peripheral's ROM content, Private utility method for importing a peripheral's ROM content,
given its slot number and pointers to the bytes. given its slot number and pointers to the bytes.
@ -92,25 +92,25 @@ static struct // the ROM repository
return; return;
if (slotROM != nil) if (slotROM != nil)
memcpy(mMemory->ROM[1] + 0x100*slotNum, slotROM, 0x100); memcpy((mMemory->ROM[1]) + 0x100*slotNum, slotROM, 0x100);
if (expansionROM != nil) if (expansionROM != nil)
memcpy(mMemory->ROM[1] + 0x800*slotNum, expansionROM, 0x800); memcpy((mMemory->ROM[1]) + 0x800*slotNum, expansionROM, 0x800);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
- (void)_PrepareModel - (void)_PrepareModel
{/* {/*
Makes model-specific preparations for this Apple II, including ROM Makes model-specific preparations for this Apple II, primarily ROM
content and flag settings. content and flag settings.
*/ */
enum enum
{ {
kMF_ec = // set of mutable flags common to IIe and IIc kMF_ec = // set of mutable flags common to IIe and IIc
kf80COL | kfSINGRES | kfALTCHAR | kf80COL | kfSINGRES | kfALTCHAR |
kfALTZP | kfRAMRD | kfRAMWRT | kfALTZP | kfRAMRD | kfRAMWRT |
kf80STOREm | kf80STOREv kf80STOREm | kf80STOREv
}; };
uint8_t *ROM0 = mMemory->ROM[0], // internal, or main bank uint8_t *ROM0 = mMemory->ROM[0], // internal, or main bank
*ROM1 = mMemory->ROM[1]; // external, or alt. bank *ROM1 = mMemory->ROM[1]; // external, or alt. bank
@ -123,56 +123,61 @@ static struct // the ROM repository
mMutableFlags = 0; mMutableFlags = 0;
memset(mMemory->ROM, 0, sizeof(mMemory->ROM)); // wipe ROM clean memset(mMemory->ROM, 0, sizeof(mMemory->ROM)); // wipe ROM clean
for (int i = 0; i <= 7; ++i) // for debugging memory mapping!! #if 1
memset(ROM1 + 0x800*i, i*0x11, 0x800); for (int s = 1; s <= 7; ++s) // for debugging memory mapping!!
{
memset(ROM1 + 0x100*s, s, 0x100);
memset(ROM1 + 0x800*s, s*0x11, 0x800);
}
#endif
// Install the machine's primary ROM, copied from the repository. // Install the machine's primary ROM, copying it from the repository.
switch (mModel) switch (mModel)
{ {
case kA2ModelIIo: case kA2ModelIIo:
memcpy(ROM0 + 0x1000, gROM.IIo, 0x3000); memcpy(ROM0 + 0x1000, gROM.IIo, 0x3000);
goto PrepIIo_p_e; goto PrepNonIIc;
case kA2ModelIIp: case kA2ModelIIp:
memcpy(ROM0 + 0x1000, gROM.IIpD0, 0x3000); memcpy(ROM0 + 0x1000, gROM.IIpD0, 0x3000);
goto PrepIIo_p_e; goto PrepNonIIc;
case kA2ModelIIe: case kA2ModelIIe:
memcpy(ROM0 + 0x0100, gROM.IIeC1, 0x3F00); memcpy(ROM0 + 0x0100, gROM.IIeC1, 0x3F00);
mMutableFlags |= kMF_ec | kfCXROM | kfC3ROM; mMutableFlags |= kMF_ec | kfCXROM | kfC3ROM;
// fall into PrepIIo_p_e // fall into ...
PrepIIo_p_e: PrepNonIIc:
[self _InstallPeripheralROM:1 :gROM.SSC :gROM.SSCX]; [self _InstallPeripheralROM:1 :gROM.printer :nil];
[self _InstallPeripheralROM:2 :gROM.clock :nil]; [self _InstallPeripheralROM:3 :gROM.clock :nil];
[self _InstallPeripheralROM:4 :gROM.Slinky :gROM.SlinkyX]; [self _InstallPeripheralROM:4 :gROM.memory :nil];
[self _InstallPeripheralROM:6 :gROM.DiskII :nil]; [self _InstallPeripheralROM:6 :gROM.DiskII :nil];
memcpy(mMemory->altSlotROM, ROM1, 0x800);
memcpy(mMemory->altSlotROM+0x300, ROM0+0x300, 0x100); memcpy(mMemory->mixedSlotROM, ROM1, 0x800);
memcpy(mMemory->mixedSlotROM+0x300, ROM0+0x300, 0x100);
memcpy(mPrinter.reg, memcpy(mPrinter.reg,
"\x68\xEE\x7B\xFF\x68\xEE\x7B\xFF" "\x68\xEE\x7B\xFF"
"\x68\xEE\x7B\xFF"
"\0\x10\0\0\xFF\xFF\xFF\xFF", 16); "\0\x10\0\0\xFF\xFF\xFF\xFF", 16);
break; break;
case kA2ModelIIcp: case kA2ModelIIcp:
memcpy(ROM0 + 0x0100, gROM.IIcpMain, 0x3F00); memcpy(ROM0 + 0x100, gROM.IIcpMain, 0x3F00);
memcpy(ROM1 + 0x0100, gROM.IIcpAlt , 0x3F00); memcpy(ROM1 + 0x100, gROM.IIcpAlt , 0x3F00);
goto PrepIIc; goto PrepIIc;
case kA2ModelIIc: case kA2ModelIIc:
// Check for older, single-bank IIc ROM!! // Check for older, single-bank IIc ROM!!
memcpy(ROM0 + 0x0100, gROM.IIcMain, 0x3F00); memcpy(ROM0 + 0x100, gROM.IIcMain, 0x3F00);
memcpy(ROM1 + 0x0100, gROM.IIcAlt , 0x3F00); memcpy(ROM1 + 0x100, gROM.IIcAlt , 0x3F00);
// fall into PrepIIc; // fall into ...
PrepIIc: PrepIIc:
mMutableFlags |= kMF_ec; mMutableFlags |= kMF_ec;
memcpy(mPrinter.reg, memcpy(mPrinter.reg,
"\0\x50\0\0\0\x50\0\0\0\x50\0\0\0\x50\0\0", 16); "\0\x50\0\0\0\x50\0\0\0\x50\0\0\0\x50\0\0", 16);
// memcpy(mModem.reg, // memcpy(mModem.reg, "\0\x10\0\0\0\x10\0\0\0\x10\0\0\0\x10\0\0", 16);
// "\0\x10\0\0\0\x10\0\0\0\x10\0\0\0\x10\0\0", 16);
break; break;
} }
} }
@ -183,61 +188,61 @@ static struct // the ROM repository
{/* {/*
Scans the given file, looking for ROM segments that we recognize. A Scans the given file, looking for ROM segments that we recognize. A
segment is recognized if the checksum of its first 256 bytes matches segment is recognized if the checksum of its first 256 bytes matches
one that we've precomputed. Segments are then read into the ROM a sum that we've precomputed. Recognized segments are read into the
repository, defined above. ROM repository structure (above).
*/ */
#define CASE(N, ARR) case 0x##N: \ #define CASE(N, ARR) \
dest = gROM.ARR; len = sizeof(gROM.ARR); break; case 0x##N: dest = gROM.ARR; len = sizeof(gROM.ARR); break;
enum { kDebug = NO, enum { kLogging = NO,
chunkSize = 256 }; chunkSize = 256 };
uint8_t chunk[chunkSize]; uint8_t chunk[chunkSize];
NSInputStream* sin; FILE* fin;
uint32_t crcInit = crc32(0L, Z_NULL, 0);
if (nil == (sin = [[NSInputStream alloc] initWithFileAtPath:filePath])) fin = fopen([filePath fileSystemRepresentation], "rb");
if (fin == NULL)
return NO; return NO;
[sin open]; setbuf(fin, NULL);
if (kDebug) if (kLogging)
NSLog(@"Scanning ROM file '%@'", [filePath lastPathComponent]); NSLog(@"Scanning file '%@' for ROM", [filePath lastPathComponent]);
while ([sin read:chunk maxLength:chunkSize] == chunkSize) while (fread(chunk, 1, chunkSize, fin) == chunkSize)
{ {
uint32_t crc = adler32(~0UL, chunk, chunkSize); uint32_t crc = crc32(crcInit, chunk, chunkSize);
uint8_t* dest; uint8_t* dest;
long len; long len;
if (kDebug) if (kLogging)
NSLog(@"%05lX: crc=%08X", NSLog(@"%05lX: crc=%08X", ftell(fin) - chunkSize, crc);
[[sin propertyForKey:NSStreamFileCurrentOffsetKey] longValue]
- chunkSize, crc);
switch (crc) switch (crc)
{ {
CASE(5FCB5D2A, IIo) CASE(AA2342E8, IIo)
CASE(B2ADA4E6, IIpD0) CASE(F3048537, IIpD5) CASE(B9E3B093, IIpD0) CASE(79135697, IIpD5)
CASE(EDA770F0, IIeC1) CASE(085488C1, IIeD5) CASE(40375280, IIeC1) CASE(1DB83E23, IIeD5)
CASE(24F39DF7, IIcpMain) CASE(F768C5C3, IIcpAlt)
CASE(A3BB7671, IIcMain) CASE(A9A56CEC, IIcAlt) case 0x816CDA70: CASE(228C4909, IIcMain)
CASE(A40E7672, IIcpMain) CASE(A99F6CE9, IIcpAlt) case 0xFA9D7930: CASE(DC459600, IIcAlt)
CASE(9C377B54, DiskII) CASE(CE7144F6, DiskII)
// CASE(39797894, Mouse) CASE(BA81A559, Mouse)
// CASE(67D46AFF, SSC) CASE(B2EB6D44, SSCX) CASE(92600557, Slinky) CASE(67C88BD0, SlinkyX)
// CASE(C37D631F, IIeSerial) CASE(CDFB877A, IIeSerialX) CASE(87DF71C4, SSC) CASE(F085C5CF, SSCX)
// CASE(FCE2762B, Slinky) CASE(807A73D1, SlinkyX) CASE(926CBF62, IIeSerial) CASE(F35CD658, IIeSerialX)
default: continue; // chunk not recognized; continue reading default: continue; // chunk not recognized; continue reading
} }
memcpy(dest, chunk, chunkSize); memcpy(dest, chunk, chunkSize);
[sin read:dest+chunkSize maxLength:len-chunkSize]; fread(dest+chunkSize, 1, len-chunkSize, fin);
if (dest == gROM.IIpD0) if (dest == gROM.IIpD0)
memcpy(gROM.IIeD0, dest, len); memcpy(gROM.IIeD0, dest, len);
} }
[sin close]; // need?? fclose(fin);
[sin release];
return YES; return YES;
#undef CASE #undef CASE
@ -247,17 +252,16 @@ static struct // the ROM repository
+ (void)ScanDirectoryForROM:(NSString*)dirPath + (void)ScanDirectoryForROM:(NSString*)dirPath
{/* {/*
Scans every file in the given directory for recognized segments of Scans every file in the given directory for recognized segments of ROM.
ROM. If nil is passed, the default directory is "ROMs", at the same If nil is passed, the application's "ROMs" directory is searched.
level as the application bundle.
*/ */
NSEnumerator *e;
NSString *fname, *fpath;
if (dirPath == nil) if (dirPath == nil)
dirPath = [[[NSBundle mainBundle] bundlePath] dirPath = [[[NSBundle mainBundle] bundlePath]
stringByAppendingPathComponent:@"../ROMs"]; stringByAppendingPathComponent:@"../ROMs"];
NSEnumerator *e;
NSString *fname, *fpath;
e = [[[NSFileManager defaultManager] e = [[[NSFileManager defaultManager]
directoryContentsAtPath:dirPath] objectEnumerator]; directoryContentsAtPath:dirPath] objectEnumerator];
if (e == nil) if (e == nil)

View File

@ -150,7 +150,6 @@ static NSString* gNameOfModel[] =
mPC = mMemory->ROM[0][0x3FFD] << 8 // load PC from $FFFC-D in ROM mPC = mMemory->ROM[0][0x3FFD] << 8 // load PC from $FFFC-D in ROM
| mMemory->ROM[0][0x3FFC]; | mMemory->ROM[0][0x3FFC];
// mPrinter.reg[0x8] = ??;
mPrinter.reg[0xA] = 0; // command reg mPrinter.reg[0xA] = 0; // command reg
mPrinter.reg[0xB] = 0x3E; // control reg mPrinter.reg[0xB] = 0x3E; // control reg
mPrinter.lights = 0; mPrinter.lights = 0;
@ -258,7 +257,10 @@ static inline uint8_t ASCIIfy(int charset, uint8_t ch)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
+ (void)_UpdateClock:(NSTimer*)timer + (void)_UpdateClock:(NSTimer*)timer
{ {/*
Called approximately once per second, from an NSTimer, to update the
date and time. Apple II clock cards read the data computed here.
*/
static struct static struct
{ {
char hi[100], lo[100]; char hi[100], lo[100];
@ -267,6 +269,7 @@ static inline uint8_t ASCIIfy(int charset, uint8_t ch)
{ {
"00000000001111111111222222222233333333334444444444" "00000000001111111111222222222233333333334444444444"
"55555555556666666666777777777788888888889999999999", "55555555556666666666777777777788888888889999999999",
"01234567890123456789012345678901234567890123456789" "01234567890123456789012345678901234567890123456789"
"01234567890123456789012345678901234567890123456789" "01234567890123456789012345678901234567890123456789"
}; };
@ -282,14 +285,16 @@ static inline uint8_t ASCIIfy(int charset, uint8_t ch)
tPrev = t; tPrev = t;
A2G.timeInGMT? gmtime_r(&t, &tm) : localtime_r(&t, &tm); A2G.timeInGMT? gmtime_r(&t, &tm) : localtime_r(&t, &tm);
tm.tm_year %= 100;
tm.tm_mon += 1; tm.tm_mon += 1;
if (tm.tm_year >= 100)
tm.tm_year -= 100;
uint8_t str[32] = uint8_t str[32] =
{ {
tm.tm_mon << 5 | tm.tm_mday, tm.tm_mon << 5 | tm.tm_mday,
tm.tm_year << 1 | tm.tm_mon >> 3, tm.tm_year << 1 | tm.tm_mon >> 3,
tm.tm_min, tm.tm_hour, tm.tm_min,
tm.tm_hour,
digit.hi[tm.tm_mon ], digit.lo[tm.tm_mon ], ',', digit.hi[tm.tm_mon ], digit.lo[tm.tm_mon ], ',',
'0', digit.lo[tm.tm_wday], ',', '0', digit.lo[tm.tm_wday], ',',
@ -299,8 +304,7 @@ static inline uint8_t ASCIIfy(int charset, uint8_t ch)
digit.hi[tm.tm_sec ], digit.lo[tm.tm_sec ], 13, digit.hi[tm.tm_sec ], digit.lo[tm.tm_sec ], 13,
}; };
for (int i = 32/4; --i >= 0;) QCOPY(A2T.curTime, str, 32);
((uint32_t*)(A2T.curTime))[i] = ((uint32_t*)str)[i];
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@ -214,7 +214,6 @@ static void InitBitPatterns(void)
char* tpix = (char*)(A2T.vidPix.TYPE); char* tpix = (char*)(A2T.vidPix.TYPE);
#define BAM_(I) pout[I] = *(PixelGroup*)(tpix + (bits & kMask)) #define BAM_(I) pout[I] = *(PixelGroup*)(tpix + (bits & kMask))
#define BAM(I) BAM_(I); bits >>= kShift #define BAM(I) BAM_(I); bits >>= kShift
#define HLOOP \ #define HLOOP \

View File

@ -189,10 +189,7 @@ static void EnnybSector(uint8_t* dest, //[kSizePhysSector]
for (int t = 35; --t >= 0;) for (int t = 35; --t >= 0;)
{ {
read(mOrigFD, buf[0], rdTrackSize); read(mOrigFD, buf[0], rdTrackSize);
#if 0
memcpy(buf[1], buf[0], wrTrackSize);
#endif
write(mWorkFD, buf[0], wrTrackSize); write(mWorkFD, buf[0], wrTrackSize);
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,8 @@
/* Globals.l (.m) /* Globals.l (.m)
Generally useful functions and data structures residing in the global
scope. Everything except 'A2G' however is considered private to the
LibAppleII library.
*/ */
%option 8bit never-interactive noyywrap prefix="A2Globals_" %option 8bit never-interactive noyywrap prefix="A2Globals_"
%{ %{
@ -39,7 +43,7 @@ BZh return kFmtBZip;
struct A2Globals A2G = struct A2Globals A2G =
{ {
.defaultModel = kA2ModelIIp, .defaultModel = kA2ModelIIp,
.defaultExtraRAM = 0, // sensible values: 0, 18-21 .defaultExtraRAM = 0, // sensible values: 0, 20 (1 MB)
.standardColors = // ... in a 12-bit RGB format .standardColors = // ... in a 12-bit RGB format
{ {
@ -199,7 +203,7 @@ BOOL A2AppendResourceFile(fd_t fout, NSString* resName)
void A2DumpArray(const char* name, const void* arr, size_t sz, int type) void A2DumpArray(const char* name, const void* arr, size_t sz, int type)
{/* {/*
Dumps an array of integers to a text file, in the format of C static Dumps an array of integers to a text file, in the form of C static
initializers. initializers.
*/ */
static FILE* fout = NULL; static FILE* fout = NULL;

View File

@ -7,6 +7,9 @@
#import "LibAppleII.h" #import "LibAppleII.h"
#import "MyUtils.h" #import "MyUtils.h"
//---------------------------------------------------------------------------
// Macros
#define LENGTH(ARRAY_1D) \ #define LENGTH(ARRAY_1D) \
( sizeof(ARRAY_1D) / sizeof(ARRAY_1D[0]) ) ( sizeof(ARRAY_1D) / sizeof(ARRAY_1D[0]) )
// number of elements in a one-dimensional array // number of elements in a one-dimensional array
@ -15,6 +18,11 @@
ks##NAME = (SHIFT), kf##NAME = 1U << ks##NAME, ks##NAME = (SHIFT), kf##NAME = 1U << ks##NAME,
// defines bit-flag constants with ease // defines bit-flag constants with ease
#define QCOPY(DEST, SRC, LEN) do { \
for (long i = ((long)(LEN))>>2; --i >= 0;) \
((uint32_t*)(DEST))[i] = ((const uint32_t*)(SRC))[i]; \
} while (0)
#define IS_OPEN(FD) ((FD) >= 0) #define IS_OPEN(FD) ((FD) >= 0)
#define CLOSE(FD) (close(FD), -1) #define CLOSE(FD) (close(FD), -1)
#define REWIND(FD) lseek((FD), 0, SEEK_SET) #define REWIND(FD) lseek((FD), 0, SEEK_SET)
@ -61,8 +69,8 @@ enum
DFLAG(16, RAMRD) // flags affecting memory reads DFLAG(16, RAMRD) // flags affecting memory reads
DFLAG(17, LCRD) DFLAG(17, LCRD)
DFLAG(18, CXROM) DFLAG(18, C3ROM)
DFLAG(19, C3ROM) DFLAG(19, CXROM)
DFLAG(20, HotSlot) DFLAG(20, HotSlot)
// DFLAG(21, HotSlot1) // DFLAG(21, HotSlot1)
// DFLAG(22, HotSlot2) // DFLAG(22, HotSlot2)
@ -105,8 +113,8 @@ typedef struct A2Memory
RAM[8][2][0x2000], // main and aux RAM (64 KB each) RAM[8][2][0x2000], // main and aux RAM (64 KB each)
ROM[2][0x4000], // up to 2 banks of ROM ROM[2][0x4000], // up to 2 banks of ROM
mixedSlotROM[0x800],
WOM[0x800], // write-only memory (for ROM writes) WOM[0x800], // write-only memory (for ROM writes)
altSlotROM[0x800],
pad_[0x1000], // pad struct up to next 0x2000 boundary pad_[0x1000], // pad struct up to next 0x2000 boundary
diskBuffers[4][0x2000]; diskBuffers[4][0x2000];

View File

@ -153,7 +153,7 @@ extern struct A2Globals
struct { // optional "Slinky" RAM card struct { // optional "Slinky" RAM card
uint32_t pos, mask; uint32_t pos, mask;
uint8_t *base, nowhere; uint8_t *rBase, *wBase, rNowhere, wNowhere;
} mSlinky; } mSlinky;
struct A2IWM { // two IWM controllers, with two drives each struct A2IWM { // two IWM controllers, with two drives each

View File

@ -1 +1 @@
162,192,44,48,192,169,12,32,43,255,202,208,245,169,160,157,0,4,157,0,5,157,0,6,157,0,7,232,208,241,189,55,255,240,254,9,128,157,40,4,232,208,243,56,72,233,1,208,252,104,233,1,208,246,96,78,111,32,82,79,77,32,119,97,115,32,102,111,117,110,100,32,102,111,114,32,116,104,105,115,32,109,111,100,101,108,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,72,24,165,56,208,8,169,27,133,56,169,253,133,57,165,54,208,9,169,37,133,54,169,193,133,55,56,169,0,133,36,133,33,104,176,1,96,41,127,32,71,193,201,32,144,246,201,127,240,242,230,36,165,36,201,80,144,234,169,0,133,36,169,13,32,71,193,169,10,208,0,141,152,192,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,120,40,169,88,208,112,0,24,144,1,96,169,194,141,8,191,169,28,141,7,191,169,76,141,6,191,96,160,3,140,191,192,173,191,192,153,144,191,136,16,247,96,160,21,140,191,192,160,17,173,191,192,9,128,153,0,2,136,16,245,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,130,192,108,252,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,201,32,169,0,201,3,133,68,133,70,133,71,141,1,8,169,1,133,66,169,8,133,69,44,130,192,32,88,255,186,189,0,1,10,10,10,10,133,67,32,56,196,166,67,76,1,8,188,143,192,162,0,169,0,24,96,165,67,16,4,169,40,56,96,41,112,170,164,66,240,232,136,240,10,136,240,34,136,240,228,169,1,56,96,32,134,196,189,131,192,145,68,200,208,248,230,69,189,131,192,145,68,200,208,248,198,69,169,0,24,96,32,134,196,177,68,157,131,192,200,208,248,230,69,177,68,157,131,192,200,208,248,240,227,160,0,152,157,128,192,165,70,10,157,129,192,165,71,42,157,130,192,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,79,56, 162,192,44,48,192,169,12,32,43,255,202,208,245,169,160,157,0,4,157,0,5,157,0,6,157,0,7,232,208,241,189,55,255,240,254,9,128,157,40,4,232,208,243,56,72,233,1,208,252,104,233,1,208,246,96,78,111,32,82,79,77,32,119,97,115,32,102,111,117,110,100,32,102,111,114,32,116,104,105,115,32,109,111,100,101,108,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,72,165,54,240,3,108,252,255,169,21,133,54,169,80,133,33,169,0,133,36,104,41,127,32,32,193,201,13,208,14,169,10,72,173,153,192,41,16,240,249,104,141,152,192,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,120,40,169,88,208,112,0,24,144,39,96,173,7,191,133,7,173,8,191,133,8,160,0,185,35,195,145,7,200,192,15,144,246,96,160,3,140,191,192,173,191,192,153,144,191,136,16,247,96,160,21,140,191,192,160,17,173,191,192,9,128,153,0,2,136,16,245,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,130,192,108,252,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,201,32,169,0,201,3,133,68,133,70,133,71,141,1,8,169,1,133,66,169,8,133,69,169,64,133,67,32,44,196,166,67,76,1,8,188,143,192,162,0,169,0,24,96,165,67,48,25,41,112,170,189,143,192,240,17,164,66,240,231,136,240,14,136,240,11,136,240,227,169,1,56,96,169,40,56,96,169,0,168,157,128,192,165,70,10,157,129,192,165,71,42,157,130,192,165,66,201,2,240,24,189,131,192,145,68,200,208,248,230,69,189,131,192,145,68,200,208,248,198,69,169,0,24,96,177,68,157,131,192,200,208,248,230,69,177,68,157,131,192,200,208,248,240,230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,79,44,

View File

@ -1,13 +1,13 @@
// 'common.xcconfig' -- a set of common XCode configration settings // 'common.xcconfig' -- a set of common XCode configration settings
// shared by all targets. // shared by all targets.
App_Version = 2.00b2 App_Version = 2.00b3
PRODUCT_NAME = Catakig PRODUCT_NAME = Catakig
WRAPPER_EXTENSION = app WRAPPER_EXTENSION = app
//ALWAYS_SEARCH_USER_PATHS = NO //ALWAYS_SEARCH_USER_PATHS = NO
// Apple recommends this setting // Apple recommends this setting, but we can't use it yet.
INFOPLIST_FILE = Info.plist INFOPLIST_FILE = Info.plist
GCC_PRECOMPILE_PREFIX_HEADER = YES GCC_PRECOMPILE_PREFIX_HEADER = YES