From: notaz Date: Tue, 22 Sep 2009 19:38:49 +0000 (+0000) Subject: 32x: preliminary PWM implementation. 32x opts in menu X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2f512cab27fa3ac45d2aa944899b1c2b582906d;p=libpicofe.git 32x: preliminary PWM implementation. 32x opts in menu git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@790 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/common/menu.c b/common/menu.c index 4393ed5..fa0480b 100644 --- a/common/menu.c +++ b/common/menu.c @@ -1424,6 +1424,21 @@ static int menu_loop_cd_options(menu_id id, int keys) return 0; } +// ------------ 32X options menu ------------ + +static menu_entry e_menu_32x_options[] = +{ + mee_onoff("32X enabled", MA_32XOPT_ENABLE_32X, PicoOpt, POPT_EN_32X), + mee_onoff("PWM sound", MA_32XOPT_PWM, PicoOpt, POPT_EN_PWM), +}; + +static int menu_loop_32x_options(menu_id id, int keys) +{ + static int sel = 0; + me_loop(e_menu_32x_options, &sel, NULL); + return 0; +} + // ------------ adv options menu ------------ static menu_entry e_menu_adv_options[] = @@ -1672,6 +1687,7 @@ static menu_entry e_menu_options[] = mee_range (cpu_clk_name, MA_OPT_CPU_CLOCKS, currentConfig.CPUclock, 20, 900), mee_handler ("[Display options]", menu_loop_gfx_options), mee_handler ("[Sega/Mega CD options]", menu_loop_cd_options), + mee_handler ("[32X options]", menu_loop_32x_options), mee_handler ("[Advanced options]", menu_loop_adv_options), mee_handler_mkname_id(MA_OPT_SAVECFG, mh_saveloadcfg, mgn_savecfg), mee_handler_id("Save cfg for current game only", MA_OPT_SAVECFG_GAME, mh_saveloadcfg), @@ -2079,6 +2095,7 @@ static menu_entry *e_menu_table[] = e_menu_gfx_options, e_menu_adv_options, e_menu_cd_options, + e_menu_32x_options, e_menu_keyconfig, e_menu_hidden, }; diff --git a/common/menu.h b/common/menu.h index d6397e4..d3e49b2 100644 --- a/common/menu.h +++ b/common/menu.h @@ -85,6 +85,8 @@ typedef enum MA_CDOPT_SCALEROT_CHIP, MA_CDOPT_BETTER_SYNC, MA_CDOPT_DONE, + MA_32XOPT_ENABLE_32X, + MA_32XOPT_PWM, MA_CTRL_PLAYER1, MA_CTRL_PLAYER2, MA_CTRL_EMU, diff --git a/gp2x/Makefile b/gp2x/Makefile index 329da36..fedadf3 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -73,7 +73,7 @@ OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o endif # Pico - 32X -OBJS += pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o +OBJS += pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o pico/32x/pwm.o # Pico - Pico OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o # Pico - carthw diff --git a/gp2x/emu.c b/gp2x/emu.c index 757bea6..49f7149 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -78,7 +78,9 @@ void pemu_prep_defconfig(void) memset(&defaultConfig, 0, sizeof(defaultConfig)); defaultConfig.EmuOpt = 0x9d | EOPT_RAM_TIMINGS|EOPT_CONFIRM_SAVE|EOPT_EN_CD_LEDS; - defaultConfig.s_PicoOpt = 0x0f | POPT_EN_MCD_PCM|POPT_EN_MCD_CDDA|POPT_EN_SVP_DRC|POPT_ACC_SPRITES; + defaultConfig.s_PicoOpt = POPT_EN_STEREO|POPT_EN_FM|POPT_EN_PSG|POPT_EN_Z80 | + POPT_EN_MCD_PCM|POPT_EN_MCD_CDDA|POPT_EN_SVP_DRC|POPT_ACC_SPRITES | + POPT_EN_32X|POPT_EN_PWM; defaultConfig.s_PsndRate = 44100; defaultConfig.s_PicoRegion = 0; // auto defaultConfig.s_PicoAutoRgnOrder = 0x184; // US, EU, JP diff --git a/linux/Makefile b/linux/Makefile index 1fecdd7..8d83aaf 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -40,7 +40,7 @@ OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o # Pico - 32X -OBJS += pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o +OBJS += pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o pico/32x/pwm.o # Pico - Pico OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o # Pico - sound