diff --git a/presets/nes/horizmask.c b/presets/nes/horizmask.c index 19d764ed..66dbf605 100644 --- a/presets/nes/horizmask.c +++ b/presets/nes/horizmask.c @@ -76,7 +76,7 @@ void update_nametable() { // draw rest of building memset(buf+PLAYROWS-bldg_height, bldg_char, bldg_height); // draw vertical slice in name table - vrambuf_put(addr ^ 0xc000, buf, PLAYROWS); + vrambuf_put(addr | VRAMBUF_VERT, buf, PLAYROWS); // every 4 columns, update attribute table if ((x & 3) == 1) { // compute attribute table address diff --git a/presets/nes/vrambuf.h b/presets/nes/vrambuf.h index ba761d8c..0d26d7fe 100644 --- a/presets/nes/vrambuf.h +++ b/presets/nes/vrambuf.h @@ -23,6 +23,9 @@ extern byte updptr; VRAMBUF_ADD(addr);\ VRAMBUF_ADD(len); +// OR with address to put vertical run +#define VRAMBUF_VERT 0x8000 + // add EOF marker to buffer (but don't increment pointer) void vrambuf_end(void);