From 461fe41f795a6b13c337d3e7090ab0e4ee756906 Mon Sep 17 00:00:00 2001 From: Brendan Robert Date: Wed, 21 Mar 2018 20:22:34 -0500 Subject: [PATCH] Removed font speedup hacks -- we should just rely on transwarp softswitch for speedups. --- .../main/java/jace/lawless/LawlessHacks.java | 22 ------------------- .../main/java/jace/lawless/LawlessVideo.java | 19 ---------------- 2 files changed, 41 deletions(-) diff --git a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java index b849dfa7..1fdfe2da 100644 --- a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java +++ b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java @@ -1,7 +1,5 @@ package jace.lawless; -import jace.apple2e.MOS65C02; -import jace.apple2e.SoftSwitches; import jace.cheat.Cheats; import jace.core.Computer; import jace.core.RAMEvent; @@ -12,11 +10,6 @@ import jace.lawless.LawlessVideo.RenderEngine; */ public class LawlessHacks extends Cheats { - // Location of font routines - int FONT_ROUTINES = 0x0EC00; - int FONT_ROUTINES_END = 0x0f800; - int FONT_SPEEDUP_CYCLES = 10000; - int FONT_ROUTINES_LEN = 0x0f00; // Modes specified by the game engine int MODE_SOFTSWITCH = 0x0C020; @@ -28,21 +21,6 @@ public class LawlessHacks extends Cheats { @Override public void registerListeners() { // Observe graphics changes - addCheat(RAMEvent.TYPE.WRITE, (e) -> { - if (e.getAddress() >= 0x02000 && e.getAddress() <= 0x05FFF) { - ((LawlessVideo) computer.getVideo()).setBWFlag(e.getAddress(), - !SoftSwitches.RAMWRT.getState() || - computer.getCpu().getProgramCounter() < FONT_ROUTINES || - computer.getCpu().getProgramCounter() > FONT_ROUTINES_END); - } - }, 0x02000, 0x05FFF); - // Watch for font routine usage for speedup - addCheat(RAMEvent.TYPE.EXECUTE, (e) -> { - if ((e.getAddress() & 0x0ff00) == FONT_ROUTINES) { - computer.motherboard.requestSpeed(this); - } - }, FONT_ROUTINES, FONT_ROUTINES | 0x0ff); - // Try to detect engines changing addCheat(RAMEvent.TYPE.ANY, false, (e) -> { if ((e.getAddress() & 0x0FFF0) == MODE_SOFTSWITCH) { System.out.println("Trapped " + e.getType().toString() + " to $"+Integer.toHexString(e.getAddress())); diff --git a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java index 7b5c15fe..8c4f0b8c 100644 --- a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java +++ b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java @@ -84,25 +84,6 @@ public class LawlessVideo extends VideoNTSC { System.out.println("Detected engine same as before: " + e.name()); } } - - public void setBWFlag(int addr, boolean b) { - addr &= 0x01FFF; - int row = VideoNTSC.identifyHiresRow(addr); - if (row < 0 || row > 192) { - return; - } - int col = addr - VideoNTSC.calculateHiresOffset(row); - /* - if (row > 20 && row < 136 && col < 20) { - boolean prev = activeMask[row][col*2]; - activeMask[row][col*2] = b; - activeMask[row][col*2+1] = b; - if (prev ^ b) { - redraw(); - } - } - */ - } static public int[] divBy56 = new int[560];