X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftom.cpp;h=a8e482d6c6f1718ffa00a8a0bc2ebd1effd178f3;hb=e923b820a95d2f9b038cb2895c3d2174b6e7b393;hp=0757601f732e920a05be5c45576cddb19029d7db;hpb=e0530264688efd52086a1382568f4d13b4281316;p=virtualjaguar diff --git a/src/tom.cpp b/src/tom.cpp index 0757601..a8e482d 100644 --- a/src/tom.cpp +++ b/src/tom.cpp @@ -457,8 +457,6 @@ Vertical resolution: 238 lines void tom_calc_cry_rgb_mix_lut(void) { - memory_malloc_secure((void **)&tom_cry_rgb_mix_lut, 2 * 0x10000, "CRY/RGB mixed mode LUT"); - for (uint32 i=0; i<0x10000; i++) { uint16 color = i; @@ -478,6 +476,7 @@ void tom_calc_cry_rgb_mix_lut(void) blue = (((uint32)bluecv[chrm][chrl]) * y) >> 11; color = (red << 10) | (green << 5) | blue; } + tom_cry_rgb_mix_lut[i] = color; } } @@ -852,6 +851,8 @@ void TOMExecScanline(uint16 scanline, bool render) // void tom_init(void) { + memory_malloc_secure((void **)&tom_cry_rgb_mix_lut, 2 * 0x10000, "CRY/RGB mixed mode LUT"); + op_init(); blitter_init(); //This should be done by JERRY! pcm_init(); @@ -875,6 +876,7 @@ void tom_done(void) // gpu_done(); // dsp_done(); memory_free(tom_ram_8); + memory_free(tom_cry_rgb_mix_lut); } /*uint32 tom_getHBlankWidthInPixels(void) @@ -917,10 +919,10 @@ uint32 tom_getVideoModeWidth(void) // To make it easier to make a quasi-fixed display size, we restrict the viewing // area to an arbitrary range of the Horizontal Count. uint16 pwidth = ((GET16(tom_ram_8, VMODE) & PWIDTH) >> 9) + 1; -// return (RIGHT_VISIBLE_HC - LEFT_VISIBLE_HC) / pwidth; + return (RIGHT_VISIBLE_HC - LEFT_VISIBLE_HC) / pwidth; //Temporary, for testing Doom... - return (RIGHT_VISIBLE_HC - LEFT_VISIBLE_HC) / (pwidth == 8 ? 4 : pwidth); -// return (RIGHT_VISIBLE_HC - LEFT_VISIBLE_HC) / (pwidth == 4 ? 8 : pwidth); +// return (RIGHT_VISIBLE_HC - LEFT_VISIBLE_HC) / (pwidth == 8 ? 4 : pwidth); +//// return (RIGHT_VISIBLE_HC - LEFT_VISIBLE_HC) / (pwidth == 4 ? 8 : pwidth); // More speculating... // According to the JTRM, the number of potential pixels across is given by the