aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/cpu.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpu/cpu.ts b/src/cpu/cpu.ts
index 5663a1c..ed88e71 100644
--- a/src/cpu/cpu.ts
+++ b/src/cpu/cpu.ts
@@ -44,6 +44,7 @@ export type CPUMemoryReadHook = (addr: u16) => u8;
export interface CPUMemoryReadHooks {
[key: number]: CPUMemoryReadHook;
}
+
export class CPU implements ICPU {
readonly data: Uint8Array = new Uint8Array(this.sramBytes + registerSpace);
readonly data16 = new Uint16Array(this.data.buffer);
@@ -53,6 +54,9 @@ export class CPU implements ICPU {
readonly writeHooks: CPUMemoryHooks = [];
readonly pc22Bits = this.progBytes.length > 0x20000;
+ // This lets the Timer Compare output override GPIO pins:
+ readonly gpioTimerHooks: CPUMemoryHooks = [];
+
pc = 0;
cycles = 0;
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.