mirror of
https://github.com/italicsjenga/gba.git
synced 2025-01-11 03:21:30 +11:00
begin re-oganization
This commit is contained in:
parent
53f64f2260
commit
ad7cac6628
23
book/src-bak/SUMMARY.md
Normal file
23
book/src-bak/SUMMARY.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
# Rust GBA Tutorials
|
||||
|
||||
* [Introduction](introduction.md)
|
||||
* [Ch 0: Development Setup](ch00/index.md)
|
||||
* [Ch 1: Hello GBA](ch01/index.md)
|
||||
* [hello1](ch01/hello1.md)
|
||||
* [Volatile](ch01/volatile.md)
|
||||
* [IO Registers](ch01/io_registers.md)
|
||||
* [The Display Control Register](ch01/the_display_control_register.md)
|
||||
* [Video Memory Intro](ch01/video_memory_intro.md)
|
||||
* [hello2](ch01/hello2.md)
|
||||
* [Ch 2: User Input](ch02/index.md)
|
||||
* [The Key Input Register](ch02/the_key_input_register.md)
|
||||
* [The VCount Register](ch02/the_vcount_register.md)
|
||||
* [light_cycle](ch02/light_cycle.md)
|
||||
* [Ch 3: Memory and Objects](ch03/index.md)
|
||||
* [GBA Memory Mapping](ch03/gba_memory_mapping.md)
|
||||
* [Tile Data](ch03/tile_data.md)
|
||||
* [Regular Backgrounds](ch03/regular_backgrounds.md)
|
||||
* [Regular Objects](ch03/regular_objects.md)
|
||||
* [GBA PRNG](ch03/gba_prng.md)
|
||||
* [memory_game](ch03/memory_game.md)
|
|
@ -183,7 +183,7 @@ pub struct RegularScreenblockEntry(u16);
|
|||
|
||||
impl RegularScreenblockEntry {
|
||||
pub const SCREENBLOCK_ENTRY_TILE_ID_MASK: u16 = 0b11_1111_1111;
|
||||
pub fn from_tile_id(id: u16) -> Self {
|
||||
pub const fn from_tile_id(id: u16) -> Self {
|
||||
RegularScreenblockEntry(id & Self::SCREENBLOCK_ENTRY_TILE_ID_MASK)
|
||||
}
|
||||
}
|
||||
|
@ -243,8 +243,9 @@ the "screen base block" value.
|
|||
pub struct BackgroundControlSetting(u16);
|
||||
|
||||
impl BackgroundControlSetting {
|
||||
pub fn from_base_block(sbb: u16) -> Self {
|
||||
BackgroundControlSetting(sbb << 8)
|
||||
pub const SCREEN_BASE_BLOCK_MASK: u16 = 0b1_1111;
|
||||
pub const fn from_base_block(sbb: u16) -> Self {
|
||||
BackgroundControlSetting((sbb & Self::SCREEN_BASE_BLOCK_MASK) << 8)
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
@ -1,23 +1,34 @@
|
|||
|
||||
# Rust GBA Tutorials
|
||||
|
||||
* [Introduction](introduction.md)
|
||||
* [Ch 0: Development Setup](ch00/index.md)
|
||||
* [Ch 1: Hello GBA](ch01/index.md)
|
||||
* [hello1](ch01/hello1.md)
|
||||
* [Volatile](ch01/volatile.md)
|
||||
* [IO Registers](ch01/io_registers.md)
|
||||
* [The Display Control Register](ch01/the_display_control_register.md)
|
||||
* [Video Memory Intro](ch01/video_memory_intro.md)
|
||||
* [hello2](ch01/hello2.md)
|
||||
* [Ch 2: User Input](ch02/index.md)
|
||||
* [The Key Input Register](ch02/the_key_input_register.md)
|
||||
* [The VCount Register](ch02/the_vcount_register.md)
|
||||
* [light_cycle](ch02/light_cycle.md)
|
||||
* [Ch 3: Memory and Objects](ch03/index.md)
|
||||
* [GBA Memory Mapping](ch03/gba_memory_mapping.md)
|
||||
* [Tile Data](ch03/tile_data.md)
|
||||
* [Regular Backgrounds](ch03/regular_backgrounds.md)
|
||||
* [Regular Objects](ch03/regular_objects.md)
|
||||
* [GBA PRNG](ch03/gba_prng.md)
|
||||
* [memory_game](ch03/memory_game.md)
|
||||
* Introduction
|
||||
* Goals Of This Book
|
||||
* Prerequisites
|
||||
* Getting Outside Help
|
||||
* Development Setup
|
||||
* Hello Magic
|
||||
* Volatile
|
||||
* Core Only
|
||||
* Broad Concepts
|
||||
* BIOS
|
||||
* Working RAM
|
||||
* IO Registers
|
||||
* Palette RAM
|
||||
* Video RAM
|
||||
* Object Attribute Memory
|
||||
* Game Pak ROM / Flash ROM
|
||||
* Save RAM
|
||||
* Video Modes
|
||||
* RBG15 Color
|
||||
* Bitmap Modes
|
||||
* Tiled Modes
|
||||
* Affine Math
|
||||
* Special Effects
|
||||
* Non-Video Hardware
|
||||
* Buttons
|
||||
* Timers
|
||||
* Direct Memory Access
|
||||
* Sound
|
||||
* Interrupts
|
||||
* Network
|
||||
* Game Pak
|
||||
* Examples
|
||||
* for example in example_list
|
||||
|
|
|
@ -107,7 +107,7 @@ pub struct RegularScreenblockEntry(u16);
|
|||
|
||||
impl RegularScreenblockEntry {
|
||||
pub const SCREENBLOCK_ENTRY_TILE_ID_MASK: u16 = 0b11_1111_1111;
|
||||
pub fn from_tile_id(id: u16) -> Self {
|
||||
pub const fn from_tile_id(id: u16) -> Self {
|
||||
RegularScreenblockEntry(id & Self::SCREENBLOCK_ENTRY_TILE_ID_MASK)
|
||||
}
|
||||
}
|
||||
|
@ -136,8 +136,9 @@ pub fn checker_screenblock(slot: usize, a_entry: RegularScreenblockEntry, b_entr
|
|||
pub struct BackgroundControlSetting(u16);
|
||||
|
||||
impl BackgroundControlSetting {
|
||||
pub fn from_base_block(sbb: u16) -> Self {
|
||||
BackgroundControlSetting(sbb << 8)
|
||||
pub const SCREEN_BASE_BLOCK_MASK: u16 = 0b1_1111;
|
||||
pub const fn from_base_block(sbb: u16) -> Self {
|
||||
BackgroundControlSetting((sbb & Self::SCREEN_BASE_BLOCK_MASK) << 8)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue