POV-Ray : Newsgroups : povray.off-topic : Memory-mapped I/O : Re: Memory-mapped I/O Server Time
6 Oct 2024 08:24:24 EDT (-0400)
  Re: Memory-mapped I/O  
From: Lars R 
Date: 17 Feb 2015 18:15:42
Message: <54e3cb9e$1@news.povray.org>
Am 02.02.2015 um 19:16 schrieb Orchid Win7 v1:
> Is it even still *possible* to map the graphics card's
> framebuffer into the CPU's address space?

On Linux (and surely other unix clones): no problem at all!

Just open /dev/fb0, making some ioctl()'s on it to get the size and the
pixel type of the frame buffer and you can call mmap() to the file
descriptor to map the whole frame buffer memory into your address space.

> Similarly, if I want to ask the harddisk to do something, do I need to
> explicitly construct ATAPI commands, or does the chipset do that for me?

just mmap() your /dev/sd* to your address space and feel free to
read/write into it.

> I'm not trying to actually *write* a device driver, I'm just curious as
> to how this stuff works these days.

It works good. And a lot of software use these interfaces today (X
server, database systems etc.)

Lars R.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.