// F02298 W xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx B_Z0 - Z0
// ------------------------------------------------------------
-//#include <SDL.h>
#include "tom.h"
+
+#include <string.h> // For memset()
+#include <stdlib.h> // For rand()
#include "video.h"
#include "gpu.h"
#include "objectp.h"
#include "cry2rgb.h"
#include "settings.h"
#include "clock.h"
+#include "jaguar.h"
+#include "log.h"
+#include "blitter.h"
+#include "m68k.h"
#define NEW_TIMER_SYSTEM
extern uint8 objectp_running;
-static uint8 * tom_ram_8;
+uint8 tom_ram_8[0x4000];
uint32 tom_width, tom_height;
static uint32 tom_timer_prescaler;
static uint32 tom_timer_divider;
//int16 * TOMBackbuffer;
uint32 * TOMBackbuffer;
-static char * videoMode_to_str[8] =
+static const char * videoMode_to_str[8] =
{ "16 BPP CRY", "24 BPP RGB", "16 BPP DIRECT", "16 BPP RGB",
"Mixed mode", "24 BPP RGB", "16 BPP DIRECT", "16 BPP RGB" };
op_init();
blitter_init();
//This should be done by JERRY! pcm_init();
- memory_malloc_secure((void **)&tom_ram_8, 0x4000, "TOM RAM");
+// memory_malloc_secure((void **)&tom_ram_8, 0x4000, "TOM RAM");
tom_reset();
// Setup the non-stretchy scanline rendering...
memcpy(scanline_render, scanline_render_normal, sizeof(scanline_render));
// WriteLog("tom: INT1=0x%.2x%.2x\n",TOMReadByte(0xf000e0),TOMReadByte(0xf000e1));
// gpu_done();
// dsp_done();
- memory_free(tom_ram_8);
+// memory_free(tom_ram_8);
// memory_free(tom_cry_rgb_mix_lut);
}
return GPUReadByte(offset, who);
else if ((offset >= GPU_WORK_RAM_BASE) && (offset < GPU_WORK_RAM_BASE+0x1000))
return GPUReadByte(offset, who);
- else if ((offset >= 0xF00010) && (offset < 0xF00028))
- return OPReadByte(offset, who);
+/* else if ((offset >= 0xF00010) && (offset < 0xF00028))
+ return OPReadByte(offset, who);*/
else if ((offset >= 0xF02200) && (offset < 0xF022A0))
return BlitterReadByte(offset, who);
else if (offset == 0xF00050)
return GPUReadWord(offset, who);
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);
+/* else if ((offset >= 0xF00010) && (offset < 0xF00028))
+ return OPReadWord(offset, who);*/
else if ((offset >= 0xF02200) && (offset < 0xF022A0))
return BlitterReadWord(offset, who);
else if (offset == 0xF00050)
GPUWriteByte(offset, data, who);
return;
}
- else if ((offset >= 0xF00010) && (offset < 0xF00028))
+/* else if ((offset >= 0xF00010) && (offset < 0xF00028))
{
OPWriteByte(offset, data, who);
return;
- }
+ }*/
else if ((offset >= 0xF02200) && (offset < 0xF022A0))
{
BlitterWriteByte(offset, data, who);
TOMWriteByte(offset, data >> 8);
TOMWriteByte(offset+1, data & 0xFF);
}*/
- else if ((offset >= 0xF00010) && (offset < 0xF00028))
+/* else if ((offset >= 0xF00010) && (offset < 0xF00028))
{
OPWriteWord(offset, data, who);
return;
- }
+ }*/
else if (offset == 0xF00050)
{
tom_timer_prescaler = data;
offset &= 0x3FFF;
if (offset == 0x28) // VMODE (Why? Why not OBF?)
+//Actually, we should check to see if the Enable bit of VMODE is set before doing this... !!! FIX !!!
+#warning Actually, we should check to see if the Enable bit of VMODE is set before doing this... !!! FIX !!!
objectp_running = 1;
if (offset >= 0x30 && offset <= 0x4E)