Skip to content

Commit

Permalink
fix overflowing video ram address
Browse files Browse the repository at this point in the history
  • Loading branch information
nippur72 committed Aug 18, 2023
1 parent f5b6684 commit 2f4c335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion systems/vic20.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ uint32_t vic20_exec(vic20_t* sys, uint32_t micro_seconds) {

static uint16_t _vic20_vic_fetch(uint16_t addr, void* user_data) {
vic20_t* sys = (vic20_t*) user_data;
uint16_t data = (sys->color_ram[addr & 0x03FF]<<8) | mem_rd(&sys->mem_vic, addr);
uint16_t data = (sys->color_ram[addr & 0x03FF]<<8) | mem_rd(&sys->mem_vic, addr & 0x3FFF);
return data;
}

Expand Down

0 comments on commit 2f4c335

Please sign in to comment.