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
Unlike most game consoles, the Game Boy can pause the dot clock briefly,
53
+
making Mode 3 longer and Mode 0 shorter. It routinely takes a 6 to 11 dot
54
+
break to fetch an OBJ's tile between background tile pattern fetches.
55
+
On DMG and GBC in DMG mode, mid-scanline writes to [`BGP`](<#FF47 — BGP (Non-CGB Mode only): BG palette data>)
56
+
allow observing this behavior, as the delay from drawing an OBJ shifts the
57
+
write's effect to the left by that many dots.
58
+
59
+
Three things are known to pause the dot clock:
60
+
61
+
- Background scrolling: If `SCX % 8` is not zero at the start of the scanline, rendering is paused for that many dots while the shifter discards that many pixels from the leftmost tile.
62
+
- Window: An active window pauses for at least 6 dots, as the background fetching mechanism starts over at the left side of the window.
63
+
- Objects: Each object usually pauses for `11 - min(5, (x + SCX) % 8)` dots.
64
+
Because object fetch waits for background fetch to finish, an object's cost depends on its position relative to the left side of the background tile under it. It's greater if an object is directly aligned over the background tile, less if the object is to the right. If the object's left side is over the window, use `255 - WX` instead of `SCX` in this formula.
65
+
66
+
::: warning TO BE VERIFIED
67
+
68
+
The exact pause duration for window start is
69
+
not confirmed; it may have the same background fetch finish delay as
70
+
an object. If two objects' left sides are over the same background or
71
+
window tile, the second may pause for fewer dots.
72
+
73
+
:::
74
+
75
+
A hardware quirk in the monochrome Game Boy makes the LCD interrupt
76
+
sometimes trigger when writing to STAT (including writing \$00) during
77
+
OAM scan, HBlank, VBlank, or LY=LYC. It behaves as if \$FF were
78
+
written for one cycle, and then the written value were written the next
79
+
cycle. Because the GBC in DMG mode does not have this quirk, two games
80
+
that depend on this quirk (Ocean's *Road Rash* and Vic Tokai's *Xerd
Unlike most game consoles, the Game Boy can pause the dot clock briefly,
76
-
making Mode 3 longer and Mode 0 shorter. It routinely takes a 6 to 11 dot
77
-
break to fetch an OBJ's tile between background tile pattern fetches.
78
-
On DMG and GBC in DMG mode, mid-scanline writes to [`BGP`](<#FF47 — BGP (Non-CGB Mode only): BG palette data>)
79
-
allow observing this behavior, as the delay from drawing an OBJ shifts the
80
-
write's effect to the left by that many dots.
81
-
82
-
Three things are known to pause the dot clock:
83
-
84
-
- Background scrolling: If `SCX % 8` is not zero at the start of the scanline, rendering is paused for that many dots while the shifter discards that many pixels from the leftmost tile.
85
-
- Window: An active window pauses for at least 6 dots, as the background fetching mechanism starts over at the left side of the window.
86
-
- Objects: Each object usually pauses for `11 - min(5, (x + SCX) % 8)` dots.
87
-
Because object fetch waits for background fetch to finish, an object's cost depends on its position relative to the left side of the background tile under it. It's greater if an object is directly aligned over the background tile, less if the object is to the right. If the object's left side is over the window, use `255 - WX` instead of `SCX` in this formula.
88
-
89
-
::: warning TO BE VERIFIED
90
-
91
-
The exact pause duration for window start is
92
-
not confirmed; it may have the same background fetch finish delay as
93
-
an object. If two objects' left sides are over the same background or
94
-
window tile, the second may pause for fewer dots.
95
-
96
-
:::
97
-
98
-
A hardware quirk in the monochrome Game Boy makes the LCD interrupt
99
-
sometimes trigger when writing to STAT (including writing \$00) during
100
-
OAM scan, HBlank, VBlank, or LY=LYC. It behaves as if \$FF were
101
-
written for one cycle, and then the written value were written the next
102
-
cycle. Because the GBC in DMG mode does not have this quirk, two games
103
-
that depend on this quirk (Ocean's *Road Rash* and Vic Tokai's *Xerd
0 commit comments