Skip to content

Commit dbc0980

Browse files
iximeowISSOtm
andauthored
Fix typo in LCD mode timing description (#464)
* fix typo in LCD mode timing description the microsecond estimates for mode timings didn't line up. presumably HBlank is intended to pad times for each line at a consistent 376 dots, and adding minimum mode 3 + maximum mode 0 equals maximum mode 3 + minimum mode 0 - 376 dots either way. but the microsecond estimates didn't match: 60 + 20 = 80µs vs 40 + 49 = 89µs. presumably the correct µs estimates for mode 3 are "(40 to 69µs)": >> 291 / (2 ** 22) * 1000 * 1000 > 69.38 (microseconds) correcting this value makes the min/max sums of mode 3/mode 0 times consistently 89µs, which is almost the same as the time for 376 dots: >> 376 / (2 ** 22) * 1000 * 1000 > 89.65 * remove wall-clock timings from mode timing table while these times are mostly correct, readers typically will be working in terms of dots (hardware clock cycles) rather than with respect to wall clock times. in the case that someone needs timings in terms of seconds, these numbers were not sufficiently precise anyway: rounding to microseconds introduces error up to 1.4% (85 dots -> ~20.2656 microseconds -> round to 20 -> off by ~0.2656 microseconds for 1.4%). * Update src/STAT.md Co-authored-by: Eldred Habert <[email protected]>
1 parent 90cdd13 commit dbc0980

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/STAT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ to the CPU: writes are ignored, and reads return garbage values (usually $FF).
5151

5252
Mode | Action | Duration | Accessible video memory
5353
-----|------------------------------------------------------------------|--------------------------------------------------------------------|-------------------------
54-
2 | Searching OAM for OBJs whose Y coordinate overlap this line | 80 dots (19 µs) | VRAM, CGB palettes
55-
3 | Reading OAM and VRAM to generate the picture | 168 to 291 dots (40 to 60 µs) depending on sprite count | None
56-
0 | Nothing (HBlank) | 85 to 208 dots (20 to 49 µs) depending on previous mode 3 duration | VRAM, OAM, CGB palettes
57-
1 | Nothing (VBlank) | 4560 dots (1087 µs, 10 scanlines) | VRAM, OAM, CGB palettes
54+
2 | Searching OAM for OBJs whose Y coordinate overlap this line | 80 dots | VRAM, CGB palettes
55+
3 | Reading OAM and VRAM to generate the picture | 168 to 291 dots, depending on sprite count | None
56+
0 | Nothing (HBlank) | 85 to 208 dots, depending on previous mode 3 duration | VRAM, OAM, CGB palettes
57+
1 | Nothing (VBlank) | 4560 dots (10 scanlines) | VRAM, OAM, CGB palettes
5858

5959
## Properties of STAT modes
6060

0 commit comments

Comments
 (0)