Skip to content

Commit

Permalink
vga: update memory even when text mode coords are oob (fixes openbsd …
Browse files Browse the repository at this point in the history
…bootfloppy)
  • Loading branch information
copy committed Apr 20, 2024
1 parent 53d8395 commit fd74aed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vga.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,8 @@ VGAScreen.prototype.text_mode_redraw = function()

VGAScreen.prototype.vga_memory_write_text_mode = function(addr, value)
{
this.vga_memory[addr] = value;

const max_cols = Math.max(this.max_cols, this.offset_register * 2);
let row;
let col;
Expand Down Expand Up @@ -918,8 +920,6 @@ VGAScreen.prototype.vga_memory_write_text_mode = function(addr, value)
this.bus.send("screen-put-char", [row, col, chr,
this.vga256_palette[this.dac_mask & this.dac_map[color >> 4 & 0xF]],
this.vga256_palette[this.dac_mask & this.dac_map[color & 0xF]]]);

this.vga_memory[addr] = value;
};

VGAScreen.prototype.update_cursor = function()
Expand Down

0 comments on commit fd74aed

Please sign in to comment.