You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

The ultimate extension Module for Gamebuino: The Ninja Board

b/Hardware Started by DarkestEx, June 30, 2015, 05:04:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

u/DarkestEx July 04, 2015, 04:09:10 PM
Quote from: CKH4 on July 04, 2015, 03:58:37 PM
Could the coprocessor be used for graphics? (Adding a gpu to the game buino :w00t:)
Only for the oled on the ninja board. The coprocessor has no connection to the display on the Gamebuino and can't ever get one (hardware limitations).
u/CKH4 July 04, 2015, 04:31:16 PM
Oh, do you sync between the coprocessor and the memory? It's possible that you could encode instructions but I guess it might not even be faster than doing all the calculations on the main processor. If the screen is stored in memory then it's possible you could do advanced shape calculations (ie. 3d) on the coprocessor then store the shape over the screen memory. I'm probably just throwing out garbage because I'm not familiar with the game buino but whatever.
u/DarkestEx July 04, 2015, 04:44:32 PM
Quote from: CKH4 on July 04, 2015, 04:31:16 PM
Oh, do you sync between the coprocessor and the memory? It's possible that you could encode instructions but I guess it might not even be faster than doing all the calculations on the main processor. If the screen is stored in memory then it's possible you could do advanced shape calculations (ie. 3d) on the coprocessor then store the shape over the screen memory. I'm probably just throwing out garbage because I'm not familiar with the game buino but whatever.
That idea is really interesting!
I would probably need to run a cs pin to the coprocessor, but the I would have access. But I would have problems with race conditions.
On the other side, we have a high-speed connection between the coprocessor and the main cpu. maybe we could use that to do stuff.
u/CKH4 July 04, 2015, 04:51:20 PM
Maybe we could define the processor order at the beginning of the program so if you wanted the graphics done before the calculations you could define mP-cP or cP-mP to determine the processing order. Also I'll write two programs with fake syntax later to see if I can explain any other ideas with it.
u/DarkestEx July 04, 2015, 04:54:39 PM
Quote from: CKH4 on July 04, 2015, 04:51:20 PM
Maybe we could define the processor order at the beginning of the program so if you wanted the graphics done before the calculations you could define mP-cP or cP-mP to determine the processing order. Also I'll write two programs with fake syntax later to see if I can explain any other ideas with it.
Oh, thanks!
Can't wait to see it! :)
u/CKH4 July 04, 2015, 07:50:16 PM
Heres the code stuff that I made up.

- means a user sub-routine

Code (Graphics Program) Select

// Setup
// No preference for main math or graphics processor
mP()  // sets the main processor to auto
cP()  // sets the co-processor to auto, not necessary if you only want the main processor

// variable loading
x1, x2, x3, x4, y1, y2, y3, y4 = 10, 50, 10, 50, 10, 10, 50, 50

// Main loop
Repeat()  // if empty defaults to quit
// rand(min,max,step size)
x1, x2, x3, x4, y1, y2, y3, y4 = 10+rand(-1,1,2), 50+rand(-1,1,2), 10+rand(-1,1,2), 50+rand(-1,1,2), 10+rand(-1,1,2), 10+rand(-1,1,2), 50+rand(-1,1,2), 50+rand(-1,1,2)
FPolygon(x1, y1, x2, y2, x3, y3, x4, y4)
ScreenUpd()
End  // closes the loop


Code (Mixed Program) Select

// Setup
// No preference for main math or graphics processor
mP(math)  // sets the main processor to math routines
cP(graphics)  // sets the co-processor to processes graphics routines

// variable loading
rotation = 0

// Main loop
Repeat()  // if empty defaults to quit
rotation = rotation + 1
a = sin(rotation/10)  // math handled by the main processor
b = cos(rotation/10)  // math handled by the main processor
Polygon(a,b,a,-b,-a,b,-a,-b)  // graphics handled by the coprocessor
ScreenUpd()
End  // closes the loop
u/DarkestEx July 05, 2015, 03:58:14 PM
Quote from: CKH4 on July 04, 2015, 07:50:16 PM
Heres the code stuff that I made up.

- means a user sub-routine

Code (Graphics Program) Select

// Setup
// No preference for main math or graphics processor
mP()  // sets the main processor to auto
cP()  // sets the co-processor to auto, not necessary if you only want the main processor

// variable loading
x1, x2, x3, x4, y1, y2, y3, y4 = 10, 50, 10, 50, 10, 10, 50, 50

// Main loop
Repeat()  // if empty defaults to quit
// rand(min,max,step size)
x1, x2, x3, x4, y1, y2, y3, y4 = 10+rand(-1,1,2), 50+rand(-1,1,2), 10+rand(-1,1,2), 50+rand(-1,1,2), 10+rand(-1,1,2), 10+rand(-1,1,2), 50+rand(-1,1,2), 50+rand(-1,1,2)
FPolygon(x1, y1, x2, y2, x3, y3, x4, y4)
ScreenUpd()
End  // closes the loop


Code (Mixed Program) Select

// Setup
// No preference for main math or graphics processor
mP(math)  // sets the main processor to math routines
cP(graphics)  // sets the co-processor to processes graphics routines

// variable loading
rotation = 0

// Main loop
Repeat()  // if empty defaults to quit
rotation = rotation + 1
a = sin(rotation/10)  // math handled by the main processor
b = cos(rotation/10)  // math handled by the main processor
Polygon(a,b,a,-b,-a,b,-a,-b)  // graphics handled by the coprocessor
ScreenUpd()
End  // closes the loop

Thank you. That looks interesting and I will absolutely look into that.
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal