You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/part1/palettes.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,11 @@ I put air quotes because "black" isn't true black, and "white" isn't true white.
26
26
Further, note that the original Game Boy had shades of green, but the later Game Boy Pocket's screen produced shades of gray instead.
27
27
And, even better, the Game Boy Color will automatically colorize games that lack Game Boy Color support!
28
28
29
-

29
+
<img
30
+
class="pixelated"
31
+
src="../assets/img/hello_world_autocolor.png"
32
+
alt="Screenshot of our Hello World, automatically colorized by the Game Boy Color"
33
+
/>
30
34
31
35
All this to say, one shouldn't expect specific colors out of a Game Boy game[^console_detection], just four more or less bright colors.
32
36
@@ -86,8 +90,12 @@ We would get thus:
86
90
(I'm not giving the value in hexadecimal, use this as an opportunity to exercise your bin-to-hex conversions!)
87
91
88
92
<figure>
89
-
<img src="../assets/img/hello_world_inv.png" alt="Screenshot of the color-inverted Hello World">
90
-
<figcaption>If you got it right, it should look like this!</figcaption>
93
+
<img
94
+
class="pixelated"
95
+
src="../assets/img/hello_world_inv.png"
96
+
alt="Screenshot of the color-inverted Hello World"
97
+
>
98
+
<figcaption>If you got it right, it should look like this!</figcaption>
91
99
</figure>
92
100
93
101
If you go to the Tile Viewer and change "Palette" to "Gray", you will notice that the tile data stays the same regardless of how the palette is modified!
Copy file name to clipboardExpand all lines: src/part1/tilemap.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,11 @@ We will explain this in more detail in Part Ⅱ.
47
47
Here we will be able to see the power of tile reuse in full force.
48
48
As a convenience and a refresher, here are the tiles our Hello World loads into VRAM:
49
49
50
-

50
+
<img
51
+
class="pixelated"
52
+
src="../assets/img/hello_world_tiles.png"
53
+
alt="Enlarged view of the tiles loaded in VRAM"
54
+
/>
51
55
52
56
You can see that we only loaded a single "blank" tile ($00, the first aka. top-left one), but it can be repeated to cover the whole background at no extra cost!
Copy file name to clipboardExpand all lines: src/part2/bcd.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Of course, we still need to call it on impact. To do this, we add a call to `Inc
64
64
65
65
Before we can display the score we'll need to add some graphics for the numbers 0-9. We already have some ready-made digits for this project, so you can copy [this premade file](https://github.com/gbdev/gb-asm-tutorial/raw/master/unbricked/bcd/digit-tileset.asm), and paste it at the end of your tile set, just before the `TilesEnd` label. Your tile set will look like this:
66
66
67
-

67
+
<imgsrc="../assets/part2/img/bcd-tileset.png"alt="Screenshot of tile set with digits added at the end"class="pixelated">
68
68
69
69
So we can easily remember where the digits start, let's add a constant called `DIGIT_OFFSET` to point us to where the digits are relative to the start of the tile set: `$1A`
Copy file name to clipboardExpand all lines: src/part2/getting-started.md
+27-5Lines changed: 27 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,12 @@ Combining these constants must be done using `|`, the *binary "or"* operator; we
90
90
There's one last thing we need before we can build the ROM, and that's the graphics.
91
91
We will draw the following screen:
92
92
93
-

93
+
<img
94
+
class="pixelated"
95
+
src="../assets/part2/img/tilemap.png"
96
+
alt="Layout of unbricked"
97
+
width="300px"
98
+
/>
94
99
95
100
In `hello-world.asm`, tile data had been written out by hand in hexadecimal; this was to let you see how the sausage is made at the lowest level, but *boy* is it impractical to write!
96
101
This time, we will employ a more friendly way, which will let us write each row of pixels more easily.
Copy file name to clipboardExpand all lines: src/part2/title-screen.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,11 @@
2
2
3
3
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:
0 commit comments