diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-19 14:43:22 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-19 14:43:22 +0100 |
commit | f24b01fa9967873e575a56541c9dc7fd4a32eb45 (patch) | |
tree | d89fd6e584d98de09bded3cc119cc214ed746349 /emulator.c | |
parent | Feature: Added registers (diff) | |
download | CHIP8-Emulator-f24b01fa9967873e575a56541c9dc7fd4a32eb45.tar.gz CHIP8-Emulator-f24b01fa9967873e575a56541c9dc7fd4a32eb45.tar.bz2 CHIP8-Emulator-f24b01fa9967873e575a56541c9dc7fd4a32eb45.zip |
Misc: Load roms after 0x200
Diffstat (limited to 'emulator.c')
-rw-r--r-- | emulator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/emulator.c b/emulator.c index afc78b1..699999c 100644 --- a/emulator.c +++ b/emulator.c @@ -13,7 +13,8 @@ int emulator_load_rom(Emulator* emulator, char* rom_name) struct stat st; fstat(fileno(rom), &st); - int bytes_read = fread(emulator->memory, 1, st.st_size, rom); + //rom loaded after 0x200 into memory + int bytes_read = fread(emulator->memory + 0x200, 1, st.st_size, rom); if(bytes_read != st.st_size) { perror("doesnt cuadrar\n"); |