The finished part is on bitmap modes and IMO is complete enough, though I should check all code examples and "wash" a bit the language used (maybe you have noticed my awful english...) :alien:
I once had a look at that game, but my conclusions is that that source code is hopeless; it is closely intermixed with the VCL and uses a proprietary blit engine. Even if you would be able to use the LCL, the GBA has way to few resources to support the LCL. I think making it run in FPC would be an accomplishment itself, porting it is another matter.
I have already started work on porting it to JEDI-SDL, so there is no dependency on the VCL. The idea was to get it up and running on Linux and Win32 ( and I think someone compiled it on MacOS as well ), which I managed to do at least the intro and main menu were working. I even added multi-language support.
SoA uses a layered sprite system, which allowed you to strip characters down to their underwear. Once the layering sprite system is ported the rendering loop could easily be re-written to be more effecient. Even the proprietry blitting system can be replaced. It's not an easy job, but it can be done. The main issue I see with GBA would be replace the SDL calls with GBA calls or alternatively we could write a thin SDL API replication layer that maps to GBA blit calls and the space restrictions that go with GBA.
All doable, but it takes time and loads of it. If I won the lottery I'd pay some people to finish it off.
Cool If you managed to kick out the VCL there might be some ways to save that code.
There are no GBA calls. The GBA is:
var videoram:array[0..xxxx] of word absolute $yyyy;
... and write the blitting code in assembler. We now have the Hermes blitting engine in FPC SVN, that one might help.
Hermes is a blitting engine that mainly focuses fast clearing of surfaces and on drawing bitmaps with colour space conversion (i.e. drawing 8-bit palette graphics in 32-bit graphics modes or drawing 32 bit graphics in 16-bit mode, or whatever).
MMX assembler accelerated versions of all routines exist.
It was translated from C to Pascal by Nikolay Nikolov:
Pascal version is here:
http://svn.freepascal.org/svn/fpc/tr.../extra/hermes/
Original C version:
http://www.clanlib.org/hermes/
Bookmarks