Add option to dump the contents of RAM to a file
This commit is contained in:
parent
0aefdf4753
commit
4e62b32d60
8 changed files with 68 additions and 2 deletions
|
|
@ -1228,6 +1228,15 @@ void UpdateMemoryCards()
|
|||
}
|
||||
}
|
||||
|
||||
bool DumpRAM(const char* filename)
|
||||
{
|
||||
auto fp = FileSystem::OpenManagedCFile(filename, "wb");
|
||||
if (!fp)
|
||||
return false;
|
||||
|
||||
return std::fwrite(Bus::g_ram, Bus::RAM_SIZE, 1, fp.get()) == 1;
|
||||
}
|
||||
|
||||
bool HasMedia()
|
||||
{
|
||||
return g_cdrom.HasMedia();
|
||||
|
|
@ -1333,7 +1342,8 @@ bool RemoveMediaPathFromPlaylist(u32 index)
|
|||
|
||||
if (GetMediaPlaylistIndex() == index)
|
||||
{
|
||||
g_host_interface->AddFormattedOSDMessage(10.0f, "Removing current media from playlist, removing media from CD-ROM.");
|
||||
g_host_interface->AddFormattedOSDMessage(10.0f,
|
||||
"Removing current media from playlist, removing media from CD-ROM.");
|
||||
g_cdrom.RemoveMedia();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue