end = end<<16>>16;\r
\r
// Find name table line:\r
- if (pvid->reg[12]&1)\r
+ if (!(est->rendstatus & PDRAW_32_COLS))\r
{\r
nametab=(pvid->reg[3]&0x3c)<<9; // 40-cell mode\r
nametab_step = 1<<6;\r
else nametab=(pvid->reg[4]&0x07)<<12; // B\r
\r
scrpos = est->Draw2FB;\r
- if (est->rendstatus & PDRAW_BORDER_32)\r
+ if ((~est->rendstatus & (PDRAW_BORDER_32|PDRAW_32_COLS)) == 0)\r
scrpos += 32;\r
scrpos+=8*est->Draw2Width*(planestart-scrstart);\r
\r
// Get vertical scroll value:\r
vscroll=PicoMem.vsram[plane];//&0x1ff;\r
#if VSRAM\r
- if (!(pvid->reg[12]&1) && (pvid->reg[11]&4)) // H32 + 2-cell mode\r
+ if ((est->rendstatus & PDRAW_32_COLS) && (pvid->reg[11]&4)) // H32 + 2-cell mode\r
vscroll=PicoMem.vsram[plane+0x20];//&0x1ff;\r
#endif\r
#if INTERLACE\r
unsigned char *scrpos = est->Draw2FB, *pd = 0;\r
int scrstart = est->Draw2Start;\r
\r
- if (est->rendstatus & PDRAW_BORDER_32)\r
+ if ((~est->rendstatus & (PDRAW_BORDER_32|PDRAW_32_COLS)) == 0)\r
scrpos += 32;\r
\r
while((code=*hc++)) {\r
while(sy <= 0) { sy+=8; tile+=tdeltay; height--; }\r
\r
scrpos = est->Draw2FB;\r
- if (est->rendstatus&PDRAW_BORDER_32)\r
+ if ((~est->rendstatus & (PDRAW_BORDER_32|PDRAW_32_COLS)) == 0)\r
scrpos += 32;\r
scrpos+=sy*est->Draw2Width;\r
\r
int i,u,link=0;\r
u32 *sprites[80]; // Sprites\r
int y_min=START_ROW*8, y_max=END_ROW*8; // for a simple sprite masking\r
- int max_sprites = pvid->reg[12]&1 ? 80 : 64;\r
+ int max_sprites = !(est->rendstatus & PDRAW_32_COLS) ? 80 : 64;\r
\r
if (est->rendstatus & PDRAW_30_ROWS)\r
y_min += 8, y_max += 8;\r
\r
table=pvid->reg[5]&0x7f;\r
- if (pvid->reg[12]&1) table&=0x7e; // Lowest bit 0 in 40-cell mode\r
+ if (!(est->rendstatus & PDRAW_32_COLS)) table&=0x7e; // Lowest bit 0 in 40-cell mode\r
table<<=8; // Get sprite table address/2\r
\r
for (i = u = 0; u < max_sprites && link < max_sprites; u++)\r
ldr r11, [r11, #OFS_EST_Draw2FB]\r
sub r4, r9, r4, lsl #24\r
tst r7, #PDRAW_BORDER_32 @ H32 border mode?\r
+ tstne r7, #PDRAW_32_COLS\r
addne r11, r11, #32\r
mov r4, r4, asr #24\r
mov r7, #328*8\r
ldr r11,[r1, #OFS_EST_Draw2Start]\r
ldr r2, [r0], #4 @ read y offset\r
tst r7, #PDRAW_BORDER_32 @ H32 border mode?\r
+ tstne r7, #PDRAW_32_COLS\r
addne r4, r4, #32\r
mov r7, #328\r
mla r2, r7, r2, r4\r
and r12, r12, #0xf800\r
mov r5, r5, lsl #6 @ nametab_step\r
tst r7, #PDRAW_BORDER_32\r
+ tstne r7, #PDRAW_32_COLS\r
addne r11, r11, #32 @ center screen in H32 mode\r
\r
0: and r4, r0, #0xff\r
ldr r2, [r1, #OFS_EST_Draw2Start]\r
ldr r10, [r1, #OFS_EST_PicoMem_vram]\r
tst r0, #PDRAW_BORDER_32 @ H32 border mode?\r
+ tstne r0, #PDRAW_32_COLS\r
addne r11, r11, #32\r
sub r12, r12, r2, lsl #3\r
mov r0, #328\r