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

vcs: added code/data segments for memory view

This commit is contained in:
Steven Hugg 2018-12-05 14:05:10 -05:00
parent 57c4b63701
commit efbc6dbe34
4 changed files with 7 additions and 6 deletions

View File

@ -84,7 +84,6 @@ TODO:
- resize memory browser when split resize (any div resize) - resize memory browser when split resize (any div resize)
- preroll the emulator so optimizer does its thing before loading rom - preroll the emulator so optimizer does its thing before loading rom
- wasm dynamic linking of emulators (https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md) - wasm dynamic linking of emulators (https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md)
- z80 HALT works?
WEB WORKER FORMAT WEB WORKER FORMAT

View File

@ -9,8 +9,6 @@ declare var jt, Javatari, Z80_fast, CPU6809;
export var PLATFORMS = {}; export var PLATFORMS = {};
export var frameUpdateFunction : (Canvas) => void = null;
var _random_state = 1; var _random_state = 1;
export function noise() { export function noise() {
@ -121,7 +119,6 @@ export class RasterVideo {
this.ctx.putImageData(this.imageData, sx, sy, dx, dy, w, h); this.ctx.putImageData(this.imageData, sx, sy, dx, dy, w, h);
else else
this.ctx.putImageData(this.imageData, 0, 0); this.ctx.putImageData(this.imageData, 0, 0);
if (frameUpdateFunction) frameUpdateFunction(this.canvas);
} }
setupMouseEvents(el? : HTMLElement) { setupMouseEvents(el? : HTMLElement) {
@ -160,7 +157,6 @@ export class VectorVideo extends RasterVideo {
ctx.fillRect(0, 0, this.width, this.height); ctx.fillRect(0, 0, this.width, this.height);
ctx.globalAlpha = 1.0; ctx.globalAlpha = 1.0;
ctx.globalCompositeOperation = 'lighter'; ctx.globalCompositeOperation = 'lighter';
if (frameUpdateFunction) frameUpdateFunction(this.canvas);
} }
COLORS = [ COLORS = [

View File

@ -698,7 +698,7 @@ export class MemoryView implements ProjectView {
else else
return 'data'; return 'data';
} }
else if (a >= compparams.code_start && a < compparams.code_start+compparams.code_size) else if (a >= compparams.code_start && a < compparams.code_start+(compparams.code_size||compparams.rom_size))
return 'code'; return 'code';
else else
return 'unknown'; return 'unknown';

View File

@ -38,6 +38,12 @@ function moduleInstFn(module_id:string) {
} }
var PLATFORM_PARAMS = { var PLATFORM_PARAMS = {
'vcs': {
code_start: 0x1000,
code_size: 0xf000,
data_start: 0x80,
data_size: 0x80,
},
'mw8080bw': { 'mw8080bw': {
code_start: 0x0, code_start: 0x0,
rom_size: 0x2000, rom_size: 0x2000,