some pandora tweaks

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@878 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2010-06-02 09:52:27 +00:00
parent f3a57b2d6c
commit 74e1b42b92
10 changed files with 66 additions and 38 deletions

View file

@ -1,6 +1,7 @@
#export CROSS = arm-none-linux-gnueabi-
CROSS ?= $(CROSS_COMPILE)
LIBROOT = /home/notaz/dev/pnd/libroot
PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh
# settings
use_cyclone = 1
@ -18,6 +19,9 @@ asm_cdmemory = 1
#profile = 1
#drc_debug = 3
no_32x = 1
no_sms = 1
-include Makefile.local
ifeq "$(use_musashi)" "1"
@ -87,13 +91,18 @@ tidy:
$(RM) $(OBJS)
readme.txt: ../../tools/textfilter ../base_readme.txt
../../tools/textfilter ../base_readme.txt $@ GP2X
../../tools/textfilter ../base_readme.txt $@ PANDORA
# ----------- release -----------
ifneq ($(findstring rel,$(MAKECMDGOALS)),)
$(error TODO)
ifeq ($(VER),)
$(error need VER)
endif
endif
rel: PicoDrive PicoDrive.run picorestore ../../pico/carthw.cfg readme.txt \
skin PicoDrive.png PicoDrive_p.png PicoDrive.pxml
rm -rf out
mkdir out
cp -r $^ out/
$(PND_MAKE) -p PicoDrive_$(VER).pnd -d out -x PicoDrive.pxml -i PicoDrive.png -c

View file

@ -49,6 +49,7 @@ void pemu_prep_defconfig(void)
g_menubg_ptr = temp_frame;
defaultConfig.EmuOpt |= EOPT_VSYNC;
defaultConfig.s_PicoOpt |= POPT_EN_MCD_GFX|POPT_EN_MCD_PSYNC;
defaultConfig.scaling = SCALE_2x2_3x2;
}
@ -113,9 +114,9 @@ static void draw_cd_leds(void)
static int emuscan_1x1(unsigned int num)
{
DrawLineDest = (unsigned short *)g_screen_ptr + num*800 + 800/2 - 320/2;
//int w = (Pico.video.reg[12]&1) ? 320 : 256;
//DrawLineDest = (unsigned short *)g_screen_ptr + num*w;
DrawLineDest = (unsigned short *)g_screen_ptr +
g_screen_width * g_screen_height / 2 - g_screen_width * 240 / 2 +
num*g_screen_width + g_screen_width/2 - 320/2;
return 0;
}
@ -250,17 +251,24 @@ void plat_update_volume(int has_changed, int is_up)
}
}
void pemu_forced_frame(int opts)
void pemu_forced_frame(int opts, int no_scale)
{
int oldscale = currentConfig.scaling;
int po_old = PicoOpt;
PicoOpt &= ~0x10;
if (no_scale) {
currentConfig.scaling = SCALE_1x1;
emu_video_mode_change(0, 0, 0);
}
PicoOpt &= ~POPT_ALT_RENDERER;
PicoOpt |= opts|POPT_ACC_SPRITES; // acc_sprites
Pico.m.dirtyPal = 1;
PicoFrameDrawOnly();
PicoOpt = po_old;
currentConfig.scaling = oldscale;
}
static void updateSound(int len)
@ -368,14 +376,11 @@ void emu_video_mode_change(int start_line, int line_count, int is_32cols)
void pemu_loop_prep(void)
{
emu_video_mode_change(0, 0, 0);
if (currentConfig.CPUclock != get_cpu_clock()) {
FILE *f = fopen("/proc/pandora/cpu_mhz_max", "w");
if (f != NULL) {
fprintf(f, "%d\n", currentConfig.CPUclock);
fclose(f);
}
char buf[64];
snprintf(buf, sizeof(buf), "sudo /usr/pandora/scripts/op_cpuspeed.sh %d",
currentConfig.CPUclock);
system(buf);
}
pemu_sound_start();
@ -434,7 +439,7 @@ const char *plat_get_credits(void)
"Reesy & FluBBa: DrZ80 core\n"
"MAME devs: YM2612 and SN76496 cores\n"
"Pandora team: Pandora\n"
"Inder: menu bg\n"
"Inder, ketchupgun: graphics\n"
"\n"
"special thanks (for docs, ideas):\n"
" Charles MacDonald, Haze,\n"