Page 1 of 1
Printing out the RAM and VRAM usage on Dreamcast?
Posted: Thu Jun 10, 2010 5:09 pm
by epicasian
This is more of a question for Falco, or any other DC Devver.
I finally found out how to load and display graphics and move them around with user input. Now I need to make sure I'm not using too much memory the way I display these graphics.
So my question is, how do I display the RAM and VRAM usage on the Dreamcast?
Thanks,
~EpicAsian
Re: Printing out the RAM and VRAM usage on Dreamcast?
Posted: Thu Jun 10, 2010 9:09 pm
by Falco Girgis
I'll have to get back to you on that.
There is a simple pvr_get_vram() call or something you can make. Maybe you can find it faster than I can?
I believe there's also a way to check how much has been allocated on the heap at runtime... I don't think there's anything for the stack, but you can always subtract an offset from your main for a decent approximation and add that to your heap allocated space...
Re: Printing out the RAM and VRAM usage on Dreamcast?
Posted: Thu Jun 10, 2010 9:24 pm
by epicasian
How did you print out the VRAM usage, poly and texture count in episode 15.5? Or was that build never working on Dreamcast?
~EpicAsian
Re: Printing out the RAM and VRAM usage on Dreamcast?
Posted: Fri Jun 11, 2010 9:43 am
by Falco Girgis
epicasian wrote:How did you print out the VRAM usage, poly and texture count in episode 15.5? Or was that build never working on Dreamcast?
~EpicAsian
I knew the VRAM usage, because I was loading every image as a 16-bit PNG. So each image became width * height * 2 (16 bits = 2 bytes) bytes.
I found out later that KOS actually had some kind of functionality for returning it. That VRAM-o-meter also didn't take into account the fact that the framebuffer is a 1024 x 1024 texture eating something like 4MB of VRAM...