1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-25 18:33:11 +00:00

fixed symbols in memory views when calling subroutines

This commit is contained in:
Steven Hugg 2020-08-02 10:40:52 -05:00
parent f7b09ab1a0
commit 5fcdde3244
2 changed files with 25 additions and 8 deletions

View File

@ -197,7 +197,6 @@ TODO:
- Debug Browser - Debug Browser
- more stuff like 7800 display lists - more stuff like 7800 display lists
- don't include start/end line on platforms w/o raster timing - don't include start/end line on platforms w/o raster timing
- memory map shows subroutine symbol even after RTS
- BIOS symbols - BIOS symbols
- show current tool for file - show current tool for file

View File

@ -1003,8 +1003,8 @@ abstract class ProbeViewBaseBase {
case ProbeFlags.VRAM_WRITE: s = "VRAM Write"; break; case ProbeFlags.VRAM_WRITE: s = "VRAM Write"; break;
case ProbeFlags.INTERRUPT: s = "Interrupt"; break; case ProbeFlags.INTERRUPT: s = "Interrupt"; break;
case ProbeFlags.ILLEGAL: s = "Error"; break; case ProbeFlags.ILLEGAL: s = "Error"; break;
case ProbeFlags.SP_PUSH: s = "Stack Dec"; break; case ProbeFlags.SP_PUSH: s = "Stack Push"; break;
case ProbeFlags.SP_POP: s = "Stack Inc"; break; case ProbeFlags.SP_POP: s = "Stack Pop"; break;
default: return ""; default: return "";
} }
if (typeof addr == 'number') s += " " + this.addr2str(addr); if (typeof addr == 'number') s += " " + this.addr2str(addr);
@ -1104,10 +1104,19 @@ abstract class ProbeBitmapViewBase extends ProbeViewBase {
y = y|0; y = y|0;
var s = ""; var s = "";
var lastroutine = null; var lastroutine = null;
var symstack = [];
var lastcol = -1; var lastcol = -1;
this.redraw( (op,addr,col,row,clk,value) => { this.redraw( (op,addr,col,row,clk,value) => {
if (op == ProbeFlags.EXECUTE) { switch (op) {
lastroutine = this.addr2symbol(addr) || lastroutine; case ProbeFlags.EXECUTE:
lastroutine = this.addr2symbol(addr) || lastroutine;
break;
case ProbeFlags.SP_PUSH:
symstack.push(lastroutine);
break;
case ProbeFlags.SP_POP:
lastroutine = symstack.pop();
break;
} }
if (row == y && col <= x) { if (row == y && col <= x) {
if (col != lastcol) { if (col != lastcol) {
@ -1165,10 +1174,19 @@ export class AddressHeatMapView extends ProbeBitmapViewBase implements ProjectVi
var pc = -1; var pc = -1;
var already = {}; var already = {};
var lastroutine = null; var lastroutine = null;
var symstack = [];
this.redraw( (op,addr,col,row,clk,value) => { this.redraw( (op,addr,col,row,clk,value) => {
if (op == ProbeFlags.EXECUTE) { switch (op) {
pc = addr; case ProbeFlags.EXECUTE:
lastroutine = this.addr2symbol(addr) || lastroutine; pc = addr;
lastroutine = this.addr2symbol(addr) || lastroutine;
break;
case ProbeFlags.SP_PUSH:
symstack.push(lastroutine);
break;
case ProbeFlags.SP_POP:
lastroutine = symstack.pop();
break;
} }
var key = op|pc; var key = op|pc;
if (addr == a && !already[key]) { if (addr == a && !already[key]) {