mirror of
https://github.com/thamugadi/powerpc-ofw-boot.git
synced 2024-10-19 18:26:05 +00:00
Compare commits
8 Commits
8d2f24d9e1
...
a7a68be57c
Author | SHA1 | Date | |
---|---|---|---|
|
a7a68be57c | ||
|
cf626c7eab | ||
|
7005a2c281 | ||
|
3c40f50fb6 | ||
|
3de2240706 | ||
|
75d8667cb3 | ||
|
74790b7525 | ||
|
aa79432946 |
44
Makefile
44
Makefile
@ -1,37 +1,45 @@
|
|||||||
MACHINE=mac99
|
MACHINE = mac99
|
||||||
PPC=powerpc-eabi
|
PPC = powerpc-eabi
|
||||||
QEMU=qemu-system-ppc
|
QEMU = qemu-system-ppc
|
||||||
RES=1600x900x32
|
RES = 1600x900x32
|
||||||
|
|
||||||
|
SOURCES_C = $(wildcard entry/*.c)
|
||||||
|
SOURCES_S = $(wildcard entry/*.s)
|
||||||
|
OBJECTS = $(SOURCES_C:.c=.elf) $(SOURCES_S:.s=.elf)
|
||||||
|
|
||||||
|
.PHONY: clean run debug beige
|
||||||
|
|
||||||
DISK.APM: kernel.elf bootinfo.txt scripts/kpartx.sh
|
DISK.APM: kernel.elf bootinfo.txt scripts/kpartx.sh
|
||||||
dd bs=512K count=2 if=/dev/zero of=DISK.APM
|
dd bs=512K count=2 if=/dev/zero of=DISK.APM
|
||||||
parted DISK.APM --script mklabel mac mkpart primary hfs+ 32.8KB 100%
|
parted DISK.APM --script mklabel mac mkpart primary hfs+ 32.8KB 100%
|
||||||
sudo chmod +x scripts/kpartx.sh
|
sudo chmod +x scripts/kpartx.sh
|
||||||
sudo ./scripts/kpartx.sh
|
sudo ./scripts/kpartx.sh
|
||||||
sudo mkdir /mnt/ppc
|
sudo mkdir -p /mnt/ppc /mnt/boot
|
||||||
sudo mkdir /mnt/boot
|
|
||||||
sudo cp bootinfo.txt /mnt/ppc
|
sudo cp bootinfo.txt /mnt/ppc
|
||||||
sudo cp kernel.elf /mnt/boot
|
sudo cp kernel.elf /mnt/boot
|
||||||
sudo umount /mnt/
|
sudo umount /mnt/
|
||||||
sudo kpartx -d DISK.APM
|
sudo kpartx -d DISK.APM
|
||||||
|
|
||||||
bootinfo.txt: loader/load.fth loader/def.fth
|
bootinfo.txt: loader/load.fth loader/def.fth
|
||||||
echo "<chrp-boot><boot-script>" >> bootinfo.txt
|
echo "<chrp-boot><boot-script>" >> bootinfo.txt
|
||||||
cat loader/def.fth >> bootinfo.txt
|
cat loader/def.fth >> bootinfo.txt
|
||||||
cat loader/load.fth >> bootinfo.txt
|
cat loader/load.fth >> bootinfo.txt
|
||||||
echo "</boot-script></chrp-boot>" >> bootinfo.txt
|
echo "</boot-script></chrp-boot>" >> bootinfo.txt
|
||||||
kernel.elf: start.elf boot.elf
|
|
||||||
$(PPC)-ld -Ttext=0x200000 start.elf boot.elf -o kernel.elf
|
kernel.elf: $(OBJECTS)
|
||||||
boot.elf: entry/boot.c
|
$(PPC)-ld -Ttext=0x200000 -Tdata=0x300100 $^ -o $@
|
||||||
$(PPC)-gcc -c entry/boot.c -o boot.elf
|
|
||||||
start.elf: entry/start.s
|
%.elf: %.c
|
||||||
$(PPC)-as -c entry/start.s -o start.elf
|
$(PPC)-gcc -I include -c $< -o $@
|
||||||
|
|
||||||
|
%.elf: %.s
|
||||||
|
$(PPC)-as -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm *.APM *elf *txt
|
rm -f *.APM *elf *txt
|
||||||
|
|
||||||
run:
|
run:
|
||||||
$(QEMU) -hda *.APM -g $(RES) -machine $(MACHINE)
|
$(QEMU) -hda *.APM -g $(RES) -machine $(MACHINE)
|
||||||
beige:
|
|
||||||
$(QEMU) -hda *.APM -g $(RES) -machine g3beige
|
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
$(QEMU) -hda *.APM -d in_asm -g $(RES) -machine $(MACHINE)
|
$(QEMU) -hda *.APM -d in_asm -g $(RES) -machine $(MACHINE)
|
||||||
all:
|
|
||||||
make clean && make && make run
|
|
||||||
|
146
entry/boot.c
146
entry/boot.c
@ -1,141 +1,23 @@
|
|||||||
#include "boot.h"
|
void (*ofw)();
|
||||||
void __stack_chk_fail_local(void){}
|
void __eabi();
|
||||||
void __eabi(void){}
|
|
||||||
void get_io_type(void)
|
|
||||||
{
|
|
||||||
if (*(unsigned char*)__VRAM__BEIGE == beige) IO_TYPE = beige;
|
|
||||||
else if (*(unsigned char*)__VRAM__MAC99 == mac99) IO_TYPE = mac99;
|
|
||||||
if (IO_TYPE == beige)
|
|
||||||
{
|
|
||||||
screen_width = (*(unsigned int*)(__VRAM__BEIGE+4));
|
|
||||||
screen_height = (*(unsigned int*)(__VRAM__BEIGE+8));
|
|
||||||
|
|
||||||
}
|
void __stack_chk_fail_local(void)
|
||||||
else if (IO_TYPE == mac99)
|
{
|
||||||
{
|
}
|
||||||
screen_width = (*(unsigned int*)(__VRAM__MAC99+4));
|
void __eabi(void)
|
||||||
screen_height = (*(unsigned int*)(__VRAM__MAC99+8));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void init(void)
|
|
||||||
{
|
{
|
||||||
if (IO_TYPE == beige)
|
|
||||||
{
|
|
||||||
p_vram = __VRAM__BEIGE;
|
|
||||||
p_bios = __BIOS__BEIGE;
|
|
||||||
p_timer= __TIMR__BEIGE;
|
|
||||||
}
|
|
||||||
else if (IO_TYPE == mac99)
|
|
||||||
{
|
|
||||||
p_vram = __VRAM__MAC99;
|
|
||||||
p_bios = __BIOS__MAC99;
|
|
||||||
p_timer= __TIMR__MAC99;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
get_io_type();
|
if (ofw_test("open"))
|
||||||
init();
|
|
||||||
game_of_life();
|
|
||||||
}
|
|
||||||
|
|
||||||
void fillscreen(unsigned int* addr, unsigned char a, unsigned char b, unsigned char c, int n)
|
|
||||||
{
|
|
||||||
unsigned char* ptr = addr;
|
|
||||||
for (unsigned int i = 0; i<n; i++)
|
|
||||||
{
|
{
|
||||||
//24-bit VGA
|
asm("mr 27, 28");
|
||||||
*ptr = a;
|
asm("b $");
|
||||||
ptr++;
|
}
|
||||||
*ptr = b;
|
else
|
||||||
ptr++;
|
{
|
||||||
*ptr = c;
|
asm("mr 30, 31");
|
||||||
ptr++;
|
asm("b $");
|
||||||
*ptr = 0;
|
|
||||||
ptr++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void memcpy(unsigned char* dest, unsigned char* src, int n)
|
|
||||||
{
|
|
||||||
unsigned char* destination = dest;
|
|
||||||
unsigned char* source = src;
|
|
||||||
for (int i = 0; i<n; i++)
|
|
||||||
{
|
|
||||||
*destination = *source;
|
|
||||||
destination++; source++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void game_of_life(void)
|
|
||||||
{
|
|
||||||
int N = screen_width;
|
|
||||||
int i,j,ip1,jp1,nei;
|
|
||||||
unsigned int random;
|
|
||||||
unsigned char universe[N][N];
|
|
||||||
unsigned char universe2[N][N];
|
|
||||||
unsigned char* junk_beige = 0x81040000;
|
|
||||||
for (i = 0; i < N; i++) for (j = 0; j < N; j++)
|
|
||||||
{
|
|
||||||
if (IO_TYPE == mac99)
|
|
||||||
{
|
|
||||||
random = (*p_timer + *p_bios);
|
|
||||||
if (!(random%7)) universe[i][j] = 1;
|
|
||||||
else universe[i][j] = 0;
|
|
||||||
p_bios++;
|
|
||||||
}
|
|
||||||
else if (IO_TYPE == beige)
|
|
||||||
{
|
|
||||||
random = (*junk_beige);
|
|
||||||
if (!(random%3)) universe[i][j] = 1;
|
|
||||||
else universe[i][j] = 0;
|
|
||||||
junk_beige++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
memcpy(p_vram, p_vram+255, 400000);
|
|
||||||
|
|
||||||
p_vram += 400000;
|
|
||||||
for (i = 0; i < N; i++) for (j = 0; j < N; j++)
|
|
||||||
{
|
|
||||||
if (universe[i][j]) fillscreen(p_vram, 255,255,255,1);
|
|
||||||
else fillscreen(p_vram,200 ,210,5,1);
|
|
||||||
p_vram+=4;
|
|
||||||
}
|
|
||||||
for (i = 0; i < N; i++) for (j = 0; j < N; j++) universe2[i][j] = universe[i][j];
|
|
||||||
for (i = 0; i < N; i++) for (j = 0; j < N; j++)
|
|
||||||
{
|
|
||||||
nei = 0;
|
|
||||||
ip1 = i + 1;
|
|
||||||
jp1 = j + 1;
|
|
||||||
if (i == N) ip1=0;
|
|
||||||
if (j == N) jp1=0;
|
|
||||||
if (!i) ip1=N;
|
|
||||||
if (!j) jp1=N;
|
|
||||||
if (universe[i][jp1]) nei++;
|
|
||||||
if (universe[ip1][j]) nei++;
|
|
||||||
if (universe[i][j-1]) nei++;
|
|
||||||
if (universe[i-1][j]) nei++;
|
|
||||||
if (universe[ip1][jp1]) nei++;
|
|
||||||
if (universe[ip1][j-1]) nei++;
|
|
||||||
if (universe[i-1][jp1]) nei++;
|
|
||||||
if (universe[i-1][j-1]) nei++;
|
|
||||||
|
|
||||||
if (universe[i][j])
|
|
||||||
{
|
|
||||||
if (nei == 2 || nei == 3) universe2[i][j] = universe[i][j];
|
|
||||||
else universe2[i][j] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (nei == 3) universe2[i][j] = 1;
|
|
||||||
else universe2[i][j] = universe[i][j];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
for (i = 0; i < N; i++) for (j = 0; j < N; j++) universe[i][j] = universe2[i][j];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
26
entry/boot.h
26
entry/boot.h
@ -1,26 +0,0 @@
|
|||||||
#define beige 0xBE
|
|
||||||
#define mac99 0x5A
|
|
||||||
|
|
||||||
#define __VRAM__BEIGE 0x80000000
|
|
||||||
#define __BIOS__BEIGE 0xFFC00000
|
|
||||||
#define __TIMR__BEIGE 0 //
|
|
||||||
#define __VRAM__MAC99 0x81000000
|
|
||||||
#define __BIOS__MAC99 0xFFF00000
|
|
||||||
#define __TIMR__MAC99 0x80080038
|
|
||||||
void __stack_chk_fail_local();
|
|
||||||
|
|
||||||
unsigned char IO_TYPE;
|
|
||||||
unsigned int screen_width;
|
|
||||||
unsigned int screen_height;
|
|
||||||
|
|
||||||
unsigned char* p_vram;
|
|
||||||
unsigned char* p_bios;
|
|
||||||
unsigned char* p_timer;
|
|
||||||
unsigned char u8_extract_bit(unsigned char n, unsigned char bit);
|
|
||||||
void get_io_type(void);
|
|
||||||
void init(void);
|
|
||||||
void fillscreen(unsigned int* addr, unsigned char a, unsigned char b, unsigned char c, int n);
|
|
||||||
void memcpy(unsigned char* dest, unsigned char* src, int n);
|
|
||||||
unsigned char u8_extract_bit(unsigned char n, unsigned char bit);
|
|
||||||
unsigned char u32_extract_bit(unsigned int n, unsigned char bit);
|
|
||||||
|
|
252
entry/devicetree.c
Normal file
252
entry/devicetree.c
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
#include <ofw.h>
|
||||||
|
|
||||||
|
extern void (*ofw)();
|
||||||
|
|
||||||
|
phandle child(phandle _child)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
phandle arg;
|
||||||
|
phandle ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("child", 6, 1, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg = _child;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
phandle parent(phandle _parent)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
phandle arg;
|
||||||
|
phandle ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("parent", 7, 1, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg = _parent;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
phandle instance_to_package(ihandle instance)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
ihandle arg;
|
||||||
|
phandle ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("instance-to-package", 20, 1, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg = instance;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getproplen(phandle node, char* name)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
phandle arg1;
|
||||||
|
char* arg2;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("getproplen", 11, 2, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg1 = node;
|
||||||
|
ofw_arg.arg2 = name;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getprop(phandle node, char* name, uint8_t* buf, int buflen)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
phandle arg1;
|
||||||
|
char* arg2;
|
||||||
|
uint8_t* arg3;
|
||||||
|
int arg4;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("getprop", 8, 4, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg1 = node;
|
||||||
|
ofw_arg.arg2 = name;
|
||||||
|
ofw_arg.arg3 = buf;
|
||||||
|
ofw_arg.arg4 = buflen;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int nextprop(phandle node, char* previous, uint8_t* buf)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
phandle arg1;
|
||||||
|
char* arg2;
|
||||||
|
uint8_t* arg3;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("nextprop", 9, 3, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg1 = node;
|
||||||
|
ofw_arg.arg2 = previous;
|
||||||
|
ofw_arg.arg3 = buf;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int setprop(phandle node, char* name, uint8_t* buf, int len)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
phandle arg1;
|
||||||
|
char* arg2;
|
||||||
|
uint8_t* arg3;
|
||||||
|
int arg4;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
char _service[8] = "setprop";
|
||||||
|
ofw_arg.service = _service;
|
||||||
|
|
||||||
|
ofw_arg.n_args = 4;
|
||||||
|
ofw_arg.n_rets = 1;
|
||||||
|
ofw_arg.arg1 = node;
|
||||||
|
ofw_arg.arg2 = name;
|
||||||
|
ofw_arg.arg3 = buf;
|
||||||
|
ofw_arg.arg4 = len;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int canon(char* device, uint8_t* buf, int buflen)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
char* arg1;
|
||||||
|
uint8_t* arg2;
|
||||||
|
int arg3;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("canon", 6, 3, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg1 = device;
|
||||||
|
ofw_arg.arg2 = buf;
|
||||||
|
ofw_arg.arg3 = buflen;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
phandle finddevice(char* device)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
char* arg1;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("finddevice", 11, 1, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg1 = device;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int instance_to_path(ihandle instance, uint8_t* buf, int buflen)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
ihandle arg1;
|
||||||
|
uint8_t* arg2;
|
||||||
|
int arg3;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("instance-to-path", 17, 3, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg1 = instance;
|
||||||
|
ofw_arg.arg2 = buf;
|
||||||
|
ofw_arg.arg3 = buflen;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int package_to_path(phandle package, uint8_t* buf, int buflen)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
ihandle arg1;
|
||||||
|
uint8_t* arg2;
|
||||||
|
int arg3;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("package-to-path", 16, 3, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg1 = package;
|
||||||
|
ofw_arg.arg2 = buf;
|
||||||
|
ofw_arg.arg3 = buflen;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void* call_method(char* method, ihandle instance, ...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
23
entry/ofw_common.c
Normal file
23
entry/ofw_common.c
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#include <ofw.h>
|
||||||
|
|
||||||
|
extern void (*ofw)();
|
||||||
|
|
||||||
|
int ofw_test(char* name)
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char* service;
|
||||||
|
int n_args;
|
||||||
|
int n_rets;
|
||||||
|
char* arg;
|
||||||
|
int ret;
|
||||||
|
} ofw_arg;
|
||||||
|
|
||||||
|
SERVICE("test", 5, 1, 1);
|
||||||
|
|
||||||
|
ofw_arg.arg = name;
|
||||||
|
|
||||||
|
ofw(&ofw_arg);
|
||||||
|
return ofw_arg.ret;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,7 @@
|
|||||||
.globl _start
|
.globl _start
|
||||||
|
.extern ofw
|
||||||
_start:
|
_start:
|
||||||
stwu 1, -0x7fff(1)
|
lis 9, ofw@ha
|
||||||
|
ori 9, 9, ofw@l
|
||||||
b main
|
stw 5, 0(9)
|
||||||
|
b main
|
||||||
|
10
include/ofw.h
Normal file
10
include/ofw.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define SERVICE(name, len, args, rets) \
|
||||||
|
char _service[len] = name; \
|
||||||
|
ofw_arg.service = _service; \
|
||||||
|
ofw_arg.n_args = args; \
|
||||||
|
ofw_arg.n_rets = rets;
|
||||||
|
|
||||||
|
typedef int phandle;
|
||||||
|
typedef int ihandle;
|
@ -1,5 +1,4 @@
|
|||||||
: initmsg ." powerpc-ofw-boot : Booting through OpenFirmware..." cr ;
|
: initmsg ." powerpc-ofw-boot" cr ;
|
||||||
: startmsg ." Running Game of Life..." cr ;
|
|
||||||
: sup - dup abs = ;
|
: sup - dup abs = ;
|
||||||
: inf dup sup 1 + ;
|
: inf dup sup 1 + ;
|
||||||
: diff = if 0 else -1 then ;
|
: diff = if 0 else -1 then ;
|
||||||
|
@ -5,11 +5,8 @@ fba beige-vram = if screen-width 4 beige-vram + l! then
|
|||||||
fba beige-vram = if screen-height 8 beige-vram + l! then
|
fba beige-vram = if screen-height 8 beige-vram + l! then
|
||||||
fba mac99-vram = if screen-width 4 mac99-vram + l! then
|
fba mac99-vram = if screen-width 4 mac99-vram + l! then
|
||||||
fba mac99-vram = if screen-height 8 mac99-vram + l! then
|
fba mac99-vram = if screen-height 8 mac99-vram + l! then
|
||||||
." informations stored :" cr
|
|
||||||
fba a dump
|
|
||||||
variable run
|
variable run
|
||||||
-1 run !
|
-1 run !
|
||||||
fba beige-vram diff fba mac99-vram diff and if hardware-error 0 run ! then
|
fba beige-vram diff fba mac99-vram diff and if hardware-error 0 run ! then
|
||||||
run @ 0 = if 1 0 do 0 +loop then
|
run @ 0 = if 1 0 do 0 +loop then
|
||||||
startmsg
|
|
||||||
boot hd:,\boot\kernel.elf
|
boot hd:,\boot\kernel.elf
|
||||||
|
Loading…
Reference in New Issue
Block a user