Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamchamb/ac-mod-template
Template for Animal Crossing ACE injected mods
https://github.com/jamchamb/ac-mod-template
animal-crossing modding-games
Last synced: about 2 months ago
JSON representation
Template for Animal Crossing ACE injected mods
- Host: GitHub
- URL: https://github.com/jamchamb/ac-mod-template
- Owner: jamchamb
- Created: 2018-07-29T22:26:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-29T22:31:24.000Z (over 6 years ago)
- Last Synced: 2024-11-01T10:03:02.462Z (2 months ago)
- Topics: animal-crossing, modding-games
- Language: Makefile
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Animal Crossing Mod Patch Template
This is a template for Animal Crossing mod patches written in C.
Some example mods can be found in the [ac-mods](https://github.com/jamchamb/ac-mods) repo.This requires the devkitPro tools to build.
See for how to install `devkitpro` and `gamecube-dev`.## Building
With `gamecube-dev` installed, just run `make`. The output will include a `.patch` file that holds the generated code to patch in.
### Generating the GameCube save file
[`ac-nesrom-gen`](https://github.com/jamchamb/ac-nesrom-save-generator)
can automatically create a GCI file for the mod patches by reading the
`gci_build.yaml` config file. If installed, the GCI file will be generated
when running `make`.Alternatively, use this command:
```console
$ ac-nesrom-gen --autoheader 80002000 "Mod Name" input.patch output.gci
```Import the GCI save file to a memory card and use the generic NES Console
item to load the mod.## Development
### Specifying patch location
Set the start address for the patch in `linker.ld` just before
the `.text` section.Note that `*(.text.__entry);` must always be the first entry in the `.text`
section of the linker script.### Calling Animal Crossing functions
Here are a couple of ways to call a function that already exists in
Animal Crossing:#### Use function pointers
Define the function like this, using its address as the pointer value:
```c
void (*OSReport)(char*, ...) = (void*) 0x8005A750;
```#### Use the linker script
This uses fewer instructions, resulting in a smaller patch size.
1. Define the function like this:
```
extern void OSReport(char*, ...);
```
2. Define its location in `linker.ld`:```
SECTIONS
{
. = 0x80002000;
.text . : {
...
}
...
OSReport = 0x8005A750;
}
```