Skip to content

Commit 73a673c

Browse files
committed
Copy spritesheet, map, flags, music and sound effects data to memory.
1 parent 19cac39 commit 73a673c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ static bool run_cartridge(SDL_Renderer* renderer)
373373
{
374374
reset_memory();
375375

376+
// Copy spritesheet, map, flags, music and sound effects data to memory.
377+
// 0x0000-0x42ff
378+
SDL_memcpy(pico8_ram, cart.cart_data, 0x42ff * sizeof(uint8_t));
379+
376380
if (!cart.is_corrupt)
377381
{
378382
state = STATE_EMULATOR;

0 commit comments

Comments
 (0)