Compare commits

...

2 Commits

Author SHA1 Message Date
Brendan Robert 90771cb31e Fix text issue with locket message 2024-04-03 00:03:43 -05:00
Brendan Robert e8c6fb3efe update ignore file for temporary pom files 2024-04-02 23:29:31 -05:00
2 changed files with 20 additions and 1 deletions

3
.gitignore vendored
View File

@ -68,3 +68,6 @@ error_stack.txt
# Ignore NetBeans project files
Platform/Apple/tools/jace/nb-configuration.xml
Platform/Apple/tools/jace/nbactions.xml
# Ignore temporary pom files
Platform/Apple/tools/jace/runPom.xml

View File

@ -10,6 +10,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.TreeMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
@ -76,12 +77,27 @@ public class LawlessHacks extends Cheats {
}
// Enhance text rendering by forcing the text to be pure B&W
Map<Integer, Integer> detectedEntryPoints = new TreeMap<>();
long lastStatus = 0;
private void enhanceText(RAMEvent e) {
if (!e.isMainMemory()) {
return;
}
int pc = Emulator.withComputer(c->c.getCpu().getProgramCounter(), 0);
boolean drawingText = pc == 0x0ee46 || pc > 0x0f300;
boolean drawingText = (pc >= 0x0ee00 && pc <= 0x0f0c0) || pc > 0x0f100;
if (DEBUG) {
if (drawingText) {
detectedEntryPoints.put(pc, detectedEntryPoints.getOrDefault(pc, 0) + 1);
}
if ((System.currentTimeMillis() - lastStatus) >= 10000) {
lastStatus = System.currentTimeMillis();
System.out.println("---text entry points---");
detectedEntryPoints.forEach((addr, count) -> {
System.out.println(Integer.toHexString(addr) + ": " + count);
});
}
}
Emulator.withVideo(v -> {
if (v instanceof LawlessVideo) {
LawlessVideo video = (LawlessVideo) v;