Mem and Regs not part of cpu anymore.

This commit is contained in:
SimoZ64
2025-08-01 21:05:11 +02:00
parent 812b905bdf
commit 010bb5e0bb
35 changed files with 246 additions and 250 deletions

View File

@@ -35,7 +35,7 @@ void KaizenGui::QueryDevices(SDL_Event event) {
void KaizenGui::HandleInput(SDL_Event event) {
n64::Core& core = n64::Core::GetInstance();
n64::PIF &pif = core.cpu->GetMem().mmio.si.pif;
n64::PIF &pif = core.GetMem().mmio.si.pif;
switch(event.type) {
case SDL_EVENT_GAMEPAD_AXIS_MOTION:
if(!gamepad)
@@ -261,7 +261,8 @@ void KaizenGui::RenderUI() {
void KaizenGui::LoadROM(const std::string &path) noexcept {
n64::Core& core = n64::Core::GetInstance();
core.LoadROM(path);
const auto gameNameDB = core.cpu->GetMem().rom.gameNameDB;
const auto gameNameDB = core.GetMem().rom.gameNameDB;
SDL_SetWindowTitle(window.getHandle(), ("Kaizen - " + gameNameDB).c_str());
}
void KaizenGui::run() {
@@ -291,12 +292,7 @@ void KaizenGui::run() {
}
void KaizenGui::LoadTAS(const std::string &path) const noexcept {
n64::Core& core = n64::Core::GetInstance();
if (core.LoadTAS(fs::path(path))) {
const auto gameNameDB = core.cpu->GetMem().rom.gameNameDB;
const auto movieName = fs::path(path).stem().string();
return;
if (!n64::Core::GetInstance().LoadTAS(fs::path(path))) {
panic("Could not load TAS movie {}!", path);
}
panic("Could not load TAS movie {}!", path);
}