From 68b374d7a77ecff845729281e2fb335879e40b6c Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Sun, 3 Apr 2022 15:06:06 +0100 Subject: [PATCH] GB: disable wave in APU due to perf regression Signed-off-by: Mahyar Koshkouei --- ext/minigb_apu/minigb_apu.c | 3 ++- src/main.c | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ext/minigb_apu/minigb_apu.c b/ext/minigb_apu/minigb_apu.c index 2a6ff66..cfc2339 100644 --- a/ext/minigb_apu/minigb_apu.c +++ b/ext/minigb_apu/minigb_apu.c @@ -350,7 +350,8 @@ void audio_callback(void *userdata, void *restrict stream, int len) update_square(stream, 0); update_square(stream, 1); - update_wave(stream); + /* FIXME: Performance regression when wave is switched on. */ + //update_wave(stream); update_noise(stream); } diff --git a/src/main.c b/src/main.c index 7709892..421578c 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ #define ENABLE_LCD 1 -#define ENABLE_SOUND 0 +#define ENABLE_SOUND 1 #define ENABLE_HIPASS 0 #define USE_DMA 0 @@ -181,7 +181,7 @@ void main_core1(void) static const uint16_t green = 0x07D0; union core_cmd cmd; - /* Initilise and control LCD on core 1. */ + /* Initialise and control LCD on core 1. */ mk_ili9225_init(); /* Initilise DMA transfer for clearing the LCD screen. */ @@ -202,8 +202,9 @@ void main_core1(void) mk_ili9225_write_pixels_end(); /* Set DMA transfer to be the length of a DMG line. */ - //dma_channel_set_trans_count(dma_lcd, LCD_WIDTH, false); - //channel_config_set_read_increment(&c2, true); + dma_channel_set_trans_count(dma_lcd, LCD_WIDTH, false); + channel_config_set_read_increment(&c2, true); + //dma_sniffer_enable(dma_lcd, 0, true); /* Set LCD window to DMG size. */ mk_ili9225_set_window(16, LCD_HEIGHT + 15,