From 38163dd7df6fc61794d7bb420737a68455c4637c Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 21 May 2011 18:18:27 +0000 Subject: [PATCH] minor adjustmens more uncommited 1.80 code.. git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@928 be3aeb3a-fb24-0410-a615-afba39da0efa --- common/emu.c | 1 + gp2x/Makefile | 27 ++++++++++++++------------- gp2x/emu.c | 4 +++- gp2x/soc_pollux.c | 2 +- pandora/Makefile | 2 +- pandora/picorestore.c | 28 ++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 16 deletions(-) diff --git a/common/emu.c b/common/emu.c index 1e60925..235861b 100644 --- a/common/emu.c +++ b/common/emu.c @@ -1357,6 +1357,7 @@ void emu_cmn_forced_frame(int no_scale, int do_emu) memset32(g_screen_ptr, 0, g_screen_width * g_screen_height * 2 / 4); + PicoOpt &= ~POPT_ALT_RENDERER; PicoOpt |= POPT_ACC_SPRITES; if (!no_scale) PicoOpt |= POPT_EN_SOFTSCALE; diff --git a/gp2x/Makefile b/gp2x/Makefile index 2e5a104..62bbc9b 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -106,21 +106,22 @@ readme.txt: ../../tools/textfilter ../base_readme.txt ../../tools/textfilter ../base_readme.txt $@ GP2X # ----------- release ----------- -ifneq ($(findstring rel,$(MAKECMDGOALS)),) -ifeq ($(VER),) -$(error need VER) -endif -endif +VER ?= $(shell head -n 1 version.h | sed 's/.*"\(.*\)\.\(.*\)".*/\1\2/g') CODE940 = code940/pico940_v3.bin -rel: PicoDrive PicoDrive.gpe $(CODE940) readme.txt PicoDrive.png ../game_def.cfg \ - warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko - zip -9 -j ../../PicoDrive_$(VER).zip $^ - zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt - mkdir bin_to_cso_mp3 - cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/ - zip -9 -r ../../PicoDrive_$(VER).zip bin_to_cso_mp3 - rm -rf bin_to_cso_mp3 +rel: PicoDrive PicoDrive.gpe $(CODE940) readme.txt ../game_def.cfg \ + PicoDrive.png PicoDrive_s.png PicoDrive_t.png \ + warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko \ + ../../pico/carthw.cfg + mkdir -p out/PicoDrive/skin/ + cp $^ out/PicoDrive/ + cp PicoDrive.ini out/ + cp skin/*.png out/PicoDrive/skin/ + cp skin/*.txt out/PicoDrive/skin/ + mkdir out/bin_to_cso_mp3 + cp ../../tools/bin_to_cso_mp3/* out/bin_to_cso_mp3/ + cd out && zip -9 -r ../../../PicoDrive_$(VER).zip * + rm -rf out $(CODE940): make -C code940/ diff --git a/gp2x/emu.c b/gp2x/emu.c index 4addd46..7175afc 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -67,8 +67,10 @@ void pemu_prep_defconfig(void) soc = soc_detect(); if (soc == SOCID_MMSP2) defaultConfig.s_PicoOpt |= POPT_EXT_FM; - else if (soc == SOCID_POLLUX) + else if (soc == SOCID_POLLUX) { defaultConfig.EmuOpt |= EOPT_WIZ_TEAR_FIX|EOPT_SHOW_RTC; + defaultConfig.s_PicoOpt |= POPT_EN_MCD_GFX; + } } void pemu_validate_config(void) diff --git a/gp2x/soc_pollux.c b/gp2x/soc_pollux.c index ab56b99..b7a8a12 100644 --- a/gp2x/soc_pollux.c +++ b/gp2x/soc_pollux.c @@ -149,7 +149,7 @@ static void gp2x_video_RGB_setscaling_(int ln_offs, int W, int H) static void gp2x_video_wait_vsync_(void) { - while (!(memregl[0x308c>>2] & (1 << 10))); + while (!(memregl[0x308c>>2] & (1 << 10))) spend_cycles(128); memregl[0x308c>>2] |= 1 << 10; } diff --git a/pandora/Makefile b/pandora/Makefile index db3413b..45f74b2 100644 --- a/pandora/Makefile +++ b/pandora/Makefile @@ -97,7 +97,7 @@ platform/common/menu.o: menu.c # ----------- release ----------- -VER = $(shell head -n 1 version.h | sed 's/.*"\(.*\)\.\(.*\)".*/\1\2/g') +VER ?= $(shell head -n 1 version.h | sed 's/.*"\(.*\)\.\(.*\)".*/\1\2/g') rel: PicoDrive PicoDrive.run picorestore ../../pico/carthw.cfg readme.txt \ skin PicoDrive.png PicoDrive_p.png PicoDrive.pxml diff --git a/pandora/picorestore.c b/pandora/picorestore.c index d2fb0a3..77f5720 100644 --- a/pandora/picorestore.c +++ b/pandora/picorestore.c @@ -1,3 +1,31 @@ +/* + * picorestore - clean up after an omapfb program crash + * + * Copyright (c) Gražvydas "notaz" Ignotas, 2010 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the organization nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include #include #include -- 2.39.5