mirror of
https://github.com/elliotnunn/wedge.git
synced 2024-11-21 16:30:48 +00:00
95df455703
The Wedge is a C program that, when inserted into a PowerPC ROM, runs just before the NanoKernel. This is very early in the boot process. The Wedge takes this opportunity to rearrange the MacOS address space and make more than 1.5 GB RAM available to applications. Some serious problems remain with this approach, so a "proper" solution to the 1.5 GB RAM limit will take more work. This code was ripped out of the old CDG5 build system and refactored. It it more appropriate to keep the Wedge separate from the real OS code.
15 lines
332 B
C
15 lines
332 B
C
#include <stdio.h>
|
|
|
|
#define Middle ((long *)0xfff20000UL)
|
|
|
|
void main(void)
|
|
{
|
|
if(Middle[-2] != 'WgLg')
|
|
{
|
|
printf("The Wedge did not run. Restart with a Mac OS ROM file in your System Folder that has the Wedge built in. This application displays the Wedge log.\n");
|
|
return;
|
|
}
|
|
|
|
fwrite((char *)Middle, 1, Middle[-1], stdout);;
|
|
}
|