We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6010dc8 + a7978f4 commit 1f25585Copy full SHA for 1f25585
src/util/check_region.asm
@@ -1,4 +1,6 @@
1
checkRegion:
2
+.assert >@vwait1 = >@endVWait, error, "Region detection code crosses page boundary"
3
+
4
; region detection via http://forums.nesdev.com/viewtopic.php?p=163258#p163258
5
;;; use the power-on wait to detect video system-
6
ldx #0
@@ -14,6 +16,7 @@ checkRegion:
14
16
@noincy:
15
17
bit $2002
18
bpl @vwait2 ; at this point, about 57165 cycles have passed
19
+@endVWait:
20
21
;;; BUT because of a hardware oversight, we might have missed a vblank flag.
22
;;; so we need to both check for 1Vbl and 2Vbl
0 commit comments