From fd38874932217d9c8154ed96cf325152213a30f0 Mon Sep 17 00:00:00 2001 From: OmniaX-Dev Date: Tue, 16 Jun 2026 07:21:47 +0200 Subject: [PATCH] Sync push --- extra/info/info | 1 - src/debugger/Data.hpp | 32 +++++++++++++++++++++++++++++++ src/hardware/VirtualIODevices.cpp | 6 +++--- src/runtime/DragonRuntime.cpp | 22 +++++++++++++++++++++ 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 src/debugger/Data.hpp diff --git a/extra/info/info b/extra/info/info index 7ceaf46..f0940ee 100644 --- a/extra/info/info +++ b/extra/info/info @@ -115,7 +115,6 @@ 0x8A: Background (1 Byte) (VRAM Memory Cell: Character:1, Foreground:1, Background:1, Reserved:1) - 0x16FF ------- 0x1700 GENERIC SERIAL INTERFACE (64 Bytes) diff --git a/src/debugger/Data.hpp b/src/debugger/Data.hpp new file mode 100644 index 0000000..2951d89 --- /dev/null +++ b/src/debugger/Data.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "../tools/GlobalData.hpp" + +namespace dragon +{ + namespace debugger + { + struct Run + { + AddressType offset; + stdvec old_bytes; + stdvec new_bytes; + }; + struct Keyframe + { + u64 cycle; + stdvec full_state; // entire memory image at this cycle + }; + struct CycleDiff + { + u64 cycle; + stdvec runs; // empty if nothing changed + }; + struct History + { + u32 keyframe_interval { 1000 }; + stdvec keyframes; // one every `interval` cycles + stdvec diffs; // one per cycle (including keyframe cycles, optional) + }; + } +} diff --git a/src/hardware/VirtualIODevices.cpp b/src/hardware/VirtualIODevices.cpp index ca82fd4..fa2a37d 100644 --- a/src/hardware/VirtualIODevices.cpp +++ b/src/hardware/VirtualIODevices.cpp @@ -65,7 +65,7 @@ namespace dragon InterruptVector::InterruptVector(void) { - u32 dataSize = data::MemoryMapAddresses::IntVector_End - data::MemoryMapAddresses::IntVector_Start; + u32 dataSize = data::MemoryMapAddresses::IntVector_End - data::MemoryMapAddresses::IntVector_Start + 1; for (i32 i = 0; i < dataSize; i++) m_data.push_back(0x00); } @@ -113,7 +113,7 @@ namespace dragon void VirtualKeyboard::init(void) { - u32 dataSize = data::MemoryMapAddresses::Keyboard_End - data::MemoryMapAddresses::Keyboard_Start; + u32 dataSize = data::MemoryMapAddresses::Keyboard_End - data::MemoryMapAddresses::Keyboard_Start + 1; for (i32 i = 0; i < dataSize; i++) m_data.push_back(0x00); enableSignals(); @@ -660,7 +660,7 @@ namespace dragon Graphics::Graphics(void) { m_videoMemory.init(0xFFFF); - m_vramStart = data::MemoryMapAddresses::VideoCardInterface_End - data::MemoryMapAddresses::VideoCardInterface_Start; + m_vramStart = data::MemoryMapAddresses::VideoCardInterface_End - data::MemoryMapAddresses::VideoCardInterface_Start + 1; m_16Color_frameSize = ogfx::PixelRenderer::TextRenderer::CONSOLE_CHARS_H * ogfx::PixelRenderer::TextRenderer::CONSOLE_CHARS_V * m_16Color_cellSize; m_16Color_currentFrameAddr = m_vramStart; m_16Color_secondFrameAddr = m_vramStart + m_16Color_frameSize; diff --git a/src/runtime/DragonRuntime.cpp b/src/runtime/DragonRuntime.cpp index 0c6ece5..f923bc8 100644 --- a/src/runtime/DragonRuntime.cpp +++ b/src/runtime/DragonRuntime.cpp @@ -292,6 +292,28 @@ namespace dragon out.fg(ostd::ConsoleColors::BrightYellow).p(" Loading CMOS Machine info").nl(); out.nl().nl(); + + + + + ostd::ByteStream test; + test.reserve(0xFFFF); + for (i32 i = 0; i < 0xFFFF; i++) + { + std::cout << (int)i << "\n"; + test.push_back(memMap.read8(cast(i))); + } + exit(0); + + + + + + + + + + return RETURN_VAL_EXIT_SUCCESS; }