game development

i have been seen games created to arduino, but those are arcade like, i would like to create something more like nes games.

i have a doubt regarding if i can acomplish that , if so, how many microcontrollers do i nedd, i have:
1 arduino uno
1 mega
1 mini
1 due

so far i know due has more KB capacity and ram, so i was thinking to take that to be the main procesor, add others for controls, music, etc, but i dont know.

i would like some direction to create own game console, i dont care if is too much work, what parts do i need, i need directions on that guys,

how to load the images or game from SD instead microcontroller FLASH, can i do something like that?

thanks in advance.

It's totaly possible with the Arduino Due !!!

One thing you could do to speed un the image display is to use an old RAM stick to store them. Also, you could try overclocking you due if it isn't fast enough (at your own risk, even though I've never had problem with doing this) I've created libraries for both of these :slight_smile:

Also, don't use multiple arduinos, the due itself is enough. Adding other arduinos for input will just slow down the Due every time it has to read the states of the inputs.
Try using port manipulation for the inputs !

To display the game, look into a library called "DueVga". It alows you to generate 320x240 VGA signals to use a monitor. It's also very fast !

Hope this helps, have a nice day !

tnx i will check the libraries, what about sound a due is still perfect to handle audio, video and the game itself, thanks in advance.

Yes, the due is perfectly capable of playing audio. There is a library called "Audio" than allows the due to play .wav files from an SD card. Also, The Due has the scheduler library, it allows it to "multitask" wich can be usefull for some games

Hi alexandrerouma,

I had a look at your interesting library DueOverclock, and I think Delay could be handled more smoothly. In fact Delay() requires SysTick to fire an interrupt every 1 ms. When you are using the 84 MHz default DUE clock, SysTick->LOAD is loaded with SystemCoreClock/1000 = 84000. To keep using Delay() just as is, update SysTick->LOAD with SystemCoreClock/1000 after SystemCoreClockUpdate();

With this method, Delay() and delayMicroseconds() will do their job correctly without any modification.

And for purists, you can write this too to avoid warnings at compile time:
#undef VARIANT_MCK
#define VARIANT_MCK (SystemCoreClock)
#undef F_CPU
#define F_CPU (SystemCoreClock)

There is a sticky thread in the DUE sub section of this forum for new libraries. :slight_smile:

Hi ard_newbie

Thanks for the sugestion, I'll have a look at what I can do :slight_smile:

So, if I undestand correctly, If I update the SysTick->LOAD register with the new frequency, the native "delay" function will still work correcly ?

And does it also fix the UART and millis() problems ?

And yes, I posted the DueOverclock library to the library subsection some time ago :wink:

AFAICT millis(), micros(), Delay() and delayMicroseconds() all need a SysTick interrupt every 1 ms. To update UART_BRGR, you can write this (e.g. if SystemCoreClock = 96 MHz and baudrate = 250000):

UART->UART_BRGR = 24; // 96000000 / 16 * BRGR = BaudRate

Ok, thanks for the help :slight_smile: