mirror of
https://github.com/italicsjenga/gba.git
synced 2025-01-23 07:56:33 +11:00
new aims
This commit is contained in:
parent
6e89a16bbf
commit
9c547a62b1
3 changed files with 20 additions and 12 deletions
|
@ -16,7 +16,7 @@ before_script:
|
|||
- cargo install-update -a
|
||||
|
||||
script:
|
||||
# Obtain the devkitPro tools, using target as a temp directory
|
||||
# Obtain the devkitPro tools, using `target/` as a temp directory
|
||||
- mkdir -p target
|
||||
- cd target
|
||||
- wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
|
||||
# Rust GBA Guide
|
||||
|
||||
* Introduction
|
||||
* Goals Of This Book
|
||||
* Prerequisites
|
||||
* Reader Requirements
|
||||
* Book Goals and Style
|
||||
* Getting Outside Help
|
||||
* Development Setup
|
||||
* Hello Magic
|
||||
* Volatile
|
||||
* GBA Limitations
|
||||
* No Floats
|
||||
* Core Only
|
||||
* Volatile Destination
|
||||
* Broad Concepts
|
||||
* BIOS
|
||||
* Working RAM
|
||||
|
@ -16,13 +20,13 @@
|
|||
* Object Attribute Memory
|
||||
* Game Pak ROM / Flash ROM
|
||||
* Save RAM
|
||||
* Video Modes
|
||||
* Video
|
||||
* RBG15 Color
|
||||
* Bitmap Modes
|
||||
* Tiled Modes
|
||||
* Affine Math
|
||||
* Special Effects
|
||||
* Non-Video Hardware
|
||||
* Non-Video
|
||||
* Buttons
|
||||
* Timers
|
||||
* Direct Memory Access
|
||||
|
@ -31,4 +35,7 @@
|
|||
* Network
|
||||
* Game Pak
|
||||
* Examples
|
||||
* for example in example_list
|
||||
* hello_magic
|
||||
* hello_world
|
||||
* light_cycle
|
||||
* bg_demo
|
||||
|
|
11
src/lib.rs
11
src/lib.rs
|
@ -2,6 +2,7 @@
|
|||
#![cfg_attr(not(test), feature(asm))]
|
||||
#![warn(missing_docs)]
|
||||
#![allow(clippy::cast_lossless)]
|
||||
#![deny(clippy::float_arithmetic)]
|
||||
|
||||
//! This crate helps you write GBA ROMs.
|
||||
//!
|
||||
|
@ -77,11 +78,11 @@ pub fn div_modulus(numerator: i32, denominator: i32) -> (i32, i32) {
|
|||
let mod_out: i32;
|
||||
unsafe {
|
||||
asm!(/* assembly template */ "swi 0x06"
|
||||
:/* output operands */ "={r0}"(div_out), "={r1}"(mod_out)
|
||||
:/* input operands */ "{r0}"(numerator), "{r1}"(denominator)
|
||||
:/* clobbers */ "r3"
|
||||
:/* options */
|
||||
);
|
||||
:/* output operands */ "={r0}"(div_out), "={r1}"(mod_out)
|
||||
:/* input operands */ "{r0}"(numerator), "{r1}"(denominator)
|
||||
:/* clobbers */ "r3"
|
||||
:/* options */
|
||||
);
|
||||
}
|
||||
(div_out, mod_out)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue