Game Boy Development Environment
Vložit
- čas přidán 27. 06. 2024
- I show you how to set up a Game Boy development environment so you can start coding your own games.
Support the channel - / neshacker
Amazon Affiliate Links:
Game Boy T-Shirt - amzn.to/3tW8TCu
Everdrive GB X7 - amzn.to/3sgTA6N
Everdrive GB X3 - amzn.to/475Hmgk
Development Tools / Repo:
RGBDS - rgbds.gbdev.io/
VS Code - code.visualstudio.com/
GitHub Demo Project - github.com/NesHacker/GameBoyDev
Development Emulators:
BGB Emulator - bgb.bircd.org/
Emulicious - emulicious.net/
mGBA - mgba.io/
Gearboy - github.com/drhelius/Gearboy
Graphics Tools:
YY-CHR - w.atwiki.jp/yychr/
Tilemap Studio - github.com/Rangi42/tilemap-st...
Music:
“Famous - Instrumental Version” by Atomiks
“Sliding” by Evgeny Bardyuzha
“Money Printer” by Notize
“High Roller” by Rex Banner
“Midnight Tokyo” by Downtown Binary
Chapters:
0:00 Introduction
0:50 Assembly & Linking
2:20 VS Code for Game Boy Development
4:39 Development Emulators
6:26 Running on Real Hardware
7:31 Building the Demo Project
8:33 Conclusion - Věda a technologie
macOS Install Guide - czcams.com/video/WLRq-FcuiPo/video.html
Ubuntu Install Guide - czcams.com/video/5qg7I3Sfmu8/video.html
Windows Install Guide - czcams.com/video/F4eRZeuFwCA/video.html
A VM is the worst opinion you had in this video. Recommend people multiboot instead.
Apple suck! The M1 Mac can't multi boot so we just use VM!
If the SD card is greater than 32gb Windows won't format it to fat32
@@ReligiousReasoning you can force format, the Xbox original softmldding community has a formatter that does it very well, I fall back on it sometimes
@@420......... I know that there are several 3rd party programs to do it
Well, I was surprised and delighted to see my VSCode extension suddenly show up in a channel I enjoy watching! I was doing a happy little dance as you pointed out all the little features it has. Thank you for showing it, and I'm glad you found it helpful!
You are very welcome and thank you for making such a great extension! Seriously, it makes GB programming even more joyful 😀
That extension is badass!
Epic!
Thank for your work
Can you make ASM to C extension? Lol make it a real basic C
I'm 42 years old and man, how I wish the internet as we know today, existed in the 90's. So I could start learning how to program when I had lots of free time. Today, it's only a dream that I can't acomodate on my routine due to time constraints. I actually tried to taunt myself how to code in C++, and made 2 mods for GTA IV years ago, but while the mods worked, I shown to a friend that it's a programmer and he felt very confused with my code haha, surely it was full of redundances and weird solutions because I didn't knew better.
for so many years these childhood classics have been a black box to me. i’m glad i found this channel.
That’s really great to hear… these systems and games were very important to me when I was a kid so it’s been really rewarding to explore them and explain what’s going on to you all 🥹
What’s even more interesting is once you’ve better learned and understand the hardware, it’s sort of a puzzle to look at some official titles and wonder what they did to pull off some of the tricks for animating certain things.
You have a real gift for teaching. You are succinct in your descriptions and demonstrate a thorough knowledge of the subject. Keep up the great work!
That’s very high praise, thank you very much ☺️
Echoing this. Your delivery has changed the way I write documentation for the better.
Recent versions of Windows will only allow FAT32 to be used on drives 32 GB or less (the SD card in the video was 128 GB). You can use a utility like FAT32 Format to do larger drives on Windows.
Oh that makes sense… I just used one of my camera SD cards for shooting footage and the like, good catch!
Not entirely recent; 2K had this limit too, iirc.
Or Rufus if it allows formatting of flash cards just make sure to do non bootable from the menu picker
the one i used was GuiFormat
Or you can not use Windows lol
Can't wait to try coding for the game boy !
Heck yeah! It’s really fun, especially if you’re coming from the NES… something’s are just much cleaner and make more sense (like screen scrolling 😂)
I needed this more than air
That VScode extension is just a language server, you should be able to use it in any editor including vim/nvim...
Ah interesting, I wasn’t aware MS created a protocol for this. Though I think vim might not be as smooth an experience as VS Code without extensive modification.
Thx you, I was learning this last week and having it compressed in a CZcams video makes it easier to learn.
You’re very welcome 😊
Wonderful video. Those extensions for VSCode in particular are absolute gems. Very concise and immensely useful from start to finish. Thank you so much for your work!
You are very welcome, and thank you for your kind words! 😊
Would love more of this if it was a series!
Awesome! I was wondering where you were gonna go next. Great choice!
I’m glad you liked it :)
That VSCode extension looks really useful, and interesting to hear your recommendations on emulation.
I've been eagerly awaiting a series like this for ASM dev on GB, everyone just goes straight to GB Studio
Super nice! Love the work you are putting in :D
I really appreciate that 😊
A couple of good alternatives to bgb are SameBoy and Gambatte, both of which are cross OS, highly accurate and even feature libretro cores (Retroarch/BizHawk). In fact, according to the latest GBEmulatorShootout accuracy test (run on August 31st 2023), both SameBoy and Emulicious handily beat bgb
Leave it to Kirby to drop yet another knowledge bomb… Much appreciated, friend ☺️
I can understand not mentioning gambatte, since afaik its debugging tools are really limited. But I did find it a little strange that SameBoy specifically wasn't mentioned, since it has an excellent debug UI for OS X, or so I've been told (I don't have a Mac).
Awesome guide!!!
Really looking forward for upcoming GameBoy content.
I’ve got some good ideas in the pipeline, stay tuned!
Holy crap. The RGBDS Z80 extension would be great for just looking through code and seeing just what everything does. That just amazes me.
Great intro into GB DEV using assembly code, look forward to future installments. Have played around using "C" with GBDK - 2020 and got some reasonable 'Mario' style side scrolling and 'Zelda' style scrolling roms for the GB, for a non programmer. When I get some spare time I have been trying to get my head around assembly coding, as you have said, not that hard but you do need to practice it to get a handle on the nuances of the language. The book "Game Boy Coding Adventure" has been an excellent resource tool for me.
It can be frustrating but a lot of fun to learn as well ☺️
We want the next episode!!!!
Nowwwwww
👏🏻👏🏻👏🏻
i am so glad people like you are generous enough to share this knowledge
Very helpful when starting to develop for the Game Boy.😀
Here’s to hoping for many happy hours of coding in the future 🍻
I was just dreaming on a video like this. It's great!
Perfect, I’m glad you liked it
Thanks!
You’re very welcome! And thank you 😊
Keep it up! Just Subbed, and it’s exactly the info I’ve been looking for.
Quick tip, in VS code, you can navigate to another section by command/alt clicking the name of the class or method, and navigate back and forth between spots just like using back/forward arrows in a browser or visual studio by using the hotkeys ctrl+- and ctrl+shift+- (those are dash/underscore keys. Don't hit the plus key obviously.)
Nice, thanks so much for sharing!
@@NesHacker No problem, and thank you for creating such an incredible resource for everyone to learn the development of NES and GameBoy. You do an amazing job sir. 👍
This recommendation is amazing :D Thanks for the video!
This is really cool. I learned ARM assembly in my college classes and it would be cool to also learn how to program assembly for a gameboy.
GBASM is very similar to Z80, and doesn't take too much doing to learn if you're already familiar with at least one assembly language. Go for it!
Geeked out over this and subbed to channel.
For debugging emulators, I'd like to also suggest Mesen. It was originally a NES/SNES emulator, but it recently added support for GB/C and even PC Engine, and it has universal debugging tools for all of them. Plus it has versions for both Windows and Linux.
Mesen is life. When he said there were two choices, my first thought was "oh cool, what's comparable to Mesen?"
THIS THIS THIS! WE NEED MORE OF THIS!!!
The whole VS Code Intellisense assembly is insane to me. Thinking back to when I was a kid trying to learn 6502 assembly on a Commodore and getting stuck understanding the concepts and what memory addresses did what, it would have been a total game changer. Same really even with C/C++ programming back then, I remember when context sensitive editors were finally starting to highlight high level languages like BASIC, it was so awesome to have that "ANSI graphics" type source editor back then. Imagine that plus intellisense, code peeking?? Hell even a dual monitor!
Very cool. Thanks for putting the leg work in to educate ppl on this. I might give a try sometime in the next few years. It would be cool to start on some somewhat more simple projects, I find everything I work on ends up being something 10 people should be hired to complete.
If your project explode into complexity, I suggest thinking of them as “demos” instead and focusing on accomplishing bite sized tasks.
It’s what I do to keep things from getting out of hand 😂
This is cool, thanks for posting this.
Great I intend to do some GB dev after I get to grips with nes, great vid thanks
It’s super fun, you’ll have a blast programming the GB when you get there 😊
Dude, this is amazing thanks for showing us
Yeah no problem, I’m glad you liked it ☺️
Ive been working on a GBC game using RGBDS for the last 10 months and I thought I had reached the bee's knees with my Sublime Text build system - but damn some of those VSC features look amazing... Too bad my pc would blow up using VSC :'D amazing video regardless, love to see some love on RGBDS, by far the coolest homebrew assembler
RGBDS really is quite good, such an impressive assembler suite and a great community of coders around it ☺️
@@NesHacker yeah!! I've had a great experience with gb dev, not only because the hardware is pretty neat (not as many bugs as the nes) but the community too
Exactly what I want to know! Many thanks!
Awesome, glad it was helpful!
I do not own a Gameboy and never did, but I really loved the video and the vs code extension!
I don't know why you are still making a game for Gameboy, but I find it very inspiring...
Cause it’s fun 😆
BGB runs great with wine.
I had problems with wine on the latest version of macOS, but had no issues with both previous Mac versions and on Linux.
Well now I know what am going to be doing next weekend lol
Very interesting project,
I've been looking for a reason to teach myself an assembly language. I think i just found it. Thanks
Always love your vids.
This is a pretty sweet channel
Omg !! So interesting !!! I already love ur channel !!! 😍
Thanks! There’s a lot more to come on the Game Boy and other consoles, so keep an eye out!
best channel on youtube
Haha, thank you very much
The only coding I have done in assembly was to make a sodoku game in MIPS as a project in college. I have also done other things where I had to use C/C++ to create a Speculative Dynamically Scheduled Pipeline and a memory hierarchy simulator based on MIPS commands.
This is actually cool
I just realized VS code has forward and backwards buttons now.
The GB Operator made by Epilogue works just as well when testing to see if your Game Boy game works on actual hardware. The best part about this device is that if you put the game on an actual cart instead of a flash cart, the GB Operator can be used to dump the ROM if you want to make any changes or if you want to make back-ups. Same for save files if applicable.
Thanks for the great video!
You're welcome. Thank you for letting me know you appreciate it!
AMAZING 😊
Thank you! I’m glad you liked it 😊
A couple minor errata:
FAT (and FAT32) aren't windows formats, they were just used by windows by default for a while.
The UEFI partition on your modern computer uses FAT32 to this day ;)
Diskpart on Windows can make FAT32 disks, but it's a command line utility, so be careful!
Ooo nice stuff, thanks for sharing!
I thought FAT32 was a cross-format that should work across many different OSes, but I could be wrong.
Simply amazing. We live in a day when we can use a world-class editor from Microsoft to write code with Intellisense for an ancient Z80/8080 hybrid CPU video game system - for free. Wow!!!
Yeah it’s cool, right? 😀
This is very cool.. We should ask some assembly questions in our Nintendo trivia 🤣
Awesome!
“In development for nearly 30 years” *Shows 1997*
My joints…
😂
The reason you couldn't format the SD card in FAT32 is because of specification. The card you have is probably SDXC compliant (up to 2TB), which mandates exFAT. SDHC cards (up to 32GB) are FAT32 and the original SD spec (up to 2GB) is FAT16. SDHC cards are not compatible with SD only readers because there are a few protocol differences but SDXC is pretty much the same as SDHC except for using exFAT instead of FAT32, so by forcing it to use a FAT32 filesystem you basically made it behave like a SDHC one.
Cool cool! Subscribed! I made a tutorial for RGBDS, on creating a shmup. Assembly is crazy difficult, but i can see the power in it. I prefer GBDK-2020 for game boy game development. It might not be as powerful, but the devs are actively improving and it's already made a lot of cool titles. In fact, GB Studio is based on GBDK.
I’m happy you liked it! Assembly ain’t all that bad but it does take a lot of practice up front. Happy hacking! ☺️
Great video
Good stuff
Great video, thanks for sharing everything.
Do you plan to stream or record the development process teaching in the way?. Could be interesting.
Great, now i spend few hours to make simple Hello World game with text on the screen. Tnx!
If it's like this for this kind of games, It really blows my mind how we got to the current state of videogames.
This is awsome!
Thank you so much! ☺️
Super polished production and well explained. I only object to saying that assembly is "the best" way to write gameboy games. It has advantages but very significant disadvantages as well. Tools like GBDK-2020, ZGB or even GB Studio should be at least considered, if nothing else.
It’s true, assembly can sometimes be tedious to write and debug. But I think it’s definitely worth the extra effort, especially when first learning a system, as it forces you to become very familiar with the hardware and how it operates.
Other languages and maker programs may get you to a game faster, but if you really want to learn a retro system and how to program it, go with assembly 😊
Hey man, I love your videos, and this is a great one!
There is a fantastic abundance of information for Nintendo consoles. But so terribly little information for Atari consoles that came after the 2600. I would love if you could educate us on the competing consoles to the NES, like the 7800! That would be such a great service to the gaming community!
Thank you for this video, truly. I was thinking about trying my hand at the GameBoy, but never had the big motivation to until now.
Does SameBoy provide any debug tools? The more accurate the emulator, the better, was my train of thought here.
Great video! You can format with FAT32 in Windows 11, but you'll have to use Diskpart
Dude you are so cool
Haha, thank you 😊
Where the fudge have you been? My processor and I were worried sick. Your trimmer must still be broken, but that's ok I forgive you. Game on... nice video
I- uh- ahm- ah thanks 🙏
I guess it's time to develop for the GB.. There is no excuse now :D
It’s honestly really a blast, look forward to more videos on the topic in the future!
wow, wow, wow! This and every other video from you are so nice. Thank you for your dedication and investment in all your documentation. 👍
Huge respect to the people who programmed these games back in the day, long before the intellisense and debugging tools we have today. Those guys were built different.
Me encantan todos tus videos de entornos de desarrollado para nes y gb/gbc, tienes algun plan de hacer algun video del sgdk ? El entorno de desarrollo de la sega genesis/ megadrive, esa fue mi consola favorita durante todos los 90, seria genial ver un video de ese sdk con tus conocimientos. Saludos desde Mexico 🇲🇽
Yeah I mean I’d like to do all sorts of retro systems. Just takes me a long time for each video now because of research and editing, so it might be a while until I get to the sega systems. Thank you so much for watching!
VS Code is my go-to editor for almost any coding project.
It's free, has lots of useful extensions, and is (generally) fast and light on system resources (depending on how many extensions you have running).
It's always nice to see fellow programmers keep the old systems alive with new games every year.
I wish all fellow developers all the best with their projects!
I don't completely disagree with you, but describing an electron app as "fast and light on system resources" is insane to me. I use Helix, but even with non terminal editors the majority are far faster than vscode
@@elliotts5574 I say it's light compared to most standalone IDEs like Visual Studio and those from Jetbrains.
VS Code is the next best step after something like Notepad++ because I view it more like a text editor with a built-in command prompt and more useful extensions from the community.
@@elliotts5574VSCode has come a looooong way in terms of performance. I’m a JetBrains shill but Code is getting pretty dang close.
You so cooool!!!
Fun fact, to format any storage to any file system i use CMD as admin on windows and simply force format them to whatever file system i need.
Keep in mind that you can format a 64gb drive to FAT 32 but because of how FAT 32 work you will only be able to access 32gb out of 64
It also works for the even older FAT 16 which was used by windows 95
All done using CMD on windows 11
>Keep in mind that you can format a 64gb drive to FAT 32 but because of how FAT 32 work you will only be able to access 32gb out of 64
This is not true. It's very common to use fat32 with large capacity SD cards for GameCube (in the SD2SP2 adapter), 3DS, Switch, etc. I'm talking like 128GB or 256GB in many cases. All that space is most definitely accessible. I wanna say you formatted it wrong(?) if you're having the issue you describe, but I've never ran into that issue ever so I'm still a bit skeptical. The main limitation of fat32 you will run into is 4GB per-file limit. What you're describing sounds like you cloned a 32GB SD card or image to a 64GB card and then didn't expand the partition. That's the closest thing I can think of that would cause such a problem.
@SoundToxin I do admit that I was wrong there haha you are absolutely right about that. 1tb might be the limit for drive size but still limited to 4gb per file like you said ^^
Gui format or Rufus are great tools to format drives to fat32 on windows
Nice thank you for sharing 😊
@@NesHacker yeah no problem
Don't EVER listen to people telling you asssembly is "not that hard". It's fucking hard and you gotta be a real smart person to use it. Really.
Vim for life, I don't need no VSCode nonsense!
Boooooooo
Thanks! Would you do a similar episode for GBA development?
I haven't looked at the GB support in Mesen2 yet, but if it's in there then Mesen is a great emulator for devs and hackers.
Good point! It seems to support the Game Boy, but I haven’t looked into how accurate it is in comparison to more specialized GB emulators like BGB.
I use mesen2 for a lot of debugging during my game's development (alongside bgb and sameboy) and it's pretty great!! As long as you get a build from the actions section - the last stable build missed some really important gb accuracy bugfixes, specially regarding sound (which were bugs I reported to the dev directly because of my game)
amazing, assembler language
I grew up on NES and Gameboy, but I'd love to see what you're capable of making on Godot!
7:00 if you use drive manager, you have some more options and you can totally still do FAT32 on Windows 🙂
Basic is done. The only thing is I can do the make on external terminal, but not know anything about vscode to do this task thing. I thought there is another video which explain something like that. Even so probably I would not be sure as I am on macOS M2.
TL; DR
For those who come from macOS, the java seems you need to do
- brew install java
- and run the echo especially the one need sudo to make it works.
- the sign is that you type java and there should not be a warning but ask for command argument
- if you java do that you can right click on the jar and all is good
- the other tool just install wine-stable and go through all those macOS security issue (allow it under security and privacy)
Nice series!
How do you run YY-CHR on MacOs?
I use wine on my video production mac, but it doesn’t seems to work in the newest version of macOS :(
Where can I get a shirt like that!?! Awesome video!
I put an Amazon Affiliate link in the description to the shirt. If you buy it with that link it helps support the channel :)
Kind of a specific question: When you assemble your files, do you make a sym file, and if so, does Emulicious display your comments in the debugger when it uses the sym file? I have an issue where it loads the names of my variables and sections just fine, but won't show my comments. I can get the comments to load using WLA-DX as the assembler, but for gameboy development I'd prefer to use RGBDS. Thanks!
VSC as me... my first choice. I learn various techniques using exactly IntelliSense...
Love the idea of this... Though GB Studio is probably more approachable for people...
Yeah probably… But my niche is old school style low level assembly programming on retro systems with an algorithms slant 😂
@NesHacker I admit I wanna make a game like this just to say I did.
Another part of me wants to make a GBC and GBA based game engine ala GB Studio.
Though I have a feeling, I will instead aim at making my own console and related.
Valeu!
Thank you so much!
I’m studying compilers with an idea in mind. Write a subset of the C programming language to compile in asm for various platform (like game boy, snes), you think is a good idea for a project?
I'd love if there was a way to configure a custom project template for full Visual Studio 2022 to highlight and manage Game Boy Assembly.
It would also be cool if there was a way to configure or write a plugin for an emulator to report the execution line and memory back to Visual Studio so I can set breakpoints, inspect values directly in code during runtime pauses, and step through code execution. Not to mention single-click build, deploy to emulator, and running debug from the Play button.
Also, it's been like 20 years so I can't remember, but back in the day when programming z80 assembly on the TI-83 Plus, I could have library files with ion, Mirage, or other shell's subroutines and stuff and #include them at the top of my file, and they contained a bunch of definitions for the extension code.
Could I split my Game Boy application into multiple files for organization? Similar to how a Partial Class works in dotNET?
Oh yeah you can totally split projects into a bunch of files. Check out the demo code on GitHub, I do it in that project (link in the video description).
Interesting. Is there a way I can code with C or even C++? Like is there a LLVM backend for the GBA's CPU?
Will there be some comparison between doing it like this video and using GBDK to program in C?
I’ve not used it, but I can look into it and see how they compare. Good idea 👍🏻
Nice Video ! Sub & Big Like ! Love Retro Games !