Skip to content

Commit

Permalink
savestate_editor_provider: fix error on close
Browse files Browse the repository at this point in the history
profiler: blitter-tooltip: show BLT*DAT if DMA for channel is disabled but is used in minterm
`BPL1MOD`, `BPL2MOD` as decimals
  • Loading branch information
BartmanAbyss committed Aug 20, 2022
1 parent 672cf38 commit ec4d07a
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 75 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ All notable changes to the "amiga-debug" extension will be documented in this fi
- FIX: assembly: handle 0-cycle trace instructions
- FIX: kickstart symbols now include mathieeesingbas.library
- NEW: disassembler: support FPU (68881/68882/68040/68060)
- NEW: profiler: blitter-tooltip: show BLT*DAT if DMA for channel is disabled but is used in minterm
- CHG: `BPL1MOD`, `BPL2MOD` as decimals

## 1.5.2
- FIX: copper: don't crash when hovering over `NO-OP` instruction
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,11 @@ diff -ruN gcc-12.1.0 gcc-12.1.0-barto > gcc-barto.patch
### Gfx Debugger
* multiframe profiler, copperlist and copper-timings seem off
* blitter doesn't get pointers if not explicitly written by CPU (e.g. reusing pointers after blit)
* TODO: show blitter cycle duration (not only start, end cycle), show minterm
* TODO: show source blitter-rects
* TODO: show 2 resources
* TODO: tooltips for blitter-rects?
* Multi-frame: Resource from Copper: memory not ok?
* Denise: TODO: glitches, blitrects, overdraw, ECS/AGA scrolling, AGA sprites
* Denise: turrican2-level1.uss: sprites 2 pixels too far left
* Denise: turrican2-intro.uss: sprite 3 (star on logo) is black, sprite 7 (star on logo) wrong colors
* Denise: `turrican2-level1.uss`: sprites 2 pixels too far left
* Denise: `turrican2-intro.uss`: sprite 3 (star on logo) is black, sprite 7 (star on logo) wrong colors
* Denise: get overscan values from https://github.com/tonioni/WinUAE/blob/master/debug.cpp
5 changes: 3 additions & 2 deletions src/client/customRegisters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,13 @@ export class CustomRegisters {
// from 68k-dis.ts; make signed
const COERCE16 = (x: number) => (x ^ 0x8000) - 0x8000;
export const FormatCustomRegData = (regName: string, dat: number) => {
let prefix = ' ';
if(regName.match(/BPL.MOD/)) {
let prefix = ' ';
if(dat & 0x8000) {
prefix = '-';
dat = Math.abs(COERCE16(dat));
}
return prefix + dat.toString(10);
}
return prefix + '$' + dat.toString(16).padStart(4, '0');
return ' $' + dat.toString(16).padStart(4, '0');
};
15 changes: 9 additions & 6 deletions src/client/debugger/resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,18 @@ export const Screen: FunctionComponent<{
// get top-left corner of blit
const [x, y] = (() => {
for (let p = 0; p < screen.planes.length; p++) {
const plane = screen.planes[p];
let plane = screen.planes[p];
const screenLineSize = screen.width / 8 + screen.modulos[p & 1];
if (dest >= plane && dest < plane + screen.height * screenLineSize) {
const y = Math.floor((dest - plane) / screenLineSize);
const x = Math.floor((dest - plane) % screenLineSize) * 8;
return [x, y];
for(let yy = 0; yy < screen.height; yy++) {
// hmm.. this code is not detecting bits that start outside our screen but then intersect the screen
if (dest >= plane && dest < plane + screen.width / 8) {
const x = (dest - plane) * 8;
return [x, yy];
}
plane += screenLineSize;
}
return [-1, -1];
}
return [-1, -1];
})();
if (x === -1 || y === -1)
continue;
Expand Down
56 changes: 33 additions & 23 deletions src/client/dma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export interface Blit {
BLTAFWM: number;
BLTALWM: number;
BLTxPT: number[]; // A-D
BLTxDAT: number[]; // A-D
BLTxMOD: number[]; // A-D
}

Expand All @@ -241,27 +242,33 @@ export enum ChipsetFlags {

// blits are sorted
export function GetBlits(customRegs: Uint16Array, dmaRecords: DmaRecord[]): Blit[] {
const customReg = (reg: number) => customRegs[(reg - 0xdff000) >>> 1];
const customRegL = (reg: number) => (customRegs[(reg - 0xdff000) >>> 1] << 16) | customRegs[(reg + 2 - 0xdff000) >>> 1];
const customReg = (reg: number) => customRegs[reg >>> 1];
const customRegL = (reg: number) => (customRegs[reg >>> 1] << 16) | customRegs[(reg + 2) >>> 1];
const regBLTxPT = [
CustomRegisters.getCustomAddress("BLTAPT"),
CustomRegisters.getCustomAddress("BLTBPT"),
CustomRegisters.getCustomAddress("BLTCPT"),
CustomRegisters.getCustomAddress("BLTDPT")
CustomRegisters.getCustomAddress("BLTAPT") - 0xdff000,
CustomRegisters.getCustomAddress("BLTBPT") - 0xdff000,
CustomRegisters.getCustomAddress("BLTCPT") - 0xdff000,
CustomRegisters.getCustomAddress("BLTDPT") - 0xdff000
];
const regBLTxDAT = [
CustomRegisters.getCustomAddress("BLTADAT") - 0xdff000,
CustomRegisters.getCustomAddress("BLTBDAT") - 0xdff000,
CustomRegisters.getCustomAddress("BLTCDAT") - 0xdff000,
CustomRegisters.getCustomAddress("BLTDDAT") - 0xdff000
];
const regBLTxMOD = [
CustomRegisters.getCustomAddress("BLTAMOD"),
CustomRegisters.getCustomAddress("BLTBMOD"),
CustomRegisters.getCustomAddress("BLTCMOD"),
CustomRegisters.getCustomAddress("BLTDMOD")
CustomRegisters.getCustomAddress("BLTAMOD") - 0xdff000,
CustomRegisters.getCustomAddress("BLTBMOD") - 0xdff000,
CustomRegisters.getCustomAddress("BLTCMOD") - 0xdff000,
CustomRegisters.getCustomAddress("BLTDMOD") - 0xdff000
];
const regBLTCON0 = CustomRegisters.getCustomAddress("BLTCON0");
const regBLTCON1 = CustomRegisters.getCustomAddress("BLTCON1");
const regBLTAFWM = CustomRegisters.getCustomAddress("BLTAFWM");
const regBLTALWM = CustomRegisters.getCustomAddress("BLTALWM");
const regBLTSIZE = CustomRegisters.getCustomAddress("BLTSIZE");
const regBLTSIZV = CustomRegisters.getCustomAddress("BLTSIZV");
const regBLTSIZH = CustomRegisters.getCustomAddress("BLTSIZH");
const regBLTCON0 = CustomRegisters.getCustomAddress("BLTCON0") - 0xdff000;
const regBLTCON1 = CustomRegisters.getCustomAddress("BLTCON1") - 0xdff000;
const regBLTAFWM = CustomRegisters.getCustomAddress("BLTAFWM") - 0xdff000;
const regBLTALWM = CustomRegisters.getCustomAddress("BLTALWM") - 0xdff000;
const regBLTSIZE = CustomRegisters.getCustomAddress("BLTSIZE") - 0xdff000;
const regBLTSIZV = CustomRegisters.getCustomAddress("BLTSIZV") - 0xdff000;
const regBLTSIZH = CustomRegisters.getCustomAddress("BLTSIZH") - 0xdff000;
let BlitTrace = "";

const blits: Blit[] = [];
Expand All @@ -273,19 +280,19 @@ export function GetBlits(customRegs: Uint16Array, dmaRecords: DmaRecord[]): Blit
if((dmaRecord.reg !== undefined && dmaRecord.reg < 0x200) || (dmaRecord.addr !== undefined && dmaRecord.addr >= 0xdff000 && dmaRecord.addr < 0xdff200)) {
const reg = (dmaRecord.reg !== undefined && dmaRecord.reg < 0x200) ? dmaRecord.reg : (dmaRecord.addr - 0xdff000);
customRegs[reg >>> 1] = dmaRecord.dat;
const isBlitStart = (reg === regBLTSIZE - 0xdff000) || (reg === regBLTSIZH - 0xdff000);
const isBlitStart = (reg === regBLTSIZE) || (reg === regBLTSIZH);
if(isBlitStart) {
let BLTSIZH = 0;
let BLTSIZV = 0;
if(reg === regBLTSIZE - 0xdff000) { // OCS
if(reg === regBLTSIZE) { // OCS
BLTSIZH = dmaRecord.dat & 0x3f;
BLTSIZV = (dmaRecord.dat >>> 6) & 0x3ff;
if(BLTSIZH === 0)
BLTSIZH = 64;
if(BLTSIZV === 0)
BLTSIZV = 1024;
}
if(reg === regBLTSIZH - 0xdff000) { // ECS
if(reg === regBLTSIZH) { // ECS
BLTSIZH = dmaRecord.dat & 0x7ff;
BLTSIZV = customReg(regBLTSIZV) & 0x7fff;
if(BLTSIZH === 0)
Expand All @@ -298,12 +305,14 @@ export function GetBlits(customRegs: Uint16Array, dmaRecords: DmaRecord[]): Blit
const BLTAFWM = customReg(regBLTAFWM);
const BLTALWM = customReg(regBLTALWM);
const BLTxPT = [];
const BLTxDAT = [];
const BLTxMOD = [];
let channels = '';
const addresses: string[] = [];
for(let channel = 0; channel < 4; channel++) {
const adr = customRegL(regBLTxPT[channel]) & 0x1ffffe; // ECS=0x1ffffe, OCS=0x7fffe;
BLTxPT.push(adr);
BLTxDAT.push(customReg(regBLTxDAT[channel]));
BLTxMOD.push(COERCE16(customReg(regBLTxMOD[channel])));
if(BLTCON0 & (1 << (11 - channel))) {
channels += 'ABCD'[channel];
Expand All @@ -324,6 +333,7 @@ export function GetBlits(customRegs: Uint16Array, dmaRecords: DmaRecord[]): Blit
BLTAFWM,
BLTALWM,
BLTxPT,
BLTxDAT,
BLTxMOD
});
BlitTrace += `Line ${y.toString().padStart(3, ' ')} Cycle ${x.toString().padStart(3, ' ')}: BLTSIZE = ${(BLTSIZH * 16).toString().padStart(4, ' ')}x${BLTSIZV.toString().padStart(4, ' ')}; ${channels} ${addresses.join(' ')}\n`;
Expand All @@ -346,8 +356,8 @@ export function GetBlits(customRegs: Uint16Array, dmaRecords: DmaRecord[]): Blit
}

export function GetBlitCycles(dmaRecords: DmaRecord[]): number {
const regBLTSIZE = CustomRegisters.getCustomAddress("BLTSIZE");
const regBLTSIZH = CustomRegisters.getCustomAddress("BLTSIZH");
const regBLTSIZE = CustomRegisters.getCustomAddress("BLTSIZE") - 0xdff000;
const regBLTSIZH = CustomRegisters.getCustomAddress("BLTSIZH") - 0xdff000;

let cycles = 0;
let i = 0;
Expand All @@ -356,7 +366,7 @@ export function GetBlitCycles(dmaRecords: DmaRecord[]): number {
for(let x = 0; x < NR_DMA_REC_HPOS; x++, i++) {
const dmaRecord = dmaRecords[y * NR_DMA_REC_HPOS + x];
const reg = (dmaRecord.reg !== undefined && dmaRecord.reg < 0x200) ? dmaRecord.reg : (dmaRecord.addr - 0xdff000);
const isBlitStart = (reg === regBLTSIZE - 0xdff000) || (reg === regBLTSIZH - 0xdff000);
const isBlitStart = reg === regBLTSIZE || reg === regBLTSIZH;
if(isBlitStart) {
lastStart = i;
}
Expand Down
99 changes: 59 additions & 40 deletions src/client/flame/flame-graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { createPortal } from 'preact/compat';
import { StateUpdater, useCallback, useEffect, useMemo, useRef, useState } from 'preact/hooks';
import { binarySearch } from '../array';
import { dataName, DisplayUnit, formatValue, getLocationText, scaleValue } from '../display';
import { dmaTypes, DmaEvents, NR_DMA_REC_HPOS, NR_DMA_REC_VPOS, GetScreenFromBlit, DmaTypes, Blit, GetPaletteFromCustomRegs, SymbolizeAddress, DmaCyclesToCpuCycles } from '../dma';
import { dmaTypes, DmaEvents, NR_DMA_REC_HPOS, NR_DMA_REC_VPOS, GetScreenFromBlit, DmaTypes, Blit, GetPaletteFromCustomRegs, SymbolizeAddress, DmaCyclesToCpuCycles, BlitterChannel } from '../dma';
import { compileFilter, IRichFilter } from '../filter';
import { MiddleOut } from '../middleOutCompression';
import Markdown from 'markdown-to-jsx';
Expand Down Expand Up @@ -1115,48 +1115,63 @@ const Tooltip: FunctionComponent<{

const BLTCON: Bit[] = [];
const MINTERM: Bit[] = [];
const BLTDAT: boolean[] = [false, false, false, false];
if(isBlit) {
BLTCON.push({ name: "USEA", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USEA) });
BLTCON.push({ name: "USEB", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USEB) });
BLTCON.push({ name: "USEC", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USEC) });
BLTCON.push({ name: "USED", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USED) });
BLTCON.push({ name: "DOFF", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.DOFF) });
BLTCON.push({ name: "EFE", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.EFE) });
BLTCON.push({ name: "IFE", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.IFE) });
BLTCON.push({ name: "FCI", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.FCI) });
BLTCON.push({ name: "DESC", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.DESC) });
BLTCON.push({ name: "LINE", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.LINE) });
MINTERM.push({ name: "ABC", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF7) });
MINTERM.push({ name: "ABC\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF6) });
MINTERM.push({ name: "AB\u0304C", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF5) });
MINTERM.push({ name: "AB\u0304C\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF4) });
MINTERM.push({ name: "A\u0304BC", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF3) });
MINTERM.push({ name: "A\u0304BC\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF2) });
MINTERM.push({ name: "A\u0304B\u0304C", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF1) });
MINTERM.push({ name: "A\u0304B\u0304C\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF0) });
BLTCON.push({ name: "USEA", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USEA) });
BLTCON.push({ name: "USEB", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USEB) });
BLTCON.push({ name: "USEC", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USEC) });
BLTCON.push({ name: "USED", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.USED) });
BLTCON.push({ name: "DOFF", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.DOFF) });
BLTCON.push({ name: "EFE", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.EFE) });
BLTCON.push({ name: "IFE", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.IFE) });
BLTCON.push({ name: "FCI", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.FCI) });
BLTCON.push({ name: "DESC", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.DESC) });
BLTCON.push({ name: "LINE", enabled: !!(amiga.blit.BLTCON1 & BLTCON1Flags.LINE) });
MINTERM.push({ name: "ABC", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF7) }); // A B C
MINTERM.push({ name: "ABC\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF6) }); // A B ~C
MINTERM.push({ name: "AB\u0304C", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF5) }); // A ~B C
MINTERM.push({ name: "AB\u0304C\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF4) }); // A ~B ~C
MINTERM.push({ name: "A\u0304BC", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF3) }); // ~A B C
MINTERM.push({ name: "A\u0304BC\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF2) }); // ~A B ~C
MINTERM.push({ name: "A\u0304B\u0304C", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF1) }); // ~A ~B C
MINTERM.push({ name: "A\u0304B\u0304C\u0304", enabled: !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF0) }); // ~A ~B ~C

if(!(amiga.blit.BLTCON0 & BLTCON0Flags.USEA) && (
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF7) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF3) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF6) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF2) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF5) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF1) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF4) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF0)))
BLTDAT[BlitterChannel.A] = true;

if(!(amiga.blit.BLTCON0 & BLTCON0Flags.USEB) && (
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF7) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF5) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF6) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF4) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF3) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF1) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF2) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF0)))
BLTDAT[BlitterChannel.B] = true;

if(!(amiga.blit.BLTCON0 & BLTCON0Flags.USEC) && (
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF7) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF6) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF5) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF4) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF3) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF2) ||
!!(amiga.blit.BLTCON0 & BLTCON0Flags.LF1) !== !!(amiga.blit.BLTCON0 & BLTCON0Flags.LF0)))
BLTDAT[BlitterChannel.C] = true;
}

const file = label?.split(/\\|\//g).pop();
const tooltipLeft = clamp(10, canvasRect.left + canvasRect.width * left + 10, canvasRect.right - 600);
const tooltipTop = canvasRect.top + lowerY + 10;
const tooltipWidth = 500;
return (<>
<div
className={styles.tooltip}
aria-live="polite"
aria-atomic={true}
style={{ left: tooltipLeft, top: tooltipTop, bottom: 'initial', width: tooltipWidth + 'px' }}
>
<div class={styles.tooltip} aria-live="polite" aria-atomic={true} style={{ left: tooltipLeft, top: tooltipTop, bottom: 'initial', width: `${tooltipWidth}px` }}>
<dl>
{isDma && (<>
<dt>DMA Request</dt>
<dd className={styles.function}>{location.callFrame.functionName}</dd>
{amiga.dmaRecord.addr !== undefined && amiga.dmaRecord.addr !== 0xffffffff && (
<>
<dt className={styles.time}>Address</dt>
<dd className={styles.time}>{SymbolizeAddress(amiga.dmaRecord.addr & 0x00ffffff, MODELS[frame].amiga)}</dd>
</>
)}
{amiga.dmaRecord.addr !== undefined && amiga.dmaRecord.addr !== 0xffffffff && (<>
<dt className={styles.time}>Address</dt>
<dd className={styles.time}>{SymbolizeAddress(amiga.dmaRecord.addr & 0x00ffffff, MODELS[frame].amiga)}</dd>
</>)}
{dmaReg && (<>
<dt className={styles.time}>Register</dt>
<dd className={styles.time}>{dmaReg}</dd>
Expand Down Expand Up @@ -1186,16 +1201,20 @@ const Tooltip: FunctionComponent<{
<dd className={styles.time}>{BLTCON.map((d) => (<div class={d.enabled ? styles.biton : styles.bitoff}>{d.name}</div>))}</dd>
<dt className={styles.time}>Minterm</dt>
<dd className={styles.time}>${(amiga.blit.BLTCON0 & 0xff).toString(16).padStart(2, '0')} {MINTERM.map((d) => (<div class={d.enabled ? styles.biton : styles.bitoff}>{d.name}</div>))}</dd>
{[0, 1, 2, 3].filter((channel) => amiga.blit.BLTCON0 & (1 << (11 - channel))).map((channel) => (<>
{[0, 1, 2, 3].filter((channel) => amiga.blit.BLTCON0 & (1 << (11 - channel)) || BLTDAT[channel]).map((channel) => (<>
<dt className={styles.time}>{['Source A', 'Source B', 'Source C', 'Destination'][channel]}</dt>
<dd className={styles.time}>{SymbolizeAddress(amiga.blit.BLTxPT[channel], MODELS[frame].amiga)}
{channel === 0 && (<><span class={styles.eh}>Shift</span> {(amiga.blit.BLTCON0 >>> 12).toString()}</>)}
{channel === 1 && (<><span class={styles.eh}>Shift</span> {(amiga.blit.BLTCON1 >>> 12).toString()}</>)}
<span class={styles.eh}>Modulo</span> {amiga.blit.BLTxMOD[channel]}</dd>
{channel === 0 && (<>
<dt className={styles.time}>Masks</dt>
<dd><b>FWM</b> %{amiga.blit.BLTAFWM.toString(2).padStart(16, '0')} <span class={styles.eh}>LWM</span> %{amiga.blit.BLTALWM.toString(2).padStart(16, '0')}</dd>
</>)}
{BLTDAT[channel] ? <>
<dd className={styles.time}>%{amiga.blit.BLTxDAT[channel].toString(2).padStart(16, '0')}</dd>
</> : <>
<dd className={styles.time}>{SymbolizeAddress(amiga.blit.BLTxPT[channel], MODELS[frame].amiga)}
{channel === 0 && (<><span class={styles.eh}>Shift</span> {(amiga.blit.BLTCON0 >>> 12).toString()}</>)}
{channel === 1 && (<><span class={styles.eh}>Shift</span> {(amiga.blit.BLTCON1 >>> 12).toString()}</>)}
<span class={styles.eh}>Modulo</span> {amiga.blit.BLTxMOD[channel]}</dd>
{channel === 0 && (<>
<dt className={styles.time}>Masks</dt>
<dd><b>FWM</b> %{amiga.blit.BLTAFWM.toString(2).padStart(16, '0')} <span class={styles.eh}>LWM</span> %{amiga.blit.BLTALWM.toString(2).padStart(16, '0')}</dd>
</>)}
</>}
</>))}
<dt className={styles.time}>Start</dt>
<dd className={styles.time}>Line {amiga.blit.vposStart}, Color Clock {amiga.blit.hposStart}, DMA Cycle {amiga.blit.cycleStart}</dd>
Expand Down
3 changes: 2 additions & 1 deletion src/savestate_editor_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ export class SavestateEditorProvider implements vscode.CustomReadonlyEditorProvi
};
this.updateWebview(document, webviewPanel.webview);

const setStatus = (status: string) => { void webviewPanel.webview.postMessage({ type: 'status', status }); };
webviewPanel.onDidDispose(() => { webviewPanel = undefined; });
const setStatus = (status: string) => { void webviewPanel?.webview.postMessage({ type: 'status', status }); };

webviewPanel.webview.onDidReceiveMessage((message) => {
switch(message.type) {
Expand Down

0 comments on commit ec4d07a

Please sign in to comment.