From 00057c6018dc6ec17c96b3536e7228ee466b1be2 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Sat, 13 Jul 2019 14:31:10 -0400 Subject: [PATCH] update presets --- doc/notes.txt | 3 +++ presets/nes/ex0.dasm | 4 ++-- presets/nes/horizmask.c | 3 --- presets/nes/shoot2.c | 4 ++-- tools/Makefile | 3 +++ 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/notes.txt b/doc/notes.txt index 3e8f154f..249c7679 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -17,6 +17,7 @@ TODO: - step over (line, instruction) - slowdown beam for all platforms? - PC x86 support + - https://bellard.org/tcc/ - show errors in list (maybe window list?) - click to go to error - what if error in include file you can't edit b/c it never appears? @@ -130,6 +131,7 @@ TODO: - PPU/TIA register write visualization - NES crt should mark raster pos when debugging - vcs + - need Chapter 8 example? - vcs sound continues when paused - vcs: INPTx needs to be added to control state - vcs: break on # of lines changed (maybe using getRasterPosition?) @@ -162,6 +164,7 @@ TODO: - cookie - list of stuff for policy - popup +- convert binary to hex stmts WEB WORKER FORMAT diff --git a/presets/nes/ex0.dasm b/presets/nes/ex0.dasm index 5629f595..e9f3f713 100644 --- a/presets/nes/ex0.dasm +++ b/presets/nes/ex0.dasm @@ -26,9 +26,9 @@ Start: lda #$1c ; $1C = light blue color sta PPU_DATA ; $1C -> PPU data ; activate PPU graphics - lda #MASK_COLOR + lda #MASK_BG ; A = $08 sta PPU_MASK ; enable rendering - lda #CTRL_NMI + lda #CTRL_NMI ; A = $80 sta PPU_CTRL ; enable NMI .endless jmp .endless ; endless loop diff --git a/presets/nes/horizmask.c b/presets/nes/horizmask.c index 7bfba9e6..19d764ed 100644 --- a/presets/nes/horizmask.c +++ b/presets/nes/horizmask.c @@ -156,9 +156,6 @@ void main(void) { oam_clear(); oam_spr(1, 30, 0xa0, 0, 0); - // clip left 8 pixels of screen - ppu_mask(MASK_SPR|MASK_BG); - // clear vram buffer vrambuf_clear(); set_vram_update(updbuf); diff --git a/presets/nes/shoot2.c b/presets/nes/shoot2.c index fc55472c..c9e9874f 100644 --- a/presets/nes/shoot2.c +++ b/presets/nes/shoot2.c @@ -767,10 +767,10 @@ void setup_graphics() { word dest; // copy background vram_adr(0x0); - vram_write((unsigned char*)TILESET, sizeof(TILESET)); + vram_write(TILESET, sizeof(TILESET)); // copy sprites vram_adr(0x1000); - vram_write((unsigned char*)TILESET, sizeof(TILESET)); + vram_write(TILESET, sizeof(TILESET)); // write shifted versions of formation ships src = SSRC_FORM1*16; dest = SDST_FORM1*16; diff --git a/tools/Makefile b/tools/Makefile index 96a1bc79..234edcfd 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -39,6 +39,9 @@ ship1.pbm: ship1.png %.prom: cat $* | hexdump -v -e '" \n defb " 32/1 "$$%02x,"' | cut -c 2-134 +%.s: + cat $* | hexdump -v -e '" \n .byte " 32/1 "$$%02x,"' | cut -c 2-135 + %.rot.pbm: %.pbm convert $< -transpose -bordercolor white -border 4x4 $@