mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
improve 64bit portability
for win64 mostly
This commit is contained in:
parent
a0b95da112
commit
48c9e01be8
14 changed files with 42 additions and 26 deletions
|
@ -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
|
||||
|
||||
/*************************************/
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
#ifndef __FAME_H__
|
||||
#define __FAME_H__
|
||||
|
||||
// uintptr_t
|
||||
#include <stdlib.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -127,7 +133,7 @@ typedef struct
|
|||
signed int cycles_needed;
|
||||
|
||||
unsigned short *PC;
|
||||
unsigned long BasePC;
|
||||
uintptr_t BasePC;
|
||||
unsigned int flag_C;
|
||||
unsigned int flag_V;
|
||||
unsigned int flag_NotZ;
|
||||
|
@ -140,7 +146,7 @@ typedef struct
|
|||
unsigned char not_polling;
|
||||
unsigned char pad[3];
|
||||
|
||||
unsigned long Fetch[M68K_FETCHBANK1];
|
||||
uintptr_t Fetch[M68K_FETCHBANK1];
|
||||
} M68K_CONTEXT;
|
||||
|
||||
typedef enum
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
#define s16 signed short
|
||||
#define u32 unsigned int
|
||||
#define s32 signed int
|
||||
#define uptr unsigned long
|
||||
#define uptr uintptr_t
|
||||
|
||||
/*
|
||||
typedef unsigned char u8;
|
||||
|
|
|
@ -142,6 +142,7 @@
|
|||
/* Exception Vectors handled by emulation */
|
||||
#define EXCEPTION_BUS_ERROR 2 /* This one is not emulated! */
|
||||
#define EXCEPTION_ADDRESS_ERROR 3 /* This one is partially emulated (doesn't stack a proper frame yet) */
|
||||
#undef EXCEPTION_ILLEGAL_INSTRUCTION
|
||||
#define EXCEPTION_ILLEGAL_INSTRUCTION 4
|
||||
#define EXCEPTION_ZERO_DIVIDE 5
|
||||
#define EXCEPTION_CHK 6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue