]> Shamusworld >> Repos - thunder/blobdiff - src/dis6808.cpp
Code cleanup.
[thunder] / src / dis6808.cpp
index 35c54798b695a05f6794c972ac476e30be46b566..97f20c4c91d64a515d1bfed669659039c8a9147b 100644 (file)
@@ -1,9 +1,9 @@
 //
 // 6808 disassembler
 //
-// by James L. Hammons
+// by James Hammons
 //
-// (c) 2004 Underground Software
+// (c) 2004, 2014 Underground Software
 //
 
 #include "dis6808.h"
@@ -79,15 +79,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...
@@ -100,12 +100,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,8 +122,8 @@ int Decode6808(uint16 pc)
                sprintf(outbuf, "%s $%04X  ", mnemonics[opcode], offset);
                break;
        case 3:                                                                                         // Relative
-//             sprintf(outbuf, "%s $%04X", mnemonics[opcode], ++addr + (int16)(int8)soundCPU.RdMem(addr));
-               offset = addr + 1 + (int16)(int8)soundCPU.RdMem(addr);
+//             sprintf(outbuf, "%s $%04X", mnemonics[opcode], ++addr + (int16_t)(int8_t)soundCPU.RdMem(addr));
+               offset = addr + 1 + (int16_t)(int8_t)soundCPU.RdMem(addr);
                addr++;
                sprintf(outbuf, "%s $%04X  ", mnemonics[opcode], offset);
                break;