mirror of
https://github.com/kirjavascript/trueLMAO.git
synced 2024-05-20 05:10:21 -04:00
memory editor
This commit is contained in:
parent
72e0ceca2e
commit
5be8e11dbc
|
@ -22,6 +22,31 @@ impl Debug {
|
|||
palette::palette_window(&ctx, &emu);
|
||||
self.vram.render(&ctx, &emu);
|
||||
|
||||
egui::Window::new("memory")
|
||||
.show(ctx, |ui| {
|
||||
|
||||
// emu.core.mem.ram
|
||||
let bytes_row = 16;
|
||||
let total_bytes = 0x10000;
|
||||
let rows = total_bytes / bytes_row;
|
||||
|
||||
egui::ScrollArea::vertical()
|
||||
.max_height(512.)
|
||||
.show_rows(ui, 8., rows, |ui, row_range| {
|
||||
for i in row_range {
|
||||
let offset = i * bytes_row;
|
||||
let bytes = (offset..offset+bytes_row)
|
||||
.enumerate()
|
||||
.map(|(idx, offset)| {
|
||||
format!(" {:02x}", emu.core.mem.ram[idx + offset])
|
||||
}).collect::<String>();
|
||||
|
||||
|
||||
ui.label(format!("{:02x} {}", i, bytes));
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue