X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftom.cpp;h=7bd954e8dba8cb761ebbcc1665e7e5a5977642fb;hb=7fddf86a7f0a7d0de5d5b4864b58bc10c15a1a44;hp=53b9fe8542531387ca528dc1721295d7cfde1b14;hpb=43107ad33b400f193f81c51305f12206e2228331;p=virtualjaguar diff --git a/src/tom.cpp b/src/tom.cpp index 53b9fe8..7bd954e 100644 --- a/src/tom.cpp +++ b/src/tom.cpp @@ -1237,9 +1237,19 @@ if (offset >= 0xF02000 && offset <= 0xF020FF) //But it's causing Rayman to be fucked up... Why??? //Because VC is even in NI mode when calling the OP! That's why! return (tom_scanline << 1) + 1;//*/ - else if ((offset >= GPU_CONTROL_RAM_BASE) && (offset < GPU_CONTROL_RAM_BASE+0x20)) +/* +// F00004 R/W -----xxx xxxxxxxx HC - horizontal count +// -----x-- -------- (which half of the display) +// ------xx xxxxxxxx (10-bit counter) +*/ +// This is a kludge to get the HC working somewhat... What we really should do here +// is check what the global time is at the time of the read and calculate the correct HC... +// !!! FIX !!! + else if (offset == 0xF00004) + return rand() & 0x03FF; + else if ((offset >= GPU_CONTROL_RAM_BASE) && (offset < GPU_CONTROL_RAM_BASE + 0x20)) return GPUReadWord(offset, who); - else if ((offset >= GPU_WORK_RAM_BASE) && (offset < GPU_WORK_RAM_BASE+0x1000)) + else if ((offset >= GPU_WORK_RAM_BASE) && (offset < GPU_WORK_RAM_BASE + 0x1000)) return GPUReadWord(offset, who); else if ((offset >= 0xF00010) && (offset < 0xF00028)) return OPReadWord(offset, who);