GBA Video Memory

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

GBA Video Memory

Post by piku »

A thought occurred to me...

In the GBA's bitmap modes, you draw to an area of memory that is "the screen". The stuff you put there appears on the GBA's display.

You can also have sprites in the bitmap modes, however the pixels representing the sprites aren't mixed into the area of memory you draw your own bitmap stuff to.

Somewhere inside my GBA there has to be an area of memory that contains my bitmap graphics AND the sprite graphics mixed together, ready to be drawn by the LCD. Does anyone know where it is and whether I can play with it?

Or does the GBA just do something boring like copy the sprite graphics out of OAM Data memory into the screen during the vblank or something?
return (0);
User avatar
WalterMß
Baaaa!
Baaaa!
Posts: 612
Joined: Tue Oct 15, 2002 1:36 pm 0
Location: Rome, Italy

Post by WalterMß »

I don't know anything about GBA's Video Memory architecture, but I'd not expect any dedicated memory areas for sprites/textures to be there: maybe you just have to allocate that by your own and then BitBlt to the VideoRAM whenever you need it.

But I'm sure some llamasofties (or many many internet sites) will have a more useful answer for you.
READY.
█
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Post by piku »

I had a think...

Since the GBA has hardware sprites, it probably draws the sprites on the LCD at the same time it draws the "video memory" on the LCD.

Never mind. Once I figure out some fun ways to move pixels around the screen I can have fun :)
return (0);
User avatar
sack
Baaaaaaa!
Baaaaaaa!
Posts: 7077
Joined: Fri May 10, 2002 4:13 pm 0
XBL Gamertag: evilgopher
PSN: sixFiveOhTwo
Location: Rijswijk, The Netherlands
Contact:

Post by sack »

It's all done on the fly so you can't read back and play with it sadly...
User avatar
JonR
Baaa!
Baaa!
Posts: 444
Joined: Mon Sep 23, 2002 4:38 pm 0
Yahoo Messenger: syntax_cdn
Location: somewhere cold
Contact:

Post by JonR »

of course, you could (i'm doing this from memory, so it might just all be wrong) hook into the horizontal interrupt and change the video memory on the fly that way.

erm.....try to find a twister effect demo on http://www.gbadev.org...i think thats how thats done.

jonR
"you are the angel of death and I am the deadmans son..."
Post Reply