diff --git a/CHANGELOG.md b/CHANGELOG.md index c986a3a..c763d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ See [planned features](https://github.com/samkusin/clemens_iigs/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) for a list of TODOs. Feel free to add to the list. +### Known Issues + +* No 640 mode dithering - size of window really dictates how this mode looks and artifacts are obvious here +* Textfunk scanline text effects do not work +* Mockingboard emulation may slow down the system due to an inefficient VIA implementation +* ROM detection is not friendly - make sure you find a valid ROM 3 file or else the system will not warn you and likely the emulated machine will hang (not the emulator itself.) + ## Version 0.6 ### Features @@ -14,6 +21,7 @@ See [planned features](https://github.com/samkusin/clemens_iigs/issues?q=is%3Ais * macOS Catalina and above support * Gamepad support on all supported platforms * Fast disk emulation where the machine is sped up during read and write operations +* Fast emulation mode (not the most optimal, but it works to get 10-20x speed) * Partial SCC emluation to pass diagnostic tests * IIgs GSOS/Finder/Toolbox mouse to host desktop tracking * Paste text as keyboard input (does not work correctly on GSOS) @@ -40,6 +48,7 @@ See [planned features](https://github.com/samkusin/clemens_iigs/issues?q=is%3Ais * Clear key strobe on write to c010-1f * Ensure shadow map on writes is valid based on the final write page (bank 0,1 relevant) * 3.5" read/write bit cell timing fix for copy protection on certain titles +* Disk switch detection for 3.5 and hard drives improved * WOZ CRC generation * RTC uses local timezone vs GMT clock * WAI fix @@ -55,21 +64,12 @@ All 60 fps emulation when not in Fast disk mode * i7-10750H 6 core 2.6 Ghz (Windows 11, 2021 Dell XPS 15 9500, 16GB) * M2 Macbook Air (macOS Ventura, 16GB) -### Known Issues +### Planned for Next Releases -* GSOS boot on freshly installed hard drive images may crash to the monitor on - first couple startups - * The problem "goes away" after this - * Under investigation -* Textfunk results in MAME-like results vs KEGS and Crossrunner -* Mockingboard emulation may slow down the system due to an inefficient VIA implementation - -### Planned for 0.7 - -* French keyboards +* 640 mode dithering effects +* French keyboards (possibly other layouts) +* Unmounted disk failures will save a backup to the disk library * Debugger improvements -* General GUI cleanup - ## Version 0.5 diff --git a/host/clem_front.cpp b/host/clem_front.cpp index d2e0f1b..2a52c68 100644 --- a/host/clem_front.cpp +++ b/host/clem_front.cpp @@ -598,8 +598,8 @@ ClemensFrontend::ClemensFrontend(ClemensConfiguration &config, emulatorHasMouseFocus_(false), mouseInEmulatorScreen_(false), pasteClipboardToEmulator_(false), debugIOMode_(DebugIOMode::Core), vgcDebugMinScanline_(0), vgcDebugMaxScanline_(0), joystickSlotCount_(0), guiMode_(GUIMode::None), - guiPrevMode_(GUIMode::None), appTime_(0.0), nextUIFlashCycleAppTime_(0.0), - uiFlashAlpha_(1.0f), debugger_(backendQueue_, *this), settingsView_(config_) { + helpMode_(HelpMode::None), appTime_(0.0), nextUIFlashCycleAppTime_(0.0), uiFlashAlpha_(1.0f), + debugger_(backendQueue_, *this), settingsView_(config_) { ClemensTraceExecutedInstruction::initialize(); @@ -923,15 +923,25 @@ auto ClemensFrontend::frame(int width, int height, double deltaTime, ClemensHost interop.minWindowHeight += ImGui::GetTextLineHeightWithSpacing() + ImGui::GetStyle().WindowBorderSize; } + if (interop.action != ClemensHostInterop::None) { + // leave the help interface. + helpMode_ = HelpMode::None; + // prevent low-priority operations if in a modal state + + if (guiMode_ == GUIMode::LoadSnapshot || guiMode_ == GUIMode::LoadSnapshotAfterPowerOn || + guiMode_ == GUIMode::SaveSnapshot) { + interop.action = ClemensHostInterop::None; + } + } switch (interop.action) { case ClemensHostInterop::About: - setGUIMode(GUIMode::Help); + helpMode_ = HelpMode::General; break; case ClemensHostInterop::Help: - setGUIMode(GUIMode::HelpShortcuts); + helpMode_ = HelpMode::Shortcuts; break; case ClemensHostInterop::DiskHelp: - setGUIMode(GUIMode::HelpDisk); + helpMode_ = HelpMode::Disk; break; case ClemensHostInterop::LoadSnapshot: if (isBackendRunning()) { @@ -994,6 +1004,9 @@ auto ClemensFrontend::frame(int width, int height, double deltaTime, ClemensHost } emulatorHasMouseFocus_ = emulatorHasMouseFocus_ && isBackendRunning(); doEmulatorInterface(interfaceAnchor, ImVec2(width, height), interop, viewToMonitor, deltaTime); + if (helpMode_ != HelpMode::None) { + doHelpScreen(width, height); + } switch (guiMode_) { case GUIMode::None: @@ -1031,11 +1044,6 @@ auto ClemensFrontend::frame(int width, int height, double deltaTime, ClemensHost setGUIMode(GUIMode::LoadSnapshot); } break; - case GUIMode::Help: - case GUIMode::HelpShortcuts: - case GUIMode::HelpDisk: - doHelpScreen(width, height); - break; case GUIMode::JoystickConfig: // this is handled above break; @@ -1058,8 +1066,6 @@ auto ClemensFrontend::frame(int width, int height, double deltaTime, ClemensHost break; } - guiPrevMode_ = guiMode_; - if (delayRebootTimer_.has_value()) { delayRebootTimer_ = *delayRebootTimer_ + (float)deltaTime; if (*delayRebootTimer_ > kClemensRebootDelayDuration) { @@ -1278,17 +1284,24 @@ void ClemensFrontend::doEmulatorInterface(ImVec2 anchor, ImVec2 dimensions, if (guiMode_ == GUIMode::JoystickConfig) guiMode_ = GUIMode::None; doMachineSmartDiskBrowserInterface(kMonitorViewAnchor, kMonitorViewSize); - } else if (guiMode_ == GUIMode::Setup) { - doSetupUI(kMonitorViewAnchor, kMonitorViewSize); - } else if (guiMode_ == GUIMode::JoystickConfig) { - doJoystickConfig(kMonitorViewAnchor, kMonitorViewSize); } else { - if (config_.hybridInterfaceEnabled) { - doDebuggerLayout(kMonitorViewAnchor, kMonitorViewSize, viewToMonitor); - } else { - doMachineViewLayout(kMonitorViewAnchor, kMonitorViewSize, viewToMonitor); + switch (guiMode_) { + case GUIMode::Setup: + doSetupUI(kMonitorViewAnchor, kMonitorViewSize); + break; + case GUIMode::JoystickConfig: + doJoystickConfig(kMonitorViewAnchor, kMonitorViewSize); + break; + default: + if (config_.hybridInterfaceEnabled) { + doDebuggerLayout(kMonitorViewAnchor, kMonitorViewSize, viewToMonitor); + } else { + doMachineViewLayout(kMonitorViewAnchor, kMonitorViewSize, viewToMonitor); + } + break; } } + doSidePanelLayout(kSideBarAnchor, kSideBarSize); doInfoStatusLayout(kInfoStatusAnchor, kInfoStatusSize, kMonitorViewAnchor.x); ImGui::PopStyleColor(7); @@ -3123,15 +3136,15 @@ void ClemensFrontend::doHelpScreen(int width, int height) { ClemensHostImGui::Markdown(CLEM_L10N_LABEL(kEmulatorHelp)); ImGui::EndTabItem(); } - if (ImGui::BeginTabItem( - "Hotkeys", NULL, - guiMode_ == GUIMode::HelpShortcuts ? ImGuiTabItemFlags_SetSelected : 0)) { + if (ImGui::BeginTabItem("Hotkeys", NULL, + helpMode_ == HelpMode::Shortcuts ? ImGuiTabItemFlags_SetSelected + : 0)) { ClemensHostImGui::Markdown(CLEM_L10N_LABEL(kGSKeyboardCommands)); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Disk Selection", NULL, - guiMode_ == GUIMode::HelpDisk ? ImGuiTabItemFlags_SetSelected - : 0)) { + helpMode_ == HelpMode::Disk ? ImGuiTabItemFlags_SetSelected + : 0)) { ClemensHostImGui::Markdown(CLEM_L10N_LABEL(kDiskSelectionHelp)); ImGui::EndTabItem(); } @@ -3144,13 +3157,7 @@ void ClemensFrontend::doHelpScreen(int width, int height) { ImGui::EndPopup(); } - if (guiMode_ == GUIMode::HelpShortcuts || guiMode_ == GUIMode::HelpDisk) { - // hacky method to automatically trigger the shortcuts tab from the main menu - setGUIMode(GUIMode::Help); - } - if (!isOpen) { - setGUIMode(GUIMode::Emulator); - } + helpMode_ = isOpen ? HelpMode::General : HelpMode::None; } void ClemensFrontend::doJoystickConfig(ImVec2 anchor, ImVec2 dimensions) { diff --git a/host/clem_front.hpp b/host/clem_front.hpp index af55314..c6444c5 100644 --- a/host/clem_front.hpp +++ b/host/clem_front.hpp @@ -200,9 +200,6 @@ class ClemensFrontend : public ClemensHostView, ClemensDebuggerListener { LoadSnapshot, LoadSnapshotAfterPowerOn, SaveSnapshot, - Help, - HelpShortcuts, - HelpDisk, JoystickConfig, RebootEmulator, StartingEmulator, @@ -210,8 +207,15 @@ class ClemensFrontend : public ClemensHostView, ClemensDebuggerListener { }; void setGUIMode(GUIMode guiMode); + enum class HelpMode { + None, + General, + Shortcuts, + Disk + }; + GUIMode guiMode_; - GUIMode guiPrevMode_; + HelpMode helpMode_; double appTime_; double nextUIFlashCycleAppTime_; float uiFlashAlpha_; diff --git a/host/strings/clem_help.inl b/host/strings/clem_help.inl index 40abebe..2892a42 100644 --- a/host/strings/clem_help.inl +++ b/host/strings/clem_help.inl @@ -30,12 +30,16 @@ First time users will be prompted to set a location where the emulator will stor const char *kDiskSelectionHelp[] = {R"md( ## Disk Selection -Disk images are loaded by 'importing' them into the Emulator's library folder. +The disk tray resides on the top left most section of the interface. + +Each widget represents a physical disk slot. + +* **s5d1** and **s5d2** disks were 800K 3.5" disk images used to distribute most Apple IIgs titles +* **s6d1** and **s6d2** disks were 140K 5.25" disk images used to legacy Apple II titles +* **s7d1** and **s7d2** are disks that can support up to 32MB hard drive images + +All disk widgets have eject buttons. Currently s7d1 and s7d2 do not support write protection. -* Choose a drive from the four drive widgets in the top left of the Emulator view -* Select 'import' to import one or more disk images as a set (.DSK, .2MG, .PO, .DO, .WOZ) -* Enter the desired disk set name -* A folder will be created in the library folder for the disk set containing the imported images )md"}; const char *kDebuggerHelp[] = {R"md(