Handle Disk "Header" for Plugins (not forged, may be unreliable)
This commit is contained in:
parent
48ce8fbee7
commit
f312476b8b
|
@ -27,6 +27,7 @@ public:
|
||||||
void ClearDiskSettingID();
|
void ClearDiskSettingID();
|
||||||
uint8_t * GetDiskAddress() { return m_DiskImage; }
|
uint8_t * GetDiskAddress() { return m_DiskImage; }
|
||||||
uint8_t * GetDiskAddressBuffer() { return m_DiskImage + m_DiskBufAddress; }
|
uint8_t * GetDiskAddressBuffer() { return m_DiskImage + m_DiskBufAddress; }
|
||||||
|
uint8_t * GetDiskHeader() { return m_DiskImage + 0x43650; }
|
||||||
void SetDiskAddressBuffer(uint32_t address) { m_DiskBufAddress = address; }
|
void SetDiskAddressBuffer(uint32_t address) { m_DiskBufAddress = address; }
|
||||||
stdstr GetRomName() const { return m_RomName; }
|
stdstr GetRomName() const { return m_RomName; }
|
||||||
stdstr GetFileName() const { return m_FileName; }
|
stdstr GetFileName() const { return m_FileName; }
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
#include <Project64-core/N64System/N64RomClass.h>
|
#include <Project64-core/N64System/N64RomClass.h>
|
||||||
|
#include <Project64-core/N64System/N64DiskClass.h>
|
||||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||||
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
||||||
#include <Project64-core/N64System/N64Class.h>
|
#include <Project64-core/N64System/N64Class.h>
|
||||||
|
@ -134,7 +135,10 @@ bool CAudioPlugin::Initiate(CN64System * System, RenderWindow * Window)
|
||||||
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
||||||
CRegisters & Reg = System->m_Reg;
|
CRegisters & Reg = System->m_Reg;
|
||||||
|
|
||||||
Info.HEADER = g_Rom->GetRomAddress();
|
if ((g_Rom->CicChipID() == CIC_NUS_8303 || g_Rom->CicChipID() == CIC_NUS_DDUS) && g_Disk != NULL)
|
||||||
|
Info.HEADER = g_Disk->GetDiskHeader();
|
||||||
|
else
|
||||||
|
Info.HEADER = g_Rom->GetRomAddress();
|
||||||
Info.RDRAM = MMU.Rdram();
|
Info.RDRAM = MMU.Rdram();
|
||||||
Info.DMEM = MMU.Dmem();
|
Info.DMEM = MMU.Dmem();
|
||||||
Info.IMEM = MMU.Imem();
|
Info.IMEM = MMU.Imem();
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include <Project64-core/N64System/SystemGlobals.h>
|
#include <Project64-core/N64System/SystemGlobals.h>
|
||||||
#include <Project64-core/N64System/N64RomClass.h>
|
#include <Project64-core/N64System/N64RomClass.h>
|
||||||
|
#include <Project64-core/N64System/N64DiskClass.h>
|
||||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||||
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
||||||
#include <Project64-core/N64System/N64Class.h>
|
#include <Project64-core/N64System/N64Class.h>
|
||||||
|
@ -228,7 +229,10 @@ bool CGfxPlugin::Initiate(CN64System * System, RenderWindow * Window)
|
||||||
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
||||||
CRegisters & Reg = System->m_Reg;
|
CRegisters & Reg = System->m_Reg;
|
||||||
|
|
||||||
Info.HEADER = g_Rom->GetRomAddress();
|
if ((g_Rom->CicChipID() == CIC_NUS_8303 || g_Rom->CicChipID() == CIC_NUS_DDUS) && g_Disk != NULL)
|
||||||
|
Info.HEADER = g_Disk->GetDiskHeader();
|
||||||
|
else
|
||||||
|
Info.HEADER = g_Rom->GetRomAddress();
|
||||||
Info.RDRAM = MMU.Rdram();
|
Info.RDRAM = MMU.Rdram();
|
||||||
Info.DMEM = MMU.Dmem();
|
Info.DMEM = MMU.Dmem();
|
||||||
Info.IMEM = MMU.Imem();
|
Info.IMEM = MMU.Imem();
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||||
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
||||||
#include <Project64-core/N64System/N64Class.h>
|
#include <Project64-core/N64System/N64Class.h>
|
||||||
|
#include <Project64-core/N64System/N64DiskClass.h>
|
||||||
#include "RSPPlugin.h"
|
#include "RSPPlugin.h"
|
||||||
#include "GFXPlugin.h"
|
#include "GFXPlugin.h"
|
||||||
#include <Project64-core/Plugins/AudioPlugin.h>
|
#include <Project64-core/Plugins/AudioPlugin.h>
|
||||||
|
@ -185,7 +186,10 @@ bool CRSP_Plugin::Initiate(CPlugins * Plugins, CN64System * System)
|
||||||
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
CMipsMemoryVM & MMU = System->m_MMU_VM;
|
||||||
CRegisters & Reg = System->m_Reg;
|
CRegisters & Reg = System->m_Reg;
|
||||||
|
|
||||||
Info.HEADER = g_Rom->GetRomAddress();
|
if ((g_Rom->CicChipID() == CIC_NUS_8303 || g_Rom->CicChipID() == CIC_NUS_DDUS) && g_Disk != NULL)
|
||||||
|
Info.HEADER = g_Disk->GetDiskHeader();
|
||||||
|
else
|
||||||
|
Info.HEADER = g_Rom->GetRomAddress();
|
||||||
Info.RDRAM = MMU.Rdram();
|
Info.RDRAM = MMU.Rdram();
|
||||||
Info.DMEM = MMU.Dmem();
|
Info.DMEM = MMU.Dmem();
|
||||||
Info.IMEM = MMU.Imem();
|
Info.IMEM = MMU.Imem();
|
||||||
|
|
Loading…
Reference in New Issue