mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-25 18:33:11 +00:00
fixed vcs-mame presets; improved vcs debug info
This commit is contained in:
parent
2e37e22eb8
commit
8693179821
@ -35,15 +35,12 @@ TODO:
|
|||||||
- show self-modifying code insns left of editor
|
- show self-modifying code insns left of editor
|
||||||
- facade/kbd shortcuts for emulators, focus
|
- facade/kbd shortcuts for emulators, focus
|
||||||
- update Javatari version? (and others?)
|
- update Javatari version? (and others?)
|
||||||
- WASM takes too long to load (esp. verilog)
|
|
||||||
(https://developers.google.com/web/updates/2018/04/loading-wasm)
|
|
||||||
- unify versioning
|
- unify versioning
|
||||||
- more UI tests
|
- more UI tests
|
||||||
- base-36 encoding for LZG
|
- base-36 encoding for LZG
|
||||||
- disassembler for uploaded ROMs
|
- disassembler for uploaded ROMs
|
||||||
- show tool-specific (readonly) include files
|
- show tool-specific (readonly) include files
|
||||||
- verilog debugging/reloading makes it slow
|
- verilog debugging/reloading makes it slow
|
||||||
- fix VCS mame
|
|
||||||
- remove FPS and play controls when Verilog scope paused
|
- remove FPS and play controls when Verilog scope paused
|
||||||
- compile stuck when errors unchanged
|
- compile stuck when errors unchanged
|
||||||
- sound mute?
|
- sound mute?
|
||||||
@ -53,7 +50,6 @@ TODO:
|
|||||||
- how to revert included files?
|
- how to revert included files?
|
||||||
- go to error in include files
|
- go to error in include files
|
||||||
- BOM in upload/download?
|
- BOM in upload/download?
|
||||||
- don't mess with localStorage when migrating!
|
|
||||||
|
|
||||||
|
|
||||||
WEB WORKER FORMAT
|
WEB WORKER FORMAT
|
||||||
|
@ -72,7 +72,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
|||||||
<a tabindex="-1" href="#">Platform</a>
|
<a tabindex="-1" href="#">Platform</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="?platform=vcs" id="item_platform_vcs">Atari VCS</a></li>
|
<li><a class="dropdown-item" href="?platform=vcs" id="item_platform_vcs">Atari VCS</a></li>
|
||||||
<li><a class="dropdown-item" href="?platform=vcs-mame" id="item_platform_vcs">Atari VCS (MAME)</a></li>
|
<!--<li><a class="dropdown-item" href="?platform=vcs-mame" id="item_platform_vcs">Atari VCS (MAME)</a></li>-->
|
||||||
<!--<li><a class="dropdown-item" href="?platform=apple2" id="item_platform_apple2">Apple ][</a></li>-->
|
<!--<li><a class="dropdown-item" href="?platform=apple2" id="item_platform_apple2">Apple ][</a></li>-->
|
||||||
<li><a class="dropdown-item" href="?platform=vicdual" id="item_platform_vicdual">VIC Dual</a></li>
|
<li><a class="dropdown-item" href="?platform=vicdual" id="item_platform_vicdual">VIC Dual</a></li>
|
||||||
<li><a class="dropdown-item" href="?platform=mw8080bw" id="item_platform_mw8080bw">Midway 8080</a></li>
|
<li><a class="dropdown-item" href="?platform=mw8080bw" id="item_platform_mw8080bw">Midway 8080</a></li>
|
||||||
|
@ -127,13 +127,12 @@ var VCSPlatform = function() {
|
|||||||
this.getDefaultExtension = function() { return ".a"; };
|
this.getDefaultExtension = function() { return ".a"; };
|
||||||
|
|
||||||
this.getDebugCategories = function() {
|
this.getDebugCategories = function() {
|
||||||
return ['CPU','Memory','PIA','TIA'];
|
return ['CPU','PIA','TIA'];
|
||||||
}
|
}
|
||||||
this.getDebugInfo = function(category, state) {
|
this.getDebugInfo = function(category, state) {
|
||||||
switch (category) {
|
switch (category) {
|
||||||
case 'CPU': return this.cpuStateToLongString(state.c);
|
case 'CPU': return this.cpuStateToLongString(state.c);
|
||||||
case 'Memory': return this.ramStateToLongString(state);
|
case 'PIA': return this.ramStateToLongString(state) + "\n" + this.piaStateToLongString(state.p);
|
||||||
case 'PIA': return this.piaStateToLongString(state.p);
|
|
||||||
case 'TIA': return this.tiaStateToLongString(state.t);
|
case 'TIA': return this.tiaStateToLongString(state.t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -143,24 +142,37 @@ var VCSPlatform = function() {
|
|||||||
this.tiaStateToLongString = function(t) {
|
this.tiaStateToLongString = function(t) {
|
||||||
var pos = this.getRasterPosition();
|
var pos = this.getRasterPosition();
|
||||||
var s = '';
|
var s = '';
|
||||||
s += "H " + pos.x + " V " + pos.y + "\n";
|
s += "H" + lpad(pos.x,5) + " V" + lpad(pos.y,5) + " ";
|
||||||
s += (t.vs?"VSYNC ":"- ") + (t.vb?"VBLANK ":"- ") + "\n";
|
s += (t.vs?"VSYNC ":"- ") + (t.vb?"VBLANK ":"- ") + "\n";
|
||||||
|
s += "\n";
|
||||||
s += "Playfield " + t.f + "\n";
|
s += "Playfield " + t.f + "\n";
|
||||||
// TODO? s += " Color {color:0x" + hex(t.fc) + "} {color:0x" + hex(t.fb) + "}\n";
|
s += " " + (t.fr?"REFLECT ":"- ") + (t.fs?"SCOREMODE ":"- ") + (t.ft?"PRIORITY ":"- ") + "\n";
|
||||||
for (var j=0; j<2; j++) {
|
for (var j=0; j<2; j++) {
|
||||||
var i = "p"+j;
|
var i = "p"+j;
|
||||||
s += "Player"+j+ " " + t[i+'co'] + " " + t[i+'sc'] + " " + t[i+'ss'] + " " + (t[i+'v']?"DELAY":"") + " " + (t[i+'cc']?"CLOSECOPY":"") + " " + (t[i+'mc']?"MEDCOPY":"") + " " + (t[i+'wc']?"WIDECOPY":"") + " " + (t[i+'r']?"REFLECT":"") + "\n";
|
s += "Player"+j+ lpad(tobin(t[i]),11) + lpad(tobin(t[i+'d']),11) + "\n";
|
||||||
s += " " + tobin(t[i]) + " " + tobin(t[i+'d']) + "\n";
|
}
|
||||||
|
s += "\n";
|
||||||
|
// TODO? s += " Color {color:0x" + hex(t.fc) + "} {color:0x" + hex(t.fb) + "}\n";
|
||||||
|
s += " Count Scan Speed\n";
|
||||||
|
for (var j=0; j<2; j++) {
|
||||||
|
var i = "p"+j;
|
||||||
|
s += "Player"+j+ lpad(t[i+'co'],8) + lpad(nonegstr(t[i+'sc']),5) + lpad(t[i+'ss'],6);
|
||||||
|
s += " " + (t[i+'rr']?"RESET":"") + " " + (t[i+'v']?"DELAY":"") + " " + (t[i+'cc']?"CLOSECOPY":"") + " " + (t[i+'mc']?"MEDCOPY":"") + " " + (t[i+'wc']?"WIDECOPY":"") + " " + (t[i+'r']?"REFLECT":"") + "\n";
|
||||||
}
|
}
|
||||||
for (var j=0; j<2; j++) {
|
for (var j=0; j<2; j++) {
|
||||||
var i = "m"+j;
|
var i = "m"+j;
|
||||||
s += "Missile"+j+ " " + t[i+'co'] + " " + t[i+'sc'] + " " + t[i+'ss'] + "\n";
|
s += "Missile"+j+ lpad(t[i+'co'],7) + lpad(nonegstr(t[i+'sc']),5) + lpad(t[i+'ss'],6);
|
||||||
|
s += " " + (t[i+'rr']?"RESET":"") + " " + (t[i+'r']?"RESET2PLAYER":"") + "\n";
|
||||||
}
|
}
|
||||||
s += "Ball " + t['bco'] + " " + t['bsc'] + " " + t['bss'] + "\n";
|
s += "Ball"+ lpad(t['bco'],11) + lpad(nonegstr(t['bsc']),5) + lpad(t['bss'],6) + "\n";
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function nonegstr(n) {
|
||||||
|
return n < 0 ? "-" : n.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/// VCS TIMING ANALYSIS
|
/// VCS TIMING ANALYSIS
|
||||||
|
|
||||||
var pc2minclocks = {};
|
var pc2minclocks = {};
|
||||||
|
@ -170,8 +170,10 @@ export class CodeProject {
|
|||||||
loadNext();
|
loadNext();
|
||||||
} else {
|
} else {
|
||||||
// found on remote fetch?
|
// found on remote fetch?
|
||||||
var webpath = "presets/" + this.platform_id + "/" + path;
|
var preset_id = this.platform_id;
|
||||||
if (this.platform_id == 'vcs' && path.indexOf('.') <= 0)
|
preset_id = preset_id.replace("-mame","");
|
||||||
|
var webpath = "presets/" + preset_id + "/" + path;
|
||||||
|
if (this.platform_id.startsWith('vcs') && path.indexOf('.') <= 0)
|
||||||
webpath += ".a"; // legacy stuff
|
webpath += ".a"; // legacy stuff
|
||||||
this.callbackGetRemote( webpath, (text:string) => {
|
this.callbackGetRemote( webpath, (text:string) => {
|
||||||
console.log("GET",webpath,text.length,'bytes');
|
console.log("GET",webpath,text.length,'bytes');
|
||||||
@ -180,7 +182,7 @@ export class CodeProject {
|
|||||||
loadNext();
|
loadNext();
|
||||||
}, 'text')
|
}, 'text')
|
||||||
.fail( (err:XMLHttpRequest) => {
|
.fail( (err:XMLHttpRequest) => {
|
||||||
console.log("Could not load preset", path, err);
|
console.log("Could not load preset", path, err.status);
|
||||||
// only cache result if status is 404 (not found)
|
// only cache result if status is 404 (not found)
|
||||||
if (err.status && err.status == 404)
|
if (err.status && err.status == 404)
|
||||||
this.filedata[path] = null;
|
this.filedata[path] = null;
|
||||||
|
@ -144,7 +144,7 @@ function refreshWindowList() {
|
|||||||
// add other source files
|
// add other source files
|
||||||
separate = true;
|
separate = true;
|
||||||
current_project.iterateFiles(function(id, text) {
|
current_project.iterateFiles(function(id, text) {
|
||||||
if (id != main_file_id)
|
if (text && id != main_file_id)
|
||||||
addWindowItem(id, getFilenameForPath(id), loadEditor);
|
addWindowItem(id, getFilenameForPath(id), loadEditor);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function lpad(s:string, n:number):string { while(s.length<n) s=" "+s; return s; }
|
function lpad(s:string, n:number):string {
|
||||||
|
s += ''; // convert to string
|
||||||
|
while (s.length<n) s=" "+s;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
function byte2signed(b:number):number {
|
function byte2signed(b:number):number {
|
||||||
b &= 0xff;
|
b &= 0xff;
|
||||||
|
Loading…
Reference in New Issue
Block a user