Fix CLI args
This commit is contained in:
@@ -12,7 +12,7 @@ void Core::Stop() {
|
|||||||
cpu->Reset();
|
cpu->Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Core::LoadTAS(const fs::path &path) {
|
bool Core::LoadTAS(const fs::path &path) const {
|
||||||
return cpu->GetMem().mmio.si.pif.movie.Load(path);
|
return cpu->GetMem().mmio.si.pif.movie.Load(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ struct Core {
|
|||||||
Core(ParallelRDP&);
|
Core(ParallelRDP&);
|
||||||
void Stop();
|
void Stop();
|
||||||
void LoadROM(const std::string&);
|
void LoadROM(const std::string&);
|
||||||
bool LoadTAS(const fs::path&);
|
bool LoadTAS(const fs::path&) const;
|
||||||
void Run(float volumeL, float volumeR);
|
void Run(float volumeL, float volumeR);
|
||||||
void Serialize();
|
void Serialize();
|
||||||
void Deserialize();
|
void Deserialize();
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ template<> u32 Mem::Read(n64::Registers ®s, u32 paddr) {
|
|||||||
return Util::ReadAccess<u32>(si.pif.bootrom, paddr - PIF_ROM_REGION_START);
|
return Util::ReadAccess<u32>(si.pif.bootrom, paddr - PIF_ROM_REGION_START);
|
||||||
case PIF_RAM_REGION:
|
case PIF_RAM_REGION:
|
||||||
return be32toh(Util::ReadAccess<u32>(si.pif.ram, paddr - PIF_RAM_REGION_START));
|
return be32toh(Util::ReadAccess<u32>(si.pif.ram, paddr - PIF_RAM_REGION_START));
|
||||||
case 0x00800000 ... 0x03EFFFFF: case 0x04200000 ... 0x042FFFFF:
|
case 0x00800000 ... 0x03FFFFFF: case 0x04200000 ... 0x042FFFFF:
|
||||||
case 0x04900000 ... 0x04FFFFFF: case 0x1FC00800 ... 0xFFFFFFFF: return 0;
|
case 0x04900000 ... 0x04FFFFFF: case 0x1FC00800 ... 0xFFFFFFFF: return 0;
|
||||||
default:
|
default:
|
||||||
Util::panic("Unimplemented 32-bit read at address {:08X} (PC = {:016X})", paddr, (u64) regs.pc);
|
Util::panic("Unimplemented 32-bit read at address {:08X} (PC = {:016X})", paddr, (u64) regs.pc);
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ void KaizenQt::dropEvent(QDropEvent* event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void KaizenQt::LoadROM(const QString& fileName) noexcept {
|
void KaizenQt::LoadROM(const QString& fileName) noexcept {
|
||||||
|
mainWindow->view.actionPause->setEnabled(true);
|
||||||
|
mainWindow->view.actionReset->setEnabled(true);
|
||||||
|
mainWindow->view.actionStop->setEnabled(true);
|
||||||
emuThread->start();
|
emuThread->start();
|
||||||
emuThread->core.LoadROM(fileName.toStdString());
|
emuThread->core.LoadROM(fileName.toStdString());
|
||||||
mainWindow->setWindowTitle(emuThread->core.cpu->GetMem().rom.gameNameDB.c_str());
|
mainWindow->setWindowTitle(emuThread->core.cpu->GetMem().rom.gameNameDB.c_str());
|
||||||
@@ -68,8 +71,8 @@ void KaizenQt::Quit() noexcept {
|
|||||||
QApplication::quit();
|
QApplication::quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KaizenQt::LoadTAS(const QString& fileName) noexcept {
|
void KaizenQt::LoadTAS(const QString& fileName) const noexcept {
|
||||||
emuThread->core.LoadTAS(fileName.toStdString());
|
emuThread->core.LoadTAS(fs::path(fileName.toStdString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void KaizenQt::keyPressEvent(QKeyEvent *e) {
|
void KaizenQt::keyPressEvent(QKeyEvent *e) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class KaizenQt : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
KaizenQt() noexcept;
|
KaizenQt() noexcept;
|
||||||
void LoadTAS(const QString& path) noexcept;
|
void LoadTAS(const QString& path) const noexcept;
|
||||||
void LoadROM(const QString& path) noexcept;
|
void LoadROM(const QString& path) noexcept;
|
||||||
void dropEvent(QDropEvent*) override;
|
void dropEvent(QDropEvent*) override;
|
||||||
void dragEnterEvent(QDragEnterEvent*) override;
|
void dragEnterEvent(QDragEnterEvent*) override;
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ void MainWindowController::ConnectSignalsToSlots() noexcept {
|
|||||||
"All supported types (*.zip *.ZIP *.7z *.7Z *.rar *.RAR *.tar *.TAR *.n64 *.N64 *.v64 *.V64 *.z64 *.Z64)");
|
"All supported types (*.zip *.ZIP *.7z *.7Z *.rar *.RAR *.tar *.TAR *.n64 *.N64 *.v64 *.V64 *.z64 *.Z64)");
|
||||||
|
|
||||||
if (!file_name.isEmpty()) {
|
if (!file_name.isEmpty()) {
|
||||||
view.actionPause->setEnabled(true);
|
|
||||||
view.actionReset->setEnabled(true);
|
|
||||||
view.actionStop->setEnabled(true);
|
|
||||||
emit OpenROM(file_name);
|
emit OpenROM(file_name);
|
||||||
view.vulkanWidget->show();
|
view.vulkanWidget->show();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user