#49557 - GPFerror - Sun Jul 31, 2005 6:05 am
does the DS's arm9 and or arm7 processor support threading?
If we built the devkitarm with threading support would it work?
Could we use a some kind of timer interrupt to do thread scheduling.
Thanks,
Troy
#49558 - sajiimori - Sun Jul 31, 2005 6:16 am
Threading is implemented in software. Timer interrupts work fine.
#49559 - tepples - Sun Jul 31, 2005 6:27 am
For more predictable performance, I'd suggest hooking your thread scheduler on the vcount interrupt.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#49561 - GPFerror - Sun Jul 31, 2005 8:02 am
thanks, Are there any example of thread schedulers?
or is there any examples of code for swapping out running threads?
I have little experience from this side, more used to just using an existing thread library.
Hooking it to the vcount interupt sound interesting as well, any examples?
thanks,
Troy
#49562 - notb4dinner - Sun Jul 31, 2005 8:26 am
I can email (no webspace at the moment) you some simple code to do threading and PIP scheduling on the GBA if you like, doing it on the DS should be fundamentally the same. I thoroughly recommend using your own threading code at least once just for the understanding you gain.
#49582 - GPFerror - Sun Jul 31, 2005 6:07 pm
notb4dinner wrote: |
I can email (no webspace at the moment) you some simple code to do threading and PIP scheduling on the GBA if you like, doing it on the DS should be fundamentally the same. I thoroughly recommend using your own threading code at least once just for the understanding you gain. |
Thanks, sent you a PM with my email address.
#54618 - GPFerror - Tue Sep 20, 2005 10:28 pm
ok here my attempt at porting the gba's RTAdvance to the DS
Its at least compiled :), and partially runs in dsemu
/* RTAdvanceDemo.c by Matthew Blyde
*
* Simple demonstration of thread creation, semaphores, mutexs and priority inheritance.
* These mechanisms are used to implement a program to count the number of times a user
* presses the A button, followed by the UP button.
*/
http://gpf.dcemu.co.uk/RTAdvance.rar
dont know if it works at all on hardware, but the source is there if anyone wants to fix it or tell me how :)
Troy(GPF)
Edit: ok confirmed to not work on hardware :( oh well
#72801 - GPFerror - Tue Feb 21, 2006 9:38 pm
anyone ever successfully update this code? Still looking for a set of code to create a threading library for the DS.
Thanks,
Troy(GPF)
http://gpf.dcemu.co.uk
#72842 - GPFerror - Wed Feb 22, 2006 2:23 am
awesome natrium figured out my bug today in #mellowdsdev
in RTConfig.h
increase the stack size from 512 to 2048
Code: |
#define STACK_SIZE 2048 |
can't belive that was the problem all along lol. I'll release the source and binaries soon, then it time to figure out how to convert this into a threading library :)
thanks again natrium
Troy(GPF)