From 9858c962e481e2c1f44d26323450c62de97ca7ee Mon Sep 17 00:00:00 2001 From: Lokathor Date: Sun, 11 Nov 2018 00:25:26 -0700 Subject: [PATCH] "display control" to "display control register" --- book/src/SUMMARY.md | 2 +- ...ontrol.md => the_display_control_register.md} | 8 ++++---- docs/ch0/index.html | 4 ++-- docs/ch1/hello1.html | 2 +- docs/ch1/hello2.html | 2 +- docs/ch1/index.html | 2 +- docs/ch1/io_registers.html | 6 +++--- ...ol.html => the_display_control_register.html} | 16 ++++++++-------- docs/ch1/video_memory_intro.html | 6 +++--- docs/index.html | 2 +- docs/introduction.html | 2 +- docs/print.html | 16 ++++++++-------- docs/searchindex.js | 2 +- docs/searchindex.json | 2 +- 14 files changed, 36 insertions(+), 36 deletions(-) rename book/src/ch1/{the_display_control.md => the_display_control_register.md} (93%) rename docs/ch1/{the_display_control.html => the_display_control_register.html} (94%) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 0afee8f..6ac3978 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -6,6 +6,6 @@ * [Ch 1: Hello GBA](ch1/index.md) * [hello1](ch1/hello1.md) * [IO Registers](ch1/io_registers.md) - * [The Display Control](ch1/the_display_control.md) + * [The Display Control Register](ch1/the_display_control_register.md) * [Video Memory Intro](ch1/video_memory_intro.md) * [hello2](ch1/hello2.md) diff --git a/book/src/ch1/the_display_control.md b/book/src/ch1/the_display_control_register.md similarity index 93% rename from book/src/ch1/the_display_control.md rename to book/src/ch1/the_display_control_register.md index 82592ca..31ca0e8 100644 --- a/book/src/ch1/the_display_control.md +++ b/book/src/ch1/the_display_control_register.md @@ -10,7 +10,7 @@ that we can get a hint of what's to come. Also it's the one that you basically always need to set at least once in every GBA game, so it's a good starting one to go over for that reason too. -The Display Control is a `u16` value located at `0x0400_0000`. +The display control register holds a `u16` value, and is located at `0x0400_0000`. ## Video Modes @@ -45,8 +45,8 @@ locations on the screen. ## CGB Mode Bit 3 is effectively read only. Technically it can be flipped using a BIOS call, -but when you write to the display control normally it won't write to this bit, -so we'll call it effectively read only. +but when you write to the display control register normally it won't write to +this bit, so we'll call it effectively read only. This bit is on if the CPU is in CGB mode. @@ -90,7 +90,7 @@ some nifty graphical effects. ## In Conclusion... -So what did we do to the display control in `hello1`? +So what did we do to the display control register in `hello1`? ```rust (0x04000000 as *mut u16).write_volatile(0x0403); diff --git a/docs/ch0/index.html b/docs/ch0/index.html index f07c2a3..d49f1dc 100644 --- a/docs/ch0/index.html +++ b/docs/ch0/index.html @@ -72,7 +72,7 @@
@@ -216,7 +216,7 @@ get the idea.

At this point you have an ELF binary that some emulators can execute directly. This is helpful because it'll have debug symbols and all that, assuming a debug -build. Specifically, mgba 0.1 beta +build. Specifically, mgba 0.7 beta 1 can do it, and perhaps other emulators can also do it.

However, if you want a "real" ROM that works in all emulators and that you could diff --git a/docs/ch1/hello1.html b/docs/ch1/hello1.html index 822957c..d438603 100644 --- a/docs/ch1/hello1.html +++ b/docs/ch1/hello1.html @@ -72,7 +72,7 @@

diff --git a/docs/ch1/hello2.html b/docs/ch1/hello2.html index 49d84f8..aca6149 100644 --- a/docs/ch1/hello2.html +++ b/docs/ch1/hello2.html @@ -72,7 +72,7 @@
diff --git a/docs/ch1/index.html b/docs/ch1/index.html index 161b8e5..d245c24 100644 --- a/docs/ch1/index.html +++ b/docs/ch1/index.html @@ -72,7 +72,7 @@
diff --git a/docs/ch1/io_registers.html b/docs/ch1/io_registers.html index 838943a..fbc1fcb 100644 --- a/docs/ch1/io_registers.html +++ b/docs/ch1/io_registers.html @@ -72,7 +72,7 @@
@@ -182,7 +182,7 @@ array index is.

- @@ -200,7 +200,7 @@ array index is.

- diff --git a/docs/ch1/the_display_control.html b/docs/ch1/the_display_control_register.html similarity index 94% rename from docs/ch1/the_display_control.html rename to docs/ch1/the_display_control_register.html index b14ab6f..a6e7672 100644 --- a/docs/ch1/the_display_control.html +++ b/docs/ch1/the_display_control_register.html @@ -3,7 +3,7 @@ - The Display Control - Rust GBA Tutorials + The Display Control Register - Rust GBA Tutorials @@ -72,7 +72,7 @@
@@ -136,15 +136,15 @@
-

The Display Control

-

The Display Control is our first actual IO Register. GBATEK gives it the +

The Display Control Register

+

The display control register is our first actual IO Register. GBATEK gives it the shorthand DISPCNT, so you might see it under that name if you read other guides.

Among IO Registers, it's one of the simpler ones, but it's got enough complexity that we can get a hint of what's to come.

Also it's the one that you basically always need to set at least once in every GBA game, so it's a good starting one to go over for that reason too.

-

The Display Control is a u16 value located at 0x0400_0000.

+

The display control register holds a u16 value, and is located at 0x0400_0000.

Video Modes

The lowest three bits (0-2) let you select from among the GBA's six video modes. You'll notice that 3 bits allows for eight modes, but the values 6 and 7 are @@ -174,8 +174,8 @@ effectively only 160w x 128h in this mode.

CGB Mode

Bit 3 is effectively read only. Technically it can be flipped using a BIOS call, -but when you write to the display control normally it won't write to this bit, -so we'll call it effectively read only.

+but when you write to the display control register normally it won't write to +this bit, so we'll call it effectively read only.

This bit is on if the CPU is in CGB mode.

Page Flipping

Bit 4 lets you pick which page to use. This is only relevent in video modes 4 or @@ -205,7 +205,7 @@ be okay to use for a moment or two every once in a while.

object display window. We'll get into how windows work later on, they let you do some nifty graphical effects.

In Conclusion...

-

So what did we do to the display control in hello1?

+

So what did we do to the display control register in hello1?


 # #![allow(unused_variables)]
 #fn main() {
diff --git a/docs/ch1/video_memory_intro.html b/docs/ch1/video_memory_intro.html
index 972c019..60ffdb5 100644
--- a/docs/ch1/video_memory_intro.html
+++ b/docs/ch1/video_memory_intro.html
@@ -72,7 +72,7 @@
         
 
         
 
         
@@ -239,7 +239,7 @@ binary to make sense of it.