feat: implement gdb memory map

This commit is contained in:
2022-12-15 05:06:50 -04:00
parent 400e155502
commit 8a58251ef6
2 changed files with 47 additions and 2 deletions

View File

@@ -36,6 +36,28 @@ pub const target: []const u8 =
\\</target>
;
// Game Pak SRAM isn't included
// TODO: Can i be more specific here?
pub const memory_map: []const u8 =
\\ <?xml version="1.0"?>
\\ <!DOCTYPE memory-map
\\ PUBLIC "+//IDN gnu.org//DTD GDB Memory Map V1.0//EN"
\\ "http://sourceware.org/gdb/gdb-memory-map.dtd">
\\
\\ <memory-map>
\\ <memory type="rom" start="0" length="4000">
\\ <memory type="ram" start="2000000" length="40000">
\\ <memory type="ram" start="3000000" length="8000">
\\ <memory type="ram" start="4000000" length="400">
\\ <memory type="ram" start="5000000" length="400">
\\ <memory type="ram" start="6000000" length="18000">
\\ <memory type="ram" start="7000000" length="400">
\\ <memory type="rom" start="8000000" length="20000000">
\\ <memory type="rom" start="A000000" length="20000000">
\\ <memory type="rom" start="C000000" length="20000000">
\\ </memory-map>;
;
// FIXME: Shouldn't this be a Packet Struct?
pkt_cache: ?[]const u8 = null,