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
|
else
|
||||||
xxx = 7 - xx;
|
xxx = 7 - xx;
|
||||||
|
|
||||||
u16 c;
|
u16 cc;
|
||||||
if (color) {
|
if (color) {
|
||||||
c = gbPalette[palette + color];
|
cc = gbPalette[palette + color];
|
||||||
} else {
|
} else {
|
||||||
c = gbPalette[0];
|
cc = gbPalette[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(systemColorDepth) {
|
switch(systemColorDepth) {
|
||||||
case 16:
|
case 16:
|
||||||
gbSgbDraw16Bit(dest + yyy*(256+2) + xxx, c);
|
gbSgbDraw16Bit(dest + yyy*(256+2) + xxx, cc);
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
gbSgbDraw24Bit(dest8 + (yyy*256+xxx)*3, c);
|
gbSgbDraw24Bit(dest8 + (yyy*256+xxx)*3, cc);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
gbSgbDraw32Bit(dest32 + yyy*(256+1)+xxx, c);
|
gbSgbDraw32Bit(dest32 + yyy*(256+1)+xxx, cc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1025,7 +1025,7 @@ bool CPUWriteGSASnapshot(const char *fileName,
|
|||||||
utilPutDword(buffer, totalSize); // length of remainder of save - CRC
|
utilPutDword(buffer, totalSize); // length of remainder of save - CRC
|
||||||
fwrite(buffer, 1, 4, file);
|
fwrite(buffer, 1, 4, file);
|
||||||
|
|
||||||
char temp[0x2001c];
|
char *temp = new char[0x2001c];
|
||||||
memset(temp, 0, 28);
|
memset(temp, 0, 28);
|
||||||
memcpy(temp, &rom[0xa0], 16); // copy internal name
|
memcpy(temp, &rom[0xa0], 16); // copy internal name
|
||||||
temp[0x10] = rom[0xbe]; // reserved area (old checksum)
|
temp[0x10] = rom[0xbe]; // reserved area (old checksum)
|
||||||
@ -1045,6 +1045,7 @@ bool CPUWriteGSASnapshot(const char *fileName,
|
|||||||
fwrite(buffer, 1, 4, file); // CRC?
|
fwrite(buffer, 1, 4, file); // CRC?
|
||||||
|
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
delete [] temp;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ extern u8 freezeVRAM[0x18000];
|
|||||||
extern u8 freezeOAM[0x400];
|
extern u8 freezeOAM[0x400];
|
||||||
extern u8 freezePRAM[0x400];
|
extern u8 freezePRAM[0x400];
|
||||||
extern bool debugger_last;
|
extern bool debugger_last;
|
||||||
extern int oldreg[17];
|
extern int oldreg[18];
|
||||||
extern char oldbuffer[10];
|
extern char oldbuffer[10];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "GBA.h"
|
#include "GBA.h"
|
||||||
|
|
||||||
#ifdef BKPT_SUPPORT
|
#ifdef BKPT_SUPPORT
|
||||||
int oldreg[17];
|
int oldreg[18];
|
||||||
char oldbuffer[10];
|
char oldbuffer[10];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ void BIOS_LZ77UnCompVram()
|
|||||||
int length = (data >> 12) + 3;
|
int length = (data >> 12) + 3;
|
||||||
int offset = (data & 0x0FFF);
|
int offset = (data & 0x0FFF);
|
||||||
u32 windowOffset = dest + byteCount - offset - 1;
|
u32 windowOffset = dest + byteCount - offset - 1;
|
||||||
for(int i = 0; i < length; i++) {
|
for(int i2 = 0; i2 < length; i2++) {
|
||||||
writeValue |= (CPUReadByte(windowOffset++) << byteShift);
|
writeValue |= (CPUReadByte(windowOffset++) << byteShift);
|
||||||
byteShift += 8;
|
byteShift += 8;
|
||||||
byteCount++;
|
byteCount++;
|
||||||
|
Loading…
Reference in New Issue
Block a user