diff --git a/doc/notes.txt b/doc/notes.txt index f9cb8572..67ca8aa8 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -314,10 +314,9 @@ Push Git metadata kept in local storage Converting from NESASM to DASM - +- asl a -> asl - subroutine keyword on labels - [zp],y to (zp),y -- asl a -> asl - LOW(x) and HIGH(x) to <() and >() - .db to .byte, .dw to .word - use NES_HEADER macros @@ -334,3 +333,22 @@ Cross platform NES/SMS/GG library - no nametable mirroring in SMS - 256x240 vs 256x192 +Emulator Lib +- move getPresets() (into presets/ dir?) +- CPU interface + - execCycle(), execInsn() + - fix/unfix PC + - interrupt +- generic raster scanline platform +- PlatformRunner + - handles rewind, intra-frame breakpoint, debugging + - profiling log, exec/read/write/intr (for each bus?) +- expose video, audio, controller interfaces +- new debugging info +- memory map interface +- "About" metadata +- auto load/save state? +- handle legacy + - VCS + - NES + - MAME diff --git a/index.html b/index.html index de8e7457..73ca4680 100644 --- a/index.html +++ b/index.html @@ -153,6 +153,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) { + @@ -199,7 +200,10 @@ if (window.location.host.endsWith('8bitworkshop.com')) { - + + + + @@ -230,7 +234,6 @@ if (window.location.host.endsWith('8bitworkshop.com')) { - diff --git a/src/baseplatform.ts b/src/baseplatform.ts index e96e8029..11eff15c 100644 --- a/src/baseplatform.ts +++ b/src/baseplatform.ts @@ -1048,6 +1048,7 @@ export function dumpStackToString(platform:Platform, mem:Uint8Array|number[], st return s+"\n"; } +// TODO: slow, funky, uses global export function lookupSymbol(platform:Platform, addr:number, extra:boolean) { var start = addr; var addr2symbol = platform.debugSymbols && platform.debugSymbols.addr2symbol; @@ -1055,7 +1056,7 @@ export function lookupSymbol(platform:Platform, addr:number, extra:boolean) { var sym = addr2symbol[addr]; if (sym) { // return first symbol we find var sym = addr2symbol[addr]; - return extra ? (sym + " + " + (start-addr)) : sym; + return extra ? (sym + " + $" + hex(start-addr)) : sym; } addr--; } diff --git a/src/platform/c64.ts b/src/platform/c64.ts index cc721294..4bab5888 100644 --- a/src/platform/c64.ts +++ b/src/platform/c64.ts @@ -9,6 +9,9 @@ declare var jt; // for 6502 // https://www.c64-wiki.com/wiki/C64 // http://www.zimmers.net/cbmpics/cbm/c64/vic-ii.txt +// http://www.zimmers.net/cbmpics/cbm/c64/c64prg.txt +// http://sta.c64.org/cbm64mem.html +// http://hitmen.c02.at/temp/palstuff/ var C64_PRESETS = [ {id:'hello.dasm', name:'Hello World (ASM)'}, @@ -64,6 +67,7 @@ const C64_KEYMATRIX_NOSHIFT = [ ]; // CIA +// TODO: https://www.c64-wiki.com/wiki/CIA class CIA { regs = new Uint8Array(0x10); @@ -239,6 +243,9 @@ class C64Platform extends Base6502Platform implements Platform { getKeyboardMap() { return null; /* TODO: C64_KEYCODE_MAP;*/ } // http://map.grauw.nl/articles/keymatrix.php + // https://codebase64.org/doku.php?id=base:reading_the_keyboard + // http://www.c64os.com/post?p=45 + // https://www.c64-wiki.com/wiki/Keyboard getKeyboardFunction() { return (o,key,code,flags) => { //console.log(o,key,code,flags); @@ -260,6 +267,7 @@ class C64Platform extends Base6502Platform implements Platform { } } + // TODO: https://www.c64-wiki.com/wiki/Zeropage write6510(a:number, v:number) { this.ram[a] = v; switch (a) { @@ -377,6 +385,7 @@ class C64Platform extends Base6502Platform implements Platform { for (var sl=0; sl> 8; } else { // assume cartridge ROM this.rom = padBytes(data, romLength); @@ -537,6 +552,7 @@ for (var i=0; i<256; i++) { } // bank-switching table +// TODO: https://www.c64-wiki.com/wiki/Bank_Switching enum BankSwitchFlags { LORAM=1, HIRAM=2, CHAREN=4, _GAME=8, _EXROM=16 diff --git a/src/ui.ts b/src/ui.ts index ef8f7965..52fa770f 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -1618,7 +1618,7 @@ function showWelcomeMessage() { ]; steps.push({ element: "#booksMenuButton", - placement: 'right', + placement: 'bottom', title: "Bookstore", content: "Get some books that explain how to program all of this stuff, and write some games!" }); diff --git a/src/views.ts b/src/views.ts index d9b101de..294dafd9 100644 --- a/src/views.ts +++ b/src/views.ts @@ -436,7 +436,7 @@ export class DisassemblerView implements ProjectView { while (bytes.length < 14) bytes += ' '; var dstr = disasm.line; - if (addr2symbol && disasm.isaddr) { + if (addr2symbol && disasm.isaddr) { // TODO: move out dstr = dstr.replace(/([^#])[$]([0-9A-F]+)/, (substr:string, ...args:any[]):string => { var addr = parseInt(args[1], 16); var sym = addr2symbol[addr];