Skip to content

Commit

Permalink
Reset X- and Y-offsets when enabling SVGA video mode
Browse files Browse the repository at this point in the history
Reset members svga_offset, svga_offset_x and svga_offset_y to 0 when enabling any SVGA video mode.

Behaviour copied from Bochs at: https://sourceforge.net/p/bochs/code/HEAD/tree/trunk/bochs/iodev/display/vga.cc#l1068
  • Loading branch information
chschnell authored and copy committed Sep 8, 2024
1 parent e3b43c1 commit 283bda1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vga.js
Original file line number Diff line number Diff line change
Expand Up @@ -2163,6 +2163,9 @@ VGAScreen.prototype.port1CF_write = function(value)

if(this.svga_enabled && this.dispi_index === 4)
{
this.svga_offset = 0;
this.svga_offset_x = 0;
this.svga_offset_y = 0;
this.set_size_graphical(this.svga_width, this.svga_height, this.svga_bpp, this.svga_width, this.svga_height);
this.bus.send("screen-set-mode", true);
this.graphical_mode = true;
Expand Down

0 comments on commit 283bda1

Please sign in to comment.