-
-
Notifications
You must be signed in to change notification settings - Fork 5
FeOS specific features
fincs edited this page Feb 4, 2012
·
1 revision
FeOS has two operation modes:
- Console mode (default): it blocks all DS hardware access in order to provide a sandboxed libnds console+keyboard-based environment which you can use through printf(), scanf(), etc.
- Direct mode: DS hardware access restrictions are lifted and you can (mostly) use the standard libnds API to access the video hardware.
Making a Direct mode application is easy; this is the only boilerplate code needed to use Direct mode:
#include <feos.h>
#include <stdio.h>
int main()
{
FeOS_DirectMode(); // switch to Direct mode
//... your code here
FeOS_ConsoleMode(); // switch back to Console mode
return 0;
}
Sometimes running ARM7 code is necessary in order to perform some tasks. Therefore, FeOS provides support for loading ARM7 code. In order to do so, you first have to create an ARM7 module (explained in Creating a project).
The code functions that do the job are the following:
instance_t FeOS_LoadARM7(const char* filename, int* pFifoChannel);
void FeOS_FreeARM7(instance_t hModule, int fifoChannel);
Cooperative multithreading is a way for easily running several pieces of code that voluntarily decide when the next task should run. A simple implementation is available in FeOS called MultiFeOS.
(TODO code example)