mz80 uses unsigned long as UINT32 by default, which is 64 bits on LP64. Use stdint.h instead. Index: dgen-1.23/mz80.h =================================================================== --- dgen-1.23.orig/mz80.h 2007-12-09 20:27:28.000000000 -0200 +++ dgen-1.23/mz80.h 2007-12-09 20:27:36.000000000 -0200 @@ -46,28 +46,30 @@ #ifndef _MZ80_H_ #define _MZ80_H_ +#include + #ifndef UINT32 -#define UINT32 unsigned long int +#define UINT32 uint32_t #endif #ifndef UINT16 -#define UINT16 unsigned short int +#define UINT16 uint16_t #endif #ifndef UINT8 -#define UINT8 unsigned char +#define UINT8 uint8_t #endif #ifndef INT32 -#define INT32 signed long int +#define INT32 int32_t #endif #ifndef INT16 -#define INT16 signed short int +#define INT16 int16_t #endif #ifndef INT8 -#define INT8 signed char +#define INT8 int8_t #endif #ifdef __cplusplus Index: dgen-1.23/mz80/makez80.c =================================================================== --- dgen-1.23.orig/mz80/makez80.c 2007-12-09 20:27:28.000000000 -0200 +++ dgen-1.23/mz80/makez80.c 2007-12-09 20:27:36.000000000 -0200 @@ -50,6 +50,7 @@ #include #include #include +#include #define VERSION "3.4" @@ -57,8 +58,8 @@ #define FALSE 0x0 #define INVALID 0xff -#define UINT32 unsigned long int -#define UINT8 unsigned char +#define UINT32 uint32_t +#define UINT8 uint8_t #define TIMING_REGULAR 0x00 #define TIMING_XXCB 0x01