--- qemu/roms/SLOF/board-js2x/slof/OF.fs 2018/04/24 18:59:09 1.1 +++ qemu/roms/SLOF/board-js2x/slof/OF.fs 2018/04/24 19:46:17 1.1.1.3 @@ -209,6 +209,10 @@ d# 14318378 VALUE tb-frequency \ defau #include +270 cp + +#include + 280 cp \ rtas-config is not used @@ -332,10 +336,7 @@ check-for-nvramrc #include "elf.fs" #include -: bios-exec ( arg len -- rc ) - s" snk" romfs-lookup 0<> IF load-elf-file drop start-elf64 - ELSE 2drop false THEN -; +8a8 cp \ check wether a VGA device was found during pci scan, if it was \ try to initialize it and create the needed device-nodes @@ -343,7 +344,10 @@ check-for-nvramrc 100000 value biosemu-vmem-size 0 value screen-info -vga-device-node? 0<> use-biosemu? AND IF +: init-vga-devices ( -- ) + vga-device-node? 0= use-biosemu? 0= OR IF + EXIT + THEN s" VGA Device found: " type vga-device-node? node>path type s" initializing..." type cr \ claim virtual memory for biosemu of 1MB biosemu-vmem-size 4 claim to biosemu-vmem @@ -365,7 +369,11 @@ vga-device-node? 0<> use-biosemu? AND IF 20 char-cat biosemu-debug $cathex \ add biosemu-debug as param ( paramstr+path+biosemu-debug len ) THEN - bios-exec + .(client-exec) IF + ." biosemu client exec failed!" cr + set-node \ restore old current-node + EXIT + THEN \ s" Time after biosemu:" type .date cr s" VGA initialization: detecting displays..." type cr \ try to get info for two monitors @@ -391,9 +399,10 @@ vga-device-node? 0<> use-biosemu? AND IF 20 char-cat \ add a space ( pathstr len paramstr len ) 2swap $cat ( paramstr+path len ) 20 char-cat - screen-info $cathex bios-exec + screen-info $cathex + .(client-exec) 0= \ s" Time after client exec:" type .date cr - screen-info c@ 0<> IF + screen-info c@ 0<> AND IF s" display " type i . s" found..." type \ screen found \ create device entry @@ -412,7 +421,9 @@ vga-device-node? 0<> use-biosemu? AND IF biosemu-vmem biosemu-vmem-size release s" VGA initialization done." type cr -THEN \ vga-device-node? +; + +init-vga-devices : enable-framebuffer-output ( -- ) \ enable output on framebuffer