From 8942d6462eb30767aa35521c857ab0bc94ae876c Mon Sep 17 00:00:00 2001 From: Brendan Robert Date: Sat, 5 Sep 2015 09:02:23 -0500 Subject: [PATCH] BUGFIX: All rendering is halted when a file chooser is open for any reason. For whatever reason, background canvas updates kill the CPU when file dialog is open so this is fixed now. NEW: Memory inspector view lets you monitor read/write operations on a specific memory cell BUGFIX: Retina screens are detected to prevent the memoryview canvas from getting too large. --- src/main/java/jace/EmulatorUILogic.java | 30 +++--- src/main/java/jace/JaceApplication.java | 2 +- src/main/java/jace/apple2e/MOS65C02.java | 19 ++-- src/main/java/jace/apple2e/Speaker.java | 3 +- src/main/java/jace/cheat/MemoryCell.java | 5 +- src/main/java/jace/cheat/MetaCheat.java | 64 +++++++++++-- src/main/java/jace/core/CPU.java | 8 ++ src/main/java/jace/core/Video.java | 4 +- src/main/java/jace/ide/IdeController.java | 5 +- src/main/java/jace/ui/MetacheatUI.java | 106 +++++++++++++++++++--- src/main/java/jace/ui/Watch.java | 18 +++- src/main/resources/fxml/Metacheat.fxml | 35 +++++++ 12 files changed, 242 insertions(+), 57 deletions(-) diff --git a/src/main/java/jace/EmulatorUILogic.java b/src/main/java/jace/EmulatorUILogic.java index 7133068..f51d056 100644 --- a/src/main/java/jace/EmulatorUILogic.java +++ b/src/main/java/jace/EmulatorUILogic.java @@ -163,7 +163,6 @@ public class EmulatorUILogic implements Reconfigurable { // watchValue.setText("00"); // } // } - // public static void updateBreakpointList(final DebuggerPanel panel) { // java.awt.EventQueue.invokeLater(() -> { // Integer address; @@ -200,7 +199,7 @@ public class EmulatorUILogic implements Reconfigurable { public static void runFile() { Emulator.computer.pause(); FileChooser select = new FileChooser(); - File binary = select.showOpenDialog(null); + File binary = select.showOpenDialog(JaceApplication.getApplication().primaryStage); if (binary == null) { Emulator.computer.resume(); return; @@ -336,7 +335,7 @@ public class EmulatorUILogic implements Reconfigurable { Emulator.computer.pause(); Image i = Emulator.computer.getVideo().getFrameBuffer(); // BufferedImage bufImageARGB = SwingFXUtils.fromFXImage(i, null); - File targetFile = select.showSaveDialog(null); + File targetFile = select.showSaveDialog(JaceApplication.getApplication().primaryStage); if (targetFile == null) { return; } @@ -375,7 +374,7 @@ public class EmulatorUILogic implements Reconfigurable { throw new RuntimeException(exception); } } - + @InvokableAction( name = "Open IDE", category = "development", @@ -404,12 +403,15 @@ public class EmulatorUILogic implements Reconfigurable { } static final Map> INDICATORS = new HashMap<>(); + static public void addIndicator(Object owner, Label icon) { addIndicator(owner, icon, 250); } - + static public void addIndicator(Object owner, Label icon, long TTL) { - if (JaceApplication.singleton == null) return; + if (JaceApplication.getApplication() == null) { + return; + } synchronized (INDICATORS) { Set