Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- openbios-devel/drivers/tcx.fs | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/openbios-devel/drivers/tcx.fs b/openbios-devel/drivers/tcx.fs index 72f4762..83cb65e 100644 --- a/openbios-devel/drivers/tcx.fs +++ b/openbios-devel/drivers/tcx.fs @@ -14,23 +14,25 @@ fcode-version3 \ and height, grab the ones passed in by QEMU/generated by OpenBIOS \
-: openbios-video-addr - " openbios-video-addr" $find if - cell+ @ +: (find-xt) \ ( str len -- xt | -1 ) + $find if + exit + else + -1 then ;
-: openbios-video-width - " openbios-video-width" $find if - cell+ @ - then -; +" openbios-video-addr" (find-xt) cell+ value openbios-video-addr-xt +" openbios-video-width" (find-xt) cell+ value openbios-video-width-xt +" openbios-video-height" (find-xt) cell+ value openbios-video-height-xt +" depth-bits" (find-xt) cell+ value depth-bits-xt +" line-bytes" (find-xt) cell+ value line-bytes-xt
-: openbios-video-height - " openbios-video-height" $find if - cell+ @ - then -; +: openbios-video-addr openbios-video-addr-xt @ ; +: openbios-video-width openbios-video-width-xt @ ; +: openbios-video-height openbios-video-height-xt @ ; +: depth-bits depth-bits-xt @ ; +: line-bytes line-bytes-xt @ ;
\ \ Installation @@ -56,9 +58,10 @@ fcode-version3 h# 18 encode-int " hfporch" property h# 03dfd240 encode-int " pixfreq" property h# 3c encode-int " vfreq" property - h# 300 encode-int " height" property - h# 400 encode-int " width" property - h# 400 encode-int " linebytes" property + + openbios-video-height encode-int " height" property + openbios-video-width encode-int " width" property + line-bytes encode-int " linebytes" property
5 encode-int 0 encode-int encode+ " intr" property 5 encode-int " interrupts" property