... | ... |
@@ -166,7 +166,7 @@ screen_deo(Device *d, Uint8 port) |
166 | 166 |
n = d->dat[0x6] >> 4; |
167 | 167 |
dx = (d->dat[0x6] & 0x01) << 3; |
168 | 168 |
dy = (d->dat[0x6] & 0x02) << 2; |
169 |
- if(addr > 0xfff8 - twobpp * 8 * (n + 1)) |
|
169 |
+ if(addr > 0x10000 - ((n + 1) << (3 + twobpp))) |
|
170 | 170 |
return; |
171 | 171 |
for(i = 0; i <= n; i++) { |
172 | 172 |
screen_blit(&uxn_screen, layer, x + dy * i, y + dx * i, &d->u->ram[addr], d->dat[0xf] & 0xf, d->dat[0xf] & 0x10, d->dat[0xf] & 0x20, twobpp); |