ac6502 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/components/IO/ACIA.d.ts +1 -1
- package/dist/components/IO/ACIA.js +1 -1
- package/dist/components/IO/Attachments/LCDAttachment.d.ts +1 -1
- package/dist/components/IO/Attachments/LCDAttachment.js +1 -1
- package/dist/components/IO/RTC.d.ts +1 -1
- package/dist/components/IO/RTC.js +3 -3
- package/dist/components/IO/RTC.js.map +1 -1
- package/dist/components/IO/VIA.d.ts +2 -2
- package/dist/components/IO/VIA.js +2 -2
- package/dist/components/IO/Video.js +3 -2
- package/dist/components/IO/Video.js.map +1 -1
- package/dist/components/Machine.js +14 -4
- package/dist/components/Machine.js.map +1 -1
- package/dist/index.js +3 -32
- package/dist/index.js.map +1 -1
- package/dist/lib.d.ts +0 -1
- package/dist/lib.js +1 -3
- package/dist/lib.js.map +1 -1
- package/dist/tests/IO/ACIA.test.js +1 -1
- package/dist/tests/IO/ACIA.test.js.map +1 -1
- package/dist/tests/IO/RTC.test.js +1 -1
- package/dist/tests/IO/RTC.test.js.map +1 -1
- package/dist/tests/IO/VIA.test.js +1 -1
- package/dist/tests/IO/VIA.test.js.map +1 -1
- package/package.json +1 -1
- package/src/components/IO/ACIA.ts +1 -1
- package/src/components/IO/Attachments/LCDAttachment.ts +1 -1
- package/src/components/IO/RTC.ts +3 -3
- package/src/components/IO/VIA.ts +2 -2
- package/src/components/IO/Video.ts +3 -2
- package/src/components/Machine.ts +16 -4
- package/src/index.ts +3 -34
- package/src/lib.ts +0 -1
- package/src/tests/IO/ACIA.test.ts +1 -1
- package/src/tests/IO/RTC.test.ts +1 -1
- package/src/tests/IO/VIA.test.ts +1 -1
- package/src/components/IO/Terminal.ts +0 -34
|
@@ -141,7 +141,7 @@ describe('ACIA (6551 ACIA)', () => {
|
|
|
141
141
|
const mockIRQ = jest.fn()
|
|
142
142
|
serialCard.raiseIRQ = mockIRQ
|
|
143
143
|
|
|
144
|
-
serialCard.write(0x02, 0x02) // RIIE=1: receive IRQ disabled (
|
|
144
|
+
serialCard.write(0x02, 0x02) // RIIE=1: receive IRQ disabled (R6551: bit1=1 disables)
|
|
145
145
|
serialCard.onData(0x42)
|
|
146
146
|
|
|
147
147
|
expect(mockIRQ).not.toHaveBeenCalled()
|
package/src/tests/IO/RTC.test.ts
CHANGED
|
@@ -18,7 +18,7 @@ const setTime = (rtc: RTC, values: {
|
|
|
18
18
|
rtc.write(0x02, values.hours)
|
|
19
19
|
rtc.write(0x03, values.dayOfWeek)
|
|
20
20
|
rtc.write(0x04, values.date)
|
|
21
|
-
rtc.write(0x05, values.month) // EOSC=0: oscillator enabled (DS1511Y default)
|
|
21
|
+
rtc.write(0x05, values.month) // EOSC=0: oscillator enabled (DS1511Y+ default)
|
|
22
22
|
rtc.write(0x06, values.year)
|
|
23
23
|
rtc.write(0x07, values.century)
|
|
24
24
|
rtc.write(0x0f, 0x00) // Clear TE: falling edge commits user to internal
|
package/src/tests/IO/VIA.test.ts
CHANGED
|
@@ -49,7 +49,7 @@ const createMockAttachment = (options: {
|
|
|
49
49
|
} as Attachment & { setPortAValue: (v: number) => void; setPortBValue: (v: number) => void }
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
describe('VIA (
|
|
52
|
+
describe('VIA (6522 VIA)', () => {
|
|
53
53
|
let gpio: VIA
|
|
54
54
|
|
|
55
55
|
beforeEach(() => {
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { IO } from '../IO'
|
|
2
|
-
import { VTAC } from 'vtac-terminal'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Terminal - Emulates the VTAC fantasy terminal
|
|
6
|
-
*
|
|
7
|
-
* Register Map:
|
|
8
|
-
* $00: Data / Status Register
|
|
9
|
-
* Write: sends byte to VTAC for processing
|
|
10
|
-
* Read: always returns 0 (bit 7 is a busy flag on the real device; busy is never set here)
|
|
11
|
-
*/
|
|
12
|
-
export class Terminal implements IO {
|
|
13
|
-
|
|
14
|
-
raiseIRQ = () => {}
|
|
15
|
-
raiseNMI = () => {}
|
|
16
|
-
|
|
17
|
-
readonly vtac: VTAC = new VTAC()
|
|
18
|
-
|
|
19
|
-
read(address: number): number {
|
|
20
|
-
// Status register: bit 7 is busy flag on real device, never busy in emulation
|
|
21
|
-
return 0
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
write(address: number, data: number): void {
|
|
25
|
-
const register = address & 0x00
|
|
26
|
-
if (register === 0x00) {
|
|
27
|
-
this.vtac.parse(data)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
tick(frequency: number): void {}
|
|
32
|
-
reset(coldStart: boolean): void {}
|
|
33
|
-
|
|
34
|
-
}
|