Skip to content

Commit

Permalink
[NSF][FDS] Fixed wram destination pointer initialization (#383).
Browse files Browse the repository at this point in the history
  • Loading branch information
punesemu committed Mar 7, 2024
1 parent 169e9e6 commit 8bf7379
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/cpu_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ INLINE static void nsf_wr_mem(BYTE nidx, WORD address, BYTE value) {
bank = (address & 0x01);
address = (address & 0x000F) << 12;
memmap_wram_4k(nidx, MMCPU(address), bank);
dst = memmap_chunk_pnt(nidx, address);
dst = memmap_chunk_pnt(nidx, MMCPU(address));
if (dst) memcpy(dst, prgrom_pnt_byte(value << 12), S4K);
}
return;
Expand All @@ -1863,12 +1863,12 @@ INLINE static void nsf_wr_mem(BYTE nidx, WORD address, BYTE value) {
case 0x5FFD:
case 0x5FFE:
case 0x5FFF:
value = prgrom_control_bank(S4K, value);
if (nsf.sound_chips.fds && (address <= 0x5FFD)) {
value = prgrom_control_bank(S4K, value);
bank = (address & 0x07);
address = (address & 0x000F) << 12;
memmap_wram_4k(nidx, MMCPU(address), bank + 2);
dst = memmap_chunk_pnt(nidx, address);
dst = memmap_chunk_pnt(nidx, MMCPU(address));
if (dst) memcpy(dst, prgrom_pnt_byte(value << 12), S4K);
return;
}
Expand Down

0 comments on commit 8bf7379

Please sign in to comment.