[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Allocation of video RAM
> My question is about video RAM (VRAM). Right now there is no functionality for this in the kernel, except Screalloc(). This means that the driver has to implement that stuff internally, which has several
What does this function exactly? I've found only a brief description
in tos.hyp that it allocates N bytes for screen memory (is there even
some pointer returned?) or returns amount of available screen memory
back.
> drawbacks. For example - if an application exits prematurely or doesn't do mfree() on allocated VRAM, the memory won't be freed. Furthermore, there will be no memory protection for this additional class of RAM if it isn't implemented in the kernel.
My impression is application shouldn't call this function at all.
> How difficult would it be to implement another class of RAM? Is it even feasible? And if it is - would it make sense to expand Mxalloc() to handle this new class of RAM, or would it be better to implement yet another system call for this?
These are probably equal options, I'd personally look what OS does
(how it allocates screen memory) to make patching as painless as
possible. Another question is, if you want to patch TOS (in CT60
flash) or leave this functionality to FreeMiNT/AES/fVDI (not sure what
allocates screen memory in system).
--
MiKRO / Mystic Bytes
http://mikro.atari.org