0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

xkeropi をビルドする (Ubuntu 32bit)

Last updated at Posted at 2022-12-16

xkeropi をビルドした。

環境構築

OS をインストールする

nasm 使っているので 32bit の ubuntu を使う。
ubuntu-16.04.6-desktop-i386.iso を Hyper-V にインストールする。

あると便利な ssh (任意)

$ sudo apt install openssh-server

あると便利な samba (任意)

$ sudo apt install samba
$ sudo vi /etc/samba/smb.conf

[homes]
  comment = Home Directories
  browseable = no
  writable = yes
  create mask 0644
  directory mask = 0755

$ sudo smbpasswd -a yui
$ sudo service smbd restart

必要なライブラリなどをインストール

$ sudo apt-get install xutils-dev
$ sudo apt-get install libgtk2.0-dev
$ sudo apt-get install libsdl1.2-dev
$ sudo apt-get install nasm

ビルド

$ wget https://www.nonakap.org/keropi/xkeropi-20101107.tar.bz2
$ tar xf xkeropi-20101107.tar.bz2
$ cd xkeropi-20101107
$ xmkmf -a
$ make

実行してみる

xkeropi.png

うぐぅ

強制的に動かしてみる。

アサーションに引っかかってるのは下記の場所

windraw.c
	/* 15 or 16 bpp 以外はサポート外 */
	if (visual->depth != 15 && visual->depth != 16) {
		fprintf(stderr, "No support depth.\n");
		return FALSE;
	}

Hyper-V だと visual->depth = 24 だった(32じゃないのは意外だ)。

そんなん 24bppバッファに16bppで描画しても崩れはしてもバッファオーバーフローはしないので大丈夫やろってことでチェックを外す。

diff
-	if (visual->depth != 15 && visual->depth != 16) {
+	if (0) {

xkeropi2.png

おけおけ。
24bpp描画は書く面倒だけど windraw.c を改造すればなんとかなる。

その前に EUC を UTF-8 に変更しておこっと。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?