Programming the Game Boy - Temple Run

preview_player
Показать описание
I programmed Temple Run for the Game Boy and Game Boy Color systems in assembly using the Rednex Game Boy Development System. The Game Boy, first released in 1989, runs of a custom SoC known as the DMG CPU, with its core SM83 being based off the Intel 8080 and Zilog Z80. It has 8KB of WRAM, 8KB of VRAM, along with various I/O and a 160x144px LCD display. Through clever use of the hardware, the Game Boy can display 4 different shades of "gray" (filtered green through the LCD).

Later in 1998, the Game Boy Color was released and featured a new SoC known as the CGB CPU. It featured a CPU capable of running at up to double the DMG's clock speed (at the expense of using more battery power), increased the system's built in WRAM to 32KB, and VRAM to 16KB (Also moving VRAM directly into the SoC package).

The Game Boy is programmed using RGBASM, which is based on Z80 assembly syntax. Development resources are found below:

The Culture of Japan as Seen through Its Leisure. pp. 325–326.

Gameboy cartridge by Maxence Béranger from Noun Project
Game Boy by IYIKON from Noun Project
pattern by Yasser Megahed from Noun Project

This video was sponsored by Brilliant
Рекомендации по теме
Комментарии
Автор

For corners, I'd recommend placing a checkpoint.
On reaching the checkpoint, the screen will "fade to black", with only the player character on the black screen, before transitioning to reveal the new direction.

Since actual turning isn't particularly practical, this would prevent the jarring sharp teleportation and give a moment's respite.

Okamikurainya
Автор

Despite having a clear voice, thanks for still going through the effort of adding proper subtitles !!

daviddelgado
Автор

Here's a suggestion to make the turns much less jaring, the player character should rotate and then run off screen and only when it hits the boundry do you refresh with them at the bottom again. As it is, there isnt any real indication you're turning, it just resets. Cool project though i hope you do a follow up with more features from the original!

rorcarrot
Автор

I took a look at your temple run game and I think the reason it won't work on the original GameBoy is because you call the OAM DMA when you are in ROM. On the DMG, you can only access High RAM during the DMA transfer. You need to copy a routine into HRAM on boot that will call the DMA transfer and will wait for it to finish. There's more details about it in the pandoc.

SkankinMoshPit
Автор

Imagine playing Nintendo Switch but with full color

mronewheeler
Автор

This is absolutely insane. The explanation as well as the game are both top notch. Well done!

mattgio
Автор

As a pixel artist and chiptuner, I'm *Very Fond* of the GBC's hardware, it feels to me on the non-coding side like a NES but better in damn-near every way! I don't even mind the lower resolution, if anything, the biggest bottleneck is the 40 sprites limit, as for that soundchip, lemme tell ya, channel 3, that DAC, that's where its true potential lies! You can do Wonders with it!

Michirin
Автор

You using Pokemon Gold as the tilemap example really had me look up if I didn't misremember it coming out on the GBC. I wasn't aware it was GameBoy compatible!

LightTheMars
Автор

Maybe you could do what sonic 1's special stages do and simply fake the rotation by using pre-rotated versions of the tiles and just arranging them in a way that it looks right? You could probably get away with having just one frame of "rotation" just to make it look less abrupt

frostiikin
Автор

Definitely one of my favorite channels now! Love the clear focus on dev while providing some insight into the hardware.

robotonwheels
Автор

THE I OPERATING SYSTEM OH MY GOD IM DYING

angelcaru
Автор

I've been lately consuming so much Terry Davis' content and on the first sight i've read title as "I made temple OS [...]". Man...
Still cool video tho, keep up the good work.

Xevizek
Автор

My eye twitched when you said “i operating system”

MerlinSpace
Автор

Finally moving up the ladder, 20 more years and bro will finally find x64 and Unity and unreal :D

Love your content man, your NES tutorials got me into learning 6502, I changed my college courses to learn more embedded and low level programming, something so beautiful about the constraints that forces you to be a better coder

zaks
Автор

So glad nintendo announced the Switch Color this month! Really looking forward to seeing which games are compatible :)

StormBurnX
Автор

2:40 okay, that just gave me a weird idea: GB link cable adapter for the NES, so you can have games where you play NES vs NES or NES vs GB 😅.

sofia.eris.bauhaus
Автор

I love how you portray everything so simply…and then add the “ifs” and unique gotchas in a quick sentence afterwards 😅

claytondoxsee
Автор

I reently got into programming for GB is assembly too! It's a really fun challenge, and I'm particularly attracted to the special features you can use when programming with the Super Game Boy in mind!

Bofner
Автор

Please do more Gameboy assembly dev videos. I am working on a game and it's hard to find anything gameboy related that isn't GBDK or Gameboy studio. I have a basic adventure style game so far with a animated walking 16x16 character. No collisions yet. I would love to see more in depth on the interrupts and tricks like the scrolling scenes in links awakening or Pokemon splash screen. I think I have watched all videos on youtube about ASM coding on the gameboy. Waiting on that next video from Nes Hacker as well. Great video, it helped to solidify some concepts for me.

kwigbo
Автор

Fun fact: In the GDR, a clone of the Zilog Z80 was also produced under reverse engineering. This chip was called the MME U880.

Nintendo_Freakx