diff options
Diffstat (limited to 'src/uxn/uxn.h')
-rw-r--r-- | src/uxn/uxn.h | 4 |
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; } | |||
49 | static inline Uint8 mempeek8(Uint8 *m, Uint16 a) { return m[a]; } | 49 | static inline Uint8 mempeek8(Uint8 *m, Uint16 a) { return m[a]; } |
50 | static inline void mempoke16(Uint8 *m, Uint16 a, Uint16 b) { mempoke8(m, a, b >> 8); mempoke8(m, a + 1, b); } | 50 | static inline void mempoke16(Uint8 *m, Uint16 a, Uint16 b) { mempoke8(m, a, b >> 8); mempoke8(m, a + 1, b); } |
51 | static inline Uint16 mempeek16(Uint8 *m, Uint16 a) { return (mempeek8(m, a) << 8) + mempeek8(m, a + 1); } | 51 | static inline Uint16 mempeek16(Uint8 *m, Uint16 a) { return (mempeek8(m, a) << 8) + mempeek8(m, a + 1); } |
52 | static inline void devpoke8(Device *d, Uint8 a, Uint8 b) { d->dat[a & 0xf] = b; d->talk(d, a & 0x0f, 1); } | ||
53 | static inline Uint8 devpeek8(Device *d, Uint8 a) { d->talk(d, a & 0x0f, 0); return d->dat[a & 0xf]; } | ||
54 | static inline void devpoke16(Device *d, Uint8 a, Uint16 b) { devpoke8(d, a, b >> 8); devpoke8(d, a + 1, b); } | ||
55 | static inline Uint16 devpeek16(Device *d, Uint16 a) { return (devpeek8(d, a) << 8) + devpeek8(d, a + 1); } | ||
52 | 56 | ||
53 | int loaduxn(Uxn *c, char *filepath); | 57 | int loaduxn(Uxn *c, char *filepath); |
54 | int bootuxn(Uxn *c); | 58 | int bootuxn(Uxn *c); |