Skip to content

Commit 8723b53

Browse files
authored
Remove line numbers in DeadCScroll non-code blocks (#43)
1 parent 2ede6dc commit 8723b53

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

list/guides/deadcscroll.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The `SCY`/`SCX` registers have a simple purpose: specify the coordinate of the s
2222

2323
When you don't require scrolling, and when your cart boots, `SCY`/`SCX` is typically set to 0,0. When a screen is displayed, it appears normally even though you only set the values once. This is because as the screen draws, the PPU automatically adds the value in `LY` ($FF44) to the value in `SCY` in order to know what row of pixels to draw.
2424

25-
```
25+
```:no-line-numbers
2626
SCY value (set once)
2727
2828
│ screen
@@ -37,7 +37,7 @@ SCY value (set once)
3737
└───────┘
3838
```
3939
If `SCY` = $20 (for example):
40-
```
40+
```:no-line-numbers
4141
SCY value (set once)
4242
4343
│ screen
@@ -55,7 +55,7 @@ SCY value (set once)
5555
You can take advantage of how the PPU renders the screen by setting these registers *as the screen draws*. If you do this, you can create some interesting 'raster' effects that are presented here.
5656

5757
As an example, let's say you wanted to triple line 0 and show it for line 0, line 1, and line 2, and then continue with line 3. You would write to the `SCY` register like so:
58-
```
58+
```:no-line-numbers
5959
SCY value (set once per line)
6060
6161
│ screen
@@ -93,7 +93,7 @@ There are two key elements to make this system very stable and very fast:
9393
The idea of the double-buffer is that while one buffer is being used by the hardware to draw the screen, you modify (fill) values in the other. When the screen is done drawing, you switch buffers so the one you were just modifying is being used for drawing and you start modifying the other.
9494

9595
While the Draw Buffer (A) is used to render the screen, you change values in the Fill Buffer (B).
96-
```
96+
```:no-line-numbers
9797
┌───────┐ ┌───────┐
9898
│Draw │ │Fill │
9999
│Buffer │ │Buffer │
@@ -106,7 +106,7 @@ While the Draw Buffer (A) is used to render the screen, you change values in the
106106
```
107107

108108
When the screen is done being drawn (and you know this because the VBlank interrupt would have triggered or the value in `LY` changed to 144), you switch the buffers.
109-
```
109+
```:no-line-numbers
110110
┌───────┐ ┌───────┐
111111
│Fill │ │Draw │
112112
│Buffer │ │Buffer │
@@ -119,7 +119,7 @@ When the screen is done being drawn (and you know this because the VBlank interr
119119
```
120120

121121
Here, "switch buffers" means to switch the *purpose* of each buffer. It doesn't mean to copy buffers. Remember, we need this to be as fast as possible so to change buffers, you simply change pointers:
122-
```
122+
```:no-line-numbers
123123
Draw-->┌───────┐ Fill-->┌───────┐
124124
Ptr │Buffer │ Ptr │Buffer │
125125
│A │ │B │
@@ -131,7 +131,7 @@ Ptr │Buffer │ Ptr │Buffer │
131131
└───────┘ └───────┘
132132
```
133133
Becomes:
134-
```
134+
```:no-line-numbers
135135
Fill-->┌───────┐ Draw-->┌───────┐
136136
Ptr │Buffer │ Ptr │Buffer │
137137
│A │ │B │

0 commit comments

Comments
 (0)