Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- [Input](part2/input.md)
- [Collision](part2/collision.md)
- [Bricks](part2/bricks.md)
- [Title Screen](part2/title-screen.md)
- [Decimal Numbers](part2/bcd.md)
- [Work in progress](part2/wip.md)

Expand Down
Binary file added src/assets/part2/img/title-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/part2/title-screen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Title Screen

Let's make our game more official and give it a title screen! First, copy the tileset and tilemap found [here](https://github.com/gbdev/gb-asm-tutorial/raw/master/unbricked/title-screen/tilemap-titlescreen.asm) and paste it at the end of your code. This will make a title screen that looks like so:

![Title Screen](../assets/part2/img/title-screen.png)

Then copy and paste the following after [waiting for VBlank](./getting-started.md):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to point to a specific point in Getting Started? We do introduce the VBlank waiting there but it's not "explicitly" explained yet (it's in fact said we will explain it later )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There wasn't a handy header to jump to but I was indeed referring to this section:

The next few lines wait until “VBlank”, which is the only time you can safely turn off the screen (doing so at the wrong time could damage a real Game Boy, so this is very crucial). We’ll explain what VBlank is and talk about it more later in the tutorial.

I can't actually find another point in the tutorial where this is discussed however. Should I leave the link as is, link to the pan docs, or remove the link altogether? Maybe we should file an issue to determine where we should discuss VBlank in more detail as the tutorial suggests we will?

Copy link
Copy Markdown
Member

@avivace avivace Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we remove the link for now and we open an issue about having a more complete introduction/explication of what VBlank is etc, maybe even in that Getting Started. Once that is done maybe when VBlank is mentioned we can link to that.

Comment thread
avivace marked this conversation as resolved.
Outdated

```rgbasm,linenos,start={{#line_no_of "" ../../unbricked/title-screen/main.asm:title_screen}}
{{#include ../../unbricked/title-screen/main.asm:title_screen}}
```
Note that we are using our `Memcopy` function from the [Functions](./functions.md) lesson! Isn't it handy to have reusable code? We are also using our `UpdateKeys` function from the [Input](./input.md) lesson to determine when to stop displaying the title screen and move on to the game itself. To do so, we loop until the start button has been pressed.

And just like that we have ourselves a title screen!
6 changes: 6 additions & 0 deletions unbricked/title-screen/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

rgbasm -o main.o main.asm
rgbasm -o input.o input.asm
rgblink -o unbricked.gb main.o input.o
rgbfix -v -p 0xFF unbricked.gb
Loading