Skip to content

Commit

Permalink
wswan: Add read-only debug view access to I/O port space
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Dec 20, 2024
1 parent a4acce3 commit 73238cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mednafen/src/wswan/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,16 @@ static void GetAddressSpaceBytes(const char *name, uint32 Address, uint32 Length
Buffer++;
}
}
else if(!strcmp(name, "ports"))
{
while(Length--)
{
Address &= 0xFF;
*Buffer = IsWW ? WSwan_readport_WW(Address) : WSwan_readport(Address);
Address++;
Buffer++;
}
}
else if(!strcmp(name, "cs") || !strcmp(name, "ds") || !strcmp(name, "ss") || !strcmp(name, "es"))
{
uint32 segment;
Expand Down Expand Up @@ -864,6 +874,8 @@ void WSwan_MemoryInit(bool lang, bool IsWSC, uint32 ssize, bool IsWW_arg)
ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "ds", "Data Segment", 16);
ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "es", "Extra Segment", 16);

ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "ports", "I/O Ports", 8);

ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "ieeprom", "Internal EEPROM", 11);

if(sram_size)
Expand Down

0 comments on commit 73238cc

Please sign in to comment.