mirror of
https://bitbucket.org/rslr/miggy-cpu.git
synced 2026-06-12 19:16:29 +00:00
Fixed RESET
This commit is contained in:
parent
0d93bfe32d
commit
7daa27e15f
4 changed files with 10 additions and 0 deletions
|
|
@ -2999,7 +2999,9 @@ public class CoreGenerator {
|
|||
|
||||
private void op_reset_microcode() {
|
||||
addState("op_reset");
|
||||
check_privileged();
|
||||
consume(130, 1, 0);
|
||||
addFormattedMicroInsn("handle_reset()");
|
||||
microprefetch(true, null);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5180,7 +5180,14 @@ public abstract class Core extends CoreALU {
|
|||
mpc = resume_prefetch;
|
||||
continue;
|
||||
case 336: /* op_reset */
|
||||
if ((sr & 0x2000) == 0) {
|
||||
elapsed += 6;
|
||||
tvn = 32;
|
||||
mpc = trapill;
|
||||
continue;
|
||||
}
|
||||
elapsed += 126;
|
||||
handle_reset();
|
||||
mpc = resume_prefetch;
|
||||
continue;
|
||||
case 337: /* op_trap */
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ public class InstructionTests extends TestCase {
|
|||
test.executeBinTest("CLR.l");
|
||||
test.executeBinTest("TRAP");
|
||||
test.executeBinTest("TRAPV");
|
||||
test.executeBinTest("RESET");
|
||||
}
|
||||
|
||||
public void testJMP() {
|
||||
|
|
|
|||
BIN
miggy-emu/src/test/resources/miggy/cpupoet/RESET.json.bin
Normal file
BIN
miggy-emu/src/test/resources/miggy/cpupoet/RESET.json.bin
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue