X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fpico_int.h;h=68a77c0b11c8a48aa3be542df05fc055bd5a0ebd;hb=697746df021a83dcb556afdb36abc6977780985c;hp=4804ad17a4fe2f3f13790f187bc0abf30dcac05f;hpb=6add7875b54904ff2a6c4b49a1b6e82a3c888a6d;p=picodrive.git diff --git a/pico/pico_int.h b/pico/pico_int.h index 4804ad1..68a77c0 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -229,12 +229,6 @@ extern int z80_scanline_cycles; /* cycles done until z80_scanline */ #define cycles_68k_to_z80(x) ((x)*957 >> 11) -#define Z80_MEM_SHIFT 13 -extern unsigned long z80_read_map [0x10000 >> Z80_MEM_SHIFT]; -extern unsigned long z80_write_map[0x10000 >> Z80_MEM_SHIFT]; -typedef unsigned char (z80_read_f)(unsigned short a); -typedef void (z80_write_f)(unsigned int a, unsigned char data); - // ----------------------- SH2 CPU ----------------------- #include "cpu/sh2/sh2.h" @@ -472,6 +466,9 @@ typedef struct #define DMAC_FIFO_LEN (4*4) #define PWM_BUFF_LEN 1024 // in one channel samples +#define SH2_DRCBLK_RAM_SHIFT 1 +#define SH2_DRCBLK_DA_SHIFT 1 + struct Pico32x { unsigned short regs[0x20]; @@ -491,9 +488,15 @@ struct Pico32x struct Pico32xMem { unsigned char sdram[0x40000]; +#ifdef DRC_SH2 + unsigned short drcblk_ram[1 << (18 - SH2_DRCBLK_RAM_SHIFT)]; +#endif unsigned short dram[2][0x20000/2]; // AKA fb unsigned char m68k_rom[0x10000]; // 0x100; using M68K_BANK_SIZE unsigned char data_array[2][0x1000]; // cache in SH2s (can be used as RAM) +#ifdef DRC_SH2 + unsigned short drcblk_da[2][1 << (12 - SH2_DRCBLK_DA_SHIFT)]; +#endif unsigned char sh2_rom_m[0x800]; unsigned char sh2_rom_s[0x400]; unsigned short pal[0x100]; @@ -727,6 +730,10 @@ static __inline int isspace_(int c) return (0x09 <= c && c <= 0x0d) || c == ' '; } +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +#endif + // emulation event logging #ifndef EL_LOGMASK #define EL_LOGMASK 0 @@ -776,10 +783,10 @@ extern void lprintf(const char *fmt, ...); #define cdprintf(x...) #endif -#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 -#define MEMH_FUNC __attribute__((aligned(4))) +#ifdef __i386__ +#define REGPARM(x) __attribute__((regparm(x))) #else -#define MEMH_FUNC +#define REGPARM(x) #endif #ifdef __GNUC__