Join us on Discord!
You can help CodeWalrus stay online by donating here.

The ultimate extension Module for Gamebuino: The Ninja Board

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DarkestEx

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).
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

CKH4

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.
  • Calculators owned: TI-83+, TI-84+


DarkestEx

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.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

CKH4

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.
  • Calculators owned: TI-83+, TI-84+


DarkestEx

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! :)
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

CKH4

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
  • Calculators owned: TI-83+, TI-84+


DarkestEx

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.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Powered by EzPortal