Let's build a Game Boy Emulator on a Breadboard!

Поделиться
HTML-код
  • Опубликовано: 4 янв 2025

Комментарии • 98

  • @maybe3392
    @maybe3392 Год назад +4

    I had my doubts about your channel the first time you released a pico gameboy. This video was excellent, and I no longer have any doubts. Thank you very much.

  • @plaaggeest64
    @plaaggeest64 Год назад +6

    Been waiting on this video! Looks amazing will try it when i have the time keep up the good work!

  • @Scorpionx3221
    @Scorpionx3221 Год назад +1

    Hi guys I have attempted this project myself but need some help, as when I get the the games menu and select a game the games names display backwards and when I select then to be played the screen goes blank??

  • @NunoPereira
    @NunoPereira Год назад +5

    Very good vídeo and information

  • @YouMakeTech
    @YouMakeTech  Год назад

    FREQUENTLY ASKED QUESTIONS
    > Can I use a different LCD display e.g. ili9341?
    The native Game Boy resolution is only 160x144 pixels.
    The image will be too small on a high resolution screen (e.g. ILI9341 320x200).
    This project uses an ILI9225 display because its resolution is low (220x176), it comes with an SD card reader and is inexpensive.
    Doubling the size of each pixel would require a 320x288 display, and the image will be cropped vertically on a 320x200 display.
    Scaling by a non integer number (e.g. 244/144 = 1.6666) would require too much processing power from the Raspberry Pi Pico
    > When executing the emulator my screen stays white/black
    Make sure you use a genuine Pi Pico from Raspberry Pi and not a clone.
    This project overclocks the Pico to 266MHz, 2x the normal frequency.
    Clones don't seem to support overclocking well.
    If this still doesn't work, try with another LCD display.
    On 5 LCD displays I bought, 2 had the white screen issue.
    Again the SPI bus is overclocked to 30MHz and requires high quality displays.
    I buy from Amazon not Ali Express. The quality is higher + I can return items when they don't work.
    > Can it emulate Game Boy Advance (GBA)?
    Pico has not enough power to emulate the GBA at full speed.
    I guess most 8 bits and 16 bits consoles (< year 2000) could be emulated on Pico, GB, GBC, NES, SNES, etc. but not 32 bits consoles.
    For NES emulation on Raspberry Pi Pico, check out: github.com/fhoedemakers/pico-infonesPlus

    > Can it play Game Boy color games?
    It cannot play Game Boy color games yet.
    However, it can run original/monochrome Game Boy DMG games in colors, like the Game Boy Color did:
    Some games have hard coded color palettes in the Bios and
    you can switch between 12 manual color palettes with select + left or right
    > Which emulator does it use?
    The Game Boy emulator used is Peanut-GB/RP2040-GB by Mahyar Koshkouei / deltabeard ( github.com/deltabeard/RP2040-GB ) with some minor changes done by me to support sound and accommodate SD card menu/save games on Raspberry Pi Pico ( github.com/YouMakeTech/Pico-GB ). Peanut-GB has been specially optimized to run at full speed on low specs computers or microcontrollers.
    It runs at 60 frames per second on the Pico, at the expense of some emulation accuracy. It can play most of the 1000+ original Game Boy DMG games!

  • @breadkimbow2783
    @breadkimbow2783 Год назад +1

    does it supports 240x320? because i got white screen issue,

  • @danadodua
    @danadodua Год назад +2

    Congratulations, Here on the game selection screen the names are appearing mirrored, do you have any tips

    • @YouMakeTech
      @YouMakeTech  Год назад

      Strange. It seems your display is not 100% compatible with mine. You can try using another display from another brand. The orientation is set by MK_ILI9225_REG_ENTRY_MODE, 0x1018 in mk_ili9225.c. You can try to replace 0x1018 by 0x1008 or 0x1028 or 0x1038 to see if you get the correct orientation, but this requires recompiling the firmware. The easiest is probably to try using a display from another supplier

    • @danadodua
      @danadodua Год назад

      @@YouMakeTech I know I'm asking demis, but since I'm not experienced in copying, could you copy this for me please?

    • @elgben513
      @elgben513 Год назад +1

      @@YouMakeTech how do I recompile the firmware?

  • @elgben513
    @elgben513 Год назад +1

    when I go to launch game the screen goes black. does anyone know hot to fix it, i have tried many different ROMs

  • @seanocansey5673
    @seanocansey5673 Год назад +2

    cool project! but how come this uses the ili9225 and not the more common ili9341?

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      This project doesn't use an il9341 because the resolution of the ili9341 is too high (320x240). The native resolution of the Game Boy is only 160x144. Upscaling the resolution by a non integer number would take too much processing power. And a 160x144 output on a 320x240 display will be too small. Hence the use of the ili9225 with a resolution of 220x176 pixels...

  • @layz6243
    @layz6243 Год назад +2

    Damn, I have to buy to download those STL. files. Nice-

  • @plaaggeest64
    @plaaggeest64 Год назад +2

    Hey so i just put it together without the buttons and I only see a white screen. I have put an SD card in it with a pokemon red rom if that matters. I bought my display on aliexpress and it looks identical to yours so i think I have the right screen. I am using a raspberry pico W if that also matters. Do you have any clue what I can do to fix it?

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      Hey, on 5 screens I bought, 2 had the same issue (white screen). The solution is to replace the screen. I was told that when the screen is white, it's not soldered properly on the PCB. Maybe the screens get damaged during shipping. Anyway, try with another screen and it should fix the issue. I no longer buy this stuff on aliexpress, I buy from Amazon. When it's broken, I return it!

  • @ryanmanthorp3229
    @ryanmanthorp3229 Год назад

    Hello! I have this working on a breadboard but I have a little arcade machine 10-in 1 cheap thing and this display fits inside perfectly but the image is off centre. Is there a way to modify the offset to move the image to the right?

  • @2T-projects
    @2T-projects Год назад

    please help me Im trying to connect the ili 9341 display to the pi pico but it just doesnt wirk is there any fix ?

  • @jakekleinerpaingain
    @jakekleinerpaingain Год назад

    So im again so i actually soldered headears and stopped bc my screen shows xG4 r 3 jvd z even wheni inster sd card

  • @ftechshorts6398
    @ftechshorts6398 Год назад

    From where i can get the gb files

  • @aptube6754
    @aptube6754 Год назад

    Bro is it possible to get output on tv via RCA AVTV cable ???

  • @DoTienThuatQP
    @DoTienThuatQP Год назад

    Is it possible with st7735? if yes, please give me advice about it. thanks

  • @ryanmanthorp3229
    @ryanmanthorp3229 Год назад +1

    This may help some people but I was struggling to get this to work after checking wiring many time. When powering on I would just have a grey screen. I was using a 3rd party pi pico but then saw the creator comment asking someone if they are using a genuine pi pico. So I swapped out mine for a genuine pi pico and it worked! For the price of a genuine pi pico I recommend always buying them unless the 3rd party ones come with extra features but for this project get a genuine one!

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      Thanks for your comment. Some people complain it doesn't work but they use a Pi Pico clone which I never tested. This project overclocks the Pico to 266MHz, 2x the normal frequency, and many clones don't seem to work well at this frequency. I'll add a recommendation to use only a genuine Raspberry Pi Pico for this project. Thanks!

  • @seanocansey5673
    @seanocansey5673 Год назад

    How do you change the rotation of the LCD in the Code?

  • @mrled3038
    @mrled3038 Год назад +3

    Hi! Amazing work. Im trying but i cant make it work. Do you make something after adding the peanutgb to the pico in the soft?

    • @YouMakeTech
      @YouMakeTech  Год назад

      Hi! I do everything as in the video. Flash Pico, connect the display and the sd card reader, and you should see the game selection display. What doesn't work?

  • @spandannagarkar1700
    @spandannagarkar1700 Год назад +1

    Hey @YouMakeTech I had a question
    Can a raspberry pi pico run a gba emulator or play gba games?

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      I might be wrong but I don't think Pico has enough power to emulate the GBA at full speed. I guess most 8 bits and 16 bits consoles could be emulated on Pico, GB, GBC, NES, SNES, etc. but not 32 bits consoles.

    • @spandannagarkar1700
      @spandannagarkar1700 Год назад

      @@YouMakeTech okay then which microcontroller shall a use if I want to make a diy GBA ☺️

    • @valkyrie4Ok
      @valkyrie4Ok Год назад +1

      @@spandannagarkar1700 raspberry pi zero would probably be the best for that

    • @spandannagarkar1700
      @spandannagarkar1700 Год назад

      Thanks @I like thick men

  • @domenicoromano519
    @domenicoromano519 Год назад +3

    Is there any way to get it works with a rp2040 zero and a ST7789 ips display? The 2040zero has less pin so I should just edit the code or...? I'm sorry for the dumb question but if so how I can edit the code?

    • @jamescutting1317
      @jamescutting1317 Год назад

      Any chance you figured out the answer to this question? Am currently troubleshooting this exact situation!

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      I'm not much familiar with the RP2040 zero. Looking at the RP2040 zero from waveshare, it seems to have the same pins at the Raspberry Pi Pico. Some of them are not easy to access/soldier though, but they are available. So you shouldn't need to change the pins. If you need to, you can change the pins in main.c, lines #68 to #82 (#define GPIO_UP 2 ... #define GPIO_LED 22). The pins for the sd card and the screen shouldn't be changed because they require the hardware SPI buses to be fast. Currently, the emulator uses an ili9225 display, you will need to write a driver for the ST7789, with the same interface as mk_ili9225.c/mk_ili9225.h

    • @jamescutting1317
      @jamescutting1317 Год назад

      @@YouMakeTech If I were to be using a Raspberry Pi Pico and the ST7789 display, would it be a matter of writing the driver for the emulator? The pin-outs are different from the one featured in the video, but I think I have figured them out...

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      Yes. But the image will be small. The Game Boy has a native resolution of 160x144 pixels, while the ST7789 is 240x240. Upscaling the resolution by a non integer number will be probably too slow and will not look nice. We selected the ili9225 because it is cheap, has a low resolution and an sd card reader included

    • @jamescutting1317
      @jamescutting1317 Год назад +1

      @@YouMakeTech that makes sense. Thank you so much for your reply. As I’m still very keen on the project, I’ll pick up a ILI9225 display. Keep up the cool projects, love your work.

  • @gabikLutz7009
    @gabikLutz7009 Год назад

    I notice that your screen that you used in this video has five ports instead of 4 like in the diagram and like every screen that i find online. i should just follow the diagram you showed when i make this right?

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      Yes, if your screen has a LED pin, it must be connected to the Pico GP22 pin (yellow wire on the diagram).

  • @alexvoll1873
    @alexvoll1873 Год назад

    hey so when i connect the board to the lcd screen and connect it to my computer to power it, the only thing the pico does is blink a few times and stops. the lcd screen seems to not be on, and I have loaded a gb file to the sd card. any help??

    • @elgben513
      @elgben513 Год назад

      had the same problem just had to get a new display, mine lit up white but did not display

  • @mariemistler2617
    @mariemistler2617 Год назад +2

    Hello i like this vidéo

  • @itslfas_
    @itslfas_ Год назад +2

    will you make a case for this?

    • @YouMakeTech
      @YouMakeTech  Год назад

      Yes, I already did, take a look at www.youmaketech.com/xwlo

    • @itslfas_
      @itslfas_ Год назад

      @@YouMakeTech can you emailme a photo of the complete project?

    • @itslfas_
      @itslfas_ Год назад

      @@YouMakeTech i think this can fit in the real gameboy case will be amazing

    • @YouMakeTech
      @YouMakeTech  Год назад

      You can see it at www.youmaketech.com/pico-gb-gameboy-emulator-handheld-for-raspberry-pi-pico/

    • @YouMakeTech
      @YouMakeTech  Год назад

      The 3d printed shell can use real Game Boy buttons & lens

  • @Xavier_Everwhere
    @Xavier_Everwhere Год назад

    Sir, Can you modify the so that it can work on ili9341 driver display also, game audio directly out from raspberry pi pico so matter audio volume is low we can plug in earphone in it aur can be connected with any audio amplifier, not a particular audio amplifier chip that u had shown in the video.

    • @YouMakeTech
      @YouMakeTech  Год назад

      Sir, the resolution of the ILI9341 display (320x240) is too high for Game Boy emulation! The native Game Boy resolution is only 160x144 pixels. If you display it on an ILI9341, the image will be too small. Now if you double the size of each pixel, it would require 320x288 pixels, and the image will be cropped vertically. Scaling by a non integer number (e.g. 244/144 = 1.6666) would require too much processing power from the Raspberry Pi Pico. Sound output without using an amplifier is feasible using analog audio.

    • @Xavier_Everwhere
      @Xavier_Everwhere Год назад

      @@YouMakeTech ok sir , thank you for your reply sir,
      can we use adafruit 2.4 inch tft shield, or is it possible to get analog video output? so it can be connected in small car tv monitor.

  • @jamescutting1317
    @jamescutting1317 Год назад +1

    One more question on this; any chance we could use a PAM8302A Class D instead of the 98357A?

    • @YouMakeTech
      @YouMakeTech  Год назад

      I haven't tried but this should work. Any class D amplifier should work. The Pico outputs a standard I2S audio format, stereo, 44.1kHz.

    • @jamescutting1317
      @jamescutting1317 Год назад +1

      @@YouMakeTech Looks like it should all work. The 3.3V and GND will wire back to the breadboard. But trying to see which pin on the Pico I connect signal too. Would I use DIN, so pin GP26?

    • @YouMakeTech
      @YouMakeTech  Год назад +1

      DIN = GP26, BCLK = GP27 LRC = GP28

    • @jamescutting1317
      @jamescutting1317 Год назад +1

      @@YouMakeTech You legend, thanks again for all your help.
      And for your design, bought my gameboy case last night. Looking forward to this all coming together.

    • @jamescutting1317
      @jamescutting1317 Год назад

      @@YouMakeTech The PAm8302A doesn't have the same pins however.
      It instead has Audio In+, Audio In - & Shutdown.
      Any idea how this will then be connected?

  • @jakekleinerpaingain
    @jakekleinerpaingain Год назад

    Hi everything seems worked until i realized that my Lcd dosnt have headers on right(sd card one) can i do something instead soldering? Have nice day

    • @YouMakeTech
      @YouMakeTech  Год назад

      Hi, You can buy a standalone sd card reader if you don't want to solder headers on the lcd

  • @deadlp2545
    @deadlp2545 Год назад

    Can I use a raspberry pi zero instead of a pico?

  • @praneelbhatia4177
    @praneelbhatia4177 Год назад +1

    Hello, I tried doing this project I bought all the parts I can confirm LCD works and I flashed the right uf2 file as well but for some reason The screen is just white it doesn’t show anything no menu, I took the .gb files from net and downloaded Gameboy files but no menu shows up I re did ever connection multiple times but no luck :( is there some errors you faced which I can tackle?

    • @YouMakeTech
      @YouMakeTech  Год назад

      Maybe check again with another LCD. On 5 LCDs I bought, 2 had the white screen issue, replaced the LCD and it worked. Also check your GND. Try to connect only the LCD and the SD card first

    • @praneelbhatia4177
      @praneelbhatia4177 Год назад

      @@YouMakeTech I tried the display, the display is working just wont work with the uf2 file and the SD card, Installed the .go file from online for Gameboy original but the selection screen doesn’t come up, I also removed everything and only installed the screen and SD card, although the SD card pins I have is slightly different compared to yours. Is there discord/ any other media where I could send you the error?

    • @YouMakeTech
      @YouMakeTech  Год назад

      Please try to simply connect the screen. Do not insert an SD card or connect the SD card reader to Pico, just the display. When powered on, the screen should go black (screen init + fill back is done at line #651 of main.c). If not, it's a problem with the screen or with the pico. Don't assume that because the screen/pico worked on another project, it will work here, because in this project the SPI bus is running at high speeds (30 MHz) and the Pico is overclocked to 266 MHz! This is required to run emulation on the Pico but I cannot guarantee this will work with every Pico/Screen on the planet. In total, we've probably built 10 Game Boys now: they all work. This does not mean that they all worked the first time and sometimes you have to replace a component or two, very often the screen. Please try with a genuine Pico (not a cheap clone you find on AliExpress) + another screen. All I can tell you is that whenever I had a white screen, I swapped the screen and it worked. For my projects, I order a lot of components from the internet and you can't imagine how many times a component doesn't work as expected. The quality is very low, and probably around 30-50% of the components are broken... I can't provide one to one support for each of my projects! I do this during my free time and I don't have much available.

    • @praneelbhatia4177
      @praneelbhatia4177 Год назад +1

      @@YouMakeTech Just wanted to tell you, it worked it was the display. I made it on a perf board and works perfectly fine. Thank you so much for constant support. +1 Sub

    • @YouMakeTech
      @YouMakeTech  Год назад

      @@praneelbhatia4177 Awesome

  • @kampf4019
    @kampf4019 Год назад

    Can i use a different lcd display?

  • @seanocansey2956
    @seanocansey2956 Год назад +1

    Cool project! Works well. I've got two questions
    • Can you load save files, or do you have to start every ROM from Scratch?
    • Do you think this could be ported onto the picosystem?

    • @YouMakeTech
      @YouMakeTech  Год назад

      Thanks, when you start a ROM, the emulator automatically loads a save file from the SD card when available. The emulator can be ported onto the picosystem but the screen resolution is a bit high (240x240), the native game boy resolution is only 160x144.

  • @user-vh5gq2pp5c
    @user-vh5gq2pp5c Год назад

    Is the emulator able to save game states?

    • @YouMakeTech
      @YouMakeTech  Год назад

      The emulator is able to save game states but it t's not implemented yet. Only normal game saves are available: When you press start+select, the RAM is stored to the SD card, like a cartridge with batteries would save game progress on the original Game Boy

  • @delero5716
    @delero5716 Год назад

    Heyho, when executing the Emulator my screen stays white. I had the same problem with the tetri-Micropython game, but there i could fix it by reversing the width and height. I'm a complete newbie to C, so I'm struggeling doing the same in the emulator source-code. Do you maybe have some advice or a quick fix i could use?

    • @YouMakeTech
      @YouMakeTech  Год назад

      What exactly did you change in Python to make the screen work?

  • @jakekleinerpaingain
    @jakekleinerpaingain Год назад

    Theres a mistake in diagram (sd card one) if u replace green with orange wire (in places) everything works, but video is helpful

  • @Evilslayer73
    @Evilslayer73 Год назад

    Do this run gameboy color games?

    • @YouMakeTech
      @YouMakeTech  Год назад +3

      It cannot play Game Boy color games yet, only original/monochrome Game Boy DMG games. However, it can run original game boy DMG games in colors, like the Game Boy Color did: Some games have hard coded color palettes in the Bios and you can switch between 12 manual color palettes with select + left or right

    • @Evilslayer73
      @Evilslayer73 Год назад +1

      @@YouMakeTech thank you!!

  • @Mohammad-mi6xc
    @Mohammad-mi6xc Год назад +1

    دمت گرم

  • @kr4301
    @kr4301 Год назад

    You have the same voice as Arsene Wenger

  • @artgajez2397
    @artgajez2397 Год назад

    this is nice but all you did was build a very simple gamepad, everything else was off-the-shelf, I feel somewhat clickbaited by the title but still an ok video

  • @thevideoman12
    @thevideoman12 Год назад

    Brädböard

  • @ganbensie
    @ganbensie Год назад +1

    I made it

  • @idiedlastmonth
    @idiedlastmonth Год назад +2

    This is an amazing project for a beginner. Thank you soooo much.
    My display just arrived but it displays random letters and not the file names. I used a separate SD reader and a 64GB card. I wonder if that's the problem even though i connected everything correctly.

    • @YouMakeTech
      @YouMakeTech  Год назад

      Check carefully the connections between the Pico and the SD card reader, in particular GND. The random letters mean that Pico can't read the SD card. Make sure it's formatted in FAT32 and that your rom files have a .gb extension and are located in the root folder

    • @idiedlastmonth
      @idiedlastmonth Год назад

      @@YouMakeTech Thanks. It works with the built-in SD card reader but not my external reader. Very strange.

    • @YouMakeTech
      @YouMakeTech  Год назад

      Never tried with an external SD card reader. Is your SD card reader 3.3V compliant?

    • @idiedlastmonth
      @idiedlastmonth Год назад

      @@YouMakeTech Now it's even more weird. So while the text of file names is still broken I can load ROMs normally and play. Any suggestions what it could be?