Remove potentially undefined memcpy.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@12 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
parent
ca614231e1
commit
b1a520a587
@ -32,8 +32,8 @@ for (unsigned h = srcH; h--;) { \
|
||||
++s; \
|
||||
} \
|
||||
\
|
||||
std::memcpy(d, d - dstW, dstW * (scale - 1) * sizeof(T)); \
|
||||
d += dstW * (scale - 1); \
|
||||
for (unsigned n = scale; --n; d += dstW) \
|
||||
std::memcpy(d, d - dstW, dstW * sizeof(T)); \
|
||||
}
|
||||
|
||||
|
||||
|
@ -143,18 +143,20 @@ void Memory::init() {
|
||||
memset(disabled_ram, 0xFF, 0x1000);
|
||||
memset(vram, 0, 0x4000);
|
||||
|
||||
memset(memory + 0xC000 + 0x00, 0xFF, 0x08);
|
||||
memset(memory + 0xC000 + 0x08, 0x00, 0x08);
|
||||
memcpy(memory + 0xC000 + 0x10, memory + 0xC000, 0x800 - 0x10);
|
||||
for (unsigned addr = 0xC000; addr < 0xC800; addr += 0x10) {
|
||||
memset(memory + addr + 0x00, 0xFF, 0x08);
|
||||
memset(memory + addr + 0x08, 0x00, 0x08);
|
||||
}
|
||||
|
||||
memset(memory + 0xC800 + 0x00, 0x00, 0x08);
|
||||
memset(memory + 0xC800 + 0x08, 0xFF, 0x08);
|
||||
memcpy(memory + 0xC800 + 0x10, memory + 0xC800, 0x600);
|
||||
|
||||
memory[0xCE00 + 0x02] = 0xFF;
|
||||
memory[0xCE00 + 0x0A] = 0x00;
|
||||
memcpy(memory + 0xCE00 + 0x10, memory + 0xCE00, 0x200 - 0x10);
|
||||
for (unsigned addr = 0xC800; addr < 0xD000; addr += 0x10) {
|
||||
memset(memory + addr + 0x00, 0x00, 0x08);
|
||||
memset(memory + addr + 0x08, 0xFF, 0x08);
|
||||
}
|
||||
|
||||
for (unsigned addr = 0xCE00; addr < 0xD000; addr += 0x10) {
|
||||
memory[addr + 0x02] = 0xFF;
|
||||
memory[addr + 0x0A] = 0x00;
|
||||
}
|
||||
|
||||
memcpy(memory + 0xD000, memory + 0xC000, 0x1000);
|
||||
|
||||
@ -184,9 +186,10 @@ void Memory::init() {
|
||||
mem[0xE] = mem[0xC];
|
||||
mem[0xF] = &memory[0xF000];
|
||||
|
||||
cgb_bgp_data[0x00] = 0xFF;
|
||||
cgb_bgp_data[0x01] = 0x7F;
|
||||
memcpy(cgb_bgp_data + 0x02, cgb_bgp_data, 0x40 - 0x02);
|
||||
for (unsigned i = 0x00; i < 0x40; i += 0x02) {
|
||||
cgb_bgp_data[i] = 0xFF;
|
||||
cgb_bgp_data[i + 1] = 0x7F;
|
||||
}
|
||||
|
||||
memcpy(cgb_objp_data, cgbObjpDump, sizeof(cgbObjpDump));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user