From e3256beff53713c549eb5b0c6bb441aa44fbd1da Mon Sep 17 00:00:00 2001 From: zsknight <> Date: Tue, 26 Jun 2001 00:15:56 +0000 Subject: [PATCH] New graphics fix for mode 4, 8bit. --- zsnes/src/video/newgfx.asm | 5 +++++ zsnes/src/video/newgfx.mac | 23 +++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/zsnes/src/video/newgfx.asm b/zsnes/src/video/newgfx.asm index 9d9eae03..2c736078 100644 --- a/zsnes/src/video/newgfx.asm +++ b/zsnes/src/video/newgfx.asm @@ -47,6 +47,8 @@ EXTSYM winlogicb EXTSYM ngwinptr,objwlrpos,objwen,objclineptr,CSprWinPtr EXTSYM WindowRedraw +NEWSYM BGPT3B, times 256 dw 0 + NEWSYM NewGfxAsmStart %include "video/vidmacro.mac" @@ -185,8 +187,11 @@ NEWSYM newengine8b mov bl,[bgmode] and ebx,07h mov [BGMA+eax],bl + cmp bl,4 + je .changedmode4 cmp [BGMA+eax-1],bl je .nobgma +.changedmode4 mov byte[bgallchange+eax],1 .nobgma diff --git a/zsnes/src/video/newgfx.mac b/zsnes/src/video/newgfx.mac index d03a9fa7..11560b4e 100644 --- a/zsnes/src/video/newgfx.mac +++ b/zsnes/src/video/newgfx.mac @@ -2611,15 +2611,17 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2 add ecx,ebx jmp %%yesmosaic %%nomosaic + cmp byte[BGMA+ebx],5 jae near .tiles16x8 %%yesmosaic + cmp byte[t16x161+ebx+%1*256],1 je near .tiles16x16 cmp byte[BGMA+ebx],2 je near .offsetm -; cmp byte[BGMA+ebx],4 -; je near .offsetm + cmp byte[BGMA+ebx],4 + je near .offsetm mov eax,[BGPT1+ebx*2+%1*512] test ecx,100h jz .noyinc @@ -2901,12 +2903,13 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2 shr dx,5 add ax,dx .nooma - cmp byte[BGMA+ebx],4 - je .offsetm4 +; cmp byte[BGMA+ebx],4 +; je .offsetm4 add eax,40h -.offsetm4 +;.offsetm4 mov edx,eax and edx,0FFFFFFC0h + mov word[BGPT3B+ebx*2],dx add edx,[vram] mov [ofsmcptr],edx and eax,3Fh @@ -3063,8 +3066,8 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2 je near .tiles16x16 cmp byte[BGMA+ebx],2 je near .offsetm -; cmp byte[BGMA+ebx],4 -; je near .offsetm + cmp byte[BGMA+ebx],4 + je near .offsetm mov eax,[BG1SYl+ebx*2+%1*512] and eax,0FFFFh add eax,ebx @@ -3251,10 +3254,10 @@ EXTSYM drawmode7ngextbg,drawmode7ngextbg2 add ax,dx .nooma mov edx,eax - cmp byte[BGMA+ebx],4 - je .offsetm4 +; cmp byte[BGMA+ebx],4 +; je .offsetm4 add edx,40h -.offsetm4 +;.offsetm4 and edx,0FFC0h add edx,[vram] mov [ofsmcptr],edx