pinmame
pinmame copied to clipboard
Unmapped memory writes in Altsound
I see a lot of messages like this:
cpu #1 (PC=0000E8BE): unmapped memory byte write to 0000F9BB = AB
cpu #1 (PC=0000E8BE): unmapped memory byte write to 0000F9BC = F1
cpu #1 (PC=0000E8BE): unmapped memory byte write to 0000F9BD = AB
cpu #1 (PC=0000E8BE): unmapped memory byte write to 0000F9BE = F1
Any idea what's causing it? A single run of a game can result in many hundreds of these in the log file.
In general, this just means that the original ROM software contains instructions to write to a memory-mapped peripheral that exists at that address in the original hardware, but which PinMame doesn't implement. The specifics would depend upon the game and system, but PinMame's lack of a handler is either because the nature of the original hardware peripheral is a mystery that no one has cracked yet, or because it's been rigorously determined that the hardware in question doesn't do anything that affects the emulation, and can safely be ignored with no loss of functionality. (If it's the latter, I'd personally consider it better form to add an explicit do-nothing handler that documents the nature of the peripheral and the reason it's being intentionally ignored, not so much to suppress the warnings as for the sake of future reference.)
@mjrgh thanks for that explanation!
Just to follow up. The existing logger only works for DEBUG build, and appears not to be thread-safe. I added a separate logger for altsound that is always available and configurable for logging levels. That eliminates the clutter from non-altsound sources.