X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fjaguar.cpp;h=35f53b953edec65424cda6cffbbc6af67a037b86;hb=cd61d997688c71e8eeecf39e4ce9d77a08872d7b;hp=cb280ecbe334c12c6e5eb5838ec79209a94205a7;hpb=053fb8314018df7866ade5c62c98d90007e47199;p=virtualjaguar diff --git a/src/jaguar.cpp b/src/jaguar.cpp index cb280ec..35f53b9 100644 --- a/src/jaguar.cpp +++ b/src/jaguar.cpp @@ -1,7 +1,7 @@ // // JAGUAR.CPP // -// by cal2 +// by Cal2 // GCC/SDL port by Niels Wagenaar (Linux/WIN32) and Caz (BeOS) // Cleanups and endian wrongness amelioration by James L. Hammons // Note: Endian wrongness probably stems from the MAME origins of this emu and @@ -40,11 +40,6 @@ uint32 jaguar_active_memory_dumps = 0; uint32 jaguar_mainRom_crc32; -static uint32 m68k_cycles_per_scanline; -static uint32 gpu_cycles_per_scanline; -static uint32 dsp_cycles_per_scanline; -static uint32 jaguar_screen_scanlines; - /*static*/ uint8 * jaguar_mainRam = NULL; /*static*/ uint8 * jaguar_bootRom = NULL; /*static*/ uint8 * jaguar_mainRom = NULL; @@ -211,9 +206,6 @@ void m68k_write_memory_16(unsigned int address, unsigned int value) //if (address >= 0x0E75D0 && address <= 0x0E75E7) // WriteLog("M68K: Writing %04X at %08X, M68K PC=%08X\n", value, address, m68k_get_reg(NULL, M68K_REG_PC)); /*extern uint32 totalFrames; -extern bool suppressOutput; -if (totalFrames >= 59) - suppressOutput = false;//*/ /*if (address == 0xF02114) WriteLog("M68K: Writing to GPU_CTRL (frame:%u)... [M68K PC:%08X]\n", totalFrames, m68k_get_reg(NULL, M68K_REG_PC)); if (address == 0xF02110) @@ -524,17 +516,6 @@ void jaguar_init(void) // cd_bios_boot("C:\\ftp\\jaguar\\cd\\primalrage.cdi"); // cd_bios_boot("C:\\ftp\\jaguar\\cd\\Dragons Lair.cdi"); - // Should these be hardwired or read from VP? - jaguar_screen_scanlines = (hardwareTypeNTSC ? 524 : 624); -//Should the divisor be 50 for PAL??? Let's try it! - m68k_cycles_per_scanline = (hardwareTypeNTSC ? M68K_CLOCK_RATE_NTSC : M68K_CLOCK_RATE_PAL) / (jaguar_screen_scanlines * (hardwareTypeNTSC ? 60 : 50)); - gpu_cycles_per_scanline = dsp_cycles_per_scanline - = (hardwareTypeNTSC ? RISC_CLOCK_RATE_NTSC : RISC_CLOCK_RATE_PAL) / (jaguar_screen_scanlines * (hardwareTypeNTSC ? 60 : 50)); - -//#ifdef SOUND_OUTPUT -// ws_audio_init(); -//#endif - m68k_set_cpu_type(M68K_CPU_TYPE_68000); gpu_init(); DSPInit(); @@ -573,9 +554,7 @@ void jaguar_done(void) WriteLog("Jaguar: VBL interrupt is %s\n", ((tom_irq_enabled(IRQ_VBLANK)) && (jaguar_interrupt_handler_is_valid(64))) ? "enabled" : "disabled"); M68K_show_context(); //#endif -//#ifdef SOUND_OUTPUT -// ws_audio_done(); -//#endif + cd_bios_done(); cdrom_done(); gpu_done(); @@ -621,77 +600,19 @@ void jaguar_reset(void) WriteLog("\t68K PC=%06X SP=%08X\n", m68k_get_reg(NULL, M68K_REG_PC), m68k_get_reg(NULL, M68K_REG_A7)); } +/*unused void jaguar_reset_handler(void) { -} - -void jaguar_exec(int16 * backbuffer, bool render) -{ - uint32 i, vblank_duration = tom_get_vdb(); - - // vblank - if (tom_irq_enabled(IRQ_VBLANK) && jaguar_interrupt_handler_is_valid(64)) - { - if (JaguarReadWord(0xF0004E) != 0x07FF) // VI (11 bits wide!) - { - tom_set_pending_video_int(); -// s68000interrupt(7, IRQ_VBLANK+64); -// s68000flushInterrupts(); - m68k_set_irq(7); // IRQ_VBLANK+64??? Not autovectored??? No. -// Could set a global variable here, to signal that this is a VBLANK interrupt... -// Then again, since IRQ_VBLANK is set to zero, this would not be necessary in this case. - } - } - - for(i=0; i= vdb && i < vde)//vbb) { if (!(i & 0x01)) // Execute OP only on even lines (non-interlaced only!) @@ -751,10 +676,6 @@ if (effect_start) } } } - -//#ifdef SOUND_OUTPUT -// system_sound_update(); -//#endif } // Temp debugging stuff