From 015c1c6597300d49181237b63683c8ac0799a811 Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Sun, 5 Apr 2020 17:17:16 -0500 Subject: [PATCH] Actually make the height 240 --- src/configurations.rs | 16 ++++++++-------- src/writers/graphics_320x240x256.rs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/configurations.rs b/src/configurations.rs index 1c1b898..1478a9e 100644 --- a/src/configurations.rs +++ b/src/configurations.rs @@ -408,8 +408,8 @@ pub const MODE_320X240X256_CONFIGURATION: VgaConfiguration = VgaConfiguration { (CrtcControllerIndex::HorizontalBlankingEnd, 0x82), (CrtcControllerIndex::HorizontalSyncStart, 0x54), (CrtcControllerIndex::HorizontalSyncEnd, 0x80), - (CrtcControllerIndex::VeritcalTotal, 0xBF), - (CrtcControllerIndex::Overflow, 0x1F), + (CrtcControllerIndex::VeritcalTotal, 0x0D), + (CrtcControllerIndex::Overflow, 0x3E), (CrtcControllerIndex::PresetRowScan, 0x00), (CrtcControllerIndex::MaximumScanLine, 0x41), (CrtcControllerIndex::TextCursorStart, 0x00), @@ -418,14 +418,14 @@ pub const MODE_320X240X256_CONFIGURATION: VgaConfiguration = VgaConfiguration { (CrtcControllerIndex::StartAddressLow, 0x00), (CrtcControllerIndex::TextCursorLocationHigh, 0x00), (CrtcControllerIndex::TextCursorLocationLow, 0x00), - (CrtcControllerIndex::VerticalSyncStart, 0x9C), - (CrtcControllerIndex::VerticalSyncEnd, 0x0E), - (CrtcControllerIndex::VerticalDisplayEnableEnd, 0x8F), + (CrtcControllerIndex::VerticalSyncStart, 0xEA), + (CrtcControllerIndex::VerticalSyncEnd, 0xAC), + (CrtcControllerIndex::VerticalDisplayEnableEnd, 0xDF), (CrtcControllerIndex::Offset, 0x28), (CrtcControllerIndex::UnderlineLocation, 0x00), - (CrtcControllerIndex::VerticalBlankingStart, 0x96), - (CrtcControllerIndex::VerticalBlankingEnd, 0xB9), - (CrtcControllerIndex::ModeControl, 0xe3), + (CrtcControllerIndex::VerticalBlankingStart, 0xE7), + (CrtcControllerIndex::VerticalBlankingEnd, 0x06), + (CrtcControllerIndex::ModeControl, 0xE3), (CrtcControllerIndex::LineCompare, 0xFF), ], graphics_controller_registers: &[ diff --git a/src/writers/graphics_320x240x256.rs b/src/writers/graphics_320x240x256.rs index 197c4a1..ae89116 100644 --- a/src/writers/graphics_320x240x256.rs +++ b/src/writers/graphics_320x240x256.rs @@ -8,7 +8,7 @@ use crate::{ use font8x8::UnicodeFonts; const WIDTH: usize = 320; -const HEIGHT: usize = 200; +const HEIGHT: usize = 240; const SIZE: usize = (WIDTH * HEIGHT) / 4; #[derive(Debug, Clone, Copy, Default)]