aboutsummaryrefslogtreecommitdiffstats
path: root/src/uxn/uxn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/uxn/uxn.h')
-rw-r--r--src/uxn/uxn.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/uxn/uxn.h b/src/uxn/uxn.h
index b24d058..6c6d53e 100644
--- a/src/uxn/uxn.h
+++ b/src/uxn/uxn.h
@@ -49,6 +49,10 @@ static inline void mempoke8(Uint8 *m, Uint16 a, Uint8 b) { m[a] = b; }
49static inline Uint8 mempeek8(Uint8 *m, Uint16 a) { return m[a]; } 49static inline Uint8 mempeek8(Uint8 *m, Uint16 a) { return m[a]; }
50static inline void mempoke16(Uint8 *m, Uint16 a, Uint16 b) { mempoke8(m, a, b >> 8); mempoke8(m, a + 1, b); } 50static inline void mempoke16(Uint8 *m, Uint16 a, Uint16 b) { mempoke8(m, a, b >> 8); mempoke8(m, a + 1, b); }
51static inline Uint16 mempeek16(Uint8 *m, Uint16 a) { return (mempeek8(m, a) << 8) + mempeek8(m, a + 1); } 51static inline Uint16 mempeek16(Uint8 *m, Uint16 a) { return (mempeek8(m, a) << 8) + mempeek8(m, a + 1); }
52static inline void devpoke8(Device *d, Uint8 a, Uint8 b) { d->dat[a & 0xf] = b; d->talk(d, a & 0x0f, 1); }
53static inline Uint8 devpeek8(Device *d, Uint8 a) { d->talk(d, a & 0x0f, 0); return d->dat[a & 0xf]; }
54static inline void devpoke16(Device *d, Uint8 a, Uint16 b) { devpoke8(d, a, b >> 8); devpoke8(d, a + 1, b); }
55static inline Uint16 devpeek16(Device *d, Uint16 a) { return (devpeek8(d, a) << 8) + devpeek8(d, a + 1); }
52 56
53int loaduxn(Uxn *c, char *filepath); 57int loaduxn(Uxn *c, char *filepath);
54int bootuxn(Uxn *c); 58int bootuxn(Uxn *c);