GP32 Info On Caching


rattboi24

Still Fresh
Joined
Jul 21, 2004
Messages
37
I was working on wonderboi a few days ago, and it seemed like all of a sudden it was running a lot smoother, and I couldn't account for it, since I was changing GUI code. I didn't pay much attention to it at the time. I figured maybe I just was seeing things. But I changed a little more GUI code, and it's back to the normal speed again.

That seems really strange to me, so I was figuring maybe it has to do with the memory caching. I really don't know how it works, so I was hoping someone could help me figure out how to cache the important stuff, and also help figure out what exactly the important stuff IS.

Thanks
 
Pirotic,

I don't think that's quite right. The GP32 has like 32k(?) of cache that is much faster than even normal RAM, so reading and writing is greatly increased if the data you are accessing is cached.

I know of the cache, but I was hoping to understand how it worked and how to control it.
 
In my ongoing quest for deeper understanding of all things GP32, I came across this old document today:

http://www.gp32x.de/download/development/api.pdf

Amongst its wisdom is the following:

Processor Clock Speed & CACHE Management Functions

Overview:

- GP32's minimum clock speed: 40MHz (minimum speed to operate GPSDK properly)
- GP32's maximum clock speed: 66MHz
- CACHE function: 8K mode and 4K mode are available
- Quantitative tests have not been carried out but the performance at 40MHz speed using the 8K mode CACHE is superior to that at 60MHz speed without using CACHE.
- GP32 start-up code initializes the system at 40MHz at Non-CACHE mode.
[...]
- Recommended CACHE mode: USE_8KBCACHE

So is this true? Does the system really default to uncached? I can't find any mention in the official SDK of the FlushCache() and SetGp32Cache() functions it alludes to later on. And if the CPU really is configured to have no cache by default, how can I turn it on in Mr Mirko's SDK?

Sorry for all the questions :unsure:

Cheers,
Rich
 
Last edited by a moderator:
Back
Top