mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-25 12:06:53 +01:00
sync with VBA-M
This commit is contained in:
parent
607d5d0f97
commit
a87148eb8f
@ -245,22 +245,22 @@ void gbSgbDrawBorderTile(int x, int y, int tile, int attr)
|
||||
else
|
||||
xxx = 7 - xx;
|
||||
|
||||
u16 c;
|
||||
u16 cc;
|
||||
if (color) {
|
||||
c = gbPalette[palette + color];
|
||||
cc = gbPalette[palette + color];
|
||||
} else {
|
||||
c = gbPalette[0];
|
||||
cc = gbPalette[0];
|
||||
}
|
||||
|
||||
switch(systemColorDepth) {
|
||||
case 16:
|
||||
gbSgbDraw16Bit(dest + yyy*(256+2) + xxx, c);
|
||||
gbSgbDraw16Bit(dest + yyy*(256+2) + xxx, cc);
|
||||
break;
|
||||
case 24:
|
||||
gbSgbDraw24Bit(dest8 + (yyy*256+xxx)*3, c);
|
||||
gbSgbDraw24Bit(dest8 + (yyy*256+xxx)*3, cc);
|
||||
break;
|
||||
case 32:
|
||||
gbSgbDraw32Bit(dest32 + yyy*(256+1)+xxx, c);
|
||||
gbSgbDraw32Bit(dest32 + yyy*(256+1)+xxx, cc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1025,7 +1025,7 @@ bool CPUWriteGSASnapshot(const char *fileName,
|
||||
utilPutDword(buffer, totalSize); // length of remainder of save - CRC
|
||||
fwrite(buffer, 1, 4, file);
|
||||
|
||||
char temp[0x2001c];
|
||||
char *temp = new char[0x2001c];
|
||||
memset(temp, 0, 28);
|
||||
memcpy(temp, &rom[0xa0], 16); // copy internal name
|
||||
temp[0x10] = rom[0xbe]; // reserved area (old checksum)
|
||||
@ -1045,6 +1045,7 @@ bool CPUWriteGSASnapshot(const char *fileName,
|
||||
fwrite(buffer, 1, 4, file); // CRC?
|
||||
|
||||
fclose(file);
|
||||
delete [] temp;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ extern u8 freezeVRAM[0x18000];
|
||||
extern u8 freezeOAM[0x400];
|
||||
extern u8 freezePRAM[0x400];
|
||||
extern bool debugger_last;
|
||||
extern int oldreg[17];
|
||||
extern int oldreg[18];
|
||||
extern char oldbuffer[10];
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "GBA.h"
|
||||
|
||||
#ifdef BKPT_SUPPORT
|
||||
int oldreg[17];
|
||||
int oldreg[18];
|
||||
char oldbuffer[10];
|
||||
#endif
|
||||
|
||||
|
@ -696,7 +696,7 @@ void BIOS_LZ77UnCompVram()
|
||||
int length = (data >> 12) + 3;
|
||||
int offset = (data & 0x0FFF);
|
||||
u32 windowOffset = dest + byteCount - offset - 1;
|
||||
for(int i = 0; i < length; i++) {
|
||||
for(int i2 = 0; i2 < length; i2++) {
|
||||
writeValue |= (CPUReadByte(windowOffset++) << byteShift);
|
||||
byteShift += 8;
|
||||
byteCount++;
|
||||
|
Loading…
Reference in New Issue
Block a user