Successfully streamed 'Bad Apple!' to Game Boy Color in real time



Nintendo's handheld game consoles, the

Game Boy and Game Boy Color , have ports for connecting communication cables to exchange data with other players. YouTuber ChromaLock has reported that he has successfully sent video data from a PC via the Game Boy Color's communication cable port and played it.

I Streamed To A Game Boy - YouTube


ChromaLock said, 'The Game Boy's communication cable port is attractive because even beginners can relatively easily modify and hack it,' and he tried playing videos through the link port to learn about PCB board design and microcontroller programming.



The video that plays is a shadow animation of '

Bad Apple! ', which is very famous overseas as a video that hacks gadgets and plays them.



There have been attempts to play games on a Game Boy in the past, but these involved inserting a cartridge with a built-in Wi-Fi chip and playing the games on a PC.



There were three tasks this time. The first was to design the port terminal for the Game Boy's communication cable.



Next, 'Design a microcontroller that can transmit data according to the Game Boy's communication protocol'



The second step was to 'convert the video so that it could be played on the Game Boy.'



The Game Boy's communication cable has a very simple configuration, with a total of 6 pins: ground, 5V power, TX (transmit), clock, RX (receive), and one unused pin.



The basic mechanism is that one byte of data is exchanged every eight pulses on the clock line. At this time, proper synchronization is required so that two Game Boys do not send data at the same time. The communication is extremely simple, with no complex controls such as stop bits, parity bits, or chip selects. Therefore, it is designed as a very simple serial communication protocol.



In addition, the clock speed of the original Game Boy is 8kHz, while the Game Boy Color can support up to 512kHz. ChromaLock said that one of the reasons he chose the Game Boy Color for this project was because the Game Boy Color allows for faster communication.



He also said that he chose the Game Boy Color because 'the screen of the original Game Boy was a strong yellow-green, while the Game Boy Color looks better.'



The microcontroller and connection terminal convert the PC's USB into a Game Boy Color communication cable.



The PCB board that connects to the Game Boy Color had the data lines positioned incorrectly in the initial design, which caused excessive current to flow through the Game Boy Color, destroying it.



Furthermore, ChromaLock said that they continued to take on new challenges, repeatedly fixing design issues such as the signal conversion circuit being unable to support 512kHz.



For the microcontroller, ChromaLock initially chose

the ESP32 . However, although the ESP32's operating speed is well above the Game Boy Color's 512kHz clock speed, in actual use it was not able to fully utilize its performance, and it could only recognize signals up to about 200kHz. For this reason, ChromaLock chose the Raspberry Pi Pico. The Raspberry Pi Pico is equipped with a dual-core processor, so it is possible to dedicate one core to GPIO operations.



By adopting the Raspberry Pi Pico as the microcontroller, it seems that it became possible to properly handle the clock speed of 512kHz, making data transfer possible.



However, although the code design was done with reference to the sample code, there were some cases where the microcontroller was too fast and caused problems. As a result, there was a problem with the extra clock signal being misdetected, and it was necessary to insert a delay to adjust it, ChromaLock said.



The microcontroller is fixed in a case designed with a 3D printer.



Connect to a Game Boy Color.



Regarding video, the Game Boy Color has strict limitations, being able to display only 32 colors on the screen, and each tile can only use a palette of four colors. ChromaLock took this into account, and in the encoding process, he first downsampled the video to the Game Boy Color's resolution of 160x144 pixels, then divided the screen into tiles, and generated a palette of four colors appropriate for each tile.



The encoded frames are sent via USB to the Raspberry Pi Pico, which transfers them sequentially to the Game Boy. Because data transfer is done in tiles, it takes about five frames to transfer all the data and draw one frame. As a result, the frame rate of the video played is about 11 FPS, and some videos will have screen lag. However, it is possible to play at a high frame rate of 60 FPS by sacrificing resolution.



That's why the following movie shows the 'Bad Apple!' video being played at a low resolution and high frame rate on the Game Boy Color. Since only the video is being played on the Game Boy Color and sound cannot be played, the music being played is added by editing.

Bad Apple but it's streamed to a GameBoy Color - YouTube


Also, here's what it looks like when you play the color ' HEYYEYAAEYAAAEYAEYAA ' video on a Game Boy Color.



He also connected a webcam and succeeded in projecting the captured scenery onto the Game Boy Color screen in real time.



However, the frame rate will inevitably drop, making it quite difficult to play the game on the screen.

in Software,   Hardware,   Video,   Game, Posted by log1i_yk