Skip to content

Commit

Permalink
Update notes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRainbowPhoenix authored Mar 24, 2024
1 parent a5121df commit 9eafca4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/content/docs/dev/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ Here's some of the mapping I know about :

- `0xA405_0100` may be the touchscreen, where `0xA405_01F3` changes when screen it touched

- RAM is `0x8c00_0000`
- RAM is `0x8c00_0000` to `0x8cff_ffff`

- ROM is `0x8000_0000` to `0x81ff_ffff`
- MCS starts at `0x8e00_0000`

- ROM is `0x8000_0000` to `0x81ff_ffff`

- Cached rom is `0xa000_0000` to `0xa1ff_ffff`

- Display DMAC start at `0xb400_0000`

- There are some "direct Io" from `0xFEC0_0000` to `0xFEFF_FFFF`

When loading a .bin program, it is copied at `0x8cff_0000` and the PC jump to this offset
## RAM

When [loading a .bin program](https://github.com/SnailMath/hollyhock-2/blob/master/launcher/bins.cpp#L178), it is copied at `0x8cff_0000` and the PC jump to this offset

> For hollyhock, we usually use the end of the ram, that space is usually occupied by the mcs file system, but if it's not fully full, then it should work. Just note that the hollyhock launcher is running from ram, so it can't overwrite itself...`8C00_0000` to `8CFF_FFFF` is ram, we use [`8CFE_0000`](https://github.com/SnailMath/hollyhock-2/blob/master/patches/file_loader/file_loader.s#L134) for the launcher (from the run.bin file) and [`8CFF_0000`](https://github.com/SnailMath/hollyhock-2/blob/master/launcher/bins.cpp#L178) for [programs](https://github.com/TheRainbowPhoenix/CPAppTemplate/blob/main/linker_bin.ld#L4), just look at the launcher how big it is, you can squeeze out a bit if you start your program at `8CFE_8000`....

0 comments on commit 9eafca4

Please sign in to comment.