From 3c6e66e50f3645f619a16c0dc13836273046fc14 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 17 Nov 2024 11:06:09 +0100 Subject: jaguar: add [[maybe_unused]] to the speedup functions --- src/mame/atari/jaguar.cpp | 24 +++++++++--------------- src/mame/atari/jaguar.h | 26 +++++++++++++------------- src/mame/atari/jaguar_a.cpp | 4 ---- 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/src/mame/atari/jaguar.cpp b/src/mame/atari/jaguar.cpp index 003a4b0b589..aae09bf16ff 100644 --- a/src/mame/atari/jaguar.cpp +++ b/src/mame/atari/jaguar.cpp @@ -398,6 +398,7 @@ void cojag_devices(device_slot_interface &device) device.option_add("hdd", COJAG_HARDDISK); } + /************************************* * * Machine init @@ -671,6 +672,7 @@ void jaguar_state::gpuctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask) m_gpu->iobus_w(offset, data, mem_mask); } + /************************************* * * 32-bit access to the DSP @@ -687,6 +689,7 @@ void jaguar_state::dspctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask) m_dsp->iobus_w(offset, data, mem_mask); } + /************************************* * * Input ports @@ -869,7 +872,6 @@ void jaguar_state::eeprom_data_w(offs_t offset, uint32_t data) run it until we get back to the spin loop. */ - void jaguar_state::gpu_jump_w(offs_t offset, uint32_t data, uint32_t mem_mask) { /* update the data in memory */ @@ -923,9 +925,6 @@ uint32_t jaguar_state::gpu_jump_r() crank through some random numbers, just not several thousand every frame. */ -#if ENABLE_SPEEDUP_HACKS - - uint32_t jaguar_state::cojagr3k_main_speedup_r() { uint64_t curcycles = m_maincpu->total_cycles(); @@ -952,8 +951,6 @@ uint32_t jaguar_state::cojagr3k_main_speedup_r() return *m_main_speedup; } -#endif - /************************************* @@ -971,9 +968,6 @@ uint32_t jaguar_state::cojagr3k_main_speedup_r() makes sure we don't waste time emulating that spin loop. */ -#if ENABLE_SPEEDUP_HACKS - - uint32_t jaguar_state::main_gpu_wait_r() { if (m_gpu_command_pending) @@ -981,8 +975,6 @@ uint32_t jaguar_state::main_gpu_wait_r() return *m_main_gpu_wait; } -#endif - /************************************* @@ -998,8 +990,6 @@ uint32_t jaguar_state::main_gpu_wait_r() *main_speedup is actually 0. */ -#if ENABLE_SPEEDUP_HACKS - void jaguar_state::area51_main_speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask) { uint64_t curcycles = m_maincpu->total_cycles(); @@ -1060,7 +1050,6 @@ void jaguar_state::area51mx_main_speedup_w(offs_t offset, uint32_t data, uint32_ m_main_speedup_last_cycles = curcycles; } -#endif /************************************* @@ -1333,6 +1322,7 @@ void jaguarcd_state::jaguarcd_map(address_map &map) map(0xdfff00, 0xdfff3f).rw(FUNC(jaguarcd_state::butch_regs_r16), FUNC(jaguarcd_state::butch_regs_w16)); } + /************************************* * * Main CPU memory handlers @@ -1489,6 +1479,7 @@ void jaguarcd_state::jagcd_gpu_dsp_map(address_map &map) map(0xdfff00, 0xdfff3f).rw(FUNC(jaguarcd_state::butch_regs_r), FUNC(jaguarcd_state::butch_regs_w)); } + /************************************* * * Port definitions @@ -1772,6 +1763,7 @@ static INPUT_PORTS_START( jaguar ) PORT_CONFSETTING( 0x10, "NTSC") INPUT_PORTS_END + /************************************* * * Machine driver @@ -1898,6 +1890,7 @@ void jaguarcd_state::jaguarcd(machine_config &config) CDROM(config, "cdrom").set_interface("jag_cdrom"); } + /************************************* * * Driver initialization @@ -2033,6 +2026,7 @@ DEVICE_IMAGE_LOAD_MEMBER( jaguar_state::cart_load ) return std::make_pair(std::error_condition(), std::string()); } + /************************************* * * ROM definition(s) @@ -2247,7 +2241,6 @@ ROM_END ****************************************/ - ROM_START( fishfren ) ROM_REGION( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ ROM_LOAD32_BYTE( "hh", 0x00000, 0x80000, CRC(2ef79767) SHA1(abcea584f2cbd71b05f9d7e61f40ca9da6799215) ) @@ -2523,6 +2516,7 @@ void jaguar_state::init_area51() { m_hacks_enabled = true; cojag_common_init(0x0c0, 0x09e); + #if ENABLE_SPEEDUP_HACKS /* install speedup for main CPU */ m_main_speedup_max_cycles = 120; diff --git a/src/mame/atari/jaguar.h b/src/mame/atari/jaguar.h index d738ef7f832..fe36353be3d 100644 --- a/src/mame/atari/jaguar.h +++ b/src/mame/atari/jaguar.h @@ -212,10 +212,10 @@ private: void eeprom_data_w(offs_t offset, uint32_t data); void gpu_jump_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t gpu_jump_r(); - uint32_t cojagr3k_main_speedup_r(); - uint32_t main_gpu_wait_r(); - void area51_main_speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - void area51mx_main_speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + [[maybe_unused]] uint32_t cojagr3k_main_speedup_r(); + [[maybe_unused]] uint32_t main_gpu_wait_r(); + [[maybe_unused]] void area51_main_speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + [[maybe_unused]] void area51mx_main_speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint16_t gpuctrl_r16(offs_t offset, uint16_t mem_mask = ~0); void gpuctrl_w16(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint16_t blitter_r16(offs_t offset, uint16_t mem_mask = ~0); @@ -249,14 +249,14 @@ private: uint16_t gpu_ram_r16(offs_t offset); void gpu_ram_w16(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - // from audio/jaguar.cpp + // from jaguar_a.cpp uint16_t jerry_regs_r(offs_t offset); void jerry_regs_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint32_t serial_r(offs_t offset); void serial_w(offs_t offset, uint32_t data); TIMER_CALLBACK_MEMBER(serial_update); - // from video/jaguar.cpp + // from jaguar_v.cpp uint32_t blitter_r(offs_t offset, uint32_t mem_mask = ~0); void blitter_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint16_t tom_regs_r(offs_t offset); @@ -285,20 +285,20 @@ private: void r3000_map(address_map &map) ATTR_COLD; void r3000_rom_map(address_map &map) ATTR_COLD; - void gpu_suspend() { m_gpu->suspend(SUSPEND_REASON_SPIN, 1); } + [[maybe_unused]] void gpu_suspend() { m_gpu->suspend(SUSPEND_REASON_SPIN, 1); } void gpu_resume() { m_gpu->resume(SUSPEND_REASON_SPIN); } - void dsp_suspend() { m_dsp->suspend(SUSPEND_REASON_SPIN, 1); } + [[maybe_unused]] void dsp_suspend() { m_dsp->suspend(SUSPEND_REASON_SPIN, 1); } void dsp_resume() { m_dsp->resume(SUSPEND_REASON_SPIN); } void fix_endian( void *base, uint32_t size ); void cojag_common_init(uint16_t gpu_jump_offs, uint16_t spin_pc); void init_freeze_common(offs_t main_speedup_addr); - // from audio/jaguar.cpp + // from jaguar_a.cpp void update_gpu_irq(); - void dsp_flags_w(address_space &space, offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + [[maybe_unused]] void dsp_flags_w(address_space &space, offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - // from video/jaguar.cpp + // from jaguar_v.cpp void get_crosshair_xy(int player, int &x, int &y); int effective_hvalue(int value); bool adjust_object_timer(int vc); @@ -309,7 +309,7 @@ private: TIMER_CALLBACK_MEMBER(scanline_update); void set_palette(uint16_t vmode); - /* from jagobj.cpp */ + // from jagobj.ipp void jagobj_init(); uint32_t *process_bitmap(uint16_t *scanline, uint32_t *objdata, int vc); uint32_t *process_scaled_bitmap(uint16_t *scanline, uint32_t *objdata, int vc); @@ -352,7 +352,7 @@ private: void bitmap_32_6(uint16_t *scanline, int32_t firstpix, int32_t iwidth, uint32_t *src, int32_t xpos); void bitmap_32_7(uint16_t *scanline, int32_t firstpix, int32_t iwidth, uint32_t *src, int32_t xpos); - /* from jagblit.cpp */ + // from jagblit.ipp void generic_blitter(uint32_t command, uint32_t a1flags, uint32_t a2flags); void blitter_09800001_010020_010020(uint32_t command, uint32_t a1flags, uint32_t a2flags); void blitter_09800009_000020_000020(uint32_t command, uint32_t a1flags, uint32_t a2flags); diff --git a/src/mame/atari/jaguar_a.cpp b/src/mame/atari/jaguar_a.cpp index ad15622f443..5382b897050 100644 --- a/src/mame/atari/jaguar_a.cpp +++ b/src/mame/atari/jaguar_a.cpp @@ -258,8 +258,6 @@ void jaguar_state::jerry_regs_w(offs_t offset, uint16_t data, uint16_t mem_mask) * *************************************/ -#if ENABLE_SPEEDUP_HACKS - void jaguar_state::dsp_flags_w(address_space &space, offs_t offset, uint32_t data, uint32_t mem_mask) { /* write the data through */ @@ -279,8 +277,6 @@ void jaguar_state::dsp_flags_w(address_space &space, offs_t offset, uint32_t dat } } -#endif - /************************************* -- cgit v1.2.3