Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / openbios / arch / unix / plugins / plugin_qt / qt_rom.fs
1 \ tag: Property management
2
3 \ this code implements an IEEE 1275-1994 fcode driver
4 \ for the OpenBIOS qt interface
5
6 \ Copyright (C) 2003 Stefan Reinauer
7
8 \ See the file "COPYING" for further information about
9 \ the copyright and warranty status of this work.
10
11
12 hex
13
14 tokenizer[ 1002 4336 0300 23 ]tokenizer ( -- vid did classid revision )
15
16 pci-revision
17
18 pci-header
19
20 fcode-version2
21 headers
22
23 " dev /pci" evaluate
24 new-device
25
26   " ATY,QTEMU" device-name
27   " display"   device-type
28   
29   " iso8859-1" encode-string
30   " character-set" property
31
32   true encode-int
33   " iso6429-1983-colors" property
34
35   : qt-open
36     \ [..]
37     ." opening framebuffer device." cr
38     10 10 " pci-l@" evaluate
39     /n 8 = if
40       10 14 " pci-l@" evaluate
41       20 << or
42     then
43     ." framebuffer pointer is at 0x" dup . cr
44     to frame-buffer-adr
45     default-font set-font
46     d# 640 d# 480 d# 80 d# 30 fb8-install
47     true
48     ;
49
50   : qt-close
51     ." QT Interface closed." cr
52     0 to frame-buffer-adr
53     ;
54    
55   : qt-selftest
56     ." QT Interface selftest" cr
57     0
58     ;
59
60   ['] qt-open     is-install
61   ['] qt-close    is-remove
62   ['] qt-selftest is-selftest
63
64   external
65
66 \ the following words will be defined by fb8-install
67
68   
69 \  : open  ( -- true )
70 \    ;
71   
72 \  : write ( addr len -- actual )
73 \    ;
74   
75 \  : draw-logo ( line# addr width height -- )
76 \    ;
77   
78 \  : restore ( -- )
79 \    ;
80     
81 finish-device
82
83 fcode-end
84
85 pci-end