mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
new menu option code
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@221 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
82bc9cdd10
commit
4e8a534cec
7 changed files with 613 additions and 278 deletions
|
@ -10,7 +10,7 @@ CROSS = arm-linux-
|
|||
#up = 1
|
||||
|
||||
DEFINC = -I../.. -I. -D__GP2X__ -DARM # -DBENCHMARK
|
||||
COPT_COMMON = -static -s -O3 -ftracer -fstrength-reduce -Wall -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math
|
||||
COPT_COMMON = -static -s -O2 -ftracer -fstrength-reduce -Wall -fomit-frame-pointer -fstrict-aliasing -ffast-math
|
||||
COPT = $(COPT_COMMON) -mtune=arm940t
|
||||
GCC = $(CROSS)gcc
|
||||
STRIP = $(CROSS)strip
|
||||
|
@ -51,7 +51,7 @@ code940.gpe : $(OBJS940) ../helix/helix_mp3.a
|
|||
|
||||
940ym2612.o : ../../../Pico/sound/ym2612.c
|
||||
@echo $@
|
||||
@$(GCC) $(COPT) $(DEFINC) -DEXTERNAL_YM2612 -c $< -o $@
|
||||
@$(GCC) $(COPT) -Os $(DEFINC) -DEXTERNAL_YM2612 -c $< -o $@
|
||||
|
||||
mix.o : ../../../Pico/sound/mix.s
|
||||
@echo $@
|
||||
|
|
|
@ -62,6 +62,7 @@ static int movie_size = 0;
|
|||
unsigned char *framebuff = 0; // temporary buffer for alt renderer
|
||||
int state_slot = 0;
|
||||
int reset_timing = 0;
|
||||
int config_slot = 0, config_slot_current = 0;
|
||||
|
||||
|
||||
// utilities
|
||||
|
@ -474,7 +475,7 @@ void scaling_update(void)
|
|||
int emu_ReadConfig(int game)
|
||||
{
|
||||
FILE *f;
|
||||
char cfg[512];
|
||||
char cfg[512], extbuf[16];
|
||||
int bread = 0;
|
||||
|
||||
if (!game)
|
||||
|
@ -507,9 +508,19 @@ int emu_ReadConfig(int game)
|
|||
currentConfig.PicoCDBuffers = 64;
|
||||
currentConfig.scaling = 0;
|
||||
strncpy(cfg, PicoConfigFile, 511);
|
||||
if (config_slot != 0)
|
||||
{
|
||||
char *p = strrchr(cfg, '.');
|
||||
if (p == NULL) p = cfg + strlen(cfg);
|
||||
sprintf(extbuf, ".%i.pbcfg", config_slot);
|
||||
strncpy(p, extbuf, 511 - (p - cfg));
|
||||
}
|
||||
cfg[511] = 0;
|
||||
} else {
|
||||
romfname_ext(cfg, "cfg/", ".pbcfg");
|
||||
if (config_slot != 0)
|
||||
sprintf(extbuf, ".%i.pbcfg", config_slot);
|
||||
else strcpy(extbuf, ".pbcfg");
|
||||
romfname_ext(cfg, "cfg/", extbuf);
|
||||
f = fopen(cfg, "rb");
|
||||
if (!f) romfname_ext(cfg, NULL, ".pbcfg");
|
||||
else fclose(f);
|
||||
|
@ -543,6 +554,7 @@ int emu_ReadConfig(int game)
|
|||
currentConfig.KeyBinds[22] = 1<<30; // vol down
|
||||
}
|
||||
|
||||
if (bread > 0) config_slot_current = config_slot;
|
||||
return (bread > 0); // == sizeof(currentConfig));
|
||||
}
|
||||
|
||||
|
@ -550,15 +562,25 @@ int emu_ReadConfig(int game)
|
|||
int emu_WriteConfig(int game)
|
||||
{
|
||||
FILE *f;
|
||||
char cfg[512];
|
||||
char cfg[512], extbuf[16];
|
||||
int bwrite = 0;
|
||||
|
||||
if (!game)
|
||||
{
|
||||
strncpy(cfg, PicoConfigFile, 511);
|
||||
if (config_slot != 0)
|
||||
{
|
||||
char *p = strrchr(cfg, '.');
|
||||
if (p == NULL) p = cfg + strlen(cfg);
|
||||
sprintf(extbuf, ".%i.pbcfg", config_slot);
|
||||
strncpy(p, extbuf, 511 - (p - cfg));
|
||||
}
|
||||
cfg[511] = 0;
|
||||
} else {
|
||||
romfname_ext(cfg, "cfg/", ".pbcfg");
|
||||
if (config_slot != 0)
|
||||
sprintf(extbuf, ".%i.pbcfg", config_slot);
|
||||
else strcpy(extbuf, ".pbcfg");
|
||||
romfname_ext(cfg, "cfg/", extbuf);
|
||||
}
|
||||
|
||||
printf("emu_WriteConfig: %s ", cfg);
|
||||
|
@ -578,6 +600,7 @@ int emu_WriteConfig(int game)
|
|||
}
|
||||
printf((bwrite == sizeof(currentConfig)) ? "(ok)\n" : "(failed)\n");
|
||||
|
||||
if (bwrite == sizeof(currentConfig)) config_slot_current = config_slot;
|
||||
return (bwrite == sizeof(currentConfig));
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -44,8 +44,7 @@ OBJS += ../../unzip/unzip.o ../../unzip/unzip_stream.o
|
|||
OBJS += ../gp2x/mp3.o
|
||||
# CPU cores
|
||||
DEFINC += -DEMU_M68K
|
||||
OBJS += ../../cpu/musashi/m68kcpu.o ../../cpu/musashi/m68kopac.o ../../cpu/musashi/m68kopdm.o \
|
||||
../../cpu/musashi/m68kopnz.o ../../cpu/musashi/m68kops.o
|
||||
OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o
|
||||
# mz80
|
||||
DEFINC += -D_USE_MZ80
|
||||
OBJS += ../../cpu/mz80/mz80.o
|
||||
|
|
|
@ -385,6 +385,13 @@ void set_gamma(int g100, int A_SNs_curve)
|
|||
{
|
||||
}
|
||||
|
||||
void set_LCD_custom_rate(int rate)
|
||||
{
|
||||
}
|
||||
|
||||
void unset_LCD_custom_rate(void)
|
||||
{
|
||||
}
|
||||
|
||||
/* squidgehack.c */
|
||||
int mmuhack(void)
|
||||
|
|
|
@ -224,12 +224,22 @@ Symbian:
|
|||
|
||||
Changelog
|
||||
---------
|
||||
1.321
|
||||
1.33
|
||||
* Updated Cyclone core to 0.0088.
|
||||
+ Added A r k's usbjoy fix.
|
||||
+ Added "perfect vsync" option, which adjusts GP2X LCD refresh rate and syncs
|
||||
emulation to it to eliminate tearing and ensure smoothest scrolling possible.
|
||||
+ Added an option to use A_SN's camma curve for gamma correction (improves dark
|
||||
and bright color display for mk2s).
|
||||
* Sometimes stray sounds were played after loading a savestate. Fixed.
|
||||
* Fixed a problem where >6MB mp3s were corrupted in memory (sound glitches in
|
||||
Snatcher).
|
||||
* PD no longer overwrites video player code in memory, video player now can be
|
||||
used after PicoDrive.
|
||||
used after exitting PicoDrive.
|
||||
* Fixed a bug which was causing Sonic 3 code to deadlock in some rare conditions
|
||||
if "accurate timing" was not enabled.
|
||||
* Fixed support for large hacked ROMs like "Ultimate Mortal Kombat Trilogy".
|
||||
Upto 10MB hacked ROMs are supported now.
|
||||
|
||||
1.32
|
||||
+ Added some new scaling options.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue