summary refs log tree commit diff
path: root/src/6522.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/6522.c')
-rw-r--r--src/6522.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/6522.c b/src/6522.c
index 89bc102..76c8872 100644
--- a/src/6522.c
+++ b/src/6522.c
@@ -1,3 +1,5 @@
+#include <hardware/flash.h>
+
 #include "6522.h"
 
 void via_init(via_t *via) {
@@ -20,7 +22,7 @@ void via_init(via_t *via) {
 	via->tbv = true;
 }
 
-void via_read(via_t *via, uint8_t addr, uint8_t *v, uint8_t cycle) {
+void __not_in_flash_func(via_read)(via_t *via, uint8_t addr, uint8_t *v, uint8_t cycle) {
 	uint16_t tca = via->tca - cycle;
 	uint16_t tcb = via->tcb - cycle;
 
@@ -81,7 +83,7 @@ void via_read(via_t *via, uint8_t addr, uint8_t *v, uint8_t cycle) {
 	}
 }
 
-void via_write(via_t *via, uint8_t addr, uint8_t v, uint8_t cycle) {
+void __not_in_flash_func(via_write)(via_t *via, uint8_t addr, uint8_t v, uint8_t cycle) {
 	switch (addr) {
 		case 0:
 			via->orb = v;
@@ -153,7 +155,7 @@ void via_write(via_t *via, uint8_t addr, uint8_t v, uint8_t cycle) {
 	}
 }
 
-void via_cycle(via_t *via, uint8_t cycles) {
+void __not_in_flash_func(via_cycle)(via_t *via, uint8_t cycles) {
 	if (!via->tav) {
 		uint16_t tca = via->tca - cycles;
 
@@ -182,6 +184,6 @@ void via_cycle(via_t *via, uint8_t cycles) {
 	via->tcb = tcb;
 }
 
-bool via_irq(via_t *via) {
+bool __not_in_flash_func(via_irq)(via_t *via) {
 	return (via->ifr & via->ier) > 0;
 }