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.
1 parent 4d57694 commit 8e7c62eCopy full SHA for 8e7c62e
1 file changed
src/core/bus/bus.ts
@@ -13,22 +13,21 @@ export interface ControlLines {
13
HALT: Signal
14
}
15
16
-const initialControlLines: ControlLines = {
17
- RD: 0b0,
18
- WR: 0b0,
19
- MREQ: 0b0,
20
- IORQ: 0b0,
21
- CLK: 0b0,
22
- WAIT: 0b0,
23
- IRQ: 0b0,
24
- HALT: 0b0,
25
-}
26
-
27
export class Bus {
28
// TODO: validate data and address
29
readonly data$ = new BehaviorSubject(0x00)
30
readonly address$ = new BehaviorSubject(0x00)
31
- readonly control$ = new BehaviorSubject(initialControlLines)
+
+ readonly control$ = new BehaviorSubject<ControlLines>({
+ RD: 0b0,
+ WR: 0b0,
+ MREQ: 0b0,
+ IORQ: 0b0,
+ CLK: 0b0,
+ WAIT: 0b0,
+ IRQ: 0b0,
+ HALT: 0b0,
+ })
32
33
readonly clockRise$: Observable<ControlLines> = this.control$.pipe(
34
filter((control, index) => (index && control.CLK)),
0 commit comments