diff --git a/src/inst.rs b/src/inst.rs index 8b059a595d8a894afacebf4cbb24e369096ef15a..36164bd842ef68c87fa530d6d15d2bdf4cac124a 100644 --- a/src/inst.rs +++ b/src/inst.rs @@ -1,3 +1,5 @@ +//! CPU instructions implementation for the Sharp LR35902. + use crate::cpu::Cpu; pub const INSTRUCTIONS: [Instruction; 256] = [ diff --git a/src/lib.rs b/src/lib.rs index a1dd66469c15726cfd0f3d780b4cc913dd7cbf87..adb34f3f9483a679797268726a40d0786a7c6f58 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,7 +14,7 @@ pub mod gb; pub mod gen; pub mod info; pub mod inst; -pub mod license; +pub mod licensee; pub mod macros; pub mod mmu; pub mod pad; diff --git a/src/license.rs b/src/licensee.rs similarity index 99% rename from src/license.rs rename to src/licensee.rs index 222cc507f6176d1788abd72844ba628ba899c41d..126983b3209b7dca2fc86e90d60ed4d974588b53 100644 --- a/src/license.rs +++ b/src/licensee.rs @@ -1,3 +1,5 @@ +//! Game Boy licensee vendors information and static enumerations. + use std::fmt::{self, Display, Formatter}; #[cfg(feature = "wasm")] diff --git a/src/rom.rs b/src/rom.rs index 0da4c4ce9b6c8e5a4029766f97792b8e6e50e3f1..5e9a6e22428437c992d21803fffd5de4909c237f 100644 --- a/src/rom.rs +++ b/src/rom.rs @@ -1,3 +1,5 @@ +//! Cartridge (ROM) related functions and structures. + use core::fmt; use std::{ cmp::max, @@ -10,7 +12,7 @@ use crate::{ debugln, error::Error, gb::GameBoyMode, - license::Licensee, + licensee::Licensee, mmu::BusComponent, util::read_file, warnln, diff --git a/src/test.rs b/src/test.rs index a65e5b77044bfcc72e177e0048bdc710482a8b3f..dc4c28cf1162008438e211e059984a01978d897b 100644 --- a/src/test.rs +++ b/src/test.rs @@ -80,7 +80,7 @@ mod tests { }, data::BootRom, gb::GameBoyMode, - license::Licensee, + licensee::Licensee, rom::{RamSize, Region, RomSize}, }; diff --git a/src/timer.rs b/src/timer.rs index 311c43706b57fac85b4fd556c04854504b8b61ce..c70b8ff17e967f7da8c0881207ecebb855054aec 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -1,3 +1,5 @@ +//! Timer functions and structures. + use crate::{ consts::{DIV_ADDR, TAC_ADDR, TIMA_ADDR, TMA_ADDR}, mmu::BusComponent, diff --git a/src/util.rs b/src/util.rs index be45a0e2bb04c8b7d12facdab77fa107e3c193e5..814ccafe154090bcf543843e28338ef8c2b8431e 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,3 +1,5 @@ +//! Assorted utility functions and structures. + use std::{ cell::RefCell, fs::File,