Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vita improvements #2

Merged
merged 8 commits into from Mar 7, 2019

Conversation

Projects
None yet
2 participants
@rsn8887
Copy link

rsn8887 commented Mar 7, 2019

This PR adds several improvements for the Vita port:

  • music is now working (using libtimidity and samples, see below)
  • improve smoothness of mouse pointer motion
  • reduce analog joystick deadzone for better mouse pointer control
  • enable cursor key map scrolling with BT keyboard
  • fix a missing dependency error in cmake build file for Vita
  • fix configure error liblzo2 not found by adding VITASDK lib path in config.lib
  • fix relying on existing openttd.cfg file for resolution setting, since resolution should now always be native Vita res 960x544 (it is fast). The game can now be started without any openttd.cfg file. And it is fast and works that way.
  • extra memory (total 300 MB heap) is enabled on Vita, using -dATTRIBUTE2=12, to allow music playback without running out of memory.

Note: The game takes a bit long to boot up, but not too bad (25 seconds or so)

Compilation notes and new data files

Here's a VPK I build with this PR following the instructions below:
https://mega.nz/#!BYwj3YII!l6THD7jDC4oxBsuX3XJIYfVgldOknLDuXSBoO0B7qBw

Here's my latest data.zip. This is freeware only and save for release. It includes the timidity folder with music samples, required for timidity music playback:
https://mega.nz/#!lN4HlajD!V14gkvLjwQUqAy7MZmphTo2s8eiMsIrF2T-l2SHKcOk

Vita compilation notes:

libtimidity Vita:

git clone https://github.com/sezero/libtimidity
cd libtimidity
#might use libtoolize instead of glibtoolize if not on mac
glibtoolize
aclocal
autoconf
autoheader
automake --add-missing
./configure --host arm-vita-eabi --prefix $VITASDK/arm-vita-eabi/ --disable-shared --enable-static --disable-aotest --disable-ao
sudo -E make install

=======
liblzma Vita:

#Download and extract xz-5.2.4.tar.gz from https://tukaani.org/xz/ , then
cd xz-5.2.4
./configure --host arm-vita-eabi --prefix $VITASDK/arm-vita-eabi/ --disable-shared --enable-static
cd src/liblzma
make clean
make -j12
sudo -E make install

=========
liblzo2 Vita:

#Download https://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz and extract, then
cd lzo-2.10
./configure --host arm-vita-eabi --prefix $VITASDK/arm-vita-eabi/ --disable-shared --enable-static
make clean
make -j12
sudo -E make install

========
Main game:

make clean
PKG_CONFIG_PATH=$VITASDK/arm-vita-eabi/lib/pkgconfig ./configure --os=PSVITA --host arm-vita-eabi --enable-static --prefix=/usr/local/vitasdk --with-sdl="pkg-config sdl2" --without-fontconfig --disable-strip --enable-network=0 --with-libtimidity
make -j12
cd os/vita/
cmake ./
make openttd.vpk

@angguss angguss merged commit 430320c into angguss:feature-vita-support Mar 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.