small changes and fixes
This commit is contained in:
@@ -23,11 +23,11 @@ void Core::LoadROM(const std::string& rom_) {
|
|||||||
|
|
||||||
cpu.mem.LoadROM(rom);
|
cpu.mem.LoadROM(rom);
|
||||||
GameDB::match(cpu.mem);
|
GameDB::match(cpu.mem);
|
||||||
|
cpu.mem.mmio.vi.isPal = cpu.mem.IsROMPAL();
|
||||||
cpu.mem.mmio.si.pif.InitDevices(cpu.mem.saveType);
|
cpu.mem.mmio.si.pif.InitDevices(cpu.mem.saveType);
|
||||||
cpu.mem.mmio.si.pif.LoadMempak(rom_);
|
cpu.mem.mmio.si.pif.LoadMempak(rom_);
|
||||||
cpu.mem.mmio.si.pif.LoadEeprom(cpu.mem.saveType, rom_);
|
cpu.mem.mmio.si.pif.LoadEeprom(cpu.mem.saveType, rom_);
|
||||||
cpu.mem.mmio.si.pif.ExecutePIF(cpu.mem, cpu.regs);
|
cpu.mem.mmio.si.pif.ExecutePIF(cpu.mem, cpu.regs);
|
||||||
cpu.mem.mmio.vi.isPal = cpu.mem.IsROMPAL();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::Run(float volumeL, float volumeR) {
|
void Core::Run(float volumeL, float volumeR) {
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ void GameDB::match(Mem& mem) {
|
|||||||
i.name, i.regions, rom.header.countryCode[0]);
|
i.name, i.regions, rom.header.countryCode[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Util::debug("Did not match any Game DB entries. Code: {} Region: {}", mem.rom.code, mem.rom.header.countryCode[0]);
|
Util::debug("Did not match any Game DB entries. Code: {} Region: {}", mem.rom.code, mem.rom.header.countryCode[0]);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include <SDL_keyboard.h>
|
#include <SDL_keyboard.h>
|
||||||
#include <cic_nus_6105/n64_cic_nus_6105.hpp>
|
#include <cic_nus_6105/n64_cic_nus_6105.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <MupenMovie.hpp>
|
|
||||||
|
|
||||||
#define MEMPAK_SIZE 32768
|
#define MEMPAK_SIZE 32768
|
||||||
|
|
||||||
@@ -294,8 +293,7 @@ void PIF::EepromRead(u8* cmd, u8* res, const Mem& mem) const {
|
|||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
res[i] = eeprom[(offset * 8) + i];
|
res[i] = eeprom[(offset * 8) + i];
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
Util::panic("EEPROM read on bad channel {}", channel);
|
Util::panic("EEPROM read on bad channel {}", channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -313,8 +311,7 @@ void PIF::EepromWrite(u8* cmd, u8* res, const Mem& mem) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
res[0] = 0; // Error byte, I guess it always succeeds?
|
res[0] = 0; // Error byte, I guess it always succeeds?
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
Util::panic("EEPROM write on bad channel {}", channel);
|
Util::panic("EEPROM write on bad channel {}", channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ struct PIF {
|
|||||||
bool gamepadConnected = false;
|
bool gamepadConnected = false;
|
||||||
SDL_GameController* gamepad{};
|
SDL_GameController* gamepad{};
|
||||||
JoybusDevice joybusDevices[6]{};
|
JoybusDevice joybusDevices[6]{};
|
||||||
u8 bootrom[PIF_BOOTROM_SIZE]{}, ram[PIF_RAM_SIZE]{}, *mempak, *eeprom;
|
u8 bootrom[PIF_BOOTROM_SIZE]{}, ram[PIF_RAM_SIZE]{}, *mempak{}, *eeprom{};
|
||||||
int channel = 0;
|
int channel = 0;
|
||||||
std::string mempakPath{}, eepromPath{};
|
std::string mempakPath{}, eepromPath{};
|
||||||
size_t eepromSize{};
|
size_t eepromSize{};
|
||||||
|
|||||||
Reference in New Issue
Block a user