mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
get cycles
This commit is contained in:
parent
cda7e95a28
commit
744c7a8bb4
|
@ -89,7 +89,9 @@ where
|
|||
mgba::DebugLevel::Info,
|
||||
)
|
||||
.unwrap();
|
||||
mgba::number_of_cycles_tagged(785);
|
||||
self(gba);
|
||||
mgba::number_of_cycles_tagged(785);
|
||||
mgba.print(format_args!("[ok]"), mgba::DebugLevel::Info)
|
||||
.unwrap();
|
||||
}
|
||||
|
@ -138,6 +140,8 @@ pub extern "C" fn main() -> ! {
|
|||
|
||||
#[cfg(test)]
|
||||
fn assert_image_output(image: &str) {
|
||||
display::busy_wait_for_VBlank();
|
||||
display::busy_wait_for_VBlank();
|
||||
let mut mgba = crate::mgba::Mgba::new().unwrap();
|
||||
mgba.print(
|
||||
format_args!("image:{}", image),
|
||||
|
|
|
@ -26,6 +26,12 @@ fn is_running_in_mgba() -> bool {
|
|||
DEBUG_ENABLE.get() == ENABLE_HANDSHAKE_OUT
|
||||
}
|
||||
|
||||
const NUMBER_OF_CYCLES: MemoryMapped<u16> = unsafe { MemoryMapped::new(0x04FF_F800) };
|
||||
|
||||
pub fn number_of_cycles_tagged(tag: u16) {
|
||||
NUMBER_OF_CYCLES.set(tag)
|
||||
}
|
||||
|
||||
pub struct Mgba {
|
||||
bytes_written: usize,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue