mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
fixed some portability issues
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@336 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
d4ca252d92
commit
dca310c413
8 changed files with 24 additions and 13 deletions
|
@ -610,8 +610,8 @@ static void DrawTilesFromCacheShPrep(void)
|
||||||
{
|
{
|
||||||
// as some layer has covered whole line with hi priority tiles,
|
// as some layer has covered whole line with hi priority tiles,
|
||||||
// we can process whole line and then act as if sh/hi mode was off.
|
// we can process whole line and then act as if sh/hi mode was off.
|
||||||
rendstatus|=0x80;
|
|
||||||
int c = 320/4, *zb = (int *)(HighCol+8);
|
int c = 320/4, *zb = (int *)(HighCol+8);
|
||||||
|
rendstatus|=0x80;
|
||||||
while (c--)
|
while (c--)
|
||||||
{
|
{
|
||||||
int tmp = *zb;
|
int tmp = *zb;
|
||||||
|
|
|
@ -37,6 +37,8 @@ extern unsigned int ppop;
|
||||||
|
|
||||||
#ifdef IO_STATS
|
#ifdef IO_STATS
|
||||||
void log_io(unsigned int addr, int bits, int rw);
|
void log_io(unsigned int addr, int bits, int rw);
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define log_io
|
||||||
#else
|
#else
|
||||||
#define log_io(...)
|
#define log_io(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -169,7 +169,7 @@ extern int SekCycleAimS68k;
|
||||||
// ----------------------- Z80 CPU -----------------------
|
// ----------------------- Z80 CPU -----------------------
|
||||||
|
|
||||||
#if defined(_USE_MZ80)
|
#if defined(_USE_MZ80)
|
||||||
#include "../../cpu/mz80/mz80.h"
|
#include "../cpu/mz80/mz80.h"
|
||||||
|
|
||||||
#define z80_run(cycles) mz80_run(cycles)
|
#define z80_run(cycles) mz80_run(cycles)
|
||||||
#define z80_run_nr(cycles) mz80_run(cycles)
|
#define z80_run_nr(cycles) mz80_run(cycles)
|
||||||
|
@ -177,7 +177,7 @@ extern int SekCycleAimS68k;
|
||||||
#define z80_resetCycles() mz80GetElapsedTicks(1)
|
#define z80_resetCycles() mz80GetElapsedTicks(1)
|
||||||
|
|
||||||
#elif defined(_USE_DRZ80)
|
#elif defined(_USE_DRZ80)
|
||||||
#include "../../cpu/DrZ80/drz80.h"
|
#include "../cpu/DrZ80/drz80.h"
|
||||||
|
|
||||||
extern struct DrZ80 drZ80;
|
extern struct DrZ80 drZ80;
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ extern struct DrZ80 drZ80;
|
||||||
#define z80_resetCycles()
|
#define z80_resetCycles()
|
||||||
|
|
||||||
#elif defined(_USE_CZ80)
|
#elif defined(_USE_CZ80)
|
||||||
#include "../../cpu/cz80/cz80.h"
|
#include "../cpu/cz80/cz80.h"
|
||||||
|
|
||||||
#define z80_run(cycles) Cz80_Exec(&CZ80, cycles)
|
#define z80_run(cycles) Cz80_Exec(&CZ80, cycles)
|
||||||
#define z80_run_nr(cycles) Cz80_Exec(&CZ80, cycles)
|
#define z80_run_nr(cycles) Cz80_Exec(&CZ80, cycles)
|
||||||
|
@ -335,10 +335,10 @@ typedef struct
|
||||||
union { // 0a0000: 256K
|
union { // 0a0000: 256K
|
||||||
struct {
|
struct {
|
||||||
unsigned char word_ram2M[0x40000];
|
unsigned char word_ram2M[0x40000];
|
||||||
unsigned char unused[0x20000];
|
unsigned char unused0[0x20000];
|
||||||
};
|
};
|
||||||
struct {
|
struct {
|
||||||
unsigned char unused[0x20000];
|
unsigned char unused1[0x20000];
|
||||||
unsigned char word_ram1M[2][0x20000];
|
unsigned char word_ram1M[2][0x20000];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -503,9 +503,17 @@ extern void lprintf(const char *fmt, ...);
|
||||||
if ((w) & EL_LOGMASK) \
|
if ((w) & EL_LOGMASK) \
|
||||||
lprintf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__); \
|
lprintf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__); \
|
||||||
}
|
}
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define elprintf
|
||||||
#else
|
#else
|
||||||
#define elprintf(w,f,...)
|
#define elprintf(w,f,...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define cdprintf
|
||||||
|
#else
|
||||||
|
#define cdprintf(x...)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // PICO_INTERNAL_INCLUDED
|
#endif // PICO_INTERNAL_INCLUDED
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,6 @@
|
||||||
|
|
||||||
#include "../PicoInt.h"
|
#include "../PicoInt.h"
|
||||||
|
|
||||||
#define cdprintf(x...)
|
|
||||||
|
|
||||||
|
|
||||||
#define CDC_DMA_SPEED 256
|
#define CDC_DMA_SPEED 256
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,15 @@ typedef unsigned int u32;
|
||||||
#define UTYPES_DEFINED
|
#define UTYPES_DEFINED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define rdprintf
|
||||||
|
#define wrdprintf
|
||||||
|
#else
|
||||||
//#define rdprintf dprintf
|
//#define rdprintf dprintf
|
||||||
#define rdprintf(...)
|
#define rdprintf(...)
|
||||||
//#define wrdprintf dprintf
|
//#define wrdprintf dprintf
|
||||||
#define wrdprintf(...)
|
#define wrdprintf(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EMU_CORE_DEBUG
|
#ifdef EMU_CORE_DEBUG
|
||||||
extern u32 lastread_a, lastread_d[16], lastwrite_cyc_d[16];
|
extern u32 lastread_a, lastread_d[16], lastwrite_cyc_d[16];
|
||||||
|
@ -1158,11 +1163,12 @@ static u32 PicoReadS68k32(u32 a)
|
||||||
// word RAM (1M area)
|
// word RAM (1M area)
|
||||||
if ((a&0xfe0000)==0x0c0000 && (Pico_mcd->s68k_regs[3]&4)) { // 0c0000-0dffff
|
if ((a&0xfe0000)==0x0c0000 && (Pico_mcd->s68k_regs[3]&4)) { // 0c0000-0dffff
|
||||||
int bank;
|
int bank;
|
||||||
|
u16 *pm;
|
||||||
wrdprintf("s68k_wram1M r32: [%06x] @%06x", a, SekPcS68k);
|
wrdprintf("s68k_wram1M r32: [%06x] @%06x", a, SekPcS68k);
|
||||||
// if (!(Pico_mcd->s68k_regs[3]&4))
|
// if (!(Pico_mcd->s68k_regs[3]&4))
|
||||||
// dprintf("s68k_wram1M FIXME: wrong mode");
|
// dprintf("s68k_wram1M FIXME: wrong mode");
|
||||||
bank = (Pico_mcd->s68k_regs[3]&1)^1;
|
bank = (Pico_mcd->s68k_regs[3]&1)^1;
|
||||||
u16 *pm=(u16 *)(Pico_mcd->word_ram1M[bank]+(a&0x1fffe)); d = (pm[0]<<16)|pm[1];
|
pm=(u16 *)(Pico_mcd->word_ram1M[bank]+(a&0x1fffe)); d = (pm[0]<<16)|pm[1];
|
||||||
wrdprintf("ret = %08x", d);
|
wrdprintf("ret = %08x", d);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "../PicoInt.h"
|
#include "../PicoInt.h"
|
||||||
#include "cd_file.h"
|
#include "cd_file.h"
|
||||||
|
|
||||||
#define cdprintf(x...)
|
|
||||||
//#define cdprintf(f,...) printf(f "\n",##__VA_ARGS__) // tmp
|
//#define cdprintf(f,...) printf(f "\n",##__VA_ARGS__) // tmp
|
||||||
#define DEBUG_CD
|
#define DEBUG_CD
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include "cd_sys.h"
|
#include "cd_sys.h"
|
||||||
#include "cd_file.h"
|
#include "cd_file.h"
|
||||||
|
|
||||||
#define cdprintf(x...)
|
|
||||||
#define DEBUG_CD
|
#define DEBUG_CD
|
||||||
|
|
||||||
#define TRAY_OPEN 0x0500 // TRAY OPEN CDD status
|
#define TRAY_OPEN 0x0500 // TRAY OPEN CDD status
|
||||||
|
|
|
@ -1085,7 +1085,7 @@ static void chan_render_loop(chan_rend_context *ct, int *buffer, int length)
|
||||||
void chan_render_loop(chan_rend_context *ct, int *buffer, unsigned short length);
|
void chan_render_loop(chan_rend_context *ct, int *buffer, unsigned short length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static chan_rend_context __attribute__((aligned(64))) crct;
|
static chan_rend_context crct;
|
||||||
|
|
||||||
static int chan_render(int *buffer, int length, int c, UINT32 flags) // flags: stereo, ?, disabled, ?, pan_r, pan_l
|
static int chan_render(int *buffer, int length, int c, UINT32 flags) // flags: stereo, ?, disabled, ?, pan_r, pan_l
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue