This commit is contained in:
aramya 2023-07-04 12:04:46 +01:00
parent e4435696ae
commit cf35510749
4 changed files with 14 additions and 11 deletions

View File

@ -2,7 +2,7 @@ MACHINE = mac99
PPC = powerpc-eabi
QEMU = qemu-system-ppc
RES = 1600x900x32
CPU = g4
SOURCES_C = $(shell find src -name "*.c")
SOURCES_S = $(shell find src -name "*.s")
OBJECTS = $(SOURCES_C:.c=.elf) $(SOURCES_S:.s=.elf)
@ -40,7 +40,9 @@ clean:
find src -name "*.elf" -type f -delete
run:
$(QEMU) -hda *.APM -g $(RES) -machine $(MACHINE)
$(QEMU) -hda *.APM -g $(RES) -machine $(MACHINE) -cpu $(CPU)
debug:
$(QEMU) -hda *.APM -d in_asm -g $(RES) -machine $(MACHINE)
$(QEMU) -hda *.APM -d in_asm -g $(RES) -machine $(MACHINE) -cpu $(CPU)
gdb:
$(QEMU) -hda *.APM -s -S -g $(RES) -machine $(MACHINE) -cpu $(CPU)

View File

@ -3,7 +3,7 @@
: inf dup sup 1 + ;
: diff = if 0 else -1 then ;
: fba frame-buffer-adr ;
: beige-vram 80000000 ; : mac99-vram 81000000 ;
: beige-fba 80000000 ; : mac99-fba 81000000 ;
: hardware-error ." Hardware not supported." cr ;
: beige-message ." Beige hardware detected" cr ;
: mac99-message ." mac99 hardware detected" cr ;

View File

@ -1,12 +1,12 @@
initmsg
fba beige-vram = if beige-message beige-magic-number beige-vram c! then
fba mac99-vram = if mac99-message mac99-magic-number mac99-vram c! then
fba beige-vram = if screen-width 4 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-height 8 mac99-vram + l! then
fba beige-fba = if beige-message beige-magic-number beige-fba c! then
fba mac99-fba = if mac99-message mac99-magic-number mac99-fba c! then
fba beige-fba = if screen-width 4 beige-fba + l! then
fba beige-fba = if screen-height 8 beige-fba + l! then
fba mac99-fba = if screen-width 4 mac99-fba + l! then
fba mac99-fba = if screen-height 8 mac99-fba + l! then
variable run
-1 run !
fba beige-vram diff fba mac99-vram diff and if hardware-error 0 run ! then
fba beige-fba diff fba mac99-fba diff and if hardware-error 0 run ! then
run @ 0 = if 1 0 do 0 +loop then
boot hd:,\boot\kernel.elf

View File

@ -13,6 +13,7 @@ void __eabi(void)
//void* ofw_interpret(char* cmd, int32_t* stack_args, int n_stack_args, int n_ret_args, int32_t* reta
void main(void)
{
ofw_interpret("show-devs", 0, 0, 0, 0);
puts("Press any key to continue", 25);
ofw_interpret("blink-screen", 0, 0, 0, 0);
ofw_interpret("key", 0, 0, 1, (int32_t*)0x03020000);