mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Replace references to gbafix with agb-gbafix
This commit is contained in:
parent
8af41a9b3c
commit
0d9cc6c1f7
|
@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Added custom `gbafix` implementation which can take the elf file produced by `cargo build` directly, removing the need for the objcopy step.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Made Vector2D::new a const function.
|
- Made Vector2D::new a const function.
|
||||||
- The template now uses rust 2021 edition by default.
|
- The template now uses rust 2021 edition by default.
|
||||||
|
|
|
@ -66,8 +66,6 @@ to just write games for the Game Boy Advance using this library:
|
||||||
* Install with `cargo install just`
|
* Install with `cargo install just`
|
||||||
* [mdbook](https://rust-lang.github.io/mdBook/index.html)
|
* [mdbook](https://rust-lang.github.io/mdBook/index.html)
|
||||||
* Install with `cargo install mdbook`
|
* Install with `cargo install mdbook`
|
||||||
* [gbafix](https://crates.io/crates/gbafix)
|
|
||||||
* Install with `cargo install gbafix`
|
|
||||||
|
|
||||||
With all of this installed, you should be able to run a full build of agb using by running
|
With all of this installed, you should be able to run a full build of agb using by running
|
||||||
```sh
|
```sh
|
||||||
|
|
|
@ -30,30 +30,21 @@ Depending on your platform, the file will have either a `.elf` extension or no e
|
||||||
## 3. Convert the binary to a GBA file
|
## 3. Convert the binary to a GBA file
|
||||||
|
|
||||||
In order to run the game on an emulator, we need to convert the binary file to a GBA file.
|
In order to run the game on an emulator, we need to convert the binary file to a GBA file.
|
||||||
To do this, we'll use two tools: `arm-none-eabi-objcopy` and `gbafix`.
|
To do this, we'll use the tool `agb-gbafix`.
|
||||||
|
|
||||||
Run the following command to convert the binary file to a GBA file:
|
Run the following command to convert the binary file to a GBA ROM:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
arm-none-eabi-objcopy -O binary target/thumbv4t-none-eabi/release/template template.gba
|
agb-gbafix target/thumbv4t-none-eabi/release/template -o template.gba
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
arm-none-eabi-objcopy -O binary target/thumbv4t-none-eabi/release/template.elf template.gba
|
agb-gbafix target/thumbv4t-none-eabi/release/template.elf -o template.gba
|
||||||
```
|
```
|
||||||
|
|
||||||
Depending on whether your file has the .elf extension.
|
This command will add the correct GBA header to the template.gba file and it will be playable on real hardware or an emulator.
|
||||||
This command will create a template.gba file in the template directory.
|
|
||||||
|
|
||||||
Next, run the following command to fix the GBA header:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
gbafix template.gba
|
|
||||||
```
|
|
||||||
|
|
||||||
This command will add the correct GBA header to the template.gba file.
|
|
||||||
|
|
||||||
## 4. Run the game
|
## 4. Run the game
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ The source code for the game is hosted on github, so you will need to install gi
|
||||||
|
|
||||||
# 4. gbafix
|
# 4. gbafix
|
||||||
|
|
||||||
In order to be able to play games made with agb on real hardware or on some emulators, you will need to install 'gbafix'.
|
In order to be able to play games made with agb on real hardware or on some emulators, you will need to install 'agb-gbafix'.
|
||||||
The rust implementation can be installed very easily using `cargo install gbafix`.
|
Agb's implementation can be installed very easily using `cargo install agb-gbafix`.
|
||||||
|
|
||||||
Make sure that the Cargo bin directory is in your `PATH` as we'll need to use it later.
|
Make sure that the Cargo bin directory is in your `PATH` as we'll need to use it later.
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@ After installing to your `/Applications` folder you can add the binary to your p
|
||||||
|
|
||||||
# 5. Real hardware - gbafix
|
# 5. Real hardware - gbafix
|
||||||
|
|
||||||
In order to be able to play games made with agb on real hardware or on some emulators, you will need to install 'gbafix'.
|
In order to be able to play games made with agb on real hardware or on some emulators, you will need to install 'agb-gbafix'.
|
||||||
The rust implementation can be installed very easily using `cargo install gbafix`.
|
Agb's implementation can be installed very easily using `cargo install agb-gbafix`.
|
||||||
|
|
||||||
Make sure that the Cargo bin directory is in your `PATH` as we'll need to use it later.
|
Make sure that the Cargo bin directory is in your `PATH` as we'll need to use it later.
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ You will also want to install an emulator. The best support in agb is with [mgba
|
||||||
`println!` support via `agb::println!` but any emulator should work. You'll get the best experience if
|
`println!` support via `agb::println!` but any emulator should work. You'll get the best experience if
|
||||||
`mgba-qt` is in your `PATH`.
|
`mgba-qt` is in your `PATH`.
|
||||||
|
|
||||||
If you want to run your game on real hardware, you will also need to install `gbafix` which you can do after installing
|
If you want to run your game on real hardware, you will also need to install `agb-gbafix` which you can do after installing
|
||||||
rust with the following: `cargo install gbafix`. This is not required if you are only running your game in an emulator.
|
rust with the following: `cargo install agb-gbafix`. This is not required if you are only running your game in an emulator.
|
||||||
|
|
||||||
### Running in an emulator
|
### Running in an emulator
|
||||||
|
|
||||||
|
@ -68,6 +68,5 @@ running on the real thing.
|
||||||
First build the binary in release mode using the instructions above, then do the following:
|
First build the binary in release mode using the instructions above, then do the following:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
arm-none-eabi-objcopy -O binary target/thumbv4t-none-eabi/release/<your game> <your game>.gba
|
agb-gbafix target/thumbv4t-none-eabi/release/<your game> -o <your game>.gba
|
||||||
gbafix <your game>.gba
|
|
||||||
```
|
```
|
Loading…
Reference in a new issue