diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 50963f9ecd..b10797d649 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -1055,8 +1055,6 @@ void spu_thread::cpu_init() ch_out_mbox.data.raw() = {}; ch_out_intr_mbox.data.raw() = {}; - snr_config = 0; - ch_snr1.data.raw() = {}; ch_snr2.data.raw() = {}; @@ -1068,6 +1066,11 @@ void spu_thread::cpu_init() ch_dec_start_timestamp = get_timebased_time(); // ??? ch_dec_value = 0; + if (offset >= RAW_SPU_BASE_ADDR) + { + snr_config = 0; + } + run_ctrl.raw() = 0; status.raw() = 0; npc.raw() = 0; diff --git a/rpcs3/Emu/Cell/SPUThread.h b/rpcs3/Emu/Cell/SPUThread.h index 6ea72f6836..9363565661 100644 --- a/rpcs3/Emu/Cell/SPUThread.h +++ b/rpcs3/Emu/Cell/SPUThread.h @@ -546,7 +546,7 @@ public: spu_channel ch_out_mbox; spu_channel ch_out_intr_mbox; - u64 snr_config; // SPU SNR Config Register + u64 snr_config = 0; // SPU SNR Config Register spu_channel ch_snr1; // SPU Signal Notification Register 1 spu_channel ch_snr2; // SPU Signal Notification Register 2 diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.cpp b/rpcs3/Emu/Cell/lv2/sys_spu.cpp index 1cfcfc37da..d08f086554 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_spu.cpp @@ -963,6 +963,11 @@ error_code sys_spu_thread_set_spu_cfg(ppu_thread& ppu, u32 id, u64 value) sys_spu.warning("sys_spu_thread_set_spu_cfg(id=0x%x, value=0x%x)", id, value); + if (value > 3) + { + return CELL_EINVAL; + } + const auto thread = idm::get>(id); if (UNLIKELY(!thread || !thread->group)) @@ -970,11 +975,6 @@ error_code sys_spu_thread_set_spu_cfg(ppu_thread& ppu, u32 id, u64 value) return CELL_ESRCH; } - if (value > 3) - { - return CELL_EINVAL; - } - thread->snr_config = value; return CELL_OK;