Remove the sound chip; Ctrl-Alt-Del opens the monitor
The sound chip (rtl/sound.v, ports 90h-9Dh, the PmodAMP2 on JA) is removed: its ports now read FFh like any unused port, the JA pins are free, and the manual, README, example and tests no longer mention it. No game used it. Ctrl-Alt-Del raises the monitor's NMI (STOPPED BY CTRL-ALT-DEL) instead of resetting; pressed in the monitor, again within 2 s, or while an NMI is still pending it restarts the computer. The monitor gains RESET (port 62), and BASIC returns to the main screen at start-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
addf0157fc
commit
305c608bb5
19 files changed
+1707
-2021
No files matched your search
Binary file not shown.
+9
-4
@@ -642,10 +642,9 @@ static void draw_fregs(void)
|
||||
if (!u.fs) { if (r == 0) s_str(" THE FPU IS OFF (MSTATUS.FS = 0)"); }
|
||||
else for (i = 0; i < 6; i++) {
|
||||
u8 k = r * 6 + i;
|
||||
char n[4];
|
||||
char n[6], *o = lp;
|
||||
if (k < 32) {
|
||||
n[0] = 'F'; n[1] = k < 10 ? '0' + k : '0' + k / 10;
|
||||
n[2] = k < 10 ? 0 : '0' + k % 10; n[3] = 0;
|
||||
lp = n; s_freg(k); *lp = 0; lp = o; /* FT0 ... by ABI name */
|
||||
s_rv(n, u.f[k]);
|
||||
} else if (k == 32) s_rv("FCSR", u.fcsr);
|
||||
}
|
||||
@@ -697,6 +696,7 @@ static const char *why_text(void)
|
||||
case 3: return "STEP";
|
||||
case 4: return "BREAKPOINT";
|
||||
case 5: return "STEP OVER";
|
||||
case 6: return "CTRL-ALT-DEL";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
@@ -1272,6 +1272,11 @@ static u8 command(void)
|
||||
skip_sp();
|
||||
msg = 0; msg_err = 0;
|
||||
if (*cp == ':') { hex_record(); return 0; }
|
||||
if (!memcmp(cp, "RESET", 5)) { /* restart the computer, as BTND does */
|
||||
puts_("\033[?47l");
|
||||
IO8(0x62) = 0;
|
||||
for (;;);
|
||||
}
|
||||
if (!memcmp(cp, "ASM", 3)) {
|
||||
cp += 3;
|
||||
if (setjmp(fs_jmp)) { msg = fs_msg; msg_err = 1; return 0; }
|
||||
@@ -1352,7 +1357,7 @@ static u8 command(void)
|
||||
msg = "M TO SHOW MEMORY AGAIN";
|
||||
return 0;
|
||||
case 'R':
|
||||
if (!set_reg()) { msg = "R PC|X1-X31|RA|SP|A0...|F0-F31|FCSR = VALUE"; msg_err = 1; return 0; }
|
||||
if (!set_reg()) { msg = "R REG=HEX: PC A0 X10 FA0 F10 FCSR ..."; msg_err = 1; return 0; }
|
||||
draw_regs(); draw_dis(); draw_stack(); draw_mem();
|
||||
return 0;
|
||||
case '?':
|
||||
|
||||
+1187
-1187
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user