mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-24 03:11:29 +11:00
25 lines
637 B
Rust
25 lines
637 B
Rust
#![no_std]
|
|
#![feature(start)]
|
|
#![forbid(unsafe_code)]
|
|
|
|
use gba::{
|
|
io::display::{DisplayControlSetting, DisplayMode, DISPCNT},
|
|
vram::bitmap::Mode3,
|
|
Color,
|
|
};
|
|
|
|
#[panic_handler]
|
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
|
loop {}
|
|
}
|
|
|
|
#[start]
|
|
fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
|
const SETTING: DisplayControlSetting = DisplayControlSetting::new().with_mode(DisplayMode::Mode3).with_bg2(true);
|
|
DISPCNT.write(SETTING);
|
|
Mode3::write_pixel(120, 80, Color::from_rgb(31, 0, 0));
|
|
Mode3::write_pixel(136, 80, Color::from_rgb(0, 31, 0));
|
|
Mode3::write_pixel(120, 96, Color::from_rgb(0, 0, 31));
|
|
loop {}
|
|
}
|