mpw/cpu/defs.h

60 lines
1.2 KiB
C
Raw Permalink Normal View History

#pragma once
2013-02-06 04:11:41 +00:00
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
2013-02-06 04:11:41 +00:00
2013-02-07 00:11:18 +00:00
2013-02-06 04:11:41 +00:00
/* Maximum values for memory, don't change */
#define CHIPMEM 0x200000
#define FASTMEM 0x800000
#define BOGOMEM 0x1c0000
#define KICKMEM 0x080000
typedef int BOOLE;
2013-02-06 04:11:41 +00:00
#define FALSE 0
#define TRUE 1
/*
#ifndef X64
#define PTR_TO_INT(i) ((uint32_t)i)
#define PTR_TO_INT_MASK_TYPE(i) ((uint32_t)i)
2013-02-06 04:11:41 +00:00
#endif
#ifdef X64
#define PTR_TO_INT(i) ((uint64_t)i)
#define PTR_TO_INT_MASK_TYPE(i) ((uint64_t)i)
2013-02-06 04:11:41 +00:00
#endif
*/
/* Filename length used throughout the code */
#define CFG_FILENAME_LENGTH 256
/*------------------------------------*/
/* The decode routines have this type */
/*------------------------------------*/
typedef void (*decoderoutinetype)(uint32_t, uint32_t);
2013-02-06 04:11:41 +00:00
extern uint8_t configromname[];
2013-02-06 04:11:41 +00:00
typedef union {
uint32_t *lptr;
uint16_t *wptr;
uint8_t *bptr;
uint32_t lval;
uint16_t wval[2];
uint8_t bval[4];
2013-02-06 04:11:41 +00:00
} ptunion;
typedef void (*planar2chunkyroutine)(void);
typedef void (*playbuffer_routine)(void);
typedef void (*sound_before_emu_routine)(void);
typedef void (*sound_after_emu_routine)(void);
typedef void (*buseventfunc)(void);