powerpc-ofw-boot/boot.c

31 lines
511 B
C
Raw Normal View History

2021-09-30 14:59:48 +00:00
#include "memory.h"
#define beige 0xBE
#define mac99 0x5A
2021-09-23 13:13:49 +00:00
void begin(void)
{
2021-09-30 02:19:50 +00:00
unsigned char *ptr_beige = 0x80000000;
unsigned char *ptr_mac99 = 0x81000000;
2021-09-30 14:59:48 +00:00
if (*ptr_beige == beige) IO_TYPE = beige;
if (*ptr_mac99 == mac99) IO_TYPE = mac99;
init_ptr();
clearscreen();
2021-09-30 02:19:50 +00:00
for(;;);
2021-09-23 13:13:49 +00:00
}
2021-09-30 14:59:48 +00:00
void init_ptr(void)
{
if (IO_TYPE == beige) vram_ptr = beige_vram;
if (IO_TYPE == mac99) vram_ptr = mac99_vram;
}
void clearscreen(void)
{
for (int i = 0; i<10000000; i++)
{
*vram_ptr = 0xFF;
i++;
vram_ptr++;
}
}