Skip to content

Commit

Permalink
Add initial Pandora port.
Browse files Browse the repository at this point in the history
  • Loading branch information
Exophase authored and adelva1984 committed Jul 6, 2010
1 parent 7fd5524 commit d143b1e
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 114 deletions.
9 changes: 1 addition & 8 deletions arch/nds/event.c
Expand Up @@ -116,14 +116,7 @@ static void do_unicode_key_event(struct buffered_status *status, bool down,
{
if(down)
{
status->keymap[code] = 1;
status->key_pressed = code;
status->key = code;
status->key_repeat = code;
status->unicode = unicode;
status->unicode_repeat = unicode;
status->keypress_time = get_ticks();
status->key_release = IKEY_UNKNOWN;
key_press(status, code, unicode);
}
else
{
Expand Down
28 changes: 28 additions & 0 deletions arch/pandora/Makefile.in
@@ -0,0 +1,28 @@
TOOLCHAIN ?= /usr/local/pandora/arm-2009q3
CROSS_COMPILE ?= $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-
PANDORA_LIBPATH ?= $(PREFIX)/lib
PANDORA_INCPATH ?= $(PREFIX)/include

CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
AR = $(CROSS_COMPILE)ar
OBJCOPY = $(CROSS_COMPILE)objcopy
STRIP = $(CROSS_COMPILE)strip --strip-unneeded

ARCH_CFLAGS = -march=armv7-a -mtune=cortex-a8 -fPIC -I$(PANDORA_INCPATH)
ARCH_CXXFLAGS = $(ARCH_CFLAGS)

ARCH_LDFLAGS = -L$(PANDORA_LIBPATH)

LIBPNG_CFLAGS = -I$(PANDORA_INCPATH)/libpng12
LIBPNG_LDFLAGS = -lpng12 -lz
SDL_CFLAGS = `$(TOOLCHAIN)/usr/bin/sdl-config --cflags`
SDL_LDFLAGS = `$(TOOLCHAIN)/usr/bin/sdl-config --libs`

DSOLDFLAGS = -shared
DSOPRE = lib
DSOPOST = .so
DSORPATH = -Wl,-rpath,$(LIBDIR)
DSOSONAME = -Wl,-soname,

include arch/zip.inc
1 change: 1 addition & 0 deletions arch/pandora/README
@@ -0,0 +1 @@
WRITE ME
47 changes: 7 additions & 40 deletions arch/wii/event.c
Expand Up @@ -763,14 +763,7 @@ static bool process_event(union event *ev)
enum keycode skey = input.joystick_button_map[ev->button.pad][button];
if(skey && (status->keymap[skey] == 0))
{
status->key_pressed = skey;
status->key = skey;
status->unicode = skey;
status->key_repeat = skey;
status->unicode_repeat = skey;
status->keymap[skey] = 1;
status->keypress_time = get_ticks();
status->key_release = IKEY_UNKNOWN;
key_press(status, skey, skey);
rval = true;
}
}
Expand Down Expand Up @@ -818,10 +811,7 @@ static bool process_event(union event *ev)
enum keycode skey = input.joystick_button_map[ev->button.pad][button];
if(skey)
{
status->keymap[skey] = 0;
status->key_repeat = IKEY_UNKNOWN;
status->unicode_repeat = 0;
status->key_release = skey;
key_release(status, skey);
rval = true;
}
}
Expand Down Expand Up @@ -857,23 +847,12 @@ static bool process_event(union event *ev)
if(skey)
{
if(status->keymap[skey] == 0)
{
status->key_pressed = skey;
status->key = skey;
status->unicode = skey;
status->key_repeat = skey;
status->unicode_repeat = skey;
status->keymap[skey] = 1;
status->keypress_time = get_ticks();
status->key_release = IKEY_UNKNOWN;
}
key_press(status, skey, skey);

if(last_axis == (digital_value ^ 1))
{
skey = input.joystick_axis_map[ev->axis.pad][axis][last_axis];
status->keymap[skey] = 0;
status->key_repeat = IKEY_UNKNOWN;
status->unicode_repeat = 0;
status->key_release = skey;
key_release(status, skey);
}
}
}
Expand All @@ -883,12 +862,7 @@ static bool process_event(union event *ev)
{
skey = input.joystick_axis_map[ev->axis.pad][axis][last_axis];
if(skey)
{
status->keymap[skey] = 0;
status->key_repeat = IKEY_UNKNOWN;
status->unicode_repeat = 0;
status->key_release = skey;
}
key_release(status, skey);
}
}
status->axis[ev->axis.pad][axis] = digital_value;
Expand Down Expand Up @@ -961,14 +935,7 @@ static bool process_event(union event *ev)
}
}

status->keymap[ckey] = 1;
status->key_pressed = ckey;
status->key = ckey;
status->unicode = ev->key.unicode;
status->key_repeat = ckey;
status->unicode_repeat = status->unicode;
status->keypress_time = get_ticks();
status->key_release = IKEY_UNKNOWN;
key_press(status, skey, ev->key.unicode);
break;
}
case EVENT_KEY_UP:
Expand Down
6 changes: 6 additions & 0 deletions config.sh
Expand Up @@ -28,6 +28,7 @@ usage() {
echo " wii Experimental Wii port"
echo " amiga Experimental AmigaOS 4 port"
echo " android Experimental Android port"
echo " pandora Experimental Pandora port"
echo
echo "Supported <option> values (negatives can be used):"
echo
Expand Down Expand Up @@ -449,6 +450,11 @@ if [ "$PLATFORM" = "android" ]; then
EGL="true"
fi

if [ "$PLATFORM" = "pandora" ]; then
echo "#define CONFIG_PANDORA" >> src/config.h
echo "BUILD_PANDORA=1" >> platform.inc
fi

#
# SDL was disabled above; must also disable SDL-dependent modules
#
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.txt
Expand Up @@ -34,6 +34,8 @@ USERS
viewport to a size less than 80x25 but greater than the current board
dimensions. The viewport will now always be clamped to board size.
+ Imported libmodplug 0.8.8.1 and rebased all patches.
+ Added experimental port to Pandora. See arch/pandora/README for more
information. (Exophase)

DEVELOPERS

Expand Down
37 changes: 31 additions & 6 deletions docs/platform_matrix.html
Expand Up @@ -23,7 +23,7 @@
border-collapse : collapse;
border : 2px solid black;
border-spacing : 0;
width : 103em;
width : 120em;
}

td, th {
Expand All @@ -33,7 +33,7 @@
border-color : gray;
padding : 5px;
color : black;
width : 9%;
width : 8.3%;
}

td {
Expand Down Expand Up @@ -117,6 +117,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<th>psp</th>
<th>unix</th>
<th>wii</th>
<th>pandora</th>
</tr>

<tr>
Expand All @@ -131,6 +132,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td>Playstation Portable</td>
<td>Linux, BSD, Solaris<br/>HaikuOS, etc.</td>
<td>Nintendo Wii</td>
<td>Pandora</td>
</tr>

<tr>
Expand All @@ -145,6 +147,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td>MIPS (ELF)</td>
<td>x86 (ELF)<br/>AMD64 (ELF)<br/>PPC64 (ELF)</td>
<td>PPC (ELF)</td>
<td>ARM9 (ELF)</td>
</tr>

<tr>
Expand All @@ -159,20 +162,23 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td>Big</td>
<td>Varies</td>
<td>Big</td>
<td>Little</td>
</tr>

<tr>
<th>Toolchain</th>
<td>gcc 4.2.2<br/>binutils 2.14<br/>clib2</td>
<td>gcc 4.2.1<br/>binutils 2.17<br/>bionic</td>
<td>gcc 4.0.1<br/>cctools 667.3<br/>10.3 (min ver)</td>
<td>gcc 4.1.1 (open2x)<br/>binutils 2.16.1<br/>glibc 2.3.6</td>
<td>gcc 4.1.1<br/>binutils 2.16.1<br/>glibc 2.3.6<br/>(open2x)</td>
<td>gcc 4.4.0<br/>binutils 2.19.1</td>
<td>Visual Studio 2008</td>
<td>gcc 4.4.0 (dk r26)<br/>binutils 2.19.1</td>
<td>gcc 4.3.3 (dk r13)<br/>binutils 2.16.1</td>
<td>gcc 4.4.0<br/>binutils 2.19.1<br/>(dk r26)</td>
<td>gcc 4.3.3<br/>binutils 2.16.1<br/>(dk r13)</td>
<td>Various</td>
<td>gcc 4.4.1 (dk r18)<br/>binutils 2.19.1</td>
<td>gcc 4.4.1<br/>binutils 2.19.1<br/>(dk r18)</td>
<td>gcc 4.4.1<br/>binutils 2.19.51<br/>(CS 2009q3)</td>

</tr>

<tr>
Expand All @@ -187,6 +193,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="yes">ZIP</td>
<td class="yes">Various</td>
<td class="yes">ZIP</td>
<td class="no2">ZIP (PND?)</td>
</tr>

<tr>
Expand All @@ -201,6 +208,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="na">N/A</td>
<td class="yes">YES</td>
<td class="na">N/A</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -215,6 +223,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="no">NO</td>
<td class="yes">YES</td>
<td class="no">NO</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -229,6 +238,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="std">ModPlug</td>
<td class="std">ModPlug</td>
<td class="std">ModPlug</td>
<td class="std">ModPlug</td>
</tr>

<tr>
Expand All @@ -243,6 +253,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td>tremor</td>
<td class="std">libvorbis</td>
<td class="std">libvorbis</td>
<td class="std">libvorbis</td>
</tr>


Expand All @@ -258,6 +269,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td>Size</td>
<td>Speed</td>
<td>Size</td>
<td>Speed</td>
</tr>

<tr>
Expand All @@ -272,6 +284,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="yes">YES</td>
<td class="yes">YES</td>
<td class="std">NO</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -286,6 +299,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="no2">NO<a href="#note4">[4]</a></td>
<td class="yes">YES</td>
<td class="yes">YES</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -300,6 +314,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="no2">NO<a href="#note4">[4]</a></td>
<td class="yes">YES</td>
<td class="yes">YES</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -314,6 +329,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="yes">YES</td>
<td class="yes">YES</td>
<td class="yes">YES</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -328,6 +344,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="yes">YES</td>
<td class="yes">YES</td>
<td class="std">render_gx</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -342,6 +359,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="no">NO</td>
<td class="yes">YES</td>
<td class="no">NO</td>
<td class="no2">NO</td>
</tr>

<tr>
Expand All @@ -356,6 +374,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="no">NO</td>
<td class="yes">YES</td>
<td class="no">NO</td>
<td class="no2">NO</td>
</tr>

<tr>
Expand All @@ -370,6 +389,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="na">N/A</td>
<td class="yes">YES</td>
<td class="na">N/A</td>
<td class="no2">NO</td>
</tr>

<tr>
Expand All @@ -384,6 +404,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="no">NO</td>
<td class="no2">NO<a href="#note5">[5]</a></td>
<td class="no">NO</td>
<td class="yes">YES</td>
</tr>


Expand All @@ -399,6 +420,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="na">N/A</td>
<td class="yes">YES</td>
<td class="na">N/A</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -413,6 +435,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="no2">NO<a href="#note6">[6]</a></td>
<td class="yes">YES</td>
<td class="no2">NO<a href="#note6">[6]</a></td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -427,6 +450,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="na">N/A</td>
<td class="yes">YES</td>
<td class="na">N/A</td>
<td class="yes">YES</td>
</tr>

<tr>
Expand All @@ -441,6 +465,7 @@ <h1>MegaZeux Platform Support Matrix</h1>
<td class="yes">YES</td>
<td class="std">NO</td>
<td class="yes">YES</td>
<td class="std">NO</td>
</tr>

</table>
Expand Down

0 comments on commit d143b1e

Please sign in to comment.