Hi
I attempted to get some stuff up and running in C++, but had many problems
so I abandoned it, however I think I remember someone else on the list
mentioning that they had a project up and running in C++ successfully. I
would
recommend due to your time constraint to use plain old C.
Also, with regards to overlays. You dont have to goto assem to get fast code
up and running. You can implement a code caching system, whereby you
reserve a small area of WRAM for functions. You then compile functions that
require the utmost speed to ARM32, copy them to the code cache in WRAM
and execute.(TIP: You cannot use normal C divide in ARM32, or maybe its
just me linking with the wrong libs).
A few more speed tips:
1. Turn compiler optimisations upto level 3 -O3 option. I have measured only
a
10% increase (at best) between my hand written ARM32 code and compiler
optimised.
2. Turn on pre-fetch and set correct wait state timings for THUMB code in
rom
using the following:
u32 ws0 = 5;
u32 ws1 = 5;
u32 ws2 = 5;
u32 prefetch = 1;
*((u16 *)(REG_BASE + 0x204)) = (prefetch << 14) | (ws2 << 8) | (ws1 << 5) |
(ws0 << 2);
3. Scope variables
and so on..........
Hope some of this helps
Mat
----- Original Message -----
From: <nharding@...>
To: <gbadev@egroups.com>
Cc: <nharding@...>
Sent: Wednesday, January 03, 2001 11:15 PM
Subject: [gbadev] Multi Player Gamins
> Has anyone looked into mutliplayer gaming yet on the AGB? I'm supposed to
> write my game so that up to 4 players can play with just the one
> cartridge, but we only have 1 devkit at the moment! Also if I'm writing
> this as multiplay, I'm going to have to do lots of code overlays to ensure
> that it fits into the available ram, how do I specify this in C/C++?
> Talking of C++ has anyone done any performance tests to see if there is
> any overhead for C++. Sorry for all the questions but I'm the solo coder
> on a project which has to be finished for May!
>
> Neil Harding
>
>
> unsubscribe: gbadev-unsubscribe@egroups.com
>
>
>