Go Down

Topic: NTSC video out library (Read 36 times) previous topic - next topic


May 03, 2010, 06:45 pm Last Edit: May 03, 2010, 06:45 pm by joeSeggiola Reason: 1
Wow, great job!!!
Any chanches to run it on Arduino Diecimila? Someone have tested it???


It will work with the 168 if the output resolution is lowered.  to do this open up the library and change the video_timing.h file like so:


the basic formula is this:
16*_RESOLUTION_VERTICAL must be less than the amount of SRAM the board has. in this case with a vres of 54 the library will use 864bytes of ram(not much left for user code).

the horizonal resolution currently cannont change without modifying the render_line() function in video_gen.cpp.  for instance to render a horizonal resolution of 120 change:

#define _RESOLUTION_HORIZONTAL       128
#define _RESOLUTION_HORIZONTAL       120

in render_line() remove the last set of the byte output code(these lines, note the comments):
"LD            __tmp_reg__,X+\n\t"            //16

I do plan to implement a tile render engine at some point. so the memory needs of that version will drop drastically.

doing either of these changes will break the demo code. it modifies the whole screen space as it is now, and since the library assumes that you know what you are doing when changing the screen it does not do any bounds checking.  I think I will add that to the next release.

I haven't tested any of the changes i suggested so....


May 04, 2010, 09:35 am Last Edit: May 04, 2010, 09:37 am by ChrisS Reason: 1
Wow, that's cool... PAL-Support!!!

Ok, if I understood right, you need much as possible SRAM, to get the most resolution possible?

So you think Sanguino btw. AtMega644p is the right Device to improve Resolution?

Because of Sanguino, 644p is arduino-compatible mcu. So far as I know, it's the "biggest sram" Dip/Dil mcu on the market and avaiable also.
It runs on 20Mhz so, this could be an improvement too.

I know, there are mcu's with much more sram, but in Dil/Dip Formfactor 644p is the choice of simple handling... maybe i am right.... mmh....

I am no expert... whart do you think about using 644p?

Greetings ChrisS
Sturmfabrik - mediale Dienstleistungen


yes the sanguino(ATMega644p) would work well, however do note that it would require a quick modification the the library.  This is because the OC1A pin is not on PORTB1, it is on PORTD5, the required modifications would be setting PORTD5 to be output, and connect the sync resistor to that pin (i don't know what it is on the sanguino).

The arduino mega would be even better resolution wise as it has 8k sram.

As far as the best DIP chip to use the ATMega1284p would be best, if it can be found. it is the bigger brother to the 644, with 16k sram! (@20mhz 320x240 would be possible)

clock speed really isn't an issue with this frame buffer method because unless we have about 8k of SRAM 16mhz is fast enough to output the buffer.


I am no expert... whart do you think about using 644p?

At that point, you might look into the Uzebox:


I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up