tweaks to UI

This commit is contained in:
Steven Hugg 2019-08-20 08:28:59 -04:00
parent d1df9b940d
commit 02be2c9438
6 changed files with 46 additions and 8 deletions

View File

@ -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

View File

@ -153,6 +153,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
</span>
<span class="dropdown">
<!-- PLATFORMS menu -->
<a class="btn dropdown-toggle hidden-xs toolbarMenuButton" id="platformsMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span>PLATFORMS</span> <span class="caret"></span>
</a>
@ -199,7 +200,10 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
</li>
</ul>
</span>
<span class="dropdown">
<!-- 8bitworkshop logo -->
<span class="logo-gradient hidden-xs hidden-sm hidden-md pull-right" style="margin-left:auto" onclick="window.open('/','_8bitws');">8bitworkshop</span>
<!-- BOOKS menu -->
<span class="dropdown pull-right">
<a class="btn dropdown-toggle hidden-xs toolbarMenuButton" id="booksMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
BOOKS <span class="caret"></span>
</a>
@ -230,7 +234,6 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
</li>
</ul>
</span>
<span class="logo-gradient hidden-xs hidden-sm hidden-md pull-right" style="margin-left:auto">8bitworkshop</span>
</div><!-- controls_dynamic -->
</div><!-- controls_top -->

View File

@ -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--;
}

View File

@ -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<linesPerFrame; sl++) {
this.vic.setScanline(sl);
// interrupt?
// TODO: https://www.c64-wiki.com/wiki/Raster_interrupt
if (this.vic.regs[0x19] & 0x1) {
this.vic.regs[0x19] &= 0x7e;
vicClocks -= this.cpu.setIRQAndWait();
@ -417,7 +426,13 @@ class C64Platform extends Base6502Platform implements Platform {
loadROM(title, data) {
// BASIC stub?
if (data[0] == 0x01 && data[1] == 0x08) {
this.ram.set(data, 0x801-2);
this.ram.set(data.slice(2), 0x801);
this.enableCART = false;
// hack BASIC interpreter loop (TODO?)
var prgstart = (this.debugSymbols && this.debugSymbols.symbolmap['__MAIN_START__']) || 0x80a;
this.bios[0x3f9b] = 0x4c;
this.bios[0x3f9c] = prgstart & 0xff;
this.bios[0x3f9d] = prgstart >> 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

View File

@ -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!"
});

View File

@ -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];