Sync push

This commit is contained in:
OmniaX-Dev 2024-09-15 07:57:24 +02:00
parent 9dd57c8057
commit 2c7dbea53d
8 changed files with 23 additions and 14 deletions

Binary file not shown.

View file

@ -44,6 +44,7 @@ _int_20_end:
## ========================== BIOS Video Interrupt handler =========================
_int_30_handler:
## debug_profile_start 0xE0, DBGProfilerTime.MILLIS
mov ACC, R10
jeq $_int_30_direct_print_char_text_single, 0x0001
jeq $_int_30_direct_new_line_text_single, 0x0002
@ -138,6 +139,7 @@ _int_30_write_vram_text16:
inc R9
movb [VGA_Registers.MEMORY_CONTROLLER_Y_BYTE], *R9
movb [VGA_Registers.SIGNAL], Sig_VGA_Text_16_Color.WRITE_VRAM
## debug_profile_stop
jmp $_int_30_end
_int_30_read_vram_text16:

View file

@ -1,5 +1,5 @@
## --
## -- This file is automatically generated by the DragonAssembler (version 0.4.1612)
## -- This file is automatically generated by the DragonAssembler (version 0.4.1613)
## -- Please do not modify this file in any way.
## --

View file

@ -25,7 +25,9 @@ draw_loop:
mov R10, 0x21
mov R9, $textCell
## debug_profile_start 0xE0, DBGProfilerTime.MILLIS
int 0x30
## debug_profile_stop
inc R5
mov ACC, R5

View file

@ -63,9 +63,9 @@ _disk_load_from_ddd_blocking:
and FL, 0b1111111111111110 ## Disable interrupts
mov FL, ACC
_disk_load_from_ddd_blocking_wait_loop:
debug_profile_start 0xE0, DBGProfilerTime.MILLIS
## debug_profile_start 0xE0, DBGProfilerTime.MILLIS
mov ACC, [{DISK_INTERFACE_ADDR + DiskRegisters.RO_STATUS}]
debug_profile_stop
## debug_profile_stop
jne $_disk_load_from_ddd_blocking_wait_loop, DiskStatus.FREE
or FL, 0b0000000000000001 ## Enable interrupts
mov FL, ACC

View file

@ -45,7 +45,10 @@ namespace dragon
void Renderer::updateBuffer(void)
{
if (isInvalid()) return;
ostd::Timer timer;
timer.start(true, "DISPLAY_PROFILER", ostd::eTimeUnits::Milliseconds);
SDL_UpdateTexture(m_texture, NULL, m_pixels, m_windowWidth * 4);
timer.end(true);
}
void Renderer::displayBuffer(void)

View file

@ -70,11 +70,12 @@ namespace dragon
m_refreshScreen = false;
}
}
m_renderer.updateBuffer();
m_renderer.displayBuffer();
}
static char c = 'A';
// static char c = 'A';
void VirtualDisplay::onUpdate(void)
{
@ -146,15 +147,15 @@ namespace dragon
int16_t y = mem.read16(vga_addr + tRegisters::MemControllerY);
//TODO: Remove this override used for testing purposes
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<uint8_t>(xy.x), static_cast<uint8_t>(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<uint8_t>(xy.x), static_cast<uint8_t>(xy.y), c++, 0, 15);
// if (c > 'Z')
// c = 'A';
// }
// DragonRuntime::vGraphicsInterface.writeVRAM_16Colors(static_cast<uint8_t>(x), static_cast<uint8_t>(y), textCell.character, textCell.backgroundColor, textCell.foregroundColor);
DragonRuntime::vGraphicsInterface.writeVRAM_16Colors(static_cast<uint8_t>(x), static_cast<uint8_t>(y), textCell.character, textCell.backgroundColor, textCell.foregroundColor);
}
}
else return;

View file

@ -352,7 +352,7 @@ 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);
@ -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();