fix: fix errors in memory-map xml

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-12-15 06:27:41 -04:00
parent 51082186d7
commit 2bc5bdc310
2 changed files with 14 additions and 17 deletions

View File

@ -181,6 +181,8 @@ pub fn parse(self: *Self, allocator: Allocator, emu: Emulator) !String {
const offset_str = tokens.next() orelse return .{ .static = "E9999" };
const length_str = tokens.next() orelse return .{ .static = "E9999" };
log.info("Providing GBA memory map", .{});
const offset = try std.fmt.parseInt(usize, offset_str, 16);
const length = try std.fmt.parseInt(usize, length_str, 16);

View File

@ -39,23 +39,18 @@ pub const target: []const u8 =
// 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>;
\\ <memory-map version="1.0">
\\ <memory type="rom" start="0x00000000" length="0x00004000"/>
\\ <memory type="ram" start="0x02000000" length="0x00040000"/>
\\ <memory type="ram" start="0x03000000" length="0x00008000"/>
\\ <memory type="ram" start="0x04000000" length="0x00000400"/>
\\ <memory type="ram" start="0x05000000" length="0x00000400"/>
\\ <memory type="ram" start="0x06000000" length="0x00018000"/>
\\ <memory type="ram" start="0x07000000" length="0x00000400"/>
\\ <memory type="rom" start="0x08000000" length="0x02000000"/>
\\ <memory type="rom" start="0x0A000000" length="0x02000000"/>
\\ <memory type="rom" start="0x0C000000" length="0x02000000"/>
\\ </memory-map>
;
// FIXME: Shouldn't this be a Packet Struct?