agb/examples/output.rs

25 lines
497 B
Rust
Raw Normal View History

2021-03-09 10:25:08 +11:00
#![no_std]
#![feature(start)]
2021-04-16 07:10:00 +10:00
extern crate agb;
2021-03-09 10:25:08 +11:00
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
2021-04-16 07:10:00 +10:00
let mut gba = agb::Gba::new();
let mut mgba = agb::mgba::Mgba::new().unwrap();
2021-03-09 10:25:08 +11:00
let vblank = gba.display.vblank.get();
let mut count = 0;
loop {
vblank.wait_for_VBlank();
mgba.print(
format_args!("Hello, world, frame = {}", count),
2021-04-16 07:10:00 +10:00
agb::mgba::DebugLevel::Info,
2021-03-09 10:25:08 +11:00
)
.unwrap();
count += 1;
}
}