MCPcopy Create free account
hub / github.com/badvision/jace / trackActivity

Method trackActivity

src/main/java/jace/cheat/ProgramIdentity.java:37–56  ·  view source on GitHub ↗
(RAMEvent e)

Source from the content-addressed store, hash-verified

35
36 int[] programRegions = new int[512];
37 private void trackActivity(RAMEvent e) {
38 int bank = e.getAddress() >> 8;
39 if (bank >= 0xc0 && bank < 0xd0) {
40 // Skip I/O region
41 return;
42 }
43 // Detect language card ram execution
44 if (bank >= 0xd0 && SoftSwitches.LCRAM.isOff()) {
45 // Skip rom execution
46 return;
47 }
48 if (!e.isMainMemory()) {
49 bank += 256;
50 }
51 if (e.getType() == RAMEvent.TYPE.EXECUTE) {
52 programRegions[bank] = Math.min(CLIP_VALUE, programRegions[bank] + 1);
53 } else if (e.getType() == RAMEvent.TYPE.WRITE) {
54 programRegions[bank] = 0;
55 }
56 }
57
58 private String generateChecksum() {
59 CRC32 crc = new CRC32();

Callers

nothing calls this directly

Calls 4

isOffMethod · 0.80
isMainMemoryMethod · 0.80
getAddressMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected