1- use super :: {
2- PPU , PPU_MODE_WHILE_LCD_TURNED_OFF , RenderingMode ,
3- } ;
1+ use super :: { PPU , PPU_MODE_WHILE_LCD_TURNED_OFF , RenderingMode } ;
42use crate :: cpu:: { clear_bit, is_bit_set, set_bit} ;
53
6- use crate :: debugging:: DebuggingFlagsWithoutFileHandles ;
7- use crate :: interrupts:: { Interrupt , InterruptFlagRegister } ;
84use crate :: MemoryBus ;
5+ use crate :: interrupts:: { Interrupt , InterruptFlagRegister } ;
96
107// Addresses of the GPU registers
118const LCDC_REGISTER_ADDRESS : usize = 0xFF40 ;
@@ -37,7 +34,7 @@ const LYC_INT_SELECT_BIT_POSITION: usize = 6;
3734/// Represents the registers that control the GPU.
3835///
3936/// This struct is empty and has no fields. Instead it is just used to group the GPU registers and make
40- /// the interface nicer. The actual data of the registers is held in the [MemoryBus](crate:: MemoryBus).
37+ /// the interface nicer. The actual data of the registers is held in the [MemoryBus](MemoryBus).
4138///
4239/// TODO: Explain static function setup
4340///
@@ -53,12 +50,10 @@ const LYC_INT_SELECT_BIT_POSITION: usize = 6;
5350/// - 0xFF49: OBP1 - Object Palette 1 Data Register
5451/// - 0xFF4A: WY - Window Y Position Register
5552/// - 0xFF4B: WX - Window X Position Register
56- pub struct PPURegisters {
57- pub ( super ) debugging_flags : DebuggingFlagsWithoutFileHandles ,
58- }
53+ pub struct PPURegisters { }
5954
6055/// Represents the LCDC register of the GPU. This struct is empty and has no fields. Instead, it is
61- /// just used to make the interface nicer and the actual register is held in the [MemoryBus](crate:: MemoryBus).
56+ /// just used to make the interface nicer and the actual register is held in the [MemoryBus](MemoryBus).
6257///
6358/// TODO: Explain static function setup
6459///
@@ -75,7 +70,7 @@ pub struct PPURegisters {
7570pub struct LCDCRegister { }
7671
7772/// Represents the LCD status register of the GPU. This struct is empty and has no fields. Instead, it is
78- /// just used to make the interface nicer and the actual register is held in the [MemoryBus](crate:: MemoryBus).
73+ /// just used to make the interface nicer and the actual register is held in the [MemoryBus](MemoryBus).
7974///
8075/// TODO: Explain static function setup
8176///
@@ -136,12 +131,6 @@ impl PPU {
136131}
137132
138133impl PPURegisters {
139- /// Creates a new instance of the GPURegisters struct with all registers set to their default
140- /// startup values.
141- pub fn new ( debugging_flags : DebuggingFlagsWithoutFileHandles ) -> Self {
142- Self { debugging_flags }
143- }
144-
145134 /// Set the LCD Control register to the provided value.
146135 ///
147136 /// Also sets flags in the provided [super::ChangesToPropagateToShader] struct, to keep track of which parts
@@ -457,7 +446,7 @@ impl LCDCRegister {
457446}
458447
459448impl LCDStatusRegister {
460- /// Returns the GPU mode as a [super:: RenderingMode] enum.
449+ /// Returns the GPU mode as a [RenderingMode] enum.
461450 fn get_ppu_mode ( memory_bus : & MemoryBus ) -> RenderingMode {
462451 RenderingMode :: from_u8 ( memory_bus. memory [ LCD_STATUS_REGISTER_ADDRESS ] & 0b0000_0011 )
463452 }
0 commit comments