X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftom.cpp;h=b3882a09f3fbe645e4b1b17ba6d6c2aaf21f9483;hb=94e1e961b57f253b760298ab0bae96a7de6d20fa;hp=f1a7ed8be3af6446efdddbc6e159ac511228a6df;hpb=f95620384355f3db89f779e1e7be59260ecfc6ff;p=virtualjaguar diff --git a/src/tom.cpp b/src/tom.cpp index f1a7ed8..b3882a0 100644 --- a/src/tom.cpp +++ b/src/tom.cpp @@ -4,6 +4,14 @@ // Originally by David Raingeard (cal2) // GCC/SDL port by Niels Wagenaar (Linux/WIN32) and Caz (BeOS) // Cleanups and endian wrongness amelioration by James L. Hammons +// (C) 2010 Underground Software +// +// JLH = James L. Hammons +// +// Who When What +// --- ---------- ------------------------------------------------------------- +// JLH 01/16/2010 Created this log ;-) +// // Note: Endian wrongness probably stems from the MAME origins of this emu and // the braindead way in which MAME handles memory. :-) // @@ -255,6 +263,7 @@ #include "jaguar.h" #include "log.h" #include "m68k.h" +//#include "memory.h" #include "objectp.h" #include "settings.h" #include "video.h" @@ -548,6 +557,7 @@ uint32 RGB16ToRGB32[0x10000]; uint32 CRY16ToRGB32[0x10000]; uint32 MIX16ToRGB32[0x10000]; +#warning "This is not endian-safe. !!! FIX !!!" void TOMFillLookupTables(void) { for(uint32 i=0; i<0x10000; i++) @@ -568,12 +578,12 @@ void TOMFillLookupTables(void) b = (((uint32)bluecv[chrm][chrl]) * y) >> 8; CRY16ToRGB32[i] = 0xFF000000 | (b << 16) | (g << 8) | r; - MIX16ToRGB32[i] = CRY16ToRGB32[i]; + MIX16ToRGB32[i] = (i & 0x01 ? RGB16ToRGB32[i] : CRY16ToRGB32[i]); } - for(uint32 i=0; i<0x10000; i++) - if (i & 0x01) - MIX16ToRGB32[i] = RGB16ToRGB32[i]; +// for(uint32 i=0; i<0x10000; i++) +// if (i & 0x01) +// MIX16ToRGB32[i] = RGB16ToRGB32[i]; } void TOMSetPendingJERRYInt(void) @@ -613,10 +623,9 @@ uint8 TOMGetVideoMode(void) } //Used in only one place (and for debug purposes): OBJECTP.CPP +#warning "Used in only one place (and for debug purposes): OBJECTP.CPP !!! FIX !!!" uint16 TOMGetVDB(void) { -// This in NOT VDB!!! -// return GET16(tomRam8, VBE); return GET16(tomRam8, VDB); }