Reduce duplication, only reload the active game when its settings are
changed, not any game.
NOTE: Changing from not having an ini to having one (i.e. setting the
first setting) is currently broken.
Prevent register writes from clearing the bit, which means a OTC at the
end of memory would trigger a DMA error even though the actual clear is
forced to be negative.
Fixes missing every-other-frame/flicker in Prism Land Story.
Ignore the metadata PT_LOAD segment emitted by PS1 linker scripts and
validate loadable segment ranges before invoking the loader callback.
Fixes kernel crash when loading.
Emit rwatch, watch, or awatch stop fields for the matching client and
preserve that complete stop reply for later '?' queries, while falling
back to a generic trap for unrelated breakpoints.
Pass the actual breakpoint type to callbacks, let their return value
control whether the breakpoint is retained, and then follow the normal
breakpoint pause path. This makes callback-backed execute and memory
breakpoints observable without bypassing the instruction-completion
behavior used by watchpoints.
Interpret Z2/Z3/Z4 kind values as byte lengths and represent each
watched byte with an owned CPU breakpoint. Validate MIPS
execute-breakpoint kinds, reject zero, overflowing, or excessively
large watch ranges, and avoid invasive changes to the CPU
memory-access dispatcher.
Represent protocol breakpoint types with a scoped enum and track each
client's logical breakpoints separately from a shared reference-counted
CPU breakpoint registry. Disconnects now remove only breakpoints
created by GDB, preserve pre-existing UI breakpoints, and keep
breakpoints alive while another GDB client still references them.
Remember whether the system was running before the first debugger
client forced it to pause, and resume only after the final client
disconnects. This prevents a dropped connection or disabled server
from leaving an originally running system paused, while preserving a
pause that predated debugger attachment and avoiding premature resumes
with multiple clients.
Accept the remote protocol's C and S packet forms, including their
optional resume addresses, so GDB can continue or step after reporting
a signal. Validate the signal and address fields completely; signal
delivery itself is intentionally ignored because the emulated
bare-metal target has no inferior process signal mechanism.
Enforce the advertised PacketSize while scanning the receive buffer.
Close clients that exceed the framed packet limit so an unterminated
or oversized request cannot fill the fixed receive buffer and leave
the connection permanently stalled.
Keep the most recently framed RSP reply for each client and resend it
when GDB returns a negative acknowledgement. Build acknowledgement and
reply frames separately so only the reply packet is retained for
protocol recovery.
Expose BufferedStreamSocket's allow-smaller policy through Write while
preserving the existing default for other callers. GDB replies now
require enough queue space for the complete RSP packet and close the
connection instead of silently discarding an unwritten suffix.
Advertise a 16 KiB RSP PacketSize and cap memory reads so their
hex-encoded replies fit within it. This prevents small m packets from
requesting multi-gigabyte allocations and keeps generated replies
within the server's transport capacity.