From 1bf64c4f4f13437f2a02416be0f56723acf4ff21 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 11 Dec 2021 13:34:29 -0500 Subject: [PATCH] NES; don't crash --- src/engine/platform/nes.cpp | 2 -- src/engine/platform/sound/nes/apu.h | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/engine/platform/nes.cpp b/src/engine/platform/nes.cpp index 1b9ea0824..9e0970496 100644 --- a/src/engine/platform/nes.cpp +++ b/src/engine/platform/nes.cpp @@ -309,8 +309,6 @@ int DivPlatformNES::init(DivEngine* p, int channels, int sugRate, bool pal) { } init_nla_table(500,500); - apu.addrSpace=new unsigned char[65536]; - reset(); return 5; } diff --git a/src/engine/platform/sound/nes/apu.h b/src/engine/platform/sound/nes/apu.h index 6d8f9b2f0..0c132759d 100644 --- a/src/engine/platform/sound/nes/apu.h +++ b/src/engine/platform/sound/nes/apu.h @@ -207,7 +207,7 @@ enum apu_mode { APU_60HZ, APU_48HZ }; break;\ }\ {\ - DMC.buffer = apu.addrSpace[DMC.address];\ + DMC.buffer = 0;\ }\ /* incremento gli hwtick da compiere */\ if (hwtick) { hwtick[0] += tick; }\ @@ -368,7 +368,6 @@ typedef struct _apu { int cpu_cycles; int cpu_opcode_cycle; - unsigned char* addrSpace; BYTE odd_cycle; /* ------------------------------------------------------- */