Skip to content

Commit 02023b1

Browse files
author
aquanull
committed
Fixed file inclusion and build output.
Fixed some out-of-range issues with RAM Search/Watch. Small changes in flash initialization. Some other minor changes.
1 parent 599e545 commit 02023b1

30 files changed

+2082
-1902
lines changed

src/common/System.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,21 @@ enum NativeDisplayResolutions
109109
SGB_NDR = 2
110110
};
111111

112+
// FIXME: Not better way?
113+
#define PIX_MALLOC(n) \
114+
(void *)((char *)malloc((n) + 4) + 4)
115+
#define PIX_CALLOC(n) \
116+
(void *)((char *)calloc(1, (n) + 4) + 4)
117+
#define PIX_FREE(p) \
118+
free((char *)(p) - 4)
119+
120+
// FIXME: Should fix RAM Search and RAM Watch's OoB intead
121+
#define RAM_MALLOC(n) \
122+
malloc((n) + 4)
123+
#define RAM_CALLOC(n) \
124+
calloc(1, (n) + 4)
125+
// FIXME: Just to be consistent
126+
#define RAM_FREE(p) \
127+
free(p)
128+
112129
#endif // VBA_SYSTEM_H

src/common/SystemGlobals.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ bool8 cheatsEnabled = true;
8383
bool8 mirroringEnable = false;
8484

8585
bool8 cpuEnhancedDetection = true;
86+
int32 cpuSaveType = 0;
8687

8788
int32 soundVolume = 0;
8889
int32 soundQuality = 2;

src/common/SystemGlobals.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ extern bool8 cheatsEnabled;
126126
extern bool8 mirroringEnable;
127127

128128
extern bool8 cpuEnhancedDetection;
129+
extern int32 cpuSaveType;
129130

130131
extern int32 soundVolume;
131132
extern int32 soundQuality;

src/gb/GB.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ typedef union
2424
bool gbLoadRom(const char *);
2525
void gbEmulate(int);
2626
void gbWriteMemory(register u16, register u8);
27-
void gbDrawLine();
2827
void gbGetHardwareType();
2928
void gbInit();
3029
void gbReset();

0 commit comments

Comments
 (0)