GBA coding, un-intended rants, etc.

Posted by Astryl on Oct. 14, 2010, 7:03 a.m.

OK, first things first. Yes, I can code for the GBA. It's not that hard. Secondly, I don't have much time. I'm kinda banned from the ADSL for 2 weeks for using up 3gb of our 5gb data cap.

Thirdly: http://64digits.com/users/Mega/GBA_Coding_1.pdf

That… is something interesting I wrote. Please disregard anything boastful in there, I wrote it at about 2AM last night…

Mega prepares for a relatively long time without internetz.

Comments

Quietus 13 years, 11 months ago

can you say pdf rage?

RAAAAAAAAAAGE

Astryl 13 years, 11 months ago

What, can't you access the PDF?

Quietus 13 years, 11 months ago

after a minute of my computer locking up, only for me to go "tl;dr"

Astryl 13 years, 11 months ago

LOL. It probably wouldn't interest you anyway. Technical explanations do get kinda long.

Quietus 13 years, 11 months ago

well i was planning to come back to it but i'm guessing from all the C/C++ stuff that this is way out of my reach. i can barely make GM work at this point :cough:

if nothing else, the boastful bits are funny to me :P

Astryl 13 years, 11 months ago

Enjoy them then. As an explanation, the game I'm making is for a competition, details are http://sfznserver.proboards.com/index.cgi?board=rulesnews&action=display&thread=54&page=1 there.

I'm having to correct their stupid mistakes thought >_>

Scott_AW 13 years, 11 months ago

Now code for the NES next.

Astryl 13 years, 11 months ago

I've done that before. I think I've still got NESASM on my drive somewhere.

sirxemic 13 years, 11 months ago

Quote:
There are 240 pixels per row on the GBA, and 160 rows.

This makes for an array of 38400 bytes.
I stopped reading right here. 240*160*sizeof(short) != 38400

:3

Also, tutorials in a blog directly are fine (and better imo) too.

Actually I did read on.

for(y = 0; y < 159; y++)
{
    for(x = 0; x < 239; x++)
    {
        VRAM[y*240+x] = image_Bitmap[y*240+x];
    }
}

Why aren't you blitting the right-most and bottom-most pixels?

Astryl 13 years, 11 months ago

Because the array starts at index 0 and only reaches 159 and 239.

Of course 240*160*sizeof(short) != 38400. It equals 38400 SHORT BYTES… v_v seriously, read carefully. Each byte equals one pixel, made up of the color the hardware must display.