Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

#1 2020-04-27 17:55:54

toxa
Member
Registered: 2020-02-13
Posts: 309

preemptive multitasking example for game boy (real threads in sdcc4)

that's easy: https://github.com/untoxa/gameboy_preem … ltitasking
no real purpose, just for fun.

Last edited by toxa (2020-04-28 06:35:28)

Offline

 

#2 2020-04-28 17:51:28

toxa
Member
Registered: 2020-02-13
Posts: 309

Re: preemptive multitasking example for game boy (real threads in sdcc4)

gbdk library is mostly not thread-safe. even div/mod. be careful.

4 running tasks example:
https://raw.githubusercontent.com/untoxa/gameboy_preemptive_multitasking/master/screenshot.png

Offline

 

#3 2020-04-30 06:50:11

toxa
Member
Registered: 2020-02-13
Posts: 309

Re: preemptive multitasking example for game boy (real threads in sdcc4)

A more complex demo with a thread pool and messaging: https://github.com/untoxa/a_kanoid Press "ABABABAB" to launch many balls.

https://raw.githubusercontent.com/untoxa/a_kanoid/master/screenshot.png

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson