improve 64bit portability

for win64 mostly
This commit is contained in:
notaz 2018-01-06 21:29:59 +02:00
parent a0b95da112
commit 48c9e01be8
14 changed files with 42 additions and 26 deletions

View file

@ -11,6 +11,12 @@
#ifndef CZ80_H
#define CZ80_H
// uintptr_t
#include <stdlib.h>
#ifndef _MSC_VER
#include <stdint.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
@ -44,7 +50,7 @@ extern "C" {
#endif
#ifndef FPTR
#define FPTR unsigned long
#define FPTR uintptr_t
#endif
/*************************************/

View file

@ -73,7 +73,7 @@
#define WRITE_MEM8(A, D) { \
unsigned short a = A; \
unsigned char d = D; \
unsigned long v = z80_write_map[a >> Z80_MEM_SHIFT]; \
uptr v = z80_write_map[a >> Z80_MEM_SHIFT]; \
if (map_flag_set(v)) \
((z80_write_f *)(v << 1))(a, d); \
else \