mirror of
https://github.com/libretro/RACE.git
synced 2024-11-27 11:00:21 +00:00
More build fixes
This commit is contained in:
parent
d9d06c9248
commit
b73555613f
2
cz80.cpp
2
cz80.cpp
@ -74,7 +74,7 @@ u32 Cz80_Reset(cz80_struc *cpu)
|
||||
{
|
||||
cz80_struc *CPU = cpu;
|
||||
|
||||
fast_memset(CPU, 0, (u32)(&(CPU->CycleSup)) - (u32)(&(CPU->BC)));
|
||||
fast_memset(CPU, 0, (u32*)(&(CPU->CycleSup)) - (u32*)(&(CPU->BC)));
|
||||
|
||||
Cz80_Set_PC(CPU, 0);
|
||||
zIX = 0xFFFF;
|
||||
|
@ -311,8 +311,8 @@ void retro_run(void)
|
||||
|
||||
memset(sampleBuffer, 0, samplesPerFrame * sizeof(int16_t));
|
||||
|
||||
sound_update(sampleBuffer, samplesPerFrame * sizeof(int16_t)); //Get sound data
|
||||
dac_update(sampleBuffer, samplesPerFrame * sizeof(int16_t));
|
||||
sound_update((unsigned short*)sampleBuffer, samplesPerFrame * sizeof(int16_t)); //Get sound data
|
||||
dac_update((unsigned short*)sampleBuffer, samplesPerFrame * sizeof(int16_t));
|
||||
|
||||
int16_t *p = stereoBuffer;
|
||||
for (int i = 0; i < samplesPerFrame; i++)
|
||||
@ -341,7 +341,8 @@ bool retro_serialize(void *data, size_t size)
|
||||
|
||||
bool retro_unserialize(const void *data, size_t size)
|
||||
{
|
||||
return state_restore_mem(data);
|
||||
int ret = state_restore_mem((void*)data);
|
||||
return (ret == 1);
|
||||
}
|
||||
|
||||
bool retro_load_game(const struct retro_game_info *info)
|
||||
|
@ -171,7 +171,7 @@ static int state_store(race_state_t *rs)
|
||||
extern cz80_struc *RACE_cz80_struc;
|
||||
extern s32 Z80_ICount;
|
||||
int size_of_z80 =
|
||||
(u32)(&(RACE_cz80_struc->CycleSup)) - (u32)(&(RACE_cz80_struc->BC));
|
||||
(u32*)(&(RACE_cz80_struc->CycleSup)) - (u32*)(&(RACE_cz80_struc->BC));
|
||||
memcpy(&rs->RACE_cz80_struc, RACE_cz80_struc, size_of_z80);
|
||||
rs->Z80_ICount = Z80_ICount;
|
||||
rs->PC_offset = Cz80_Get_PC(RACE_cz80_struc);
|
||||
@ -245,7 +245,7 @@ static int state_restore(race_state_t *rs)
|
||||
extern cz80_struc *RACE_cz80_struc;
|
||||
extern s32 Z80_ICount;
|
||||
int size_of_z80 =
|
||||
(u32)(&(RACE_cz80_struc->CycleSup)) - (u32)(&(RACE_cz80_struc->BC));
|
||||
(u32*)(&(RACE_cz80_struc->CycleSup)) - (u32*)(&(RACE_cz80_struc->BC));
|
||||
|
||||
memcpy(RACE_cz80_struc, &rs->RACE_cz80_struc, size_of_z80);
|
||||
Z80_ICount = rs->Z80_ICount;
|
||||
@ -411,7 +411,7 @@ static int state_restore_0x10(FILE *stream)
|
||||
extern cz80_struc *RACE_cz80_struc;
|
||||
extern s32 Z80_ICount;
|
||||
int size_of_z80 =
|
||||
(u32)(&(RACE_cz80_struc->CycleSup)) - (u32)(&(RACE_cz80_struc->BC));
|
||||
(u32*)(&(RACE_cz80_struc->CycleSup)) - (u32*)(&(RACE_cz80_struc->BC));
|
||||
|
||||
memcpy(RACE_cz80_struc, &rs.RACE_cz80_struc, size_of_z80);
|
||||
Z80_ICount = rs.Z80_ICount;
|
||||
|
Loading…
Reference in New Issue
Block a user