[movitz-devel] Driver problems
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Tue Jan 20 16:07:05 UTC 2004
Joel Smith <joels at mobyfoo.org> writes:
> I'm having some real problems writing a graphics driver for
> movitz. I need full 32bit data width for both reading and writing to
> the graphics ioports. Is there any sort of support for unboxed 32bit
> fixnums?
I just checked in the beginnings of a new operator that might help
you. It's muerte:%io-port-read-succession, and you should be able to
use it like this:
(%io-port-read-succession port object 2 0 1 :32-bit)
..to read a 32-bit port into the first slot in a struct. The 2 is the
offset in bytes from the object's address, and 0 1 are start and end
delimiters, considering the memory as an array of 32-bit words.
However, this wouldn't be a good idea, because struct slots are lisp
words. You'd better use for example a vector specialized to
(unsigned-byte 8). The usage would be the same. Another example:
(%io-port-read-succession #x100
(make-array 8 :element-type '(unsigned-byte 8))
2 0 2 :32-bit)
..will read #x100 as a 32-bit io-port twice, and the value of the
first is in positios 0-3 of the array, the second in 4-7.
--
Frode Vatvedt Fjeld
More information about the movitz-devel
mailing list