As explained in the Pokitto Magazine volume 1, page 34, it is safe to set your Pokitto’s clockspeed to 72mhz by setting _OSCT=2. This can’t be done by making a #define in your code.
Here are instructions depending on which IDE you’re using (this is a wiki, feel free to add more):
PyInSky:
Python games run at 72mhz by default.
FemtoIDE (C++):
Open project.json and add "-D_OSCT=2" to the Pokitto section in CPPFlags and CFlags.
FemtoIDE (Java):
Open project.json and add "-D_OSCT=2" to the Pokitto section in CPPFlags and add "--defsym=_OSCT=2" to the Pokitto section in SFlags.
PlatformIO: -D _OSCT=2 in build_flags in platformio.ini, e.g.
build_flags =
-D _OSCT=2
-std=c++11
Extra notes:
Overclocking has no effect on the Simulator.
The Emulator will increase the amount of instructions that it needs to execute per second, but if your computer can’t handle the extra work, overclocking will actually result in a slowdown.
The FPS number goes up, but is it actually getting any faster?
The code that actually changes the speed is in mbed’s system file, which does not include My_settings.h.
If in the #defines, the clock counter will speed up and the fps will appear faster. But for OSCT to actually affect the SysClock speed, it has to be given on the build settings
Maybe another stupid question: are there negative side effects by doing this overclocking? Or are there situations where you definitely would not want to use overclocking?
If I get chance I’ll look into improving the instructions and/or maybe finding a better way than doing it per-project, but I don’t really use EmBitz much anymore (partly because I got fed up with dealing with those build settings menus).
Technically it is a regular define,
but it has to be defined before the compiler even starts for the right library to see it and respond to it.
(Or that’s how I understood it anway.)
Putting it in the #define tab basically makes the IDE pass the right command line option to the compiler to make sure it’s defined at the start of compilation.