Archive of the Gamebuino Classic forum (2014-2018), rebuilt from the pages kept by the Wayback Machine: only part of the topics and pages were captured. Read-only. Removal on request: hi@gamebuino.com.
Composite TV out adapter
Myndale Sun Nov 16, 2014 12:46 am
A sneak preview of something I made this week:
( *Disclaimer: I am not really this crap at ufo race...I was concentrating on the video angle! :D )
I still have a few minor issues to sort out before I release it publicly but as far as proof-of-concept goes it's working well. Doesn't require any hardware modifications and also doesn't require any special libraries or anything...so long as a title has been built with the standard Gamebuino library it should run fine. Hardware is the usual i.e. an Arduino Uno with 2 resistors, although the Arduino can be replaced with a ATMega328p and a ceramic resonator which would make an SMD module very small.
Check back here for updates, I'm hoping to have the last few issues resolved next week.
( *Disclaimer: I am not really this crap at ufo race...I was concentrating on the video angle! :D )
I still have a few minor issues to sort out before I release it publicly but as far as proof-of-concept goes it's working well. Doesn't require any hardware modifications and also doesn't require any special libraries or anything...so long as a title has been built with the standard Gamebuino library it should run fine. Hardware is the usual i.e. an Arduino Uno with 2 resistors, although the Arduino can be replaced with a ATMega328p and a ceramic resonator which would make an SMD module very small.
Check back here for updates, I'm hoping to have the last few issues resolved next week.
CHEEZE Sun Nov 16, 2014 1:26 am
Amazing! did you use a second 328p or the one built into the gamebuino? also did you have to use I2C?
Drakker Sun Nov 16, 2014 1:34 am
Wow Myndale, you keep amazing us with your awesome projects. Is there anything you CAN'T do? :)
Myndale Sun Nov 16, 2014 2:15 am
CHEEZE wrote:did you use a second 328p or the one built into the gamebuino?
I'm using a second chip, it's the only way to make it work with all Gamebuino titles without having to rebuild them all with a custom library. The Gamebuino itself could be used to generate a TV signal but you wouldn't have many clock cycles left over for your game.
CHEEZE wrote:also did you have to use I2C?
Nope, just the GND, SCK and MOSI pins on the ICSP programming port. A standalone module would also need to tap the VCC pin for power.
CHEEZE Sun Nov 16, 2014 2:47 am
Absolutely amazing. maybe you can add a schematic for how it is wired and the library or software you used? i'm sure almost anyone that has a gamebuino or a clone also has an uno or extra atmega328p to use. i hope to see more on this because t.v. output would be awesome.
p.s. im not rushing you im just super excited for this.
thank you for your hard work and time.
sorry i was too excited that you didnt use I2C and just posted this. i cant wait great work brother.
p.s. im not rushing you im just super excited for this.
thank you for your hard work and time.
sorry i was too excited that you didnt use I2C and just posted this. i cant wait great work brother.
erico Sun Nov 16, 2014 4:52 am
UAU! I have no words! It is soooo 2600!
I now wonder if 2 gamebuinos could work on a single screen, or if one could add a bluetooth module to pair controllers into the same game?
Myndale, you open a door to many doors. Outstanding feat! :)
I now wonder if 2 gamebuinos could work on a single screen, or if one could add a bluetooth module to pair controllers into the same game?
Myndale, you open a door to many doors. Outstanding feat! :)
Myndale Sun Nov 16, 2014 5:24 am
Since the adapter doesn't use the i2C pins a bluetooth module should work fine, as would the multiplayer cable.
One of the things I've been toying with is multi-screen. The adapter works by detecting a 517-byte packet of commands+data that the Gamebuino library sends to the LCD once per frame. Anything larger or smaller is ignored, that way you don't get garbage on the screen when the SD card is being accessed. If you disable the LCD chip select line and render a frame normally then the display will ignore it but the adapter will still see a valid 517-byte packet and accept it. If you then re-enable the LCD chip select and draw another frame, but this time send a dummy command immediately afterwards, then LCD will draw it but the adapter will discard it. This opens up a number of new possibilities like adding "tv mode" support where the controller is used to draw a mini-map on the Gamebuino etc, to multi-player games where in addition to the main screen the players also have their own private displays.
One of the things I've been toying with is multi-screen. The adapter works by detecting a 517-byte packet of commands+data that the Gamebuino library sends to the LCD once per frame. Anything larger or smaller is ignored, that way you don't get garbage on the screen when the SD card is being accessed. If you disable the LCD chip select line and render a frame normally then the display will ignore it but the adapter will still see a valid 517-byte packet and accept it. If you then re-enable the LCD chip select and draw another frame, but this time send a dummy command immediately afterwards, then LCD will draw it but the adapter will discard it. This opens up a number of new possibilities like adding "tv mode" support where the controller is used to draw a mini-map on the Gamebuino etc, to multi-player games where in addition to the main screen the players also have their own private displays.
rodot Mon Nov 17, 2014 10:02 pm
Wow, astounding :shock:
Sushi Thu Nov 20, 2014 11:49 pm
Could you potentially wire this up to a higher res amoled? I know for a fact your TV isn't 84x48(or is it? :mrgreen:)
quosa Fri Nov 21, 2014 9:05 am
This is a greate idea! very userfriendly .. only a ISP Connection; great work
DFX2KX Tue Jan 13, 2015 2:45 am
I can actually see the screen! :O
I go on hatius for awhile and more amazing happens. Figures! Nice work... Right, back to beating this generic ISP programmer....
I go on hatius for awhile and more amazing happens. Figures! Nice work... Right, back to beating this generic ISP programmer....
Myndale Tue Jan 13, 2015 3:56 am
Quick update: I haven't forgotten about this, I just ran into some last-minute problems and was too busy to sort them out over the break. Basically there are two issues with the code as it stands:
1) When the game loader flashes a new game to memory it resets the device in order to start the game. This causes the SPI CLK pin to momentarily drop to 0 which the TV adapter mistakes as being an extra bit. From that point on all the screen bytes it receives are out of sync by 1 bit. The same thing happens if you do a manual power cycle, you have to do another 7 to get things looking right again.
2) Yoda's games (which I really want to support, because they're awesome) are all misaligned by 1 column. I've looked at the output with a logic analyser and he seems to be using a slightly different format to send his screens.
The second issue should be easy to fix but I'm still experimenting with the best way to tackle the first....it basically involves resetting the SPI read shift register, something that isn't documented in the AVR data sheet. It's not just a simple matter of resetting the entire SPI system because the timing is completely unpredictable and it has to be done in conjunction with the highly-critical composite TV signal generation (which in turn needs to be accurate down to 1 clock cycle if you want a clean signal).
I'm happy to post the (messy) code here if anyone's interested in seeing it, otherwise I'll wait until it's all working properly.
1) When the game loader flashes a new game to memory it resets the device in order to start the game. This causes the SPI CLK pin to momentarily drop to 0 which the TV adapter mistakes as being an extra bit. From that point on all the screen bytes it receives are out of sync by 1 bit. The same thing happens if you do a manual power cycle, you have to do another 7 to get things looking right again.
2) Yoda's games (which I really want to support, because they're awesome) are all misaligned by 1 column. I've looked at the output with a logic analyser and he seems to be using a slightly different format to send his screens.
The second issue should be easy to fix but I'm still experimenting with the best way to tackle the first....it basically involves resetting the SPI read shift register, something that isn't documented in the AVR data sheet. It's not just a simple matter of resetting the entire SPI system because the timing is completely unpredictable and it has to be done in conjunction with the highly-critical composite TV signal generation (which in turn needs to be accurate down to 1 clock cycle if you want a clean signal).
I'm happy to post the (messy) code here if anyone's interested in seeing it, otherwise I'll wait until it's all working properly.
batteries Tue Apr 28, 2015 1:56 am
Very cool project! :D
Would video-out allow for rendering other resolutions or is that something that's dictated by the Gamebuino libs?
Would video-out allow for rendering other resolutions or is that something that's dictated by the Gamebuino libs?
Myndale Thu Jun 18, 2015 10:39 pm
batteries wrote:Would video-out allow for rendering other resolutions or is that something that's dictated by the Gamebuino libs?
Sure, if you write the game to support it then you can do anything. That wasn't really the point of this experiment though, this was done to show that you can display Gamebuino games on a TV using ANY game that uses the Gamebuino library without needing to modifying it.
cyberic Fri Jun 19, 2015 8:56 am
Hi Myndale!
I'd be interrested in buying some kits, if you sell it
Any progress on your tracker?
I'd be interrested in buying some kits, if you sell it
Any progress on your tracker?
Awesomemario128 Mon Jun 22, 2015 1:28 am
Does the audio come out of the TV maybe you can make a headphone jack :D
Awesomemario128 Mon Jun 22, 2015 1:44 am
How big is the program? Will it fit on this?www.amazon.com/gp/aw/d/B00NLAMS9C/ref=mp_s_a_1_3?qid=1434937386&sr=8-3&pi=AC_SY200_QL40&keywords=arduino+mini&dpPl=1&dpID=51PlS70kajL&ref=plSrch
albertinjo Mon Jun 22, 2015 12:44 pm
I am working on a kit based on Myndale's Gamebuino TVout project.
Follow this thread, more information soon!
Follow this thread, more information soon!
albertinjo Sat Jul 04, 2015 11:25 pm
Hello
While working on a custom PCB for Myndale's TVout module I decided to upload a video so you can see a bit more of this thing in action.
In the video TVout module is breadboarded, connected to my DIY gamebuino v1.0 project
(viewtopic.php?f=16&t=1194&p=9336&hilit=DIY+gamebuino#p9336)
and playing R0d0t's awesome Super Crate Buino videogame.
Take a look:
While working on a custom PCB for Myndale's TVout module I decided to upload a video so you can see a bit more of this thing in action.
In the video TVout module is breadboarded, connected to my DIY gamebuino v1.0 project
(viewtopic.php?f=16&t=1194&p=9336&hilit=DIY+gamebuino#p9336)
and playing R0d0t's awesome Super Crate Buino videogame.
Take a look:
Sorunome Sun Jul 05, 2015 12:42 pm
Wow, this is looking awesome, great job! :D
BurningSushi Wed Jul 08, 2015 1:04 pm
That looks great, awesome to see it on the big screen!
Myndale Mon Jul 13, 2015 4:55 am
Awesomemario128 wrote:How big is the program? Will it fit on this?www.amazon.com/gp/aw/d/B00NLAMS9C/ref=mp_s_a_1_3?qid=1434937386&sr=8-3&pi=AC_SY200_QL40&keywords=arduino+mini&dpPl=1&dpID=51PlS70kajL&ref=plSrch
Yes, comfortably. It's only 4,030 bytes. It would also fit easily on a 168 Pro Mini, you can buy those on Ebay at the moment for less than $2.
Myndale Tue Aug 08, 2017 8:25 am
Spelling mistake....the resistors show 220 and 200 for a total of 440. ;)
Awot Tue Aug 08, 2017 9:20 am
Thanks ! i have corrected
Awot Thu Aug 17, 2017 11:52 am
Hello,
i have finished the Gamebuino TV Out Box !
i reused an old phone adapter, and a double femal RCA output for the VIDEO out.
the 2 RCA out are wired and working : it may put the gamebuino on 2 TV screens ! ( but i have to try with 2 TV .. )
i also add a reset button (the yellow button) because of the sync bug, this button is wired to the RESET pin of the Arduino, and a GND
i have finished the Gamebuino TV Out Box !
i reused an old phone adapter, and a double femal RCA output for the VIDEO out.
the 2 RCA out are wired and working : it may put the gamebuino on 2 TV screens ! ( but i have to try with 2 TV .. )
i also add a reset button (the yellow button) because of the sync bug, this button is wired to the RESET pin of the Arduino, and a GND