2011年05月23日 snes9x with ARMedslack 13.1 on zaurus(SL-C760)
_ snes9x with ARMedslack 13.1 on zaurus(SL-C760)
snes9xをARMedslack 13.1でビルドしてみた。
以前にIntelマシンでビルドした手順で行うと、別のエラーが出た。以下のパッチで対応。
*** snes9x/unix/unix.cpp.ORG 2011-03-07 19:09:37.000000000 +0900
--- snes9x/unix/unix.cpp 2011-03-07 19:13:14.000000000 +0900
***************
*** 1129,1139 ****
{
*drive = 0;
! char *slash = strrchr (path, '/');
if (!slash)
! slash = strrchr (path, '\\');
! char *dot = strrchr (path, '.');
if (dot && slash && dot < slash)
dot = NULL;
--- 1129,1139 ----
{
*drive = 0;
! char *slash = (char *)strrchr (path, '/');
if (!slash)
! slash = (char *)strrchr (path, '\\');
! char *dot = (char *)strrchr (path, '.');
if (dot && slash && dot < slash)
dot = NULL;
上記でコンパイルは通るが、以下のパッチも当てないと、armプラットフォームでは正常に動かない。
*** snes9x/port.h.ORG 2011-05-16 17:48:15.000000000 +0900 --- snes9x/port.h 2011-05-21 23:32:31.000000000 +0900 *************** *** 266,274 **** #endif #if defined(__i386__) || defined(__i486__) || defined(__i586__) || \ ! defined(__WIN32__) || defined(__alpha__) #define LSB_FIRST #define FAST_LSB_WORD_ACCESS #else #define MSB_FIRST #endif --- 266,276 ---- #endif #if defined(__i386__) || defined(__i486__) || defined(__i586__) || \ ! defined(__WIN32__) || defined(__alpha__) || defined(__arm__) #define LSB_FIRST + # if !defined(__arm__) #define FAST_LSB_WORD_ACCESS + # endif #else #define MSB_FIRST #endif
以上。
で、zaurus(SL-C760)で快適に遊べるかは...微妙。
[ツッコミを入れる]
2020年05月23日 Shell script to reboot BUFFALO AirStation NFINITI WHR-G301N
_ reboot_whrg301n.sh - 無線AP(WHRG301N)をリブートするシェルスクリプト
#! /bin/sh
trap "rm /tmp/reboot_whrg301n.$$.*.tmp; exit 1" INT TERM
whrg301n_ip=_IP_ADDRESS_
user=root
password=_PASSWORD_
random=`printf "%10.10d" ${RANDOM}${RANDOM}`
wget --http-user=${user} \
--http-password=${password} \
-O /tmp/reboot_whrg301n.$$.1.tmp \
"http://${whrg301n_ip}/cgi-bin/cgi?req=frm&frm=init.html&rand=${random}" 2>/dev/null
reboot_url=`cat /tmp/reboot_whrg301n.$$.1.tmp |\
tr '<>' '\n\n' |\
egrep 'method="POST"' |\
head -1 |\
sed -e 's/^.*action="//;s/".*$//'`
reboot_url="http://${whrg301n_ip}${reboot_url}"
reboot=`cat /tmp/reboot_whrg301n.$$.1.tmp |\
tr '<>' '\n\n' |\
LC_ALL=C egrep reboot |\
sed -e 's/^.*value="//;s/".*$//' |\
od -tx1 |\
egrep '^0000000 ' |\
tr -s ' ' |\
cut -d ' ' -f 2-7 |\
sed -e 's/^/%/;s/ /%/g'`
sWebSessionnum=`cat /tmp/reboot_whrg301n.$$.1.tmp |\
tr '<>' '\n\n' |\
egrep 'sWebSessionnum' |\
head -1 |\
sed -e 's/^.*value=//;s/>.*$//'`
sWebSessionid=`cat /tmp/reboot_whrg301n.$$.1.tmp |\
tr '<>' '\n\n' |\
egrep 'sWebSessionid' |\
head -1 |\
sed -e 's/^.*value=//;s/>.*$//'`
wget --http-user=${user} \
--http-password=${password} \
--post-data="sWebSessionnum=${sWebSessionnum}&sWebSessionid=${sWebSessionid}&reboot=${reboot}" \
-O /dev/null \
"${reboot_url}" 2>/dev/null
rm -f /tmp/reboot_whrg301n.$$.*.tmp
[ツッコミを入れる]