3 #include "rockmacros.h"
8 byte
*p
= mbc
.rmap
[a
>>12];
10 else return mem_read(a
);
13 void writeb(int a
, byte b
)
15 byte
*p
= mbc
.wmap
[a
>>12];
24 byte
*p
= mbc
.rmap
[a
>>12];
27 #ifdef ROCKBOX_LITTLE_ENDIAN
28 #ifndef ALLOW_UNALIGNED_IO
29 if (a
&1) return p
[a
] | (p
[a
+1]<<8);
31 return *(word
*)(p
+a
);
33 return p
[a
] | (p
[a
+1]<<8);
37 return mem_read(a
) | (mem_read(a
+1)<<8);
40 void writew(int a
, int w
)
44 byte
*p
= mbc
.wmap
[a
>>12];
47 #ifdef ROCKBOX_LITTLE_ENDIAN
48 #ifndef ALLOW_UNALIGNED_IO
71 return readb(a
| 0xff00);
74 void writehi(int a
, byte b
)
76 writeb(a
| 0xff00, b
);