summaryrefslogtreecommitdiffstats
path: root/games/snes9x/libretro.diff
blob: 8808654ed8b4c54308737a47a4a7ee91b3ccc0ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
From abb4b4c39f75716c4e29017005996da9b3ad4d12 Mon Sep 17 00:00:00 2001
From: Brandon Wright <bearoso@gmail.com>
Date: Sat, 28 Jul 2018 15:59:15 -0500
Subject: [PATCH] Use Snes9x aliases instead of stdint types here.

---
 apu/apu.cpp | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/apu/apu.cpp b/apu/apu.cpp
index 50dec00f..63a35392 100644
--- a/apu/apu.cpp
+++ b/apu/apu.cpp
@@ -783,7 +783,7 @@ static void to_var_from_buf (uint8 **buf, void *var, size_t size)
 }
 
 #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)
 {
     uint8	*ptr = oldblock;
@@ -792,26 +792,26 @@ void S9xAPULoadBlarggState(uint8 *oldblock)
 
     copier.copy(SNES::smp.apuram,0x10000); // RAM
 
-    uint8_t regs_in [0x10];
-    uint8_t regs [0x10];
-    uint16_t pc, spc_time, dsp_time;
-    uint8_t a,x,y,psw,sp;
+    uint8 regs_in [0x10];
+    uint8 regs [0x10];
+    uint16 pc, spc_time, dsp_time;
+    uint8 a,x,y,psw,sp;
 
     copier.copy(regs,0x10); // REGS
     copier.copy(regs_in,0x10); // REGS_IN
 
     // CPU Regs
-    pc = copier.copy_int( 0, sizeof(uint16_t) );
-    a = copier.copy_int( 0, sizeof(uint8_t) );
-    x = copier.copy_int( 0, sizeof(uint8_t) );
-    y = copier.copy_int( 0, sizeof(uint8_t) );
-    psw = copier.copy_int( 0, sizeof(uint8_t) );
-    sp = copier.copy_int( 0, sizeof(uint8_t) );
+    pc = copier.copy_int( 0, sizeof(uint16) );
+    a = copier.copy_int( 0, sizeof(uint8) );
+    x = copier.copy_int( 0, sizeof(uint8) );
+    y = copier.copy_int( 0, sizeof(uint8) );
+    psw = copier.copy_int( 0, sizeof(uint8) );
+    sp = copier.copy_int( 0, sizeof(uint8) );
     copier.extra();
 
     // times
-    spc_time = copier.copy_int( 0, sizeof(uint16_t) );
-    dsp_time = copier.copy_int( 0, sizeof(uint16_t) );
+    spc_time = copier.copy_int( 0, sizeof(uint16) );
+    dsp_time = copier.copy_int( 0, sizeof(uint16) );
 
     int cur_time = S9xAPUGetClock(CPU.Cycles);
 
@@ -824,14 +824,14 @@ void S9xAPULoadBlarggState(uint8 *oldblock)
     SNES::dsp.load_state(&ptr);
 
     // Timers
-    uint16_t next_time[3];
-    uint8_t divider[3], counter[3];
+    uint16 next_time[3];
+    uint8 divider[3], counter[3];
     for ( int i = 0; i < 3; i++ )
     {
-	    next_time[i] = copier.copy_int( 0, sizeof(uint16_t) );
-	    divider[i] = copier.copy_int( 0, sizeof(uint8_t) );
-	    counter[i] = copier.copy_int( 0, sizeof(uint8_t) );
-	    copier.extra();
+        next_time[i] = copier.copy_int( 0, sizeof(uint16) );
+        divider[i] = copier.copy_int( 0, sizeof(uint8) );
+        counter[i] = copier.copy_int( 0, sizeof(uint8) );
+        copier.extra();
     }
     // construct timers out of available parts from blargg smp
     SNES::smp.timer0.enable = regs[1] >> 0 & 1;                 // regs[1] = CONTROL
From a77b3b379b06e5e09723f65b63c9a045c71c3030 Mon Sep 17 00:00:00 2001
From: orbea <orbea@fredslev.dk>
Date: Sat, 28 Jul 2018 15:48:08 -0700
Subject: [PATCH] One moreSnes9x alias instead of stdint type.

---
 spc7110dec.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spc7110dec.cpp b/spc7110dec.cpp
index 6cc28670..ab7521b3 100644
--- a/spc7110dec.cpp
+++ b/spc7110dec.cpp
@@ -498,7 +498,7 @@ void SPC7110Decomp::reset() {
 }
 
 SPC7110Decomp::SPC7110Decomp() {
-  decomp_buffer = new uint8_t[decomp_buffer_size];
+  decomp_buffer = new uint8[decomp_buffer_size];
   reset();
 
   //initialize reverse morton lookup tables