mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-06-08 23:29:42 +00:00
7800: tweaks to debug info
This commit is contained in:
parent
d4b8473b86
commit
b131d29663
|
@ -676,6 +676,7 @@ export class Atari7800 extends BasicMachine implements RasterFrameBased {
|
||||||
let dlhi = dlstart & 0xff00;
|
let dlhi = dlstart & 0xff00;
|
||||||
let dlofs = dlstart & 0xff;
|
let dlofs = dlstart & 0xff;
|
||||||
do {
|
do {
|
||||||
|
const ctrlreg = this.maria.regs[0x1c];
|
||||||
// read DL entry
|
// read DL entry
|
||||||
let b0 = this.readConst(dlhi + ((dlofs+0) & 0x1ff));
|
let b0 = this.readConst(dlhi + ((dlofs+0) & 0x1ff));
|
||||||
let b1 = this.readConst(dlhi + ((dlofs+1) & 0x1ff));
|
let b1 = this.readConst(dlhi + ((dlofs+1) & 0x1ff));
|
||||||
|
@ -686,30 +687,25 @@ export class Atari7800 extends BasicMachine implements RasterFrameBased {
|
||||||
// extended header?
|
// extended header?
|
||||||
let indirect = false;
|
let indirect = false;
|
||||||
let description = "";
|
let description = "";
|
||||||
|
const grmode = (ctrlreg & 0x3) + ((b1 & 0x80) ? 4 : 0);
|
||||||
if ((b1 & 31) == 0) {
|
if ((b1 & 31) == 0) {
|
||||||
var pal = b3 >> 5;
|
var pal = b3 >> 5;
|
||||||
var width = 32 - (b3 & 31);
|
var width = 32 - (b3 & 31);
|
||||||
var xpos = this.readConst(dlhi + ((dlofs+4) & 0x1ff));
|
var xpos = this.readConst(dlhi + ((dlofs+4) & 0x1ff));
|
||||||
var writemode = b1 & 0x80;
|
|
||||||
indirect = (b1 & 0x20) != 0;
|
indirect = (b1 & 0x20) != 0;
|
||||||
dlofs += 5;
|
dlofs += 5;
|
||||||
description += "X=" + xpos + " W=" + width + " P=" + pal + " " + (writemode?"WRITE":"");
|
|
||||||
} else {
|
} else {
|
||||||
// direct mode
|
// direct mode
|
||||||
var xpos = b3;
|
var xpos = b3;
|
||||||
var pal = b1 >> 5;
|
var pal = b1 >> 5;
|
||||||
var width = 32 - (b1 & 31);
|
var width = 32 - (b1 & 31);
|
||||||
var writemode = 0;
|
|
||||||
dlofs += 4;
|
dlofs += 4;
|
||||||
description += "X=" + xpos + " W=" + width + " P=" + pal;
|
|
||||||
}
|
}
|
||||||
let gfxadr = b0 + (((b2 + (indirect?0:this.maria.offset)) & 0xff) << 8);
|
description += "X=" + xpos + " W=" + width + " P=" + pal;
|
||||||
let readmode = (this.maria.regs[0x1c] & 0x3) + (writemode?4:0);
|
|
||||||
let dbl = indirect && (this.maria.regs[0x1c] & 0x10) != 0;
|
|
||||||
if (readmode) description += " READMODE=" + readmode;
|
|
||||||
if (dbl) description += " DBL";
|
|
||||||
if (indirect) description += " CHR=$" + hex((this.maria.regs[0x14] + this.maria.offset) & 0xff) + "xx";
|
if (indirect) description += " CHR=$" + hex((this.maria.regs[0x14] + this.maria.offset) & 0xff) + "xx";
|
||||||
|
let gfxadr = b0 + (((b2 + (indirect?0:this.maria.offset)) & 0xff) << 8);
|
||||||
description = " $" + hex(gfxadr,4) + " " + description;
|
description = " $" + hex(gfxadr,4) + " " + description;
|
||||||
|
description = ["160A","?","320D","320A","160B","?","320B","320C"][grmode] + ' ' + description;
|
||||||
display_list.push(description);
|
display_list.push(description);
|
||||||
} while (dlofs < 0x200);
|
} while (dlofs < 0x200);
|
||||||
return display_list;
|
return display_list;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user