Cleanup, fix RomFS reads (todo: revisit), add CFG::GetConfigInfoBlk2

This commit is contained in:
wheremyfoodat 2022-10-11 22:04:26 +03:00
parent 1ddba7737f
commit 156a89ba75
7 changed files with 35 additions and 6 deletions

View file

@ -30,7 +30,7 @@ public:
}
u64 MemoryRead64(u32 vaddr) override {
return u64(MemoryRead32(vaddr)) | u64(MemoryRead32(vaddr + 4)) << 32;
return mem.read64(vaddr);
}
void MemoryWrite8(u32 vaddr, u8 value) override {
@ -162,6 +162,7 @@ public:
void runFrame() {
env.ticksLeft = 268111856 / 60;
const auto exitReason = jit->Run();
if (static_cast<u32>(exitReason) != 0) [[unlikely]] {
Helpers::panic("Exit reason: %d\nPC: %08X", static_cast<u32>(exitReason), getReg(15));

View file

@ -71,7 +71,7 @@ public:
return size;
}
bool seek(std::int64_t offset, int origin = 0) {
bool seek(std::int64_t offset, int origin = SEEK_SET) {
if (!isOpen() || fseeko(handle, offset, origin) != 0)
return false;

View file

@ -8,6 +8,9 @@ class CFGService {
Memory& mem;
MAKE_LOG_FUNCTION(log, cfgLogger)
// Service functions
void getConfigInfoBlk2(u32 messagePointer);
public:
CFGService(Memory& mem) : mem(mem) {}
void reset();

View file

@ -63,4 +63,10 @@ public:
DSPService(Memory& mem) : mem(mem) {}
void reset();
void handleSyncRequest(u32 messagePointer);
enum class SoundOutputMode : u8 {
Mono = 0,
Stereo = 1,
Surround = 2
};
};