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

Method performExtendedCommand

src/main/java/jace/apple2e/RAM128k.java:121–149  ·  view source on GitHub ↗
(int param)

Source from the content-addressed store, hash-verified

119 }
120
121 @Override
122 public void performExtendedCommand(int param) {
123 if (param == 0xda) {// 64 da : Dump all memory mappings
124 System.out.println("Active banks");
125 for (int i = 0; i < 256; i++) {
126 byte[] read = this.activeRead.get(i);
127 byte[] write = this.activeWrite.get(i);
128 String readBank = getBanks().keySet().stream().filter(bank -> {
129 PagedMemory mem = getBanks().get(bank);
130 for (byte[] page : mem.getMemory()) {
131 if (page == read) {
132 return true;
133 }
134 }
135 return false;
136 }).findFirst().orElse("unknown");
137 String writeBank = getBanks().keySet().stream().filter(bank -> {
138 PagedMemory mem = getBanks().get(bank);
139 for (byte[] page : mem.getMemory()) {
140 if (page == write) {
141 return true;
142 }
143 }
144 return false;
145 }).findFirst().orElse("unknown");
146 LOG.log(Level.INFO, "Bank {0}\t{1}\t{2}", new Object[]{Integer.toHexString(i), readBank, writeBank});
147 }
148 }
149 }
150
151 @Stateful
152 public PagedMemory mainMemory;

Callers

nothing calls this directly

Calls 4

getBanksMethod · 0.95
getMemoryMethod · 0.95
getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected