From a2305f2d645343eb3b0c9f9c4292c50328d7b7eb Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Sun, 19 Sep 2021 22:58:23 +0100 Subject: [PATCH] Added ability to fix PPU size For testing compatibility with ports that cannot change the PPU size, the FIXED_SIZE define can be set nonzero and Screen/width,height changes will be ignored. They can still be read to find the correct width/height that the PPU is currently using. --- src/uxnemu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxnemu.c b/src/uxnemu.c index dccb937..4f528c7 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -22,6 +22,7 @@ WITH REGARD TO THIS SOFTWARE. */ #define PAD 4 +#define FIXED_SIZE 0 #define POLYPHONY 4 #define BENCH 0 @@ -352,7 +353,7 @@ screen_talk(Device *d, Uint8 b0, Uint8 w) else switch(b0) { case 0x5: - set_size(peek16(d->dat, 0x2), peek16(d->dat, 0x4)); + if(!FIXED_SIZE) set_size(peek16(d->dat, 0x2), peek16(d->dat, 0x4)); break; case 0xe: { Uint16 x = peek16(d->dat, 0x8);