Skip to content

Commit bd754cd

Browse files
committed
Fix some typos on OAM and Rendering articles
1 parent b11b89f commit bd754cd

File tree

2 files changed

+35
-37
lines changed

2 files changed

+35
-37
lines changed

src/OAM_Corruption_Bug.md

+23-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OAM Corruption Bug
22

3-
There is a flaw in the Game Boy hardware that causes trash to be written
3+
There is a flaw in the Game Boy hardware that causes rubbish data to be written
44
to OAM RAM if the following instructions are used while their 16-bit content
55
(before the operation) is in the range $FE00–$FEFF and the PPU is in mode 2:
66

@@ -64,20 +64,20 @@ operations are on 16-bit words.
6464

6565
### Write Corruption
6666

67-
A write corruption corrupts the currently access row in the following
67+
A "write corruption" corrupts the currently access row in the following
6868
manner, as long as it's not the first row (containing the first two
6969
sprites):
7070

71-
- The first word in the row is replaced with this bitwise expression:
72-
`((a ^ c) & (b ^ c)) ^ c`, where `a` is the original value of that
73-
word, `b` is the first word in the preceding row, and `c` is the
74-
third word in the preceding row.
75-
- The last three words are copied from the last three words in the
76-
preceding row.
71+
- The first word in the row is replaced with this bitwise expression:
72+
`((a ^ c) & (b ^ c)) ^ c`, where `a` is the original value of that
73+
word, `b` is the first word in the preceding row, and `c` is the
74+
third word in the preceding row.
75+
- The last three words are copied from the last three words in the
76+
preceding row.
7777

7878
### Read Corruption
7979

80-
A read corruption works similarly to a write corruption, except the
80+
A "read corruption" works similarly to a write corruption, except the
8181
bitwise expression is `b | (a & c)`.
8282

8383
### Write During Increase/Decrease
@@ -92,18 +92,17 @@ If a register is increased or decreased in the same M-cycle of a write,
9292
this will effectively trigger both a read **and** a write in a single
9393
M-cycle, resulting in a more complex corruption pattern:
9494

95-
- This corruption will not happen if the accessed row is one of the
96-
first four, as well as if it's the last row:
97-
- The first word in the row preceding the currently accessed row
98-
is replaced with the following bitwise expression:
99-
`(b & (a | c | d)) | (a & c & d)` where `a` is the first word
100-
two rows before the currently accessed row, `b` is the first
101-
word in the preceding row (the word being corrupted), `c` is the
102-
first word in the currently accessed row, and `d` is the third
103-
word in the preceding row.
104-
- The contents of the preceding row is copied (after the
105-
corruption of the first word in it) both to the currently
106-
accessed row and to two rows before the currently accessed row
107-
- Regardless of wether the previous corruption occurred or not, a
108-
normal read corruption is then applied.
109-
95+
- This corruption will not happen if the accessed row is one of the
96+
first four, as well as if it's the last row:
97+
- The first word in the row preceding the currently accessed row
98+
is replaced with the following bitwise expression:
99+
`(b & (a | c | d)) | (a & c & d)` where `a` is the first word
100+
two rows before the currently accessed row, `b` is the first
101+
word in the preceding row (the word being corrupted), `c` is the
102+
first word in the currently accessed row, and `d` is the third
103+
word in the preceding row.
104+
- The contents of the preceding row is copied (after the
105+
corruption of the first word in it) both to the currently
106+
accessed row and to two rows before the currently accessed row
107+
- Regardless of whether the previous corruption occurred or not, a
108+
normal read corruption is then applied.

src/Rendering.md

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
21
# Rendering Overview
32

43
The Game Boy outputs graphics to a 160x144 pixel LCD, using a quite complex
54
mechanism to facilitate rendering.
65

76
::: warning Terminology
87

9-
Sprites/graphics terminology can vary a lot among different platforms, consoles,
8+
Sprites/graphics terminology can vary a lot among different platforms, consoles,
109
users and communities. You may be familiar with slightly different definitions.
11-
Keep also in mind that some of the definitions refers to lower (hardware) tools
10+
Keep also in mind that some definitions refer to lower (hardware) tools
1211
and some others to higher abstractions concepts.
1312

1413
:::
@@ -17,13 +16,13 @@ and some others to higher abstractions concepts.
1716

1817
Similarly to other retro systems, pixels are not manipulated
1918
individually, as this would be expensive CPU-wise. Instead, pixels are grouped
20-
in 8x8 squares, called *tiles* (or sometimes "patterns"), often considered as
19+
in 8x8 squares, called _tiles_ (or sometimes "patterns"), often considered as
2120
the base unit in Game Boy graphics.
2221

2322
A tile does not encode color information. Instead, a tile assigns a
24-
*color ID* to each of its pixels, ranging from 0 to 3. For this reason,
25-
Game Boy graphics are also called *2bpp* (2 bits per pixel). When a tile is used
26-
in the Background or Window, these color IDs are associated with a *palette*. When
23+
_color ID_ to each of its pixels, ranging from 0 to 3. For this reason,
24+
Game Boy graphics are also called _2bpp_ (2 bits per pixel). When a tile is used
25+
in the Background or Window, these color IDs are associated with a _palette_. When
2726
a tile is used in an OBJ, the IDs 1 to 3 are associated with a palette, but
2827
ID 0 means transparent.
2928

@@ -43,11 +42,11 @@ but it works for the most part.
4342

4443
### Background
4544

46-
The background is composed of a *tilemap*. A tilemap is a
45+
The background is composed of a _tilemap_. A tilemap is a
4746
large grid of tiles. However, tiles aren't directly written to tilemaps,
4847
they merely contain references to the tiles.
4948
This makes reusing tiles very cheap, both in CPU time and in
50-
required memory space, and it is the main mechanism that helps working around the
49+
required memory space, and it is the main mechanism that helps work around the
5150
paltry 8 KiB of video RAM.
5251

5352
The background can be made to scroll as a whole, writing to two
@@ -60,19 +59,19 @@ It is fairly limited: it has no transparency, it's always a
6059
rectangle and only the position of the top-left pixel can be controlled.
6160

6261
Possible usage include a fixed status bar in an otherwise scrolling game (e.g.
63-
*Super Mario Bros. 3*).
62+
_Super Mario Bros. 3_).
6463

6564
### Objects
6665

6766
The background layer is useful for elements scrolling as a whole, but
6867
it's impractical for objects that need to move separately, such as the player.
6968

70-
The *objects* layer is designed to fill this gap: *objects* are made of 1 or 2 stacked tiles (8x8 or 8x16 pixels)
69+
The _objects_ layer is designed to fill this gap: _objects_ are made of 1 or 2 stacked tiles (8x8 or 8x16 pixels)
7170
and can be displayed anywhere on the screen.
7271

7372
::: tip NOTE
7473

75-
Several objects can be combined (they can be called *metasprites*) to draw
74+
Several objects can be combined (they can be called _metasprites_) to draw
7675
a larger graphical element, usually called "sprite". Originally, the term "sprites"
7776
referred to fixed-sized objects composited together, by hardware, with a background.
7877
Use of the term has since become more general.
@@ -83,4 +82,4 @@ To summarise:
8382

8483
- **Tile**, an 8x8-pixel chunk of graphics.
8584
- **Object**, an entry in object attribute memory, composed of 1 or 2
86-
tiles. Independent from the background.
85+
tiles. Independent of the background.

0 commit comments

Comments
 (0)