From 2c7dbea53d016cbdbb72a703b2759c8aa1a61019 Mon Sep 17 00:00:00 2001 From: OmniaX-Dev Date: Sun, 15 Sep 2024 07:57:24 +0200 Subject: [PATCH] Sync push --- extra/dragon/disk1.dr | Bin 4194304 -> 4194304 bytes extra/dss/bios/drivers.dss | 2 ++ extra/dss/bios_api.dss | 2 +- extra/dss/drake/bootsector.dss | 2 ++ extra/dss/drake/disk.dss | 4 ++-- src/gui/Renderer.cpp | 3 +++ src/hardware/VirtualDisplay.cpp | 19 ++++++++++--------- src/runtime/DragonRuntime.cpp | 5 +++-- 8 files changed, 23 insertions(+), 14 deletions(-) diff --git a/extra/dragon/disk1.dr b/extra/dragon/disk1.dr index 29a386e1804ebcdbf97f62b9d618b3b0856cae79..07194b3122d7c6ac81367092d194e1bad03f82f3 100644 GIT binary patch delta 238 zcmW;AIZgs$0D#fV@H?oWe1Ispf(tIVuizRB3U9*^ruixxlevhI7?0sGY%MHJlu*3p zrD+?!)l22ps6f5JG1zey-(FL8fJ{qsvAi6tjNCM1!(Ov;o@OF@b< zBePNxq%0Mw%AC|>UKXS-4Ox^WS(X)9l{INfOV(vWHf2lNvMoEZD|^zBeL0XrIg(>J ckyAO7bGeX9xstB*{263Y)0JXe8brgd;P)q-MN62>(xy.x), static_cast(xy.y), c++, 0, 15); - if (c > 'Z') - c = 'A'; - } + // for (int32_t i = 0; i < RawTextRenderer::CONSOLE_CHARS_V * RawTextRenderer::CONSOLE_CHARS_H; i++) + // { + // auto xy = CONVERT_1D_2D(i, RawTextRenderer::CONSOLE_CHARS_H); + // DragonRuntime::vGraphicsInterface.writeVRAM_16Colors(static_cast(xy.x), static_cast(xy.y), c++, 0, 15); + // if (c > 'Z') + // c = 'A'; + // } - // DragonRuntime::vGraphicsInterface.writeVRAM_16Colors(static_cast(x), static_cast(y), textCell.character, textCell.backgroundColor, textCell.foregroundColor); + DragonRuntime::vGraphicsInterface.writeVRAM_16Colors(static_cast(x), static_cast(y), textCell.character, textCell.backgroundColor, textCell.foregroundColor); } } else return; diff --git a/src/runtime/DragonRuntime.cpp b/src/runtime/DragonRuntime.cpp index bae5ef5..f1c9fce 100644 --- a/src/runtime/DragonRuntime.cpp +++ b/src/runtime/DragonRuntime.cpp @@ -352,14 +352,14 @@ namespace dragon ostd::Timer clock_timer; bool running = true; bool fixed_clock = machine_config.fixed_clock; - // ostd::Timer _timer; + ostd::Timer _timer; while (running || vDiskInterface.isBusy()) { clock_timer.startCount(ostd::eTimeUnits::Microseconds); ostd::SignalHandler::refresh(); uint16_t addr = cpu.readRegister(dragon::data::Registers::IP); uint16_t spAddr = cpu.readRegister(dragon::data::Registers::SP); - // _timer.start(true, "Profiling", ostd::eTimeUnits::Microseconds, &out); + // _timer.start(true, "Profiling", ostd::eTimeUnits::Microseconds, &out); running = cpu.execute() && vDisplay.isRunning(); // _timer.end(true); vDisplay.update(); @@ -374,6 +374,7 @@ namespace dragon avg_count++; avg_tot += _time; s_avgInstTime = (uint64_t)std::round(avg_tot / avg_count); + // out.fg(ostd::ConsoleColors::Red).p(s_avgInstTime).nl().reset(); acc = 0; } _time = clock_timer.endCount();