WonderWitch/Memory map: Difference between revisions
From WSdev Wiki
Jump to navigationJump to search
(Created page with "== Memory map == {| class="wikitable" |+ WonderWitch memory map ! Address ! ASCII, 1 screen ! ASCII, 2 screens ! Shift-JIS, 1 screen ! Shift-JIS, 2 screens |- | style="text-align: center;" | 0x0000 | colspan="4" style="text-align: center;" | Interrupt vectors |- | style="text-align: center;" | 0x0100 | colspan="4" style="text-align: center;" | ? |- | style="text-align: center;" | 0x0E00 | rowspan="7" style="text-align: center;" | | rowspan="5" style="text-align: center;...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | The following documents the official WonderWitch memory map. Note that you are not required to follow these rules to the letter; however, some amount of the beginning of memory is expected to be left to FreyaBIOS, FreyaOS, etc. | ||
=== Internal RAM (0x00000 - 0x0FFFF) === | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 60: | Line 62: | ||
In all modes, the stack is placed immediately before the sprite table. | In all modes, the stack is placed immediately before the sprite table. | ||
==== Interrupt vectors ==== | |||
{| class="wikitable" | |||
! Start | |||
! End | |||
! Description | |||
|- | |||
| 0x00 | |||
| 0x07 | |||
| CPU interrupts | |||
|- | |||
| 0x08 | |||
| 0x0F | |||
| | |||
|- | |||
| 0x10 | |||
| 0x18 | |||
| [[WonderWitch/FreyaBIOS|FreyaBIOS]] interrupts | |||
|} | |||
=== Cartridge SRAM (0x10000 - 0x1FFFF) === | |||
{| class="wikitable" | |||
! Bank | |||
! Description | |||
|- | |||
| 0 | |||
| [[WonderWitch/Filesystem|/ram0 file data]] | |||
|- | |||
| 1 | |||
| Third process data | |||
|- | |||
| 2 | |||
| Second process data | |||
|- | |||
| 3 | |||
| First process data; typically used by [[WonderWitch/FreyaOS|FreyaOS]] | |||
|} | |||
=== Cartridge flash (0x80000 - 0xFFFFF) === | |||
The 512KB of NOR flash memory is mapped and partitioned as follows: | |||
{| class="wikitable" | |||
! Linear address | |||
! Size | |||
! Description | |||
|- | |||
| 0x8nnnn | |||
| rowspan="6" | 384 KB | |||
| rowspan="6" | [[WonderWitch/Filesystem|/rom0 file data]] | |||
|- | |||
| 0x9nnnn | |||
|- | |||
| 0xAnnnn | |||
|- | |||
| 0xBnnnn | |||
|- | |||
| 0xCnnnn | |||
|- | |||
| 0xDnnnn | |||
|- | |||
| 0xEnnnn | |||
| 64 KB | |||
| [[WonderWitch/FreyaOS|FreyaOS]] | |||
|- | |||
| 0xFnnnn | |||
| 64 KB | |||
| [[WonderWitch/FreyaBIOS|FreyaBIOS]] | |||
|} |
Latest revision as of 20:46, 19 October 2024
The following documents the official WonderWitch memory map. Note that you are not required to follow these rules to the letter; however, some amount of the beginning of memory is expected to be left to FreyaBIOS, FreyaOS, etc.
Internal RAM (0x00000 - 0x0FFFF)
Address | ASCII, 1 screen | ASCII, 2 screens | Shift-JIS, 1 screen | Shift-JIS, 2 screens |
---|---|---|---|---|
0x0000 | Interrupt vectors | |||
0x0100 | ? | |||
0x0E00 | Sprite table | |||
0x1000 | Screen 1 | |||
0x1600 | Sprite table | |||
0x1800 | Screen 1 | Screen 2 | ||
0x2000 | Tile data (512 tiles) | |||
0x2600 | Sprite table | |||
0x2800 | Screen 2 | |||
0x2E00 | Sprite table | |||
0x3000 | Screen 1 | |||
0x3800 | Tile data (128 tiles) | |||
0x4000 | Color tile data; only restored with ResumeIL. | |||
0xC000 | Unused; never restored on program suspend/resume. | |||
0xFE00 | Color palette data; only restored with ResumeIL. |
In all modes, the stack is placed immediately before the sprite table.
Interrupt vectors
Start | End | Description |
---|---|---|
0x00 | 0x07 | CPU interrupts |
0x08 | 0x0F | |
0x10 | 0x18 | FreyaBIOS interrupts |
Cartridge SRAM (0x10000 - 0x1FFFF)
Bank | Description |
---|---|
0 | /ram0 file data |
1 | Third process data |
2 | Second process data |
3 | First process data; typically used by FreyaOS |
Cartridge flash (0x80000 - 0xFFFFF)
The 512KB of NOR flash memory is mapped and partitioned as follows:
Linear address | Size | Description |
---|---|---|
0x8nnnn | 384 KB | /rom0 file data |
0x9nnnn | ||
0xAnnnn | ||
0xBnnnn | ||
0xCnnnn | ||
0xDnnnn | ||
0xEnnnn | 64 KB | FreyaOS |
0xFnnnn | 64 KB | FreyaBIOS |