From e8bad8c3ca33d6dfa672f2e570eddc3ab4b3a7e6 Mon Sep 17 00:00:00 2001 From: Toad King Date: Thu, 14 Jun 2012 03:23:47 -0400 Subject: initial libretro changes --- src/memmap.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/memmap.h') diff --git a/src/memmap.h b/src/memmap.h index ca234ea..d146522 100644 --- a/src/memmap.h +++ b/src/memmap.h @@ -46,8 +46,11 @@ #ifdef FAST_LSB_WORD_ACCESS #define READ_WORD(s) (*(uint16 *) (s)) #define READ_DWORD(s) (*(uint32 *) (s)) -#define WRITE_WORD(s, d) (*(uint16 *) (s) = (d) -#define WRITE_DWORD(s, d) (*(uint32 *) (s) = (d) +#define WRITE_WORD(s, d) *(uint16 *) (s) = (d) +#define WRITE_DWORD(s, d) *(uint32 *) (s) = (d) +#define READ_3WORD(s) ((*(uint32 *) (s)) & 0x00FFFFFF) +#define WRITE_3WORD(s, d) *(uint16 *) (s) = (uint16) (d), \ + *((uint8 *) (s) + 2) = (uint8) ((d) >> 16) #else #define READ_WORD(s) ( *(uint8 *) (s) |\ (*((uint8 *) (s) + 1) << 8)) -- cgit v1.2.3