[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Allocation of video RAM



> If the VRAM adress space can be accessed by the CPU without resorting to
> tricks, the VRAM can be added to MiNT's memory space using Maddalt. It
> will then be available using normal M(x)alloc-calls. However, to
> specifically allocate VRAM you'd have to add another mode though. I
> don't know how much work that will require.

Having general memory allocation for PCI card memory does not seem
very useful to me, and the memory is special, anyway, in that it is
not virtualizable (the hardware would have no way of knowing of any
remapping or swapping to disk, for obvious reasons).

In my opinion, it would be better to add some kind of
map-to-process-memory-space function. That would take some previously
system (VDI) only memory and make it accessible by some process. The
same mechanism might be useful for other direct hardware access (by
user level processes) as well.

>> Obviously, the VDI should do the memory mapping by calling lower level
>> functions, though.
>
> Yes, and the VDI must also work before MiNT is loaded so it has to
> handle both cases.

Since the VDI is running at supervisor level, and for that matter is
responsible for setting up the graphics card, it will always have
immediate access to any memory space on the card.
What we may want to do is to allow user level processes access to
parts of that memory space.

>>> But the VDI does afaik not cater for texture mapping, or even alpha blits.
>>
>> But we definitely should add at least the latter. Perhaps we already
>
> Isn't that implemented in NVDI 5?

I don't think so. At least there's nothing that looks like it in the
documentation I've seen. The closest would be T_BLEND, AFAICT, but
that only does an x vs 1-x blend of two images.
There is a whole bunch of incredibly strange (and hardly useful,
AFAICT) new blit modes in NVDI 5.0, as well as automatic palette
transformations etc. I _really_ don't want to implement 95% of that,
so I hope no one has used any of it...

/Johan