mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-15 20:59:08 +01:00
fixed 2-cell vertical scrolling [40-cell mode only, need investigation]: fixes left column in Gynoug
This commit is contained in:
parent
11859d43de
commit
9d430a0851
@ -1081,9 +1081,13 @@ static void render_bg_vs(int line, int width)
|
|||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
dst = (uint32 *)&buf[0x10 + shift];
|
dst = (uint32 *)&buf[0x10 + shift];
|
||||||
|
#ifdef LSB_FIRST
|
||||||
nt = (uint32 *)&vram[ntbb + (((line >> 3) << pf_shift) & 0x1FC0)];
|
v_line = (reg[12] & 1) ? ((line + ((vs[0] >> 16) & 0x3FF)) & pf_row_mask) : line;
|
||||||
v_line = (line & 7) << 3;
|
#else
|
||||||
|
v_line = (reg[12] & 1) ? ((line + (vs[0] & 0x3FF)) & pf_row_mask) : line;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & 0x1FC0)];
|
||||||
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
atbuf = nt[(index-1) & pf_col_mask];
|
atbuf = nt[(index-1) & pf_col_mask];
|
||||||
DRAW_COLUMN(atbuf, v_line)
|
DRAW_COLUMN(atbuf, v_line)
|
||||||
@ -1145,8 +1149,13 @@ static void render_bg_vs(int line, int width)
|
|||||||
{
|
{
|
||||||
dst = (uint32 *)&buf[0x10 + shift + (start<<4)];
|
dst = (uint32 *)&buf[0x10 + shift + (start<<4)];
|
||||||
|
|
||||||
nt = (uint32 *)&vram[ntab + (((line >> 3) << pf_shift) & 0x1FC0)];
|
#ifdef LSB_FIRST
|
||||||
v_line = (line & 7) << 3;
|
v_line = (reg[12] & 1) ? ((line + (vs[start] & 0x3FF)) & pf_row_mask) : line;
|
||||||
|
#else
|
||||||
|
v_line = (reg[12] & 1) ? ((line + ((vs[start] >> 16) & 0x3FF)) & pf_row_mask) : line;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & 0x1FC0)];
|
||||||
|
v_line = (v_line & 7) << 3;
|
||||||
|
|
||||||
/* Window bug */
|
/* Window bug */
|
||||||
if (start) atbuf = nt[index & pf_col_mask];
|
if (start) atbuf = nt[index & pf_col_mask];
|
||||||
@ -1343,9 +1352,13 @@ static void render_bg_im2_vs(int line, int width, int odd)
|
|||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
dst = (uint32 *)&buf[0x10 + shift];
|
dst = (uint32 *)&buf[0x10 + shift];
|
||||||
|
#ifdef LSB_FIRST
|
||||||
nt = (uint32 *)&vram[ntbb + (((line >> 3) << pf_shift) & 0x1FC0)];
|
v_line = (line + (reg[12] & 1) ? ((vs[0] >> 17) & 0x3FF) : 0) & pf_row_mask;
|
||||||
v_line = (((line & 7) << 1) | odd) << 3;
|
#else
|
||||||
|
v_line = (line + (reg[12] & 1) ? ((vs[0] >> 1) & 0x3FF) : 0) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntbb + (((v_line >> 3) << pf_shift) & 0x1FC0)];
|
||||||
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
atbuf = nt[(index-1) & pf_col_mask];
|
atbuf = nt[(index-1) & pf_col_mask];
|
||||||
DRAW_COLUMN_IM2(atbuf, v_line)
|
DRAW_COLUMN_IM2(atbuf, v_line)
|
||||||
@ -1404,9 +1417,13 @@ static void render_bg_im2_vs(int line, int width, int odd)
|
|||||||
if(shift)
|
if(shift)
|
||||||
{
|
{
|
||||||
dst = (uint32 *)&buf[0x10 + shift + (start<<4)];
|
dst = (uint32 *)&buf[0x10 + shift + (start<<4)];
|
||||||
|
#ifdef LSB_FIRST
|
||||||
nt = (uint32 *)&vram[ntab + (((line >> 3) << pf_shift) & 0x1FC0)];
|
v_line = (line + (reg[12] & 1) ? ((vs[start] >> 1) & 0x3FF) : 0) & pf_row_mask;
|
||||||
v_line = (((line & 7) << 1) | odd) << 3;
|
#else
|
||||||
|
v_line = (line + (reg[12] & 1) ? ((vs[start] >> 17) & 0x3FF) : 0) & pf_row_mask;
|
||||||
|
#endif
|
||||||
|
nt = (uint32 *)&vram[ntab + (((v_line >> 3) << pf_shift) & 0x1FC0)];
|
||||||
|
v_line = (((v_line & 7) << 1) | odd) << 3;
|
||||||
|
|
||||||
/* Window bug */
|
/* Window bug */
|
||||||
if (start) atbuf = nt[index & pf_col_mask];
|
if (start) atbuf = nt[index & pf_col_mask];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user