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
Replace the full text (a misplaced general description of serial data transfer) of the serial interrupt section with a short explanation of when the serial interrupt is requested.
Copy file name to clipboardExpand all lines: src/Interrupt_Sources.md
+2-36Lines changed: 2 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,42 +56,8 @@ The timer interrupt [is requested] every time that the timer overflows (that is,
56
56
57
57
## INT $58 — Serial interrupt
58
58
59
-
**XXXXXX\...**
60
-
61
-
Transmitting and receiving serial data is done simultaneously. The
62
-
received data is automatically stored in SB.
63
-
64
-
The serial I/O port on the Game Boy is a very simple setup and is crude
65
-
compared to standard RS-232 (IBM-PC) or RS-485 (Macintosh) serial ports.
66
-
There are no start or stop bits.
67
-
68
-
During a transfer, a byte is shifted in at the same time that a byte is
69
-
shifted out. The rate of the shift is determined by whether the clock
70
-
source is internal or external. The most significant bit is shifted in
71
-
and out first.
72
-
73
-
When the internal clock is selected, it drives the clock pin on the game
74
-
link port and it stays high when not used. During a transfer it will go
75
-
low eight times to clock in/out each bit.
76
-
77
-
The state of the last bit shifted out determines the state of the output
78
-
line until another transfer takes place.
79
-
80
-
If a serial transfer with internal clock is performed and no external
81
-
Game Boy is present, a value of \$FF will be received in the transfer.
82
-
83
-
The following code initiates the process of shifting \$75 out the serial
84
-
port and a byte to be shifted into \$FF01:
85
-
86
-
```rgbasm
87
-
ld a, $75
88
-
ld [$FF01], a
89
-
ld a, $81
90
-
ld [$FF02], a
91
-
```
92
-
93
-
The Game Boy does not support wake-on-LAN. Completion of an externally
94
-
clocked serial transfer does not exit STOP mode.
59
+
The serial interrupt [is requested] upon completion of a serial data transfer.
60
+
In other words, eight serial clock cycles after starting a transfer (by setting [SC](<#FF02 — SC: Serial transfer control>) bit 7), the incoming data will be in [SB](<#FF01 — SB: Serial transfer data>) and the interrupt will be requested.
0 commit comments