--- np2/io/gdc.c 2004/03/22 05:38:47 1.31 +++ np2/io/gdc.c 2005/02/07 14:46:11 1.35 @@ -117,9 +117,9 @@ void gdc_setanalogpalall(const UINT16 *p gdc.anareg[(c * 3) + 1] = (pal >> 4) & 15; gdc.anareg[(c * 3) + 2] = (pal >> 0) & 15; #endif - gdc_setanalogpal(c, offsetof(RGB32, p.g), (pal >> 8) & 15); - gdc_setanalogpal(c, offsetof(RGB32, p.r), (pal >> 4) & 15); - gdc_setanalogpal(c, offsetof(RGB32, p.b), (pal >> 0) & 15); + gdc_setanalogpal(c, offsetof(RGB32, p.g), (REG8)((pal >> 8) & 15)); + gdc_setanalogpal(c, offsetof(RGB32, p.r), (REG8)((pal >> 4) & 15)); + gdc_setanalogpal(c, offsetof(RGB32, p.b), (REG8)((pal >> 0) & 15)); } } @@ -404,6 +404,8 @@ const GDCCLK *clk; y = clk->maxy; } hclock = clk->clock / x; + gdc.hclock = hclock; + gdc.vclock = hclock * 10 / y; cnt = (pccore.baseclock * y) / hclock; cnt *= pccore.multiple; gdc.rasterclock = cnt / y; @@ -415,7 +417,7 @@ const GDCCLK *clk; void gdc_restorekacmode(void) { - BYTE bit; + UINT8 bit; bit = (((!np2cfg.uPD72020) && (gdc.mode1 & 0x20))?0x00:0xff); if (gdc.bitac != bit) { @@ -488,6 +490,8 @@ static void IOOUTCALL gdc_o6a(UINT port, REG8 bit; + TRACEOUT(("port:%.4x %.2x", port, dat)); + if (!(dat & 0xf8)) { bit = (dat >> 1) & 3; dat &= 1; @@ -933,6 +937,7 @@ static REG8 IOINPCALL gdc_iae(UINT port) #if defined(SUPPORT_PC9821) static void IOOUTCALL gdc_o9a0(UINT port, REG8 dat) { + TRACEOUT(("port:%.4x,%.2x", port, dat)); gdc.ff2 = dat; (void)port; }