1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-01 05:41:31 +00:00

nes: toggle nametable view with ctrl+shift+alt+n

This commit is contained in:
Steven Hugg 2019-07-25 11:35:09 -04:00
parent d5d215ce91
commit 6fdc366d03

View File

@ -7,6 +7,7 @@ import { CodeAnalyzer_nes } from "../analysis";
import { SampleAudio } from "../audio";
declare var jsnes : any;
declare var Mousetrap;
const JSNES_PRESETS = [
{id:'hello.c', name:'Hello World'},
@ -95,12 +96,15 @@ class JSNESPlatform extends Base6502Platform implements Platform {
this.ntvideo.create();
$(this.ntvideo.canvas).hide();
this.ntlastbuf = new Uint32Array(0x1000);
Mousetrap.bind('ctrl+shift+alt+n', () => {
$(this.video.canvas).toggle()
$(this.ntvideo.canvas).toggle()
});
// toggle buttons (TODO)
/*
$('<button>').text("Video").appendTo(debugbar).click(() => { $(this.video.canvas).toggle() });
$('<button>').text("Nametable").appendTo(debugbar).click(() => { $(this.ntvideo.canvas).toggle() });
*/
var idata = this.video.getFrameData();
this.nes = new jsnes.NES({
onFrame: (frameBuffer : number[]) => {