X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fcd%2Fgfx_cd.c;h=120b0ddddaf3acf6b7a55b6887a4d2b1df8f6b30;hb=c008977e8ec74b68cbccc017620a156cc39b79b2;hp=db2a406a4557053c497dfdf4337bd57bae249bb3;hpb=00bd648e6308fbcfe759a56dc24c11435d358ec4;p=picodrive.git diff --git a/Pico/cd/gfx_cd.c b/Pico/cd/gfx_cd.c index db2a406..120b0dd 100644 --- a/Pico/cd/gfx_cd.c +++ b/Pico/cd/gfx_cd.c @@ -1,6 +1,4 @@ -// TODO... -// #include #include "../PicoInt.h" #define rot_comp Pico_mcd->rot_comp @@ -33,8 +31,6 @@ static void gfx_cd_start(void) { int upd_len; - dprintf("gfx_cd_start()"); - // rot_comp.XD_Mul = ((rot_comp.Reg_5C & 0x1f) + 1) * 4; // unused rot_comp.Function = (rot_comp.Reg_58 & 7) | (Pico_mcd->s68k_regs[3] & 0x18); // Jmp_Adr // rot_comp.Buffer_Adr = (rot_comp.Reg_5E & 0xfff8) << 2; // unused? @@ -63,6 +59,8 @@ static void gfx_cd_start(void) break; } + dprintf("gfx_cd_start, stamp_map_addr=%06x", rot_comp.Stamp_Map_Adr); + gfx_cd_update(); } @@ -97,6 +95,18 @@ static void gfx_do(unsigned int func, unsigned short *stamp_base, unsigned int H // MAKE_IMAGE_LINE while (H_Dot) { + // MAKE_IMAGE_PIXEL + if (!(func & 1)) // NOT TILED + { + int mask = (func & 4) ? 0x00800000 : 0x00f80000; + if ((ecx | edx) & mask) + { + if (func & 0x18) goto Next_Pixel; + pixel = 0; + goto Pixel_Out; + } + } + if (func & 2) // mode 32x32 dot { if (func & 4) // 16x16 screen @@ -124,19 +134,7 @@ static void gfx_do(unsigned int func, unsigned short *stamp_base, unsigned int H } } - // MAKE_IMAGE_PIXEL - if (!(func & 1)) // NOT TILED - { - int mask = (func & 4) ? 0x00800000 : 0x00f80000; - if ((ecx | edx) & mask) - { - if (func & 0x18) goto Next_Pixel; - pixel = 0; - goto Pixel_Out; - } - } - - edi = stamp_base[ebx];// | (stamp_base[ebx+1] << 16); + edi = stamp_base[ebx]; esi = (edi & 0x7ff) << 7; if (!esi) { pixel = 0; goto Pixel_Out; } edi >>= (11+1); @@ -359,7 +357,7 @@ unsigned int gfx_cd_read(unsigned int a) dprintf("gfx_cd_read(%02x) = %04x", a, d); - return 0; + return d; } void gfx_cd_write16(unsigned int a, unsigned int d)