summaryrefslogtreecommitdiffstats
path: root/qemu/roms/openbios/arch/unix/plugins/plugin_qt/qt_rom.fs
blob: 1879c3654479d7ce6e80bb6a6f2d1e54625e9f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
\ tag: Property management
\ 
\ this code implements an IEEE 1275-1994 fcode driver
\ for the OpenBIOS qt interface
\ 
\ Copyright (C) 2003 Stefan Reinauer
\ 
\ See the file "COPYING" for further information about
\ the copyright and warranty status of this work.
\ 

hex

tokenizer[ 1002 4336 0300 23 ]tokenizer ( -- vid did classid revision )

pci-revision

pci-header

fcode-version2
headers

" dev /pci" evaluate
new-device

  " ATY,QTEMU" device-name
  " display"   device-type
  
  " iso8859-1" encode-string
  " character-set" property

  true encode-int
  " iso6429-1983-colors" property

  : qt-open
    \ [..]
    ." opening framebuffer device." cr
    10 10 " pci-l@" evaluate
    /n 8 = if
      10 14 " pci-l@" evaluate
      20 << or
    then
    ." framebuffer pointer is at 0x" dup . cr
    to frame-buffer-adr
    default-font set-font
    d# 640 d# 480 d# 80 d# 30 fb8-install
    true
    ;

  : qt-close
    ." QT Interface closed." cr
    0 to frame-buffer-adr
    ;
   
  : qt-selftest
    ." QT Interface selftest" cr
    0
    ;

  ['] qt-open     is-install
  ['] qt-close    is-remove
  ['] qt-selftest is-selftest

  external

\ the following words will be defined by fb8-install
\ 
  
\  : open  ( -- true )
\    ;
  
\  : write ( addr len -- actual )
\    ;
  
\  : draw-logo ( line# addr width height -- )
\    ;
  
\  : restore ( -- )
\    ;
    
finish-device

fcode-end

pci-end