]> Shamusworld >> Repos - stargem2/blobdiff - src/dis6808.cpp
Converted to SDL 2, added fullscreen support (F12 to toggle).
[stargem2] / src / dis6808.cpp
index 17cd301fd51f4c45b5e0a70c069466a63a799060..23ddf7a31b8276139fe2883dfaed374055055958 100755 (executable)
@@ -75,18 +75,19 @@ static char mnemonics[256][6] = {
   "EORB ","ADCB ","ORAB ","ADDB ","???  ","???  ","LDX  ","STX  "
 };
 
+
 //
 // 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...
@@ -96,15 +97,16 @@ static void DisplayBytes(uint16 src, uint32 dst)
                WriteLog("   ");
 }
 
+
 //
 // 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 +124,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;
@@ -148,3 +150,4 @@ int Decode6808(uint16 pc)
 
        return addr - pc;
 }
+