mirror of
https://github.com/trudnai/Steve2.git
synced 2025-01-02 18:32:37 +00:00
- Selectable Disk from Config menu
- KBDSTRB from ioWrite
This commit is contained in:
parent
a1038b80dc
commit
cf5f390ed2
@ -49,8 +49,8 @@
|
||||
325EB6A02401118300C6B4A4 /* Crossfire.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6952401118200C6B4A4 /* Crossfire.woz */; };
|
||||
325EB6A12401118300C6B4A4 /* Wavy Navy.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6962401118200C6B4A4 /* Wavy Navy.woz */; };
|
||||
325EB6A22401118300C6B4A4 /* Wavy Navy.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6962401118200C6B4A4 /* Wavy Navy.woz */; };
|
||||
325EB6A32401118300C6B4A4 /* qbit.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6972401118200C6B4A4 /* qbit.woz */; };
|
||||
325EB6A42401118300C6B4A4 /* qbit.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6972401118200C6B4A4 /* qbit.woz */; };
|
||||
325EB6A32401118300C6B4A4 /* Qbit.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6972401118200C6B4A4 /* Qbit.woz */; };
|
||||
325EB6A42401118300C6B4A4 /* Qbit.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6972401118200C6B4A4 /* Qbit.woz */; };
|
||||
325EB6A52401118300C6B4A4 /* ProDOS_312.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6982401118200C6B4A4 /* ProDOS_312.woz */; };
|
||||
325EB6A62401118300C6B4A4 /* ProDOS_312.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6982401118200C6B4A4 /* ProDOS_312.woz */; };
|
||||
325EB6A72401118300C6B4A4 /* ProDOS_402_System.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6992401118200C6B4A4 /* ProDOS_402_System.woz */; };
|
||||
@ -68,14 +68,12 @@
|
||||
32BFFB6E22EACC660003B53F /* A2MacTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB6D22EACC660003B53F /* A2MacTests.swift */; };
|
||||
32BFFB7922EACC660003B53F /* A2MacUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB7822EACC660003B53F /* A2MacUITests.swift */; };
|
||||
32C45306232E3EEF0000EBA1 /* RepeatingTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32C45305232E3EEF0000EBA1 /* RepeatingTimer.swift */; };
|
||||
32C4530B2331F7220000EBA1 /* 6502.c in Sources */ = {isa = PBXBuildFile; fileRef = 32439F7422ECD8AD0077AAE0 /* 6502.c */; };
|
||||
32C4530C2331F7220000EBA1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB5C22EACC630003B53F /* ViewController.swift */; };
|
||||
32C4530D2331F7220000EBA1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB5A22EACC630003B53F /* AppDelegate.swift */; };
|
||||
32C453112331F7220000EBA1 /* fail1.txt in Resources */ = {isa = PBXBuildFile; fileRef = 32EDB7A123272CA80073AF2D /* fail1.txt */; };
|
||||
32C453122331F7220000EBA1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32BFFB5E22EACC660003B53F /* Assets.xcassets */; };
|
||||
32C453132331F7220000EBA1 /* apple.rom in Resources */ = {isa = PBXBuildFile; fileRef = 32439F8422ECD8AD0077AAE0 /* apple.rom */; };
|
||||
32C453152331F7220000EBA1 /* 6502_functional_test.bin in Resources */ = {isa = PBXBuildFile; fileRef = 326ED2EE232D7A0000A41337 /* 6502_functional_test.bin */; };
|
||||
32C4531D2331FED90000EBA1 /* 6502.c in Sources */ = {isa = PBXBuildFile; fileRef = 32439F7422ECD8AD0077AAE0 /* 6502.c */; };
|
||||
32C4531E2331FED90000EBA1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB5C22EACC630003B53F /* ViewController.swift */; };
|
||||
32C4531F2331FED90000EBA1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB5A22EACC630003B53F /* AppDelegate.swift */; };
|
||||
32C453232331FED90000EBA1 /* fail1.txt in Resources */ = {isa = PBXBuildFile; fileRef = 32EDB7A123272CA80073AF2D /* fail1.txt */; };
|
||||
@ -172,7 +170,7 @@
|
||||
325EB6942401118200C6B4A4 /* Lode Runner.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lode Runner.woz"; sourceTree = "<group>"; };
|
||||
325EB6952401118200C6B4A4 /* Crossfire.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = Crossfire.woz; sourceTree = "<group>"; };
|
||||
325EB6962401118200C6B4A4 /* Wavy Navy.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Wavy Navy.woz"; sourceTree = "<group>"; };
|
||||
325EB6972401118200C6B4A4 /* qbit.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = qbit.woz; sourceTree = "<group>"; };
|
||||
325EB6972401118200C6B4A4 /* Qbit.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = Qbit.woz; sourceTree = "<group>"; };
|
||||
325EB6982401118200C6B4A4 /* ProDOS_312.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = ProDOS_312.woz; sourceTree = "<group>"; };
|
||||
325EB6992401118200C6B4A4 /* ProDOS_402_System.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = ProDOS_402_System.woz; sourceTree = "<group>"; };
|
||||
325EB69A2401118300C6B4A4 /* Sneakers.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = Sneakers.woz; sourceTree = "<group>"; };
|
||||
@ -400,7 +398,7 @@
|
||||
325EB6982401118200C6B4A4 /* ProDOS_312.woz */,
|
||||
325EB68F23FE028800C6B4A4 /* Donkey Kong.woz */,
|
||||
325EB6992401118200C6B4A4 /* ProDOS_402_System.woz */,
|
||||
325EB6972401118200C6B4A4 /* qbit.woz */,
|
||||
325EB6972401118200C6B4A4 /* Qbit.woz */,
|
||||
325EB69A2401118300C6B4A4 /* Sneakers.woz */,
|
||||
325EB6962401118200C6B4A4 /* Wavy Navy.woz */,
|
||||
325EB69B2401118300C6B4A4 /* Xonix.woz */,
|
||||
@ -705,7 +703,7 @@
|
||||
325EB6A62401118300C6B4A4 /* ProDOS_312.woz in Resources */,
|
||||
325EB6AC2401118300C6B4A4 /* Xonix.woz in Resources */,
|
||||
325EB67D23FBD43800C6B4A4 /* PrintChar21.ttf in Resources */,
|
||||
325EB6A42401118300C6B4A4 /* qbit.woz in Resources */,
|
||||
325EB6A42401118300C6B4A4 /* Qbit.woz in Resources */,
|
||||
325EB68723FC707A00C6B4A4 /* Apple DOS 3.3 January 1983.woz in Resources */,
|
||||
325EB64A23FBBACF00C6B4A4 /* Main.storyboard in Resources */,
|
||||
325EB67A23FBC48400C6B4A4 /* spk_up.wav in Resources */,
|
||||
@ -747,7 +745,7 @@
|
||||
325EB6A52401118300C6B4A4 /* ProDOS_312.woz in Resources */,
|
||||
325EB6AB2401118300C6B4A4 /* Xonix.woz in Resources */,
|
||||
325EB68623FC707A00C6B4A4 /* Apple DOS 3.3 January 1983.woz in Resources */,
|
||||
325EB6A32401118300C6B4A4 /* qbit.woz in Resources */,
|
||||
325EB6A32401118300C6B4A4 /* Qbit.woz in Resources */,
|
||||
32439F8822ECD8AD0077AAE0 /* apple.rom in Resources */,
|
||||
326ED2EF232D7A0000A41337 /* 6502_functional_test.bin in Resources */,
|
||||
3262F37623E169F8008BDB95 /* spk_dn.wav in Resources */,
|
||||
@ -862,7 +860,6 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
32C4530B2331F7220000EBA1 /* 6502.c in Sources */,
|
||||
32C4530C2331F7220000EBA1 /* ViewController.swift in Sources */,
|
||||
32C4532F233345820000EBA1 /* MonitorView.swift in Sources */,
|
||||
32C4530D2331F7220000EBA1 /* AppDelegate.swift in Sources */,
|
||||
@ -873,7 +870,6 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
32C4531D2331FED90000EBA1 /* 6502.c in Sources */,
|
||||
32C4531E2331FED90000EBA1 /* ViewController.swift in Sources */,
|
||||
32C45330233345820000EBA1 /* MonitorView.swift in Sources */,
|
||||
32C4531F2331FED90000EBA1 /* AppDelegate.swift in Sources */,
|
||||
|
@ -12,6 +12,11 @@ import Cocoa
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
|
||||
@IBAction func Disk1_Selected(_ sender: NSMenuItem) {
|
||||
if let menuIdentifier = sender.identifier {
|
||||
woz_loadFile( Bundle.main.resourcePath, menuIdentifier.rawValue + ".woz" )
|
||||
}
|
||||
}
|
||||
|
||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||
// Insert code here to initialize your application
|
||||
|
@ -600,6 +600,44 @@
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Config" id="n97-rZ-OOP" userLabel="Config">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Config" id="Xqf-B7-gCo">
|
||||
<items>
|
||||
<menuItem title="Disk 1" id="0NC-AF-e3z">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Disk 1" id="lnc-y1-bUG">
|
||||
<items>
|
||||
<menuItem title="Apple DOS 3.3 January 1983" identifier="Apple DOS 3.3 January 1983" id="KuV-6R-gyL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="Disk1_Selected:" target="Voe-Tx-rLC" id="fFn-bN-fJA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Donkey Kong" identifier="Donkey Kong" id="ero-Yw-Fxy">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="Disk1_Selected:" target="Voe-Tx-rLC" id="wwf-cD-Lv9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Qbit" identifier="Qbit" id="3yK-n1-y7H">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="Disk1_Selected:" target="Voe-Tx-rLC" id="c8a-9v-oR4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Disk 2" id="yVX-3l-dbM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Item 3" id="Y3v-20-h2Q">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
@ -705,11 +743,11 @@
|
||||
<scene sceneID="hIz-AP-VOD">
|
||||
<objects>
|
||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="A2Mac" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" id="m2S-Jp-Qdl" customClass="MonitorView" customModule="A2Mac" customModuleProvider="target">
|
||||
<view key="view" canDrawConcurrently="YES" id="m2S-Jp-Qdl" customClass="MonitorView" customModule="A2Mac" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="680" height="400"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" mirrorLayoutDirectionWhenInternationalizing="never" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iIF-Q5-Onc">
|
||||
<textField canDrawConcurrently="YES" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" mirrorLayoutDirectionWhenInternationalizing="never" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iIF-Q5-Onc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="592" height="400"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" enabled="NO" allowsUndo="NO" sendsActionOnEndEditing="YES" state="on" baseWritingDirection="leftToRight" title="Display Background" drawsBackground="YES" id="cIa-Sd-4OZ">
|
||||
<font key="font" metaFont="system"/>
|
||||
@ -756,7 +794,7 @@
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="LlM-EV-ruZ" customClass="HiRes" customModule="A2Mac" customModuleProvider="target">
|
||||
<customView canDrawConcurrently="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LlM-EV-ruZ" customClass="HiRes" customModule="A2Mac" customModuleProvider="target">
|
||||
<rect key="frame" x="16" y="8" width="568" height="384"/>
|
||||
</customView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mfd-12-bcR">
|
||||
|
@ -560,7 +560,9 @@ class HiRes: NSView {
|
||||
// self.hidden = videoMode.text == 1
|
||||
|
||||
// NSColor.green.setFill()
|
||||
NSColor(calibratedRed: 0.0314, green: 0.635, blue: 0.071, alpha: 1.0).setStroke()
|
||||
// NSColor(calibratedRed: 0.0314, green: 0.635, blue: 0.071, alpha: 1.0).setStroke()
|
||||
// NSColor(calibratedRed: 0.05, green: 0.7, blue: 0.1, alpha: 1.0).setStroke()
|
||||
NSColor.systemGreen.setStroke()
|
||||
|
||||
path.removeAllPoints()
|
||||
path.lineWidth = 0.7
|
||||
|
BIN
Resources/Qbit.woz
Normal file
BIN
Resources/Qbit.woz
Normal file
Binary file not shown.
@ -910,6 +910,7 @@ void m6502_ColdReset( const char * bundlePath ) {
|
||||
|
||||
// SYSTEM
|
||||
/* Requires 64K */// woz_loadFile( bundlePath, "ProDOS_312.woz");
|
||||
/* Requires Enhanced //e or later */// woz_loadFile( bundlePath, "ProDOS_402_System.woz");
|
||||
|
||||
// woz_loadFile( bundlePath, "Merlin-8 v2.48 (DOS 3.3).woz");
|
||||
woz_loadFile( bundlePath, "Apple DOS 3.3 January 1983.woz");
|
||||
|
@ -118,6 +118,7 @@ extern double mhz;
|
||||
|
||||
#define fps 30
|
||||
|
||||
extern void woz_loadFile( const char * bundlePath, const char * filename );
|
||||
extern void tst6502(void);
|
||||
extern void m6502_ColdReset( const char * bundlePath );
|
||||
extern void m6502_Run(void);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#define __6502_INSTR_LOAD_STORE_H__
|
||||
|
||||
#include <ctype.h>
|
||||
#include "../../dev/mem/mmio.h"
|
||||
|
||||
/**
|
||||
LDA Load Accumulator with Memory
|
||||
@ -112,6 +113,8 @@ INLINE void STR( uint8_t * dst, uint8_t src ) {
|
||||
else {
|
||||
// printf("mmio write:[%04X] = %02X\n", addr, src);
|
||||
// dst = Apple2_Dummy_Page;
|
||||
|
||||
ioWrite( addr, src );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ uint8_t woz_read() {
|
||||
m6502.clklast = m6502.clktime;
|
||||
|
||||
uint16_t usedBytes = woz_trks[track].bytes_used < WOZ_TRACK_BYTE_COUNT ? woz_trks[track].bytes_used : WOZ_TRACK_BYTE_COUNT;
|
||||
|
||||
if ( usedBytes ) {
|
||||
if ( clkelpased > 100 ) {
|
||||
// printf("NEED SYNC : %llu\n", clkelpased);
|
||||
bitOffset = (clkelpased >> 2) & 7;
|
||||
@ -287,6 +287,8 @@ uint8_t woz_read() {
|
||||
}
|
||||
}
|
||||
if (outdev) fprintf(outdev, "TIME OUT!\n");
|
||||
}
|
||||
|
||||
return rand();
|
||||
|
||||
#endif // WOZ_REAL_SPIN
|
||||
@ -294,11 +296,11 @@ uint8_t woz_read() {
|
||||
}
|
||||
|
||||
|
||||
void woz_loadFile( const char * bundlePath, const char * filename ) {
|
||||
void woz_loadFile( const char * resourcePath, const char * filename ) {
|
||||
|
||||
char fullpath[256];
|
||||
|
||||
strcpy(fullpath, bundlePath);
|
||||
strcpy(fullpath, resourcePath);
|
||||
strcat(fullpath, "/");
|
||||
strcat(fullpath, filename);
|
||||
|
||||
|
@ -499,7 +499,11 @@ INLINE void ioWrite( uint16_t addr, uint8_t val ) {
|
||||
// printf("mmio:%04X\n", addr);
|
||||
switch (addr) {
|
||||
case io_KBD:
|
||||
return;
|
||||
break;
|
||||
|
||||
case io_KBDSTRB:
|
||||
RAM[io_KBD] &= 0x7F;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user