Ramon van Handel wrote:
> >I was wondering, in the "real" world, does the physical memory have to be
>continuus? (ie, can isa/pci extension boards provide "extra" physical
> >memory somewhere?)
>
> It is very unusual nowadays, though there's nothing against it in principle.
how does PCI handle memory provided by an extension bord then? (ie like
your video card)
> I'm not 100% sure how SDL works, so I'll ask this question: when you set up the SDL
>framebuffer, do you supply a buffer address to SDL or does SDL supply
> the address of the framebuffer to you ?
(you can have a look at http://www.libsdl.org/docs/video/index.html)
SDL supplies the buffer (you can use SDL_LockSurface(surface) to get a
pointer to the pixelmemory). Depending on SDL_MUSTLOCK(surface) you can
read/write to the surface at any time and don't need to lock, else
you'll need to lock/unlock all the time (note:if the SDL_HWSURFACE is
not given during SetVideo, you will NOT need to lock the display surface
before accessing it).
> In the latter case it is essential, that we can directly map the SDL framebuffer as
>guest physical memory, in
> order to avoid data copying. In the first case, we can simply use "existing" memory.
I haven't seen any SDL functions that allow you to setup self allocated
memory as if it were a SDL Surface.
> Adding an IOCTL call to map memory shouldn't be very difficult; I'm willing to
>implement this (but could you publish your SDL plugin source so I have something
> to test it with ?)
I don't have it here (at work), but it's very "straight forward". I'll
try to clean things up tonight at home and put a link on my
homepage/post it to the list.
--
Best regards,
Jeroen Janssen
+++
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
-- (Terry Pratchett, Hogfather)
+++