Use Snes9x aliases instead of stdint types here.

This commit is contained in:
Brandon Wright 2018-07-28 15:59:15 -05:00
parent c6db74c3bd
commit abb4b4c39f
1 changed files with 19 additions and 19 deletions

View File

@ -783,7 +783,7 @@ static void to_var_from_buf (uint8 **buf, void *var, size_t size)
} }
#undef IF_0_THEN_256 #undef IF_0_THEN_256
#define IF_0_THEN_256( n ) ((uint8_t) ((n) - 1) + 1) #define IF_0_THEN_256( n ) ((uint8) ((n) - 1) + 1)
void S9xAPULoadBlarggState(uint8 *oldblock) void S9xAPULoadBlarggState(uint8 *oldblock)
{ {
uint8 *ptr = oldblock; uint8 *ptr = oldblock;
@ -792,26 +792,26 @@ void S9xAPULoadBlarggState(uint8 *oldblock)
copier.copy(SNES::smp.apuram,0x10000); // RAM copier.copy(SNES::smp.apuram,0x10000); // RAM
uint8_t regs_in [0x10]; uint8 regs_in [0x10];
uint8_t regs [0x10]; uint8 regs [0x10];
uint16_t pc, spc_time, dsp_time; uint16 pc, spc_time, dsp_time;
uint8_t a,x,y,psw,sp; uint8 a,x,y,psw,sp;
copier.copy(regs,0x10); // REGS copier.copy(regs,0x10); // REGS
copier.copy(regs_in,0x10); // REGS_IN copier.copy(regs_in,0x10); // REGS_IN
// CPU Regs // CPU Regs
pc = copier.copy_int( 0, sizeof(uint16_t) ); pc = copier.copy_int( 0, sizeof(uint16) );
a = copier.copy_int( 0, sizeof(uint8_t) ); a = copier.copy_int( 0, sizeof(uint8) );
x = copier.copy_int( 0, sizeof(uint8_t) ); x = copier.copy_int( 0, sizeof(uint8) );
y = copier.copy_int( 0, sizeof(uint8_t) ); y = copier.copy_int( 0, sizeof(uint8) );
psw = copier.copy_int( 0, sizeof(uint8_t) ); psw = copier.copy_int( 0, sizeof(uint8) );
sp = copier.copy_int( 0, sizeof(uint8_t) ); sp = copier.copy_int( 0, sizeof(uint8) );
copier.extra(); copier.extra();
// times // times
spc_time = copier.copy_int( 0, sizeof(uint16_t) ); spc_time = copier.copy_int( 0, sizeof(uint16) );
dsp_time = copier.copy_int( 0, sizeof(uint16_t) ); dsp_time = copier.copy_int( 0, sizeof(uint16) );
int cur_time = S9xAPUGetClock(CPU.Cycles); int cur_time = S9xAPUGetClock(CPU.Cycles);
@ -824,14 +824,14 @@ void S9xAPULoadBlarggState(uint8 *oldblock)
SNES::dsp.load_state(&ptr); SNES::dsp.load_state(&ptr);
// Timers // Timers
uint16_t next_time[3]; uint16 next_time[3];
uint8_t divider[3], counter[3]; uint8 divider[3], counter[3];
for ( int i = 0; i < 3; i++ ) for ( int i = 0; i < 3; i++ )
{ {
next_time[i] = copier.copy_int( 0, sizeof(uint16_t) ); next_time[i] = copier.copy_int( 0, sizeof(uint16) );
divider[i] = copier.copy_int( 0, sizeof(uint8_t) ); divider[i] = copier.copy_int( 0, sizeof(uint8) );
counter[i] = copier.copy_int( 0, sizeof(uint8_t) ); counter[i] = copier.copy_int( 0, sizeof(uint8) );
copier.extra(); copier.extra();
} }
// construct timers out of available parts from blargg smp // construct timers out of available parts from blargg smp
SNES::smp.timer0.enable = regs[1] >> 0 & 1; // regs[1] = CONTROL SNES::smp.timer0.enable = regs[1] >> 0 & 1; // regs[1] = CONTROL