let it build on msvc

supposedly for the original XBox?
This commit is contained in:
notaz 2017-10-14 21:28:24 +03:00
parent adb98333d7
commit 24aab4da73
8 changed files with 84 additions and 44 deletions

View file

@ -297,9 +297,9 @@ typedef void (event_cb)(unsigned int now);
unsigned int p32x_event_times[P32X_EVENT_COUNT];
static unsigned int event_time_next;
static event_cb *p32x_event_cbs[P32X_EVENT_COUNT] = {
[P32X_EVENT_PWM] = p32x_pwm_irq_event,
[P32X_EVENT_FILLEND] = fillend_event,
[P32X_EVENT_HINT] = hint_event,
p32x_pwm_irq_event, // P32X_EVENT_PWM
fillend_event, // P32X_EVENT_FILLEND
hint_event, // P32X_EVENT_HINT
};
// schedule event at some time 'after', in m68k clocks

View file

@ -292,7 +292,7 @@ void PicoDraw32xLayerMdOnly(int offs, int lines)
for (l = 0; l < lines; l++) {
if (have_scan) {
PicoScan32xBegin(l + offs);
dst = Pico.est.DrawLineDest + poffs;
dst = (unsigned short *)Pico.est.DrawLineDest + poffs;
}
for (p = 0; p < plen; p += 4) {
dst[p + 0] = pal[*pmd++];

View file

@ -30,9 +30,11 @@ PICO_INTERNAL void PicoExitMCD(void)
PICO_INTERNAL void PicoPowerMCD(void)
{
int fmt_size;
SekCycleCntS68k = SekCycleAimS68k = 0;
int fmt_size = sizeof(formatted_bram);
fmt_size = sizeof(formatted_bram);
memset(Pico_mcd->prg_ram, 0, sizeof(Pico_mcd->prg_ram));
memset(Pico_mcd->word_ram2M, 0, sizeof(Pico_mcd->word_ram2M));
memset(Pico_mcd->pcm_ram, 0, sizeof(Pico_mcd->pcm_ram));
@ -200,10 +202,10 @@ typedef void (event_cb)(unsigned int now);
unsigned int pcd_event_times[PCD_EVENT_COUNT];
static unsigned int event_time_next;
static event_cb *pcd_event_cbs[PCD_EVENT_COUNT] = {
[PCD_EVENT_CDC] = pcd_cdc_event,
[PCD_EVENT_TIMER3] = pcd_int3_timer_event,
[PCD_EVENT_GFX] = gfx_update,
[PCD_EVENT_DMA] = pcd_dma_event,
pcd_cdc_event, // PCD_EVENT_CDC
pcd_int3_timer_event, // PCD_EVENT_TIMER3
gfx_update, // PCD_EVENT_GFX
pcd_dma_event, // PCD_EVENT_DMA
};
void pcd_event_schedule(unsigned int now, enum pcd_event event, int after)

View file

@ -1617,7 +1617,7 @@ void PicoDrawSetOutBuf(void *dest, int increment)
{
DrawLineDestBase = dest;
DrawLineDestIncrement = increment;
Pico.est.DrawLineDest = DrawLineDestBase + Pico.est.DrawScanline * increment;
Pico.est.DrawLineDest = (char *)DrawLineDestBase + Pico.est.DrawScanline * increment;
}
void PicoDrawSetInternalBuf(void *dest, int increment)

View file

@ -15,4 +15,11 @@
#define ALIGNED(n)
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define strdup _strdup
#endif
#endif // PICO_PORT_INCLUDED