\r
# you may or may not need to change this\r
-export CROSS = /opt/cegcc/arm-wince-cegcc/bin/\r
+export CROSS = arm-wince-cegcc-\r
\r
# settings\r
asm_memory = 1\r
ifeq "$(profile)" "2"\r
COPT_COMMON += -fprofile-use\r
endif\r
-COPT = $(COPT_COMMON) -mtune=arm920t\r
+CFLAGS = $(COPT_COMMON) -mcpu=arm920t -mtune=arm920t\r
ASFLAGS = -mcpu=arm920t -mfloat-abi=soft\r
GCC = $(CROSS)gcc\r
STRIP = $(CROSS)strip\r
OBJS += main.o emu.o menu.o giz.o asm_utils.o\r
\r
# common\r
-OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/arm_utils.o \\r
- ../common/readpng.o ../common/mp3_helix.o\r
+OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \\r
+ platform/common/arm_utils.o platform/common/readpng.o platform/common/mp3_helix.o\r
\r
# Pico\r
ifeq "$(amalgamate)" "1"\r
-OBJS += ../../PicoAll.o\r
+OBJS += PicoAll.o\r
else\r
-OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Memory.o ../../Pico/Misc.o \\r
- ../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.o \\r
- ../../Pico/Patch.o\r
+OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o \\r
+ Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o Pico/Patch.o Pico/Debug.o\r
# Pico - CD\r
-OBJS += ../../Pico/cd/Pico.o ../../Pico/cd/Memory.o ../../Pico/cd/Sek.o ../../Pico/cd/LC89510.o \\r
- ../../Pico/cd/cd_sys.o ../../Pico/cd/cd_file.o ../../Pico/cd/gfx_cd.o \\r
- ../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o\r
+OBJS += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \\r
+ Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/gfx_cd.o Pico/cd/cue.o \\r
+ Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o\r
endif\r
+# Pico - Pico\r
+OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o\r
+# Pico - carthw\r
+OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \\r
+ Pico/carthw/svp/ssp16.o Pico/carthw/svp/compiler.o Pico/carthw/svp/stub_arm.o\r
\r
# asm stuff\r
ifeq "$(asm_render)" "1"\r
DEFINC += -D_ASM_DRAW_C\r
-OBJS += ../../Pico/draw_asm.o ../../Pico/draw2_asm.o\r
+OBJS += Pico/draw_asm.o Pico/draw2_asm.o\r
endif\r
ifeq "$(asm_memory)" "1"\r
DEFINC += -D_ASM_MEMORY_C\r
-OBJS += ../../Pico/memory_asm.o\r
+OBJS += Pico/memory_asm.o\r
endif\r
ifeq "$(asm_ym2612)" "1"\r
DEFINC += -D_ASM_YM2612_C\r
-OBJS += ../../Pico/sound/ym2612_asm.o\r
+OBJS += Pico/sound/ym2612_asm.o\r
endif\r
ifeq "$(asm_misc)" "1"\r
DEFINC += -D_ASM_MISC_C\r
-OBJS += ../../Pico/misc_asm.o\r
-OBJS += ../../Pico/cd/misc_asm.o\r
+OBJS += Pico/misc_asm.o\r
+OBJS += Pico/cd/misc_asm.o\r
endif\r
ifeq "$(asm_cdpico)" "1"\r
DEFINC += -D_ASM_CD_PICO_C\r
-OBJS += ../../Pico/cd/pico_asm.o\r
+OBJS += Pico/cd/pico_asm.o\r
endif\r
ifeq "$(asm_cdmemory)" "1"\r
DEFINC += -D_ASM_CD_MEMORY_C\r
-OBJS += ../../Pico/cd/memory_asm.o\r
+OBJS += Pico/cd/memory_asm.o\r
endif\r
\r
# Pico - sound\r
ifneq "$(amalgamate)" "1"\r
-OBJS += ../../Pico/sound/sound.o\r
+OBJS += Pico/sound/sound.o\r
endif\r
-OBJS += ../../Pico/sound/mix_asm.o\r
-OBJS += ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o\r
+OBJS += Pico/sound/mix_asm.o\r
+OBJS += Pico/sound/sn76496.o Pico/sound/ym2612.o\r
# zlib\r
-OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/inftrees.o ../../zlib/trees.o \\r
- ../../zlib/deflate.o ../../zlib/crc32.o ../../zlib/adler32.o ../../zlib/zutil.o ../../zlib/compress.o\r
+OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \\r
+ zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o\r
# unzip\r
-OBJS += ../../unzip/unzip.o ../../unzip/unzip_stream.o\r
+OBJS += unzip/unzip.o unzip/unzip_stream.o\r
# CPU cores\r
# Cyclone\r
DEFINC += -DEMU_C68K\r
-OBJS += ../../cpu/Cyclone/proj/Cyclone.o\r
+OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o\r
# drz80\r
DEFINC += -D_USE_DRZ80\r
-OBJS += ../../cpu/DrZ80/drz80.o\r
+OBJS += cpu/DrZ80/drz80.o\r
\r
+vpath %.c = ../..\r
+vpath %.s = ../..\r
+vpath %.S = ../..\r
+DIRS = platform platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \\r
+ zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80\r
\r
-all: PicoDrive.exe readme.txt\r
\r
-PicoDrive.exe : $(OBJS) ../common/helix/helix_mp3.a\r
+all: mkdirs PicoDrive.exe readme.txt\r
+\r
+PicoDrive.exe : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a\r
@echo ">>>" $@\r
- $(GCC) -o $@ -static $(COPT) $^ -lm -lpng -Lkgsdk/ -lKGSDK -Wl,-Map=PicoDrive.map 2>&1 | \\r
- grep -v ".idata$$4" # | grep -v "supports interworking, whereas"\r
+ $(GCC) -o $@ -static $(CFLAGS) $^ -lm -lpng -Lkgsdk/ -lKGSDK -Wl,-Map=PicoDrive.map \\r
+ 2>&1 | grep -v ".idata$$4" # | grep -v "supports interworking, whereas"\r
ifeq ($(DEBUG),)\r
$(STRIP) $@\r
endif\r
+ifeq "$(profile)" "1"\r
+ ../../tools/gcda $@\r
+endif\r
\r
\r
.c.o:\r
@echo ">>>" $<\r
- $(GCC) $(COPT) $(DEFINC) -c $< -o $@\r
+ $(GCC) $(CFLAGS) $(DEFINC) -c $< -o $@\r
#.s.o:\r
# @echo $<\r
-# $(GCC) $(COPT) $(DEFINC) -c $< -o $@\r
+# $(GCC) $(CFLAGS) $(DEFINC) -c $< -o $@\r
+\r
+mkdirs:\r
+ mkdir -p $(DIRS)\r
\r
-../../Pico/draw_asm.o : ../../Pico/Draw.s\r
+Pico/carthw/svp/compiler.o : ../../Pico/carthw/svp/ssp16.o ../../Pico/carthw/svp/gen_arm.c\r
+\r
+Pico/draw_asm.o : ../../Pico/Draw.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/draw2_asm.o : ../../Pico/Draw2.s\r
+Pico/draw2_asm.o : ../../Pico/Draw2.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/memory_asm.o : ../../Pico/Memory.s\r
+Pico/memory_asm.o : ../../Pico/Memory.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/sound/ym2612_asm.o : ../../Pico/sound/ym2612.s\r
+Pico/sound/ym2612_asm.o : ../../Pico/sound/ym2612.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/sound/mix_asm.o : ../../Pico/sound/mix.s\r
+Pico/sound/mix_asm.o : ../../Pico/sound/mix.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/misc_asm.o : ../../Pico/Misc.s\r
+Pico/misc_asm.o : ../../Pico/Misc.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s\r
+Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s\r
+Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
-../../Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s\r
+Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s\r
@echo ">>>" $@\r
@$(AS) $(ASFLAGS) $< -o $@\r
+Pico/carthw/svp/stub_arm.o : ../../Pico/carthw/svp/stub_arm.S\r
+ @echo ">>>" $@\r
+ $(GCC) $(CFLAGS) $(DEFINC) -c $< -o $@\r
\r
# build Cyclone\r
-../../cpu/Cyclone/proj/Cyclone.s:\r
+cpu/Cyclone/proj/Cyclone.s:\r
@echo building Cyclone...\r
@make -C ../../cpu/Cyclone/proj CONFIG_FILE=config_pico.h\r
\r
+Pico/Pico.o Pico/cd/Pico.o: ../../Pico/PicoFrameHints.c ../../Pico/PicoInt.h\r
+Pico/Memory.o Pico/cd/Memory.o : ../../Pico/MemoryCmn.c ../../Pico/PicoInt.h\r
+\r
# build helix libs\r
-../common/helix/helix_mp3.a:\r
- make -C ../common/helix\r
+../common/helix/$(CROSS)helix-mp3.a:\r
+ make -C ../common/helix clean all\r
\r
readme.txt: ../../tools/textfilter ../base_readme.txt\r
../../tools/textfilter ../base_readme.txt $@ GIZ\r
endif\r
endif\r
\r
-rel: PicoDrive.exe kgsdk/ARMV4IRel/KGSDK.dll readme.txt\r
- zip -9 -j ../../PicoDrive_$(VER).zip $^\r
+rel: PicoDrive.exe kgsdk/ARMV4IRel/KGSDK.dll ../game_def.cfg readme.txt\r
+ zip -9 -j ../../PicoDrive_giz_$(VER).zip $^\r
ln -s ../gp2x/skin skin\r
- zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt\r
+ zip -9 -r ../../PicoDrive_giz_$(VER).zip skin -i \*.png -i \*.txt\r
rm skin\r
\r
#include "../common/emu.h"
#include "../common/lprintf.h"
#include "../common/arm_utils.h"
+#include "../common/config.h"
#include "emu.h"
#include "menu.h"
#include "giz.h"
static void emu_msg_cb(const char *msg)
{
- if (giz_screen != NULL) Framework2D_UnlockBuffer();
- giz_screen = Framework2D_LockBuffer(1);
+ if (giz_screen != NULL) fb_unlock();
+ giz_screen = fb_lock(1);
memset32((int *)((char *)giz_screen + 321*232*2), 0, 321*8*2/4);
emu_textOut16(4, 232, msg);
/* assumption: emu_msg_cb gets called only when something slow is about to happen */
reset_timing = 1;
- Framework2D_UnlockBuffer();
- giz_screen = Framework2D_LockBuffer((currentConfig.EmuOpt&0x8000) ? 0 : 1);
+ fb_unlock();
+ giz_screen = fb_lock((currentConfig.EmuOpt&0x8000) ? 0 : 1);
}
void emu_stateCb(const char *str)
{
- if (giz_screen != NULL) Framework2D_UnlockBuffer();
- giz_screen = Framework2D_LockBuffer(1);
+ if (giz_screen != NULL) fb_unlock();
+ giz_screen = fb_lock(1);
clearArea(0);
blit("", str);
- Framework2D_UnlockBuffer();
+ fb_unlock();
giz_screen = NULL;
Sleep(0); /* yield the CPU, the system may need it */
PicoExit();
}
-void emu_setDefaultConfig(void)
+void emu_prepareDefaultConfig(void)
{
- memset(¤tConfig, 0, sizeof(currentConfig));
- currentConfig.lastRomFile[0] = 0;
- currentConfig.EmuOpt = 0x1f | 0x680; // | confirm_save, cd_leds, 16bit rend
- currentConfig.PicoOpt = 0x07 | 0xc00; // | cd_pcm, cd_cdda
- currentConfig.PsndRate = 22050;
- currentConfig.PicoRegion = 0; // auto
- currentConfig.PicoAutoRgnOrder = 0x184; // US, EU, JP
- currentConfig.Frameskip = -1; // auto
- currentConfig.volume = 50;
- currentConfig.KeyBinds[ 2] = 1<<0; // SACB RLDU
- currentConfig.KeyBinds[ 3] = 1<<1;
- currentConfig.KeyBinds[ 0] = 1<<2;
- currentConfig.KeyBinds[ 1] = 1<<3;
- currentConfig.KeyBinds[ 5] = 1<<4;
- currentConfig.KeyBinds[ 6] = 1<<5;
- currentConfig.KeyBinds[ 7] = 1<<6;
- currentConfig.KeyBinds[ 4] = 1<<7;
- currentConfig.KeyBinds[13] = 1<<26; // switch rend
- currentConfig.KeyBinds[ 8] = 1<<27; // save state
- currentConfig.KeyBinds[ 9] = 1<<28; // load state
- currentConfig.KeyBinds[12] = 1<<29; // vol up
- currentConfig.KeyBinds[11] = 1<<30; // vol down
- currentConfig.PicoCDBuffers = 0;
- currentConfig.scaling = 0;
+ memset(&defaultConfig, 0, sizeof(defaultConfig));
+ defaultConfig.EmuOpt = 0x1d | 0x680; // | confirm_save, cd_leds, 16bit rend
+ defaultConfig.s_PicoOpt = 0x0f | POPT_EN_MCD_PCM|POPT_EN_MCD_CDDA|POPT_EN_SVP_DRC|POPT_ACC_SPRITES;
+ defaultConfig.s_PsndRate = 22050;
+ defaultConfig.s_PicoRegion = 0; // auto
+ defaultConfig.s_PicoAutoRgnOrder = 0x184; // US, EU, JP
+ defaultConfig.s_PicoCDBuffers = 0;
+ defaultConfig.Frameskip = -1; // auto
+ defaultConfig.volume = 50;
+ defaultConfig.KeyBinds[ 2] = 1<<0; // SACB RLDU
+ defaultConfig.KeyBinds[ 3] = 1<<1;
+ defaultConfig.KeyBinds[ 0] = 1<<2;
+ defaultConfig.KeyBinds[ 1] = 1<<3;
+ defaultConfig.KeyBinds[ 5] = 1<<4;
+ defaultConfig.KeyBinds[ 6] = 1<<5;
+ defaultConfig.KeyBinds[ 7] = 1<<6;
+ defaultConfig.KeyBinds[ 4] = 1<<7;
+ defaultConfig.KeyBinds[13] = 1<<26; // switch rend
+ defaultConfig.KeyBinds[ 8] = 1<<27; // save state
+ defaultConfig.KeyBinds[ 9] = 1<<28; // load state
+ defaultConfig.KeyBinds[12] = 1<<29; // vol up
+ defaultConfig.KeyBinds[11] = 1<<30; // vol down
+ defaultConfig.scaling = 0;
defaultConfig.turbo_rate = 15;
}
+void emu_setDefaultConfig(void)
+{
+ memcpy(¤tConfig, &defaultConfig, sizeof(currentConfig));
+ PicoOpt = currentConfig.s_PicoOpt;
+ PsndRate = currentConfig.s_PsndRate;
+ PicoRegionOverride = currentConfig.s_PicoRegion;
+ PicoAutoRgnOrder = currentConfig.s_PicoAutoRgnOrder;
+ PicoCDBuffers = currentConfig.s_PicoCDBuffers;
+}
+
static int EmuScanBegin16(unsigned int num)
{
Pico.m.dirtyPal = 0;
vidConvCpyRGB565(localPal, Pico.cram, 0x40);
}
+ // a hack for VR
+ if (PicoRead16Hook == PicoSVPRead16)
+ memset32((int *)(PicoDraw2FB+328*8+328*223), 0xe0e0e0e0, 328);
if (!(Pico.video.reg[12]&1)) lines_flags|=0x10000;
if (currentConfig.EmuOpt&0x4000)
lines_flags|=0x40000; // (Pico.m.frame_count&1)?0x20000:0x40000;
if (Pico.video.reg[0xC]&8) { // shadow/hilight mode
//vidConvCpyRGB32sh(localPal+0x40, Pico.cram, 0x40);
//vidConvCpyRGB32hi(localPal+0x80, Pico.cram, 0x40); // TODO?
- blockcpy(localPal+0xc0, localPal+0x40, 0x40*2);
+ memcpy32((void *)(localPal+0xc0), (void *)(localPal+0x40), 0x40*2/4);
localPal[0xc0] = 0x0600;
localPal[0xd0] = 0xc000;
localPal[0xe0] = 0x0000; // reserved pixels for OSD
static void clearArea(int full)
{
if (giz_screen == NULL)
- giz_screen = Framework2D_LockBuffer(1);
+ giz_screen = fb_lock(1);
if (full) memset32(giz_screen, 0, 320*240*2/4);
else memset32((int *)((char *)giz_screen + 321*232*2), 0, 321*8*2/4);
if (currentConfig.EmuOpt&0x8000) {
- Framework2D_UnlockBuffer();
- giz_screen = Framework2D_LockBuffer(0);
+ fb_unlock();
+ giz_screen = fb_lock(0);
if (full) memset32(giz_screen, 0, 320*240*2/4);
else memset32((int *)((char *)giz_screen + 321*232*2), 0, 321*8*2/4);
}
static void vidResetMode(void)
{
- giz_screen = Framework2D_LockBuffer(1);
+ giz_screen = fb_lock(1);
if (PicoOpt&0x10) {
} else if (currentConfig.EmuOpt&0x80) {
memset32(giz_screen, 0, 321*240*2/4);
if (currentConfig.EmuOpt&0x8000) {
- Framework2D_UnlockBuffer();
- giz_screen = Framework2D_LockBuffer(0);
+ fb_unlock();
+ giz_screen = fb_lock(0);
memset32(giz_screen, 0, 321*240*2/4);
}
- Framework2D_UnlockBuffer();
+ fb_unlock();
giz_screen = NULL;
}
currentConfig.EmuOpt |= 0x80;
if (giz_screen == NULL)
- giz_screen = Framework2D_LockBuffer(1);
+ giz_screen = fb_lock(1);
PicoDrawSetColorFormat(1);
PicoScanBegin = EmuScanBegin16;
Pico.m.dirtyPal = 1;
PicoFrameDrawOnly();
- Framework2D_UnlockBuffer();
+ fb_unlock();
giz_screen = NULL;
PicoOpt = po_old;
if (PsndOut != NULL)
FrameworkAudio_SetPause(1);
if (giz_screen == NULL)
- giz_screen = Framework2D_LockBuffer(1);
+ giz_screen = fb_lock(1);
if ( emu_checkSaveFile(state_slot) &&
(( (which & 0x1000) && (currentConfig.EmuOpt & 0x800)) || // load
(!(which & 0x1000) && (currentConfig.EmuOpt & 0x200))) ) // save
prevEvents = (allActions[0] | allActions[1]) >> 16;
}
+void emu_platformDebugCat(char *str)
+{
+ // nothing
+}
static void simpleWait(DWORD until)
{
if (currentConfig.EmuOpt&0x80)
/* be sure correct framebuffer is locked */
- giz_screen = Framework2D_LockBuffer((currentConfig.EmuOpt&0x8000) ? 0 : 1);
+ giz_screen = fb_lock((currentConfig.EmuOpt&0x8000) ? 0 : 1);
PicoFrame();
if (giz_screen == NULL)
- giz_screen = Framework2D_LockBuffer((currentConfig.EmuOpt&0x8000) ? 0 : 1);
+ giz_screen = fb_lock((currentConfig.EmuOpt&0x8000) ? 0 : 1);
blit(fpsbuff, notice);
if (giz_screen != NULL) {
- Framework2D_UnlockBuffer();
+ fb_unlock();
giz_screen = NULL;
}
Framework2D_WaitVSync();
if (currentConfig.EmuOpt&0x8000)
- Framework2D_Flip();
+ fb_flip();
// check time
tval = GetTickCount();
#include <dirent.h> // for opendir\r
#include <windows.h>\r
\r
+#include "kgsdk/Framework.h"\r
+#include "kgsdk/Framework2D.h"\r
+\r
#include "giz.h"\r
#include "emu.h"\r
#include "menu.h"\r
#include "../common/emu.h"\r
#include "../common/readpng.h"\r
#include "version.h"\r
-#include "kgsdk/Framework.h"\r
-#include "kgsdk/Framework2D.h"\r
\r
#include <Pico/PicoInt.h>\r
#include <Pico/Patch.h>\r
\r
\r
#define gizKeyUnkn "???"\r
-static const char * const gizKeyNames[] = {\r
+const char * const keyNames[] = {\r
"LEFT", "RIGHT", "UP", "DOWN", "STOP", "PLAY", "FORWARD", "REWIND",\r
"L", "R", "HOME", "VOLUME", "BRIGHTNESS", "ALARM", "POWER", gizKeyUnkn,\r
gizKeyUnkn, gizKeyUnkn, gizKeyUnkn, gizKeyUnkn, gizKeyUnkn, gizKeyUnkn, gizKeyUnkn, gizKeyUnkn,\r
static unsigned char *bg_buffer = gfx_buffer + 321*240*2;\r
unsigned char *menu_screen = gfx_buffer; /* draw here and blit later, to avoid flicker */\r
\r
-static void menu_darken_bg(void *dst, const void *src, int pixels, int darker);\r
+void menu_darken_bg(void *dst, const void *src, int pixels, int darker);\r
static void menu_prepare_bg(int use_game_bg);\r
\r
static unsigned int inp_prev = 0;\r
\r
-static unsigned long wait_for_input(unsigned int interesting)\r
+unsigned long wait_for_input(unsigned int interesting)\r
{\r
unsigned long ret;\r
static int repeats = 0, wait = 20;\r
}\r
\r
\r
-static void menu_draw_begin(int use_bgbuff)\r
+void menu_draw_begin(int use_bgbuff)\r
{\r
if (use_bgbuff)\r
memcpy32((int *)menu_screen, (int *)bg_buffer, 321*240*2/4);\r
}\r
\r
\r
-static void menu_draw_end(void)\r
+void menu_draw_end(void)\r
{\r
- giz_screen = Framework2D_LockBuffer(0);\r
+ giz_screen = fb_lock(0);\r
if (giz_screen == NULL)\r
{\r
- lprintf_al("%s: Framework2D_LockBuffer() returned NULL\n", __FUNCTION__);\r
+ lprintf("%s: Framework2D_LockBuffer() returned NULL\n", __FUNCTION__);\r
return;\r
}\r
memcpy32(giz_screen, (int *)menu_screen, 321*240*2/4);\r
- Framework2D_UnlockBuffer();\r
+ fb_unlock();\r
giz_screen = NULL;\r
- Framework2D_Flip(1);\r
+ fb_flip();\r
}\r
\r
\r
BOOL bRet;\r
\r
wdir = malloc(sizeof(wdir[0]) * MAX_PATH);\r
- if (wdir == NULL) { lprintf_al("%s:%i: OOM\n", __FILE__, __LINE__); goto fail; }\r
+ if (wdir == NULL) { lprintf("%s:%i: OOM\n", __FILE__, __LINE__); goto fail; }\r
\r
namelist = malloc(sizeof(*namelist) * name_alloc);\r
- if (namelist == NULL) { lprintf_al("%s:%i: OOM\n", __FILE__, __LINE__); goto fail; }\r
+ if (namelist == NULL) { lprintf("%s:%i: OOM\n", __FILE__, __LINE__); goto fail; }\r
\r
// try to read first..\r
len = cstr2wstr(wdir, dir);\r
void *tmp;\r
name_alloc *= 2;\r
tmp = realloc(namelist, sizeof(*namelist) * name_alloc);\r
- if (tmp == NULL) { lprintf_al("%s:%i: OOM\n", __FILE__, __LINE__); goto fail; }\r
+ if (tmp == NULL) { lprintf("%s:%i: OOM\n", __FILE__, __LINE__); goto fail; }\r
namelist = tmp;\r
}\r
\r
if (currentConfig.KeyBinds[i] & action_mask)\r
{\r
if (player_idx >= 0 && ((currentConfig.KeyBinds[i] >> 16) & 3) != player_idx) continue;\r
- if (strkeys[0]) { strcat(strkeys, " + "); strcat(strkeys, gizKeyNames[i]); break; }\r
- else strcpy(strkeys, gizKeyNames[i]);\r
+ if (strkeys[0]) { strcat(strkeys, " + "); strcat(strkeys, keyNames[i]); break; }\r
+ else strcpy(strkeys, keyNames[i]);\r
}\r
}\r
\r
if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }\r
if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }\r
if (inp & BTN_PLAY) {\r
- int is_6button = currentConfig.PicoOpt & 0x020;\r
+ int is_6button = PicoOpt & 0x020;\r
switch (selected_id) {\r
case MA_CTRL_PLAYER1: key_config_loop(me_ctrl_actions, is_6button ? 15 : 11, 0); return;\r
case MA_CTRL_PLAYER2: key_config_loop(me_ctrl_actions, is_6button ? 15 : 11, 1); return;\r
\r
menu_entry cdopt_entries[] =\r
{\r
- { NULL, MB_NONE, MA_CDOPT_TESTBIOS_USA, NULL, 0, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_CDOPT_TESTBIOS_EUR, NULL, 0, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_CDOPT_TESTBIOS_JAP, NULL, 0, 0, 0, 1 },\r
- { "CD LEDs", MB_ONOFF, MA_CDOPT_LEDS, ¤tConfig.EmuOpt, 0x0400, 0, 0, 1 },\r
- { "CDDA audio (using mp3s)", MB_ONOFF, MA_CDOPT_CDDA, ¤tConfig.PicoOpt, 0x0800, 0, 0, 1 },\r
- { "PCM audio", MB_ONOFF, MA_CDOPT_PCM, ¤tConfig.PicoOpt, 0x0400, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_CDOPT_READAHEAD, NULL, 0, 0, 0, 1 },\r
- { "SaveRAM cart", MB_ONOFF, MA_CDOPT_SAVERAM, ¤tConfig.PicoOpt, 0x8000, 0, 0, 1 },\r
- { "Scale/Rot. fx (slow)", MB_ONOFF, MA_CDOPT_SCALEROT_CHIP,¤tConfig.PicoOpt, 0x1000, 0, 0, 1 },\r
- { "Better sync (slow)", MB_ONOFF, MA_CDOPT_BETTER_SYNC, ¤tConfig.PicoOpt, 0x2000, 0, 0, 1 },\r
- { "done", MB_NONE, MA_CDOPT_DONE, NULL, 0, 0, 0, 1 },\r
+ { NULL, MB_NONE, MA_CDOPT_TESTBIOS_USA, NULL, 0, 0, 0, 1, 0 },\r
+ { NULL, MB_NONE, MA_CDOPT_TESTBIOS_EUR, NULL, 0, 0, 0, 1, 0 },\r
+ { NULL, MB_NONE, MA_CDOPT_TESTBIOS_JAP, NULL, 0, 0, 0, 1, 0 },\r
+ { "CD LEDs", MB_ONOFF, MA_CDOPT_LEDS, ¤tConfig.EmuOpt, 0x0400, 0, 0, 1, 1 },\r
+ { "CDDA audio (using mp3s)", MB_ONOFF, MA_CDOPT_CDDA, &PicoOpt, 0x0800, 0, 0, 1, 1 },\r
+ { "PCM audio", MB_ONOFF, MA_CDOPT_PCM, &PicoOpt, 0x0400, 0, 0, 1, 1 },\r
+ { NULL, MB_NONE, MA_CDOPT_READAHEAD, NULL, 0, 0, 0, 1, 1 },\r
+ { "SaveRAM cart", MB_ONOFF, MA_CDOPT_SAVERAM, &PicoOpt, 0x8000, 0, 0, 1, 1 },\r
+ { "Scale/Rot. fx (slow)", MB_ONOFF, MA_CDOPT_SCALEROT_CHIP,&PicoOpt, 0x1000, 0, 0, 1, 1 },\r
+ { "Better sync (slow)", MB_ONOFF, MA_CDOPT_BETTER_SYNC, &PicoOpt, 0x2000, 0, 0, 1, 1 },\r
+ { "done", MB_NONE, MA_CDOPT_DONE, NULL, 0, 0, 0, 1, 0 },\r
};\r
\r
#define CDOPT_ENTRY_COUNT (sizeof(cdopt_entries) / sizeof(cdopt_entries[0]))\r
+const int cdopt_entry_count = CDOPT_ENTRY_COUNT;\r
\r
\r
struct bios_names_t\r
char *bios, *p;\r
\r
if (emu_findBios(4, &bios)) { // US\r
- for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--); p++;\r
+ for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--);\r
+ if (*p == '/') p++;\r
strncpy(bios_names.us, p, sizeof(bios_names.us)); bios_names.us[sizeof(bios_names.us)-1] = 0;\r
} else strcpy(bios_names.us, "NOT FOUND");\r
\r
if (emu_findBios(8, &bios)) { // EU\r
- for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--); p++;\r
+ for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--);\r
+ if (*p == '/') p++;\r
strncpy(bios_names.eu, p, sizeof(bios_names.eu)); bios_names.eu[sizeof(bios_names.eu)-1] = 0;\r
} else strcpy(bios_names.eu, "NOT FOUND");\r
\r
if (emu_findBios(1, &bios)) { // JP\r
- for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--); p++;\r
+ for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--);\r
+ if (*p == '/') p++;\r
strncpy(bios_names.jp, p, sizeof(bios_names.jp)); bios_names.jp[sizeof(bios_names.jp)-1] = 0;\r
} else strcpy(bios_names.jp, "NOT FOUND");\r
\r
menu_entry opt2_entries[] =\r
{\r
{ "Disable sprite limit", MB_ONOFF, MA_OPT2_NO_SPRITE_LIM, &PicoOpt, 0x40000, 0, 0, 1, 1 },\r
- { "Emulate Z80", MB_ONOFF, MA_OPT2_ENABLE_Z80, ¤tConfig.PicoOpt,0x0004, 0, 0, 1 },\r
- { "Emulate YM2612 (FM)", MB_ONOFF, MA_OPT2_ENABLE_YM2612, ¤tConfig.PicoOpt,0x0001, 0, 0, 1 },\r
- { "Emulate SN76496 (PSG)", MB_ONOFF, MA_OPT2_ENABLE_SN76496,¤tConfig.PicoOpt,0x0002, 0, 0, 1 },\r
- { "Double buffering", MB_ONOFF, MA_OPT2_DBLBUFF, ¤tConfig.EmuOpt, 0x8000, 0, 0, 1 },\r
- { "Wait for V-sync (slow)", MB_ONOFF, MA_OPT2_VSYNC, ¤tConfig.EmuOpt, 0x2000, 0, 0, 1 },\r
- { "gzip savestates", MB_ONOFF, MA_OPT2_GZIP_STATES, ¤tConfig.EmuOpt, 0x0008, 0, 0, 1 },\r
- { "Don't save last used ROM", MB_ONOFF, MA_OPT2_NO_LAST_ROM, ¤tConfig.EmuOpt, 0x0020, 0, 0, 1 },\r
- { "done", MB_NONE, MA_OPT2_DONE, NULL, 0, 0, 0, 1 },\r
+ { "Emulate Z80", MB_ONOFF, MA_OPT2_ENABLE_Z80, &PicoOpt, 0x00004, 0, 0, 1, 1 },\r
+ { "Emulate YM2612 (FM)", MB_ONOFF, MA_OPT2_ENABLE_YM2612, &PicoOpt, 0x00001, 0, 0, 1, 1 },\r
+ { "Emulate SN76496 (PSG)", MB_ONOFF, MA_OPT2_ENABLE_SN76496,&PicoOpt, 0x00002, 0, 0, 1, 1 },\r
+ { "Double buffering", MB_ONOFF, MA_OPT2_DBLBUFF, ¤tConfig.EmuOpt, 0x8000, 0, 0, 1, 1 },\r
+ { "Wait for V-sync (slow)", MB_ONOFF, MA_OPT2_VSYNC, ¤tConfig.EmuOpt, 0x2000, 0, 0, 1, 1 },\r
+ { "gzip savestates", MB_ONOFF, MA_OPT2_GZIP_STATES, ¤tConfig.EmuOpt, 0x0008, 0, 0, 1, 1 },\r
+ { "Don't save last used ROM", MB_ONOFF, MA_OPT2_NO_LAST_ROM, ¤tConfig.EmuOpt, 0x0020, 0, 0, 1, 1 },\r
+ { "SVP dynarec", MB_ONOFF, MA_OPT2_SVP_DYNAREC, &PicoOpt, 0x20000, 0, 0, 1, 1 },\r
+ { "Disable idle loop patching",MB_ONOFF, MA_OPT2_NO_IDLE_LOOPS, &PicoOpt, 0x80000, 0, 0, 1, 1 },\r
+ { "done", MB_NONE, MA_OPT2_DONE, NULL, 0, 0, 0, 1, 0 },\r
};\r
\r
#define OPT2_ENTRY_COUNT (sizeof(opt2_entries) / sizeof(opt2_entries[0]))\r
+const int opt2_entry_count = OPT2_ENTRY_COUNT;\r
\r
\r
static void draw_amenu_options(int menu_sel)\r
\r
menu_entry opt_entries[] =\r
{\r
- { NULL, MB_NONE, MA_OPT_RENDERER, NULL, 0, 0, 0, 1 },\r
+ { NULL, MB_NONE, MA_OPT_RENDERER, NULL, 0, 0, 0, 1, 1 },\r
{ "Accurate sprites", MB_ONOFF, MA_OPT_ACC_SPRITES, &PicoOpt, 0x080, 0, 0, 0, 1 },\r
- { "Scanline mode (faster)", MB_ONOFF, MA_OPT_INTERLACED, ¤tConfig.EmuOpt, 0x4000, 0, 0, 1 },\r
- { "Scale low res mode", MB_ONOFF, MA_OPT_SCALING, ¤tConfig.scaling, 0x0001, 0, 3, 1 },\r
- { "Show FPS", MB_ONOFF, MA_OPT_SHOW_FPS, ¤tConfig.EmuOpt, 0x0002, 0, 0, 1 },\r
- { NULL, MB_RANGE, MA_OPT_FRAMESKIP, ¤tConfig.Frameskip, 0, -1, 16, 1 },\r
- { "Enable sound", MB_ONOFF, MA_OPT_ENABLE_SOUND, ¤tConfig.EmuOpt, 0x0004, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_OPT_SOUND_QUALITY, NULL, 0, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_OPT_REGION, NULL, 0, 0, 0, 1 },\r
- { "Use SRAM/BRAM savestates", MB_ONOFF, MA_OPT_SRAM_STATES, ¤tConfig.EmuOpt, 0x0001, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_OPT_CONFIRM_STATES,NULL, 0, 0, 0, 1 },\r
- { "Save slot", MB_RANGE, MA_OPT_SAVE_SLOT, &state_slot, 0, 0, 9, 1 },\r
- { "[Sega/Mega CD options]", MB_NONE, MA_OPT_SCD_OPTS, NULL, 0, 0, 0, 1 },\r
- { "[advanced options]", MB_NONE, MA_OPT_ADV_OPTS, NULL, 0, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_OPT_SAVECFG, NULL, 0, 0, 0, 1 },\r
- { "Save cfg for current game only",MB_NONE,MA_OPT_SAVECFG_GAME,NULL, 0, 0, 0, 1 },\r
- { NULL, MB_NONE, MA_OPT_LOADCFG, NULL, 0, 0, 0, 1 },\r
+ { "Scanline mode (faster)", MB_ONOFF, MA_OPT_INTERLACED, ¤tConfig.EmuOpt, 0x4000, 0, 0, 1, 1 },\r
+ { "Scale low res mode", MB_ONOFF, MA_OPT_SCALING, ¤tConfig.scaling, 0x0001, 0, 3, 1, 1 },\r
+ { "Show FPS", MB_ONOFF, MA_OPT_SHOW_FPS, ¤tConfig.EmuOpt, 0x0002, 0, 0, 1, 1 },\r
+ { NULL, MB_RANGE, MA_OPT_FRAMESKIP, ¤tConfig.Frameskip, 0, -1, 16, 1, 1 },\r
+ { "Enable sound", MB_ONOFF, MA_OPT_ENABLE_SOUND, ¤tConfig.EmuOpt, 0x0004, 0, 0, 1, 1 },\r
+ { NULL, MB_NONE, MA_OPT_SOUND_QUALITY, NULL, 0, 0, 0, 1, 1 },\r
+ { NULL, MB_NONE, MA_OPT_REGION, NULL, 0, 0, 0, 1, 1 },\r
+ { "Use SRAM/BRAM savestates", MB_ONOFF, MA_OPT_SRAM_STATES, ¤tConfig.EmuOpt, 0x0001, 0, 0, 1, 1 },\r
+ { NULL, MB_NONE, MA_OPT_CONFIRM_STATES,NULL, 0, 0, 0, 1, 1 },\r
+ { "Save slot", MB_RANGE, MA_OPT_SAVE_SLOT, &state_slot, 0, 0, 9, 1, 1 },\r
+ { "[Sega/Mega CD options]", MB_NONE, MA_OPT_SCD_OPTS, NULL, 0, 0, 0, 1, 0 },\r
+ { "[advanced options]", MB_NONE, MA_OPT_ADV_OPTS, NULL, 0, 0, 0, 1, 0 },\r
+ { NULL, MB_NONE, MA_OPT_SAVECFG, NULL, 0, 0, 0, 1, 0 },\r
+ { "Save cfg for current game only",MB_NONE,MA_OPT_SAVECFG_GAME,NULL, 0, 0, 0, 1, 0 },\r
+ { NULL, MB_NONE, MA_OPT_LOADCFG, NULL, 0, 0, 0, 1, 0 },\r
};\r
\r
#define OPT_ENTRY_COUNT (sizeof(opt_entries) / sizeof(opt_entries[0]))\r
+const int opt_entry_count = OPT_ENTRY_COUNT;\r
\r
\r
static void menu_opt_cust_draw(const menu_entry *entry, int x, int y, void *param)\r
switch (entry->id)\r
{\r
case MA_OPT_RENDERER:\r
- if (currentConfig.PicoOpt&0x10)\r
+ if (PicoOpt&0x10)\r
str = " 8bit fast";\r
else if (currentConfig.EmuOpt&0x80)\r
str = "16bit accurate";\r
text_out16(x, y, "Frameskip %s", str24);\r
break;\r
case MA_OPT_SOUND_QUALITY:\r
- str = (currentConfig.PicoOpt&0x08)?"stereo":"mono";\r
- text_out16(x, y, "Sound Quality: %5iHz %s", currentConfig.PsndRate, str);\r
+ str = (PicoOpt&0x08)?"stereo":"mono";\r
+ text_out16(x, y, "Sound Quality: %5iHz %s", PsndRate, str);\r
break;\r
case MA_OPT_REGION:\r
text_out16(x, y, "Region: %s", me_region_name(PicoRegionOverride, PicoAutoRgnOrder));\r
\r
static void menu_options_save(void)\r
{\r
- PicoOpt = currentConfig.PicoOpt;\r
- PsndRate = currentConfig.PsndRate;\r
if (PicoRegionOverride) {\r
// force setting possibly changed..\r
Pico.m.pal = (PicoRegionOverride == 2 || PicoRegionOverride == 8) ? 1 : 0;\r
unsigned long inp = 0;\r
menu_id selected_id;\r
\r
- currentConfig.PicoOpt = PicoOpt;\r
- currentConfig.PsndRate = PsndRate;\r
-\r
me_enable(opt_entries, OPT_ENTRY_COUNT, MA_OPT_SAVECFG_GAME, rom_loaded);\r
me_enable(opt_entries, OPT_ENTRY_COUNT, MA_OPT_LOADCFG, config_slot != config_slot_current);\r
menu_sel_max = me_count_enabled(opt_entries, OPT_ENTRY_COUNT) - 1;\r
switch (selected_id) {\r
case MA_OPT_RENDERER:\r
if (inp & BTN_LEFT) {\r
- if ((currentConfig.PicoOpt&0x10) || !(currentConfig.EmuOpt &0x80)) {\r
- currentConfig.PicoOpt&= ~0x10;\r
+ if ((PicoOpt&0x10) || !(currentConfig.EmuOpt &0x80)) {\r
+ PicoOpt&= ~0x10;\r
currentConfig.EmuOpt |= 0x80;\r
}\r
} else {\r
- if (!(currentConfig.PicoOpt&0x10) || (currentConfig.EmuOpt &0x80)) {\r
- currentConfig.PicoOpt|= 0x10;\r
+ if (!(PicoOpt&0x10) || (currentConfig.EmuOpt &0x80)) {\r
+ PicoOpt|= 0x10;\r
currentConfig.EmuOpt &= ~0x80;\r
}\r
}\r
break;\r
case MA_OPT_SOUND_QUALITY:\r
- if ((inp & BTN_RIGHT) && currentConfig.PsndRate == 44100 &&\r
- !(currentConfig.PicoOpt&0x08))\r
+ if ((inp & BTN_RIGHT) && PsndRate == 44100 &&\r
+ !(PicoOpt&0x08))\r
{\r
- currentConfig.PsndRate = 11025;\r
- currentConfig.PicoOpt |= 8;\r
- } else if ((inp & BTN_LEFT) && currentConfig.PsndRate == 11025 &&\r
- (currentConfig.PicoOpt&0x08) && !(PicoAHW&1))\r
+ PsndRate = 11025;\r
+ PicoOpt |= 8;\r
+ } else if ((inp & BTN_LEFT) && PsndRate == 11025 &&\r
+ (PicoOpt&0x08) && !(PicoAHW&1))\r
{\r
- currentConfig.PsndRate = 44100;\r
- currentConfig.PicoOpt &= ~8;\r
+ PsndRate = 44100;\r
+ PicoOpt &= ~8;\r
} else\r
- currentConfig.PsndRate = sndrate_prevnext(currentConfig.PsndRate, inp & BTN_RIGHT);\r
+ PsndRate = sndrate_prevnext(PsndRate, inp & BTN_RIGHT);\r
break;\r
case MA_OPT_REGION:\r
region_prevnext(inp & BTN_RIGHT);\r
\r
menu_entry main_entries[] =\r
{\r
- { "Resume game", MB_NONE, MA_MAIN_RESUME_GAME, NULL, 0, 0, 0, 0 },\r
- { "Save State", MB_NONE, MA_MAIN_SAVE_STATE, NULL, 0, 0, 0, 0 },\r
- { "Load State", MB_NONE, MA_MAIN_LOAD_STATE, NULL, 0, 0, 0, 0 },\r
- { "Reset game", MB_NONE, MA_MAIN_RESET_GAME, NULL, 0, 0, 0, 0 },\r
- { "Load new ROM/ISO", MB_NONE, MA_MAIN_LOAD_ROM, NULL, 0, 0, 0, 1 },\r
- { "Change options", MB_NONE, MA_MAIN_OPTIONS, NULL, 0, 0, 0, 1 },\r
- { "Configure controls", MB_NONE, MA_MAIN_CONTROLS, NULL, 0, 0, 0, 1 },\r
- { "Credits", MB_NONE, MA_MAIN_CREDITS, NULL, 0, 0, 0, 1 },\r
- { "Patches / GameGenie",MB_NONE, MA_MAIN_PATCHES, NULL, 0, 0, 0, 0 },\r
- { "Exit", MB_NONE, MA_MAIN_EXIT, NULL, 0, 0, 0, 1 }\r
+ { "Resume game", MB_NONE, MA_MAIN_RESUME_GAME, NULL, 0, 0, 0, 0, 0 },\r
+ { "Save State", MB_NONE, MA_MAIN_SAVE_STATE, NULL, 0, 0, 0, 0, 0 },\r
+ { "Load State", MB_NONE, MA_MAIN_LOAD_STATE, NULL, 0, 0, 0, 0, 0 },\r
+ { "Reset game", MB_NONE, MA_MAIN_RESET_GAME, NULL, 0, 0, 0, 0, 0 },\r
+ { "Load new ROM/ISO", MB_NONE, MA_MAIN_LOAD_ROM, NULL, 0, 0, 0, 1, 0 },\r
+ { "Change options", MB_NONE, MA_MAIN_OPTIONS, NULL, 0, 0, 0, 1, 0 },\r
+ { "Configure controls", MB_NONE, MA_MAIN_CONTROLS, NULL, 0, 0, 0, 1, 0 },\r
+ { "Credits", MB_NONE, MA_MAIN_CREDITS, NULL, 0, 0, 0, 1, 0 },\r
+ { "Patches / GameGenie",MB_NONE, MA_MAIN_PATCHES, NULL, 0, 0, 0, 0, 0 },\r
+ { "Exit", MB_NONE, MA_MAIN_EXIT, NULL, 0, 0, 0, 1, 0 }\r
};\r
\r
#define MAIN_ENTRY_COUNT (sizeof(main_entries) / sizeof(main_entries[0]))\r
{\r
char curr_path[MAX_PATH], *selfname;\r
FILE *tstf;\r
- if ( (tstf = fopen(currentConfig.lastRomFile, "rb")) )\r
+ if ( (tstf = fopen(lastRomFile, "rb")) )\r
{\r
fclose(tstf);\r
- strcpy(curr_path, currentConfig.lastRomFile);\r
+ strcpy(curr_path, lastRomFile);\r
}\r
else\r
getcwd(curr_path, MAX_PATH);\r
}\r
\r
// warning: alignment\r
-static void menu_darken_bg(void *dst, const void *src, int pixels, int darker)\r
+void menu_darken_bg(void *dst, const void *src, int pixels, int darker)\r
{\r
unsigned int *dest = dst;\r
const unsigned int *srce = src;\r
{\r
// darken the active framebuffer\r
if (giz_screen == NULL)\r
- giz_screen = Framework2D_LockBuffer(1);\r
+ giz_screen = fb_lock(1);\r
memset(bg_buffer, 0, 321*8*2);\r
menu_darken_bg(bg_buffer + 321*8*2, (char *)giz_screen + 321*8*2, 321*224, 1);\r
memset(bg_buffer + 321*232*2, 0, 321*8*2);\r
- Framework2D_UnlockBuffer();\r
+ fb_unlock();\r
giz_screen = NULL;\r
}\r
else\r
\r
menu_gfx_prepare();\r
\r
- if ( (tstf = fopen(currentConfig.lastRomFile, "rb")) )\r
+ if ( (tstf = fopen(lastRomFile, "rb")) )\r
{\r
fclose(tstf);\r
- strcpy(curr_path, currentConfig.lastRomFile);\r
+ strcpy(curr_path, lastRomFile);\r
}\r
else\r
{\r