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.
This commit is contained in:
Andrew Alderwick 2021-09-19 22:58:23 +01:00
parent 332fbed11e
commit a2305f2d64
1 changed files with 2 additions and 1 deletions

View File

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