Skip to content

Commit

Permalink
fix VIDEO3_VRAM
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokathor committed Nov 15, 2023
1 parent 744704e commit 6b71466
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

* **0.11.2:**
* **Soundness:** Fixed the definition of `VIDEO3_VRAM`, now it's the correct
type and it will correctly stay in bounds.

* **0.11.1:**
* Fixed incorrect timer 1/2/3 addresses (classic copy-paste error).
* Fixed missing argument ordering swap in memset between the libc version and
Expand Down
4 changes: 2 additions & 2 deletions src/mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

use core::{ffi::c_void, mem::size_of};
use bitfrob::u8x2;
use voladdress::{Safe, Unsafe, VolAddress, VolBlock, VolSeries, VolGrid2dStrided};
use voladdress::{Safe, Unsafe, VolAddress, VolBlock, VolSeries, VolGrid2dStrided, VolGrid2d};
use crate::prelude::*;

// Note(Lokathor): This macro lets us stick each address at the start of the
Expand Down Expand Up @@ -249,7 +249,7 @@ def_mmio!(0x0600_0000 = AFFINE2_SCREENBLOCKS: VolGrid2dStrided<u8x2, Safe, Safe,

def_mmio!(0x0600_0000 = AFFINE3_SCREENBLOCKS: VolGrid2dStrided<u8x2, Safe, Safe, 64, 128, 25, SCREENBLOCK_INDEX_OFFSET>; "Affine screenblocks (size 3).");

def_mmio!(0x0600_0000 = VIDEO3_VRAM: VolGrid2dStrided<Color, Safe, Safe, 240, 160, 2, 0xA000>; "Video mode 3 bitmap");
def_mmio!(0x0600_0000 = VIDEO3_VRAM: VolGrid2d<Color, Safe, Safe, 240, 160>; "Video mode 3 bitmap");

def_mmio!(0x0600_0000 = VIDEO4_VRAM: VolGrid2dStrided<u8x2, Safe, Safe, 120, 160, 2, 0xA000>; "Video mode 4 palette maps (frames 0 and 1). Each entry is two palette indexes.");

Expand Down

0 comments on commit 6b71466

Please sign in to comment.