aboutsummaryrefslogtreecommitdiff
path: root/frontend/pandora
diff options
context:
space:
mode:
authornotaz2011-10-09 22:15:00 +0300
committernotaz2011-10-10 00:25:59 +0300
commit9e0630ab54cbf6b6e3ec525f1088aa54e163c938 (patch)
treefc457c1fa4fe78a154ff912feadf764a67418298 /frontend/pandora
parent554a2220f2413cc29d7912ad3f7d91c9e64284cf (diff)
downloadpcsx_rearmed-9e0630ab54cbf6b6e3ec525f1088aa54e163c938.tar.gz
pcsx_rearmed-9e0630ab54cbf6b6e3ec525f1088aa54e163c938.tar.bz2
pcsx_rearmed-9e0630ab54cbf6b6e3ec525f1088aa54e163c938.zip
add caanoo frontend files, move pandora files
Diffstat (limited to 'frontend/pandora')
-rw-r--r--frontend/pandora/pcsx.pngbin0 -> 7981 bytes
-rw-r--r--frontend/pandora/pcsx.pxml.templ40
-rwxr-xr-xfrontend/pandora/pcsx.sh16
-rw-r--r--frontend/pandora/picorestore.c109
-rw-r--r--frontend/pandora/skin/background.pngbin0 -> 183772 bytes
-rw-r--r--frontend/pandora/skin/font.pngbin0 -> 11264 bytes
-rw-r--r--frontend/pandora/skin/readme.txt8
-rw-r--r--frontend/pandora/skin/selector.pngbin0 -> 386 bytes
-rw-r--r--frontend/pandora/skin/skin.txt4
9 files changed, 177 insertions, 0 deletions
diff --git a/frontend/pandora/pcsx.png b/frontend/pandora/pcsx.png
new file mode 100644
index 0000000..71f36d0
--- /dev/null
+++ b/frontend/pandora/pcsx.png
Binary files differ
diff --git a/frontend/pandora/pcsx.pxml.templ b/frontend/pandora/pcsx.pxml.templ
new file mode 100644
index 0000000..5c53f24
--- /dev/null
+++ b/frontend/pandora/pcsx.pxml.templ
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PXML xmlns="http://openpandora.org/namespaces/PXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PXML_schema.xsd">
+<package id="package.pcsx_rearmed.notaz">
+ <titles>
+ <title lang="en_US">PCSX ReARMed</title>
+ </titles>
+ <version major="1" minor="9" release="92" build="%PR%"/>
+ <author name="PCSX team/notaz" website="http://notaz.gp2x.de/"/>
+</package>
+<application id="pcsx_rearmed.notaz.%PR%" appdata="pcsx_rearmed">
+ <titles>
+ <title lang="en_US">PCSX ReARMed %PR%</title>
+ </titles>
+ <title lang="en_US">PCSX ReARMed %PR%</title>
+
+ <descriptions>
+ <description lang="en_US">PlayStation Emulator.</description>
+ </descriptions>
+
+ <exec command="pcsx.sh"/>
+
+ <icon src="pcsx.png"/>
+
+ <author name="PCSX team/notaz" website="http://notaz.gp2x.de/"/>
+
+ <version major="1" minor="9" release="92" build="%PR%"/>
+
+ <licenses>
+ <license name="GPLv2+" url="http://www.gnu.org/licenses/gpl-2.0.html" sourcecodeurl="http://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git"/>
+ </licenses>
+
+ <info name="PCSX ReARMed %PR% readme" type="text/plain" src="readme.txt"/>
+
+ <categories>
+ <category name="Game">
+ <subcategory name="Emulator"/>
+ </category>
+ </categories>
+</application>
+</PXML>
diff --git a/frontend/pandora/pcsx.sh b/frontend/pandora/pcsx.sh
new file mode 100755
index 0000000..2077a29
--- /dev/null
+++ b/frontend/pandora/pcsx.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# stupid nub mode thing
+nub0mode=`cat /proc/pandora/nub0/mode`
+nub1mode=`cat /proc/pandora/nub1/mode`
+echo absolute > /proc/pandora/nub0/mode
+echo absolute > /proc/pandora/nub1/mode
+
+./pcsx "$@"
+
+# restore stuff if pcsx crashes
+./picorestore
+sudo -n /usr/pandora/scripts/op_lcdrate.sh 60
+
+echo "$nub0mode" > /proc/pandora/nub0/mode
+echo "$nub1mode" > /proc/pandora/nub1/mode
diff --git a/frontend/pandora/picorestore.c b/frontend/pandora/picorestore.c
new file mode 100644
index 0000000..77f5720
--- /dev/null
+++ b/frontend/pandora/picorestore.c
@@ -0,0 +1,109 @@
+/*
+ * 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 <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <linux/fb.h>
+#include <linux/omapfb.h>
+#include <linux/kd.h>
+
+int main()
+{
+ struct fb_var_screeninfo fbvar;
+ struct omapfb_plane_info pi;
+ struct omapfb_mem_info mi;
+ int ret, fbdev, kbdfd;
+
+ fbdev = open("/dev/fb0", O_RDWR);
+ if (fbdev == -1) {
+ perror("open fb0");
+ goto end_fb0;
+ }
+
+ ret = ioctl(fbdev, FBIOGET_VSCREENINFO, &fbvar);
+ if (ret == -1) {
+ perror("FBIOGET_VSCREENINFO ioctl");
+ goto end_fb0;
+ }
+
+ if (fbvar.yoffset != 0) {
+ printf("fixing yoffset.. ");
+ fbvar.yoffset = 0;
+ ret = ioctl(fbdev, FBIOPAN_DISPLAY, &fbvar);
+ if (ret < 0)
+ perror("ioctl FBIOPAN_DISPLAY");
+ else
+ printf("ok\n");
+ }
+
+end_fb0:
+ if (fbdev >= 0)
+ close(fbdev);
+
+ fbdev = open("/dev/fb1", O_RDWR);
+ if (fbdev == -1) {
+ perror("open fb1");
+ goto end_fb1;
+ }
+
+ ret = ioctl(fbdev, OMAPFB_QUERY_PLANE, &pi);
+ ret |= ioctl(fbdev, OMAPFB_QUERY_MEM, &mi);
+ if (ret != 0)
+ perror("QUERY_*");
+
+ pi.enabled = 0;
+ ret = ioctl(fbdev, OMAPFB_SETUP_PLANE, &pi);
+ if (ret != 0)
+ perror("SETUP_PLANE");
+
+ mi.size = 0;
+ ret = ioctl(fbdev, OMAPFB_SETUP_MEM, &mi);
+ if (ret != 0)
+ perror("SETUP_MEM");
+
+end_fb1:
+ if (fbdev >= 0)
+ close(fbdev);
+
+ kbdfd = open("/dev/tty", O_RDWR);
+ if (kbdfd == -1) {
+ perror("open /dev/tty");
+ return 1;
+ }
+
+ if (ioctl(kbdfd, KDSETMODE, KD_TEXT) == -1)
+ perror("KDSETMODE KD_TEXT");
+
+ close(kbdfd);
+
+ return 0;
+}
diff --git a/frontend/pandora/skin/background.png b/frontend/pandora/skin/background.png
new file mode 100644
index 0000000..f4b4523
--- /dev/null
+++ b/frontend/pandora/skin/background.png
Binary files differ
diff --git a/frontend/pandora/skin/font.png b/frontend/pandora/skin/font.png
new file mode 100644
index 0000000..707a5b4
--- /dev/null
+++ b/frontend/pandora/skin/font.png
Binary files differ
diff --git a/frontend/pandora/skin/readme.txt b/frontend/pandora/skin/readme.txt
new file mode 100644
index 0000000..dd83963
--- /dev/null
+++ b/frontend/pandora/skin/readme.txt
@@ -0,0 +1,8 @@
+The skin images can be customized, but there are several limitations:
+
+background.png - must be 320x240 image with 24bit RGB colors.
+font.png - must be 128x160 8bit grayscale image.
+selector.png - must be 8x10 8bit grayscale image.
+
+Font and selector colors can be changed by editing skin.txt.
+
diff --git a/frontend/pandora/skin/selector.png b/frontend/pandora/skin/selector.png
new file mode 100644
index 0000000..a439169
--- /dev/null
+++ b/frontend/pandora/skin/selector.png
Binary files differ
diff --git a/frontend/pandora/skin/skin.txt b/frontend/pandora/skin/skin.txt
new file mode 100644
index 0000000..1d6979f
--- /dev/null
+++ b/frontend/pandora/skin/skin.txt
@@ -0,0 +1,4 @@
+// html-style hex color codes, ex. ff0000 is red, 0000ff is blue, etc.
+text_color=ffffc0
+selection_color=808010
+