]> Shamusworld >> Repos - stargem2/blobdiff - src/dis6808.cpp
Finally fixed problems with demo mode.
[stargem2] / src / dis6808.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 17cd301..42fecda
@@ -1,9 +1,8 @@
 //
 // 6808 disassembler
 //
-// by James L. Hammons
-//
-// (c) 2004 Underground Software
+// by James Hammons
+// (C) 2004 Underground Software
 //
 
 #include "dis6808.h"
@@ -78,15 +77,15 @@ static char mnemonics[256][6] = {
 //
 // Display bytes in mem in hex
 //
-static void DisplayBytes(uint16 src, uint32 dst)
+static void DisplayBytes(uint16_t src, uint32_t dst)
 {
        WriteLog("%04X: ", src);
-       uint8 cnt = 0;                                                                          // Init counter...
+       uint8_t cnt = 0;                                                                                // Init counter...
 
        if (src > dst)
                dst += 0x10000;                                                                 // That should fix the FFFF bug...
 
-       for(uint32 i=src; i<dst; i++)
+       for(uint32_t i=src; i<dst; i++)
        {
                WriteLog("%02X ", soundCPU.RdMem(i));
                cnt++;                                                                                  // Bump counter...
@@ -99,12 +98,12 @@ static void DisplayBytes(uint16 src, uint32 dst)
 //
 // Decode a 6808 instruction
 //
-int Decode6808(uint16 pc)
+int Decode6808(uint16_t pc)
 {
        char outbuf[80];
 
-       uint16 addr = pc, offset;
-       uint8 opcode = soundCPU.RdMem(addr++);                          // Get the opcode
+       uint16_t addr = pc, offset;
+       uint8_t opcode = soundCPU.RdMem(addr++);                        // Get the opcode
 
        switch (op_mat[opcode])                                                         // Decode the addressing mode...
        {
@@ -122,7 +121,7 @@ int Decode6808(uint16 pc)
                break;
        case 3:                                                                                         // Relative
 //             sprintf(outbuf, "%s $%04X", mnemonics[opcode], ++addr + (int16)(int8)soundCPU.RdMem(addr));
-               offset = addr + 1 + (int16)(int8)soundCPU.RdMem(addr);
+               offset = addr + 1 + (int16_t)(int8_t)soundCPU.RdMem(addr);
                addr++;
                sprintf(outbuf, "%s $%04X  ", mnemonics[opcode], offset);
                break;