diff options
Diffstat (limited to 'src/devices/cpu/psx/dismips.cpp')
-rw-r--r-- | src/devices/cpu/psx/dismips.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/devices/cpu/psx/dismips.cpp b/src/devices/cpu/psx/dismips.cpp index fa00556071b..bfbc3428c94 100644 --- a/src/devices/cpu/psx/dismips.cpp +++ b/src/devices/cpu/psx/dismips.cpp @@ -11,29 +11,29 @@ #include "psx.h" extern CPU_DISASSEMBLE( r3000le ); -extern unsigned dasmmips3(char *,unsigned, UINT32); +extern unsigned dasmmips3(char *,unsigned, uint32_t); static struct { - UINT8 id[ 8 ]; - UINT32 text; /* SCE only */ - UINT32 data; /* SCE only */ - UINT32 pc0; - UINT32 gp0; /* SCE only */ - UINT32 t_addr; - UINT32 t_size; - UINT32 d_addr; /* SCE only */ - UINT32 d_size; /* SCE only */ - UINT32 b_addr; /* SCE only */ - UINT32 b_size; /* SCE only */ - UINT32 s_addr; - UINT32 s_size; - UINT32 SavedSP; - UINT32 SavedFP; - UINT32 SavedGP; - UINT32 SavedRA; - UINT32 SavedS0; - UINT8 dummy[ 0x800 - 76 ]; + uint8_t id[ 8 ]; + uint32_t text; /* SCE only */ + uint32_t data; /* SCE only */ + uint32_t pc0; + uint32_t gp0; /* SCE only */ + uint32_t t_addr; + uint32_t t_size; + uint32_t d_addr; /* SCE only */ + uint32_t d_size; /* SCE only */ + uint32_t b_addr; /* SCE only */ + uint32_t b_size; /* SCE only */ + uint32_t s_addr; + uint32_t s_size; + uint32_t SavedSP; + uint32_t SavedFP; + uint32_t SavedGP; + uint32_t SavedRA; + uint32_t SavedS0; + uint8_t dummy[ 0x800 - 76 ]; } m_psxexe_header; #define FORMAT_BIN ( 0 ) @@ -43,9 +43,9 @@ static struct #define CPU_R3000 ( 1 ) #define CPU_R4000 ( 2 ) -static UINT8 *filebuf; -static UINT32 offset; -static UINT8 order[] = { 0, 1, 2, 3 }; +static uint8_t *filebuf; +static uint32_t offset; +static uint8_t order[] = { 0, 1, 2, 3 }; static const char *const Options[]= { @@ -70,19 +70,19 @@ static void usage (void) int main( int argc, char *argv[] ) { FILE *f; - UINT8 i; - UINT8 j; - UINT8 n; - UINT8 p; - UINT32 begin; - UINT32 end; - UINT32 filelen; - UINT32 len; - UINT32 pc; + uint8_t i; + uint8_t j; + uint8_t n; + uint8_t p; + uint32_t begin; + uint32_t end; + uint32_t filelen; + uint32_t len; + uint32_t pc; char buffer[ 80 ]; char *filename; - UINT32 format; - UINT32 cpu; + uint32_t format; + uint32_t cpu; filename = nullptr; begin = 0; @@ -255,7 +255,7 @@ int main( int argc, char *argv[] ) fseek (f,begin,SEEK_SET); len=(filelen>end)? (end-begin+1):(filelen-begin); - filebuf=(UINT8 *)malloc(len+16); + filebuf=(uint8_t *)malloc(len+16); if (!filebuf) { printf ("Memory allocation error\n"); @@ -275,10 +275,10 @@ int main( int argc, char *argv[] ) pc = 0; while( pc < len ) { - UINT8 op0 = filebuf[ pc + order[ 0 ] ]; - UINT8 op1 = filebuf[ pc + order[ 1 ] ]; - UINT8 op2 = filebuf[ pc + order[ 2 ] ]; - UINT8 op3 = filebuf[ pc + order[ 3 ] ]; + uint8_t op0 = filebuf[ pc + order[ 0 ] ]; + uint8_t op1 = filebuf[ pc + order[ 1 ] ]; + uint8_t op2 = filebuf[ pc + order[ 2 ] ]; + uint8_t op3 = filebuf[ pc + order[ 3 ] ]; filebuf[ pc + 0 ] = op0; filebuf[ pc + 1 ] = op1; filebuf[ pc + 2 ] = op2; @@ -299,15 +299,15 @@ int main( int argc, char *argv[] ) { cpu_device *device = nullptr; int options = 0; - UINT8 *opram = filebuf + pc; - UINT8 *oprom = opram; + uint8_t *opram = filebuf + pc; + uint8_t *oprom = opram; i = CPU_DISASSEMBLE_CALL( r3000le ); } break; case CPU_R4000: { - UINT8 *opram = filebuf + pc; - UINT32 op = ( opram[ 3 ] << 24 ) | ( opram[ 2 ] << 16 ) | ( opram[ 1 ] << 8 ) | ( opram[ 0 ] << 0 ); + uint8_t *opram = filebuf + pc; + uint32_t op = ( opram[ 3 ] << 24 ) | ( opram[ 2 ] << 16 ) | ( opram[ 1 ] << 8 ) | ( opram[ 0 ] << 0 ); i = dasmmips3( buffer, pc + offset, op ); } break; |