Compare commits

...

2 Commits

Author SHA1 Message Date
Maschell
3006f47f0f
Add Aromas Memory Map 2024-05-06 21:28:14 +02:00
RC-14
ec300e2699 Tell people where the code is 2023-12-10 12:18:06 +01:00
2 changed files with 88 additions and 0 deletions

View File

@ -35,3 +35,9 @@ A bundle with the latest files can be downloaded [here](https://aroma.foryour.ca
1. Extract the files to the root of your sd card
2. Launch the environment via the [EnvironmentLoader](https://github.com/wiiu-env/EnvironmentLoader). You may need to hold `X` while launching the EnvironmentLoader to force open the menu.
## Where's the Code?
Aroma is a collection of tools, which all have public repos.
You can go to https://aroma.foryour.cafe/package/base-aroma and click on any listed repository to see the source code of each part.

82
memorymap.txt Normal file
View File

@ -0,0 +1,82 @@
payload.elf maps memory on the main core: 0x00800000 - 0x01000000
[0x00800000 - 0x01000000: empty]
PayloadLoaderPayload will get loaded to: 0x00FD0000
[0x00800000 to 0x00FD0000 : empty]
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
[0x00FFF000 to 0x01000000 : empty]
CustomRPXLoader will get loaded to: 0x00800000
[0x00800000 to 0x00800000 + sizeof(CustomRPXLoader)) : CustomRPXLoader]
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
[0x00FFF000 to 0x01000000 : empty]
CustomRPXLoader will copy the BATSetupHook to 0x00FFF000
[0x00800000 to 0x00800000 + sizeof(CustomRPXLoader) : CustomRPXLoader]
[endof(CustomRPXLoader) to 0x00FD0000 : empty]
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
[0x00FFF000 to 0x01000000 : BATSetupHook]
The EnvironmentLoader (payload.rpx ) will to be loaded to be right before 0x00FD0000
[0x00800000 to 0x00800000 + sizeof(CustomRPXLoader) : CustomRPXLoader]
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
[0x00FFF000 to 0x01000000 : BATSetupHook]
The EnvironmentLoader is responsible for exiting. This means it can safely overwrite the CustomRPXLoader and PayloadLoaderPayload
[0x00800000 to startof(EnvironmentLoader)) : empty]
[startof(EnvironmentLoader) to 0x00FD0000 : EnvironmentLoader]
[0x00FD0000 to 0x00FFF000 : empty]
[0x00FFF000 to 0x01000000 : BATSetupHook]
The EnvironmentLoader with use the memory region from the start (0x00800000) to itself (startof(EnvironmentLoader)) to load the setup modules (one at a time).
Each module is loaded to the **end** of this region (startof(currentModule) = (0x00FD0000 - sizeof(EnvironmentLoader) - sizeof(currentModule))
[0x00800000 to startof(currentModule) : empty]
[startof(EnvironmentLoader) - sizeof(currentModule) to startof(EnvironmentLoader) : current setup module (aligned to the end)]
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
[0x00FD0000 to 0x00FFF000 : empty]
[0x00FFF000 to 0x01000000 : BATSetupHook]
When the WUMSLoader gets loaded by the EnvironmentLoader (current setup module is now shown as WUMSLoader), it'll copy it's "wumsrelocator" to 0x00800000.
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
[endof(wumsrelocator) to startof(WUMSLoader) : empty]
[sizeof(WUMSLoader) to startof(EnvironmentLoader) : WUMSLoader (current setup module) (aligned to the end)]
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
[0x00FD0000 to 0x00FFF000 : empty]
[0x00FFF000 to 0x01000000 : BATSetupHook]
The WUMSLoader will also load the "Aroma Modules" (these are different than the setup modules!) into the region between the wumsrelocator and WUMSLoader.
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
[endof(wumsrelocator) to startof(WUMSLoader) : Aroma Modules]
[sizeof(WUMSLoader) to startof(EnvironmentLoader) : WUMSLoader (current setup module) (aligned to the end)]
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
[0x00FD0000 to 0x00FFF000 : empty]
[0x00FFF000 to 0x01000000 : BATSetupHook]
The WUMSLoader will also load the Wiiu Plugin Backend, it's plugins will get loaded to Aromas custom memory:
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
[endof(wumsrelocator) to startof(WUMSLoader) : Aroma Modules]
[sizeof(WUMSLoader) to startof(EnvironmentLoader) : WUMSLoader (current setup module) (aligned to the end)]
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
[0x00FD0000 to 0x00FFF000 : empty]
[0x00FFF000 to 0x01000000 : BATSetupHook]
[0x8XXXXXXX to 0xXXXXXXXX : Aromas Plugins, Aromas Heap]
Now the EnvironmentLoader can't use that region at the start anymore to load it's setup modules. Instead we use the custom memory from Aroma to load any further setup modules (e.g. the AutobootModule)
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
[endof(wumsrelocator) to endof(wumsrelocator)+ sizeof(AromaModules) : Aroma Modules]
[endof(AromaModules) to startof(EnvironmentLoader) : empty] // This is where the WUMSLoader was
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
[0x00FD0000 to 0x00FFF000 : empty] // This is where the PayloadLoaderPayload was
[0x00FFF000 to 0x01000000 : BATSetupHook]
[0x8XXXXXXX to 0x8XXXXXXX : Aromas Plugins, Aromas Heap, current setup module (in aroma custom memory]
The memory region where the WUMSLoader, EnvironmentLoader and PayloadLoaderPayload were loaded can't be used for Aroma.
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
[endof(wumsrelocator) to endof(wumsrelocator)+ sizeof(AromaModules) : Aroma Modules]
[endof(AromaModules) to startof(WUMSLoader) : empty] // This is where the WUMSLoader was
[endof(WUMSLoader) to endof(EnvironmentLoader) : empty] // This is where the EnvironmentLoader was
[0x00FD0000 to 0x00FFF000 : empty] // This is where the PayloadLoaderPayload was
[0x00FFF000 to 0x01000000 : BATSetupHook]
[0x8XXXXXXX to 0x8XXXXXXX : Aromas Plugins, Aromas Heap, current setup module (in aroma custom memory]