added jsnes to submodules, removed min.js files

This commit is contained in:
Steven Hugg 2019-04-03 16:40:16 -04:00
parent 102559cb06
commit 1b932c2538
9 changed files with 30 additions and 8 deletions

3
.gitmodules vendored
View File

@ -25,3 +25,6 @@
[submodule "tools/fonts/ibmfonts"]
path = tools/fonts/ibmfonts
url = https://github.com/farsil/ibmfonts
[submodule "jsnes"]
path = jsnes
url = https://github.com/sehugg/jsnes

View File

@ -109,6 +109,8 @@ TODO:
- throw errors when bad/no refs
- capture so we get mouseUp() out of frame
- per-View keyboard shortcuts
- crt0.s compiled each time?
- debug highlight doesn't go away when debugging -> running
WEB WORKER FORMAT

View File

@ -328,7 +328,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
<script src="javatari.js/temp/javatari.part.concat.js"></script>
-->
<script src="src/cpu/z80fast.js"></script>
<script src="jsnes/jsnes.min.js"></script>
<script src="jsnes/dist/jsnes.min.js"></script>
<script src="src/cpu/6809.js"></script>
<!--<script src="jsnes/lib/dynamicaudio-min.js" type="text/javascript" charset="utf-8"></script>-->
<script src="FileSaver.js/FileSaver.min.js"></script>

1
jsnes Submodule

@ -0,0 +1 @@
Subproject commit 94d4a03bc4ac0fb12824d90327b01cf23d91af2e

2
jsnes/jsnes.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -292,11 +292,12 @@ const _JSNESPlatform = function(mainElement) {
}
getDebugCategories() {
return super.getDebugCategories().concat(['PPU']);
return super.getDebugCategories().concat(['PPU', 'Mapper']);
}
getDebugInfo(category, state) {
switch (category) {
case 'PPU': return this.ppuStateToLongString(state.ppu, state.b);
case 'Mapper': return this.mapperStateToLongString(state.mmap, state.b);
default: return super.getDebugInfo(category, state);
}
}
@ -358,6 +359,18 @@ const _JSNESPlatform = function(mainElement) {
*/
return s;
}
mapperStateToLongString(mmap, mem) {
//console.log(mmap, mem);
var s = "";
s += "\nIRQ Counter: " + mmap.irqCounter;
s += "\n IRQ Latch: " + mmap.irqLatchValue;
s += "\n IRQ Reload: " + mmap.irqReload;
s += "\n IRQ Enable: " + mmap.irqEnable;
s += "\n PRG Select: " + mmap.prgAddressSelect;
s += "\n CHR Select: " + mmap.chrAddressSelect;
s += "\n";
return s;
}
}
return new JSNESPlatform();
}

View File

@ -732,11 +732,15 @@ function checkRunReady() {
return true;
}
function uiDebugCallback(state) {
lastDebugState = state;
showDebugInfo(state);
projectWindows.refresh(true);
}
function setupDebugCallback(btnid? : string) {
if (platform.setupDebug) platform.setupDebug((state) => {
lastDebugState = state;
showDebugInfo(state);
projectWindows.refresh(true);
uiDebugCallback(state);
setDebugButtonState(btnid||"pause", "stopped");
});
}
@ -1290,6 +1294,8 @@ function installErrorHandler() {
console.log(msgevent, url, line, col, error);
if (error instanceof EmuHalt || msgstr.indexOf("CPU STOP") >= 0) {
showErrorAlert([ {msg:msgstr, line:0} ]);
uiDebugCallback(platform.saveState());
setDebugButtonState("pause", "stopped"); // TODO?
} else {
ga('send', 'exception', {
'exDescription': msgevent + " " + url + " " + " " + line + ":" + col + ", " + error,

Binary file not shown.