videoMode_to_str[tom_getVideoMode()]);
// WriteLog("\ntom: object processor:\n");
// WriteLog("tom: pointer to object list: 0x%.8x\n",op_get_list_pointer());
videoMode_to_str[tom_getVideoMode()]);
// WriteLog("\ntom: object processor:\n");
// WriteLog("tom: pointer to object list: 0x%.8x\n",op_get_list_pointer());
else if (offset == 0xF00050)
return tom_timer_prescaler >> 8;
else if (offset == 0xF00051)
else if (offset == 0xF00050)
return tom_timer_prescaler >> 8;
else if (offset == 0xF00051)
WriteLog("TOM: Reading word at %06X\n", offset);
#endif
if (offset >= 0xF02000 && offset <= 0xF020FF)
WriteLog("TOM: Reading word at %06X\n", offset);
#endif
if (offset >= 0xF02000 && offset <= 0xF020FF)
//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))
//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))
else if (offset == 0xF00050)
return tom_timer_prescaler;
else if (offset == 0xF00052)
return tom_timer_divider;
offset &= 0x3FFF;
else if (offset == 0xF00050)
return tom_timer_prescaler;
else if (offset == 0xF00052)
return tom_timer_divider;
offset &= 0x3FFF;
WriteLog("TOM: Writing word %04X at %06X\n", data, offset);
#endif
if (offset == 0xF00000 + MEMCON1)
WriteLog("TOM: Writing word %04X at %06X\n", data, offset);
#endif
if (offset == 0xF00000 + MEMCON1)
- tom_byte_write(offset, data >> 8);
- tom_byte_write(offset+1, data & 0xFF);
+ TOMWriteByte(offset, data >> 8);
+ TOMWriteByte(offset+1, data & 0xFF);
if (offset == 0x2E || offset == 0x36 || offset == 0x54)
data &= 0x03FF; // These are all 10-bit registers
if (offset == 0x2E || offset == 0x36 || offset == 0x54)
data &= 0x03FF; // These are all 10-bit registers
- tom_byte_write(offset, data >> 8);
- tom_byte_write(offset+1, data & 0xFF);
+ TOMWriteByte(offset, data >> 8, who);
+ TOMWriteByte(offset+1, data & 0xFF, who);
- WriteLog("TOM: Vertical Period written: %u (%sinterlaced)\n", data, (data & 0x01 ? "non-" : ""));
+ WriteLog("TOM: Vertical Period written by %s: %u (%sinterlaced)\n", whoName[who], data, (data & 0x01 ? "non-" : ""));
- WriteLog("TOM: Video Mode written: %04X (PWIDTH = %u, VC = %u)\n", data, ((data >> 9) & 0x07) + 1, GET16(tom_ram_8, VC));
+ WriteLog("TOM: Video Mode written by %s: %04X (PWIDTH = %u, VC = %u)\n", whoName[who], data, ((data >> 9) & 0x07) + 1, GET16(tom_ram_8, VC));
// detect screen resolution changes
//This may go away in the future, if we do the virtualized screen thing...
// detect screen resolution changes
//This may go away in the future, if we do the virtualized screen thing...
{
extern SDL_Surface * surface, * mainSurface;
extern Uint32 mainSurfaceFlags;
{
extern SDL_Surface * surface, * mainSurface;
extern Uint32 mainSurfaceFlags;
-// Format format(16, 0x007C00, 0x00003E0, 0x0000001F);
-// surface = new Surface(tom_width, tom_height, format);
SDL_FreeSurface(surface);
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, tom_width, tom_height,
16, 0x7C00, 0x03E0, 0x001F, 0);
SDL_FreeSurface(surface);
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, tom_width, tom_height,
16, 0x7C00, 0x03E0, 0x001F, 0);
}
sprintf(window_title, "Virtual Jaguar (%i x %i)", (int)tom_width, (int)tom_height);
}
sprintf(window_title, "Virtual Jaguar (%i x %i)", (int)tom_width, (int)tom_height);
-// console.close();
-// console.open(window_title, width, tom_height, format);
-//???Should we do this???
+//???Should we do this??? No!
// SDL_FreeSurface(mainSurface);
mainSurface = SDL_SetVideoMode(tom_width, tom_height, 16, mainSurfaceFlags);
// SDL_FreeSurface(mainSurface);
mainSurface = SDL_SetVideoMode(tom_width, tom_height, 16, mainSurfaceFlags);
tom_timer_counter = (1 + tom_timer_prescaler) * (1 + tom_timer_divider);
// WriteLog("tom: reseting timer to 0x%.8x (%i)\n",tom_timer_counter,tom_timer_counter);
}
tom_timer_counter = (1 + tom_timer_prescaler) * (1 + tom_timer_divider);
// WriteLog("tom: reseting timer to 0x%.8x (%i)\n",tom_timer_counter,tom_timer_counter);
}
- GPUSetIRQLine(2, ASSERT_LINE);
- if ((tom_irq_enabled(IRQ_TIMER)) && (jaguar_interrupt_handler_is_valid(64)))
+ GPUSetIRQLine(GPUIRQ_TIMER, ASSERT_LINE);
+ if (tom_irq_enabled(IRQ_TIMER) && jaguar_interrupt_handler_is_valid(64))