Printing out the RAM and VRAM usage on Dreamcast?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
epicasian
Chaos Rift Junior
Chaos Rift Junior
Posts: 232
Joined: Mon Feb 22, 2010 10:32 pm
Current Project: Gigazilla Engine
Favorite Gaming Platforms: Dreamcast, SNES, PS2, PC
Programming Language of Choice: C/++
Location: WoFo, KY

Printing out the RAM and VRAM usage on Dreamcast?

Post 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
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Printing out the RAM and VRAM usage on Dreamcast?

Post 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...
User avatar
epicasian
Chaos Rift Junior
Chaos Rift Junior
Posts: 232
Joined: Mon Feb 22, 2010 10:32 pm
Current Project: Gigazilla Engine
Favorite Gaming Platforms: Dreamcast, SNES, PS2, PC
Programming Language of Choice: C/++
Location: WoFo, KY

Re: Printing out the RAM and VRAM usage on Dreamcast?

Post 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
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Printing out the RAM and VRAM usage on Dreamcast?

Post 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...
Post Reply