PDA

View Full Version : FPC 4 GBA: first working game (WIP)



Legolas
26-08-2006, 01:07 AM
So... finally I am sure that fpc4gba can be used to make some working games :D
Here some screenshots of a boring tetris clone:
http://itaprogaming.free.fr/img/tetriz01.pnghttp://itaprogaming.free.fr/img/tetriz02.pnghttp://itaprogaming.free.fr/img/tetriz03.png

I know, I know... graphic sucks, the font should be more readable and numbers should be right-aligned... But it is only a wip version I have made to prove myself that my work on freepascal compiler wasn't useless :P
As you can see, Freepascal for gba works fine, except an array related bug (http://community.freepascal.org:10000/bboards/message?message_id=233219&forum_id=24105) I'm not been able to understand. :cry:

Now the code needs a heavy cleaning, so you should wait a little for binary and code :wink:

Edit: it works on real hardware too :D (here on my DS)
http://img150.imagevenue.com/loc384/th_55666_26082006_122_384lo.jpg (http://img150.imagevenue.com/img.php?image=55666_26082006_122_384lo.jpg)

Download
Binary (http://www.uppo.it/download.php?file=cca65c57199f26f693ee74d0dedbb32f )
Sources (http://itaprogaming.free.fr/download/TetrizSrc.zip)


Edit: uploaded a new version with some bug fixes :)

WILL
26-08-2006, 01:34 AM
Hey, where can we download the game? :P I wanna play!

Legolas
26-08-2006, 01:44 AM
Hey, where can we download the game? :P I wanna play!
Ok, download added :lol:

WILL
26-08-2006, 04:06 AM
For some reason, I couldn't get past 4000 points. :lol:

Now bad. Controls could use some work. I'd love music. Great first game demo using FPC for the GBA. :D

How long did it take to develop?

Legolas
26-08-2006, 08:47 AM
For some reason, I couldn't get past 4000 points. :lol:

Now bad. Controls could use some work. I'd love music. Great first game demo using FPC for the GBA. :D

How long did it take to develop?
ROTFL! Well, the score system needs some heavy recoding... :)
I have coded it in 4/5 days, in my spare time.

Traveler
26-08-2006, 09:35 AM
That is just plain awesome!

Could you walk us through on how to put it on a DS? My brother has one and I may be able to persuade him to lend it to me :-)

Legolas
26-08-2006, 02:57 PM
That is just plain awesome!

Could you walk us through on how to put it on a DS? My brother has one and I may be able to persuade him to lend it to me :-)
Oh, it's pretty simple: all you need is a passkey that jump DS encryption routines and a storing device like M3 (http://www.m3adapter.com/), G6 (http://www.g6flash.com/) or SuperCard (http://eng.supercard.cn/). These cards fit in GBA slot of the DS and use as storage a card usually used for digital camera (sd or cf).

savage
30-08-2006, 01:41 PM
As I already said, Great stuff! Some "for dummies" instructions would be usefull for both, DS and GBA ( my son has 2 GBAs ) so I would like to try this out.

Legolas
30-08-2006, 03:42 PM
As I already said, Great stuff! Some "for dummies" instructions would be usefull for both, DS and GBA ( my son has 2 GBAs ) so I would like to try this out.

As I have already stated, you need a flash cart (like gba movie player and so on). The rom is already patched to run on real hardware, so you only need to put it on your cart. Some carts could require to use their specific software to flash the cart...

If you don't have a cart, with GBA you can use a link cable that will send the rom directly into GBA ram.

Actually I have a DS only, so I can't be more specific :(

savage
30-08-2006, 05:44 PM
Where can I get the cart or where can I get the cable? Links please.

Legolas
30-08-2006, 07:04 PM
Multiboot cable (http://www.gameboy-advance.net/flash_linker/multi_boot.htm)
GBA carts (http://www.gameboy-advance.net/flash_card/gba_flash_advance_cards.htm)

Keep in mind that with the cable you are allowed to put on the GBA small roms only (about 256kb)

If you have planned to buy a DS too, then you could buy a M3 adapter (http://www.m3adapter.com/main.htm), that works on both gba and ds (this is the device I use)

In order to buy, you can try http://www.lik-sang.com/

FPK
31-08-2006, 06:30 AM
Nice work, I should really look into thumb support now :)

Is this done using the port as it is in the svn?

WILL
31-08-2006, 09:23 AM
Yeah the implications of GBA games with full potential of the hardware would be amazing. It would even open the way for the NDS platform I believe.

Has any progress come of the efforts to support this secondary platform with the existing GBA target?

Legolas
31-08-2006, 12:11 PM
FPK: Not really... I should submit some little changes I have made here and there :)

WILL: no news about NDS... at this time I aimed my efforts at GBA :D

WILL
01-09-2006, 01:20 AM
How much did you have to modify the existing units?

Legolas
01-09-2006, 12:19 PM
How much did you have to modify the existing units?

I don't know. libnds is bigger than libgba, but the way to modify it should be pretty similar. I think it should be only a trivial though long task... maybe something like h2pas could be helpful :)
But at this time, without a working ARM9 implementation, I think it is better to aim the effort on gba :)

WILL
02-09-2006, 08:35 AM
Actually I meant how much you had to modify from the compiler's current svn (is there a stable version that includes GBA targetting yet?) to make Tetriz. ;)

I've been using what comes with Lazarus so I'm probbly not the most up to date quite yet. Though I check up on the site from time to time.

Legolas
02-09-2006, 11:55 AM
Actually I meant how much you had to modify from the compiler's current svn (is there a stable version that includes GBA targetting yet?) to make Tetriz. ;)

I've been using what comes with Lazarus so I'm probbly not the most up to date quite yet. Though I check up on the site from time to time.

Oh, well... I have uploaded my last modified compiler sources on SVN yesterday. The biggest change is that now memory allocation should work fine (at least, I hope so :roll:)

I should make a new binary package, but I'm too lazy... :P

Legolas
07-09-2006, 06:41 PM
If someone is interested, I have put sources available for download (on the first post of this thread or on my home page (http://itaprogaming.free.fr)). Probably you could notice how poor is my coding attitude but, hey! That's only a hobby! :mrgreen: :mrgreen:
Jokes apart, feel free to modify and, where possible, ameliorate it. :wink: