No Description

Hiroaki Sakai f25d7235fb Changed official name from Wonx to WonX. 23 years ago
wonx_include 7630141b26 In serial communication, input \n from standard input is converted to \r and passed 6 years ago
COPYING 3c624a304e Initial version 23 years ago
COPYRIGHT f25d7235fb Changed official name from Wonx to WonX. 6 years ago
HISTORY f25d7235fb Changed official name from Wonx to WonX. 6 years ago
MANUAL f25d7235fb Changed official name from Wonx to WonX. 6 years ago
Makefile f25d7235fb Changed official name from Wonx to WonX. 6 years ago
OMAKE.jpn f25d7235fb Changed official name from Wonx to WonX. 6 years ago
README f25d7235fb Changed official name from Wonx to WonX. 6 years ago
UNIXTimer.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
UNIXTimer.h 0f43e6d6ee Added interrupt handling. Timer interrupt support. 6 years ago
UNIXTimerP.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWCharacter.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWCharacter.h 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
WWCharacterP.h 3c624a304e Initial version 23 years ago
WWColorMap.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWColorMap.h 9c414a9117 Fixed the display range of screen2_set_window (). 23 years ago
WWColorMapP.h 3c624a304e Initial version 23 years ago
WWDisplay.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWDisplay.h aa38e7adab Improved the display routines in XDisplay.c and rendered somewhat faster. 23 years ago
WWDisplayP.h aa38e7adab Improved the display routines in XDisplay.c and rendered somewhat faster. 23 years ago
WWInterrupt.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWInterrupt.h 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
WWInterruptP.h 0f43e6d6ee Added interrupt handling. Timer interrupt support. 6 years ago
WWLCDPanel.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWLCDPanel.h 95d1135996 WWLCDPanel has two bitmap data, and the bitmap once drawn is 23 years ago
WWLCDPanelP.h 95d1135996 WWLCDPanel has two bitmap data, and the bitmap once drawn is 23 years ago
WWPalette.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWPalette.h 9c414a9117 Fixed the display range of screen2_set_window (). 23 years ago
WWPaletteP.h 3c624a304e Initial version 23 years ago
WWScreen.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWScreen.h 96b108c909 In UNIXTimer.c, callback function is called every time the callback function is called 6 years ago
WWScreenP.h 96b108c909 In UNIXTimer.c, callback function is called every time the callback function is called 6 years ago
WWSerialPort.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWSerialPort.h 96b108c909 In UNIXTimer.c, callback function is called every time the callback function is called 6 years ago
WWSerialPortP.h 96b108c909 In UNIXTimer.c, callback function is called every time the callback function is called 6 years ago
WWSprite.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWSprite.h eb06f7f4f8 Added text display function. (Only 0 to 127 ASCII characters, kanji is not supported) 6 years ago
WWSpriteP.h 3c624a304e Initial version 23 years ago
WWText.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWText.h eb06f7f4f8 Added text display function. (Only 0 to 127 ASCII characters, kanji is not supported) 6 years ago
WWTextFonts.c eb06f7f4f8 Added text display function. (Only 0 to 127 ASCII characters, kanji is not supported) 6 years ago
WWTextP.h eb06f7f4f8 Added text display function. (Only 0 to 127 ASCII characters, kanji is not supported) 6 years ago
WWTimer.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WWTimer.h 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
WWTimerP.h 0f43e6d6ee Added interrupt handling. Timer interrupt support. 6 years ago
WonX.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonX.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXDisplay.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXDisplay.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXDisplayP.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXP.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXSerialPort.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXSerialPort.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXSerialPortP.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXSystem.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXSystem.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXSystemP.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXText.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXText.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
WonXTextP.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
Wonx2WonX.pl f25d7235fb Changed official name from Wonx to WonX. 6 years ago
XDisplay.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
XDisplay.h 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
XDisplayP.h 9c414a9117 Fixed the display range of screen2_set_window (). 23 years ago
bank.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
comm.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
disp.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
etc.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
etc.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago
key.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
makefile_for_smac 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
readline.pl f25d7235fb Changed official name from Wonx to WonX. 6 years ago
sample1.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
sample2.c 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
smac-b02.zip 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
sound.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
sout2str.pl f25d7235fb Changed official name from Wonx to WonX. 6 years ago
sys2wonx.pl 5e1a9795b7 Create your own header file. It became compilable with only Wonx. 6 years ago
system.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
text.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
timer.c f25d7235fb Changed official name from Wonx to WonX. 6 years ago
wonx_configure.h f25d7235fb Changed official name from Wonx to WonX. 6 years ago

README

WonX - WonderWitch on X.

ۤä

WonX ϤޤԴǤƤʤǽ䡤Դʵǽ
ư򤹤ʬʤɤäѤޤ
Х䥢ɥХСԤκ湰μޤǡɤɤ᡼뤯
ɥ쥹ϡ
sakai@seki.ee.kagu.sut.ac.jp
hsakai@pfu.co.jp
Ǥ
ޤε¤ꡤåץǡȤϿԤäƤޤ
http://www.seki.ee.kagu.sut.ac.jp/~sakai/WonderWitch/index.html
ǡƤޤ

ߤϺ椬ͤƤޤҤȤǤϺ٤
(ʤäưΰ㤤ʤɡWonderWitch WonX Ǥ
̯˰ۤʤäƤ)ɤʤΤǤ
Ȥ˥ޥ˥奢˽񤤤Ƥʤʬ˴ؤƤϡWonderWitch ǤϤɤΤ褦
ưΤҤȤǤϥåޤ(Ƥ)
Ԥ(Ƥ)Ƥޤ
ä˾ġʤΤ˻ž夲Ƥޤ礦

ո˾ʤɤⴿޤޤɤɤ󤻤
(ֻ񤯤Ȥϸ¤ʤ˾ȿǤȤ¤ޤΤ
ϤƼϤ)

Ϥ

WonX ϡWonderWitch ѤΥץ X ץꥱȤƥѥ뤹
Ρ饤֥Ǥʲħޤ

C٥ǸߴǽäƤΤǡWonderWitch ѤΥץ
UNIXǤΤޤޥѥǤ롥(-lwonx ǥѥ뤹)
UNIXǥǥХåѤƥǥХåǤ褦ˤʤ롥(!)
饯ǡѥåȥǡΥ׵ǽ롥
ʰͤ䡤ѥåȤ䥭饯ʤǻѤʤɤ
å顼Ϥ(褦ˤ)顼å롥
ѤǤʤǽ(ؿѰդƤ뤬ޤƤʤäꡤ
äꤷơȤΤ)Ϥ󤢤롥
ɲäƤĤꡥ
β̼̿ñ˻롥(ǥǻäꡤѤ
ץȤäꤹɬפ̵ʤ) ϤȤ٤ꡥ
ߥ졼Ǥʤ饤֥ǤꡤɸƤΤǡ
ͳ˥ޥǽ
®٤٤ǥХåŪΤʤΤǡ®٤®뤳Ȥ
ޤͤƤʤ(嵭ΥǥХåͥ褹)
WonderWitch ѤΥץXdzڤिΤΤǤϤʤ
ޤߥ졼ŪʤΤǤϤʤ
ޤǥǥХåŪΤΡ(ݥꥷdzȯʤ)
äơWonderWitch Ǥư魯뤳Ȥ⡤ǥХå
Ϥ뤳Ȥ¤Τ䤹ͥ褷褦ʼ򤹤礬롥

3ʬWonX

ȤꤢɤʤΤƤߤȤǤ礦ʿͤϡ
ץץ򥳥ѥ롦¹ԤƤߤޤ礦
ʲΤ褦ˤƤߤƤ

~>% tar xvzf wonx.tgz
(ά)
~>% cd wonx

~/wonx>% make sample1
(ά)
~/wonx>% ./sample1

ɥơɸϤ˥åϤޤ
ڡС򲡤ȡλޤ

~/wonx>% make sample2
(ά)
~/wonx>% ./sample2

륭ξ岼ǡ饯ưޤ
ڡС򲡤ȡλޤ

~/wonx>% more sample1.c
~/wonx>% more sample2.c

ǡץץΥꥹȤ򸫤Ƥߤޤ礦

ˡWonderWitch ѤΥࡤ"SpeedMac" 򥳥ѥ롦¹ԤƤߤޤ

~/wonx>% make smac
(ά)
~/wonx>% cd smac
~/wonx/smac>% ./smac

ɥơɸϤ˥åϤޤ
ä p 򲡤Ʋ OFF ˤޤФ餯
(åƤѤä) p 򲡤ƺƤӲɽ ON ˤȡ
smac Υȥ̤ɽޤ
ǥڡ򲡤ơˤޤ p Dzɽ OFF ˤơ
Ф餯(åƤѤä) p Dzɽ ON ˤޤ
ɤǤ SpeedMac Υ̤ɽƤǤ礦
륭ǰưڡǼͷǤ
ϤϥѴؿƤФ줿ȤͭǤϤʤΤǡ
ȿޤĹ˲Ƥ
p 򲡤ˤ ON, OFF ؤΤϡ褬٤ᡤ
ONΤޤޤȲ̥ꥢȤ˰۾˻֤뤫Ǥ

WonX

WonX ϡWonderWitch display_control() Ȥ display_status() Ȥä
ؿ(BIOS Ф륷ƥॳ)ؤδؿäƤޤ
δؿϡX˥ɥ򳫤ơ WonderWitch ȸߴư
褦˽񤤤Ƥޤ

WonX make ȡlibwonx.a Ȥ饤֥꤬Ǥޤ
ǡWonderWitch ѤΥץUNIX -lwonx ƥѥ뤷ƤС
WonderWitch display_control() ȤΤˡWonX display_control()
󥯤졤X ư褦ˤʤ롤ȤȤߤǤ

إåեˤĤ

WonX ϡUNIXƥˤ libc ѤޤĤޤꡤ/usr/include
include ޤ
ޤWonderWitch ˤϡsys/types.h ʤɤȤäإåե뤬ޤ
äơWonderWitch Υإåե빽򤽤Τޤ WonX ˰Ѥȡ
WonX Υإåե UNIX Υإåե뤬եꥯȤ
ǽФƤޤ
(ȤСWonderWitch sys/types.h /usr/include/sys/types
եꥯȤ롤ʤɤǤ)
ϡWonderWitchѤΥץꥱ򥳥ѥ뤹ȤˡդǤ
ѥ뤬ޤȤʤȤ㳲θϡۤȤɤΤ褦ʡ
֥إåեΥեꥯȤ⤷ϸǧפ˵Ƥޤ

кȤơWonX Ǥ wonx_include Ȥǥ쥯ȥβ˥إåե
ǼƤޤ( sys Ȥǥ쥯ȥˤä
嵭кΤᡤΤ褦ˤ)
WonderWitch ѥץΡ
#include
Τ褦ʬϡ٤ơ
#include
Τ褦˽ɬפޤ
(stdio.h stdlib.h ϡUNIX ƥ°ΤΤѤΤǡ
ΤޤޤǤޤޤ)
(եꥯȤʤȤФμʤ顤θ¤ǤϤޤ)
WonderWitch ΥץΡ#include ϡ٤
#include ˽ɬפ롤ȤȤǤ
(ޤȤƹԤ perl ץȤźդƤޤ
sys2wonx.pl *.[ch] ¹ԤȡäȽ񤭴Ƥޤ)

ޤUNIXƥˤäƤϡ/usr/include/sys/types.h ushort, ulong
ƤΤȤʤΤޤäơѥ
ulong ƤȤ礬ޤ
ΤĴˤϡwonx_include ʲΥեľܽ
ĴƤwonx_include/system_configure.h 뤳Ȥˤꡤ
ĴǤ褦ˤʤäƤޤ

WonX Υѥ

ޤ WonX 򥳥ѥ뤷ơlibwonx.a ɬפޤ
WonX ΥѥϡʲμǹԤޤ

1. WonX Ÿ롥

~>% tar xvzf wonx.tar.gz
~>% cd wonx
~/wonx>%

2. WonX make 롥

~/wonx>% make
gcc -c WWCharacter.c -O -I. -I/usr/X11R6/include
gcc -c WWColorMap.c -O -I. -I/usr/X11R6/include
...(ά)...
gcc -c wonx.c -O -I. -I/usr/X11R6/include
ar ruc libwonx.a WWCharacter.o WWColorMap.o WWDisplay.o WWLCDPanel.o WWPalette.o WWScreen.o WWSprite.o WonXDisplay.o XDisplay.o disp.o text.o key.o system.o timer.o etc.o wonx.o
~/wonx>% ls lib*
libwonx.a
~/wonx>%

ޤǤǡ饤֥κϽǤ

WonderWitch ѥץꥱΥѥ

ˡWonX ѤȤơۺ SpeedMac Ȥ WonderWitch Ѥ
򥳥ѥ뤷Ƥߤޤ
(SpeedMac ϥץץȤơWonX ɸźդƤޤ)
SpeedMac WonderWitch ѤΥץǤ WonderWitch
Ѥƥѥ뤷WonderSwan ǥڤिΤΤǤ
ȤơSpeedMac WonX 󥯤ơX ư SpeedMac
¹ԷƤߤޤ

1. Ÿ롥

~/wonx>% unzip smac-b02.zip
...(ά)...
~/wonx>% cd smac-b02
~/wonx/smac-b02>%

2. إåե libwonx.a 򥳥ԡ롥

~/wonx/smac-b02>% cp -R ../wonx_include .
~/wonx/smac-b02>% cp ../libwonx.a .
~/wonx/smac-b02>%

3. makefile 롥

~/wonx/smac-b02>% emacs makefile

ʲΤ褦˽ޤ

gcc ǥѥ򤹤褦˽롥ΤȤˡѥ륪ץˡ
-I. -L. -L/usr/X11R6/lib -lwonx -lX11 -lXt
ɲä롥
(ɬפʤ顤-g ɲä)
mkfent ˤեΥСȤʤɤä顤롥

makefile źդƤΤǡݤʤϼԽ뤫ˡ

~/wonx/smac-b02>% mv makefile makefile.orig
~/wonx/smac-b02>% cp ../makefile_for_smac ./makefile

Τ褦ˤƥԡƤ

4. 롥

~/wonx/smac-b02>% emacs chara.c
~/wonx/smac-b02>% emacs dsp.c
... (եҤȤĤҤȤĽ)

Ρ
#include
#include
Τ褦ʬ
#include "wonx_include/disp.h"
#include "wonx_include/key.h"
Τ褦˽ޤ

ޤȤƤ뤿 perl ץ (sys2wonx.pl) źդƤΤǡ
ݤʤϡ
~/wonx/smac-b02>% cp ../sys2wonx.pl .
~/wonx/smac-b02>% ./sys2wonx.pl *.[ch]
Τ褦ˤƤ
(sys2wonx.pl ϡǻꤷե뼫Τ񤭴ƤޤΤ)

5. make 롥

~/wonx/smac-b02>% make
gcc -c chara.c -g -I.
gcc -c game.c -g -I.
...(ά)...
gcc -c main.c -g -I.
gcc -g -o smac chara.o game.o man.o mansub.o mansub2.o map.o mapsub.o menu.o monster.o picture.o player.o smac.o stage.o dsp.o etc.o main.o -lwonx -lX11 -lXt -L. -L/usr/X11R6/lib
~/wonx/smac-b02>% ls smac
smac
~/wonx/smac-b02>%

6. smac ư롥

~/wonx/smac-b02>% ./smac

ȡޤǤäݤǤ¤ϡ

~/wonx>% make smac

ȡκȤäƤ褦ˤʤäƤޤ



smac ưȡɥޤޤߥʥˤϡ
ʲΥǥХåѤξɽޤ

WonderWitch شؿƤФȡͤɽޤ

ޤǤϡʲԤޤ

륭WonderSwan X1X4ܥбƤ롥
i,j,k,l WonderSwan Y1Y4ܥбƤ롥
ڡСȺեȥA,BܥбƤ롥
sSTARTܥбƤ롥
p 򲡤ȡɽ/ɽ⡼ɤؤ롥
(ɽȲ̤ؤԤʤ®)
F1 򲡤ȡLCD顼ޥåפΥǡ׽Ϥ롥
F2 򲡤ȡѥåȤΥǡ׽Ϥ롥
F3 򲡤ȡ饯Υǡ׽Ϥ롥
F4 򲡤ȡץ饤ȤΥǡ׽Ϥ롥

ǥեȤǤϤʤˤؿƤФ뤿Ӥ˲̤κԤᡤ
®Ǥ
ȤСʲΤ褦ʤȤäƤȡ®ˤʤޤ

/* ̤Υꥢ */
for (y = 0; y < 32; y++)
for (x = 0; x < 32; x++) {
screen_fill_char(0, x, y, 1, 1, 0x0000); /* 褵 */
}
}

Τ褦ʾϡp 򲡤ɽ⡼ɤˤơ롼׽ä
Ƥ p 򲡤ɽ⡼ɤᤷƤ

F1 F2 򲡤ȡǡ׽ϤΤǤɸǤϤ¾ˤ
å̤˽ϤƤΤǡդĤ F1 򲡤Ǥϡ
äȤޤ̤ΥåήƤޤȤޤ
Τ褦ʤȤϡʲΤ褦ˤƵưޤȤХѥ뤷
smac Ȥ¹ԷǤƤΤʤ顤

> smac | grep -v call

⤷⥭饯ֹ10֤Υ饯Υǡˤϡ
ʲΤ褦˼¹ԤƤ顤F3 򲡤ɤǤ礦

> smac | grep "character\[10\]"

WonX ϡåϤݤˡgrep ǥե륿󥰤Ǥ褦ˡ
ʤ餺ϥåƬˡΤʸɲäƤޤ
ȤСؿƤӽФɽåˤϡƬɬ
"call" ȤʸɲäƤޤäơgrep -v call ̤С
ؿƤӽФΥåäФʤʤ롤Ȥ褦ˤʤäƤޤ

ɸǤ̤ΥåФƤΤǡgrep 򤦤ޤȤ褦ˤƤ
⤷ϡ

> smac | grep call > function_call.log

Τ褦ˤơȤΤͭǤ礦

> smac > /dev/null

ȡʸ kterm ʤɤɽʤ֤󡤹®ˤʤޤ

­ʤ

ʲΤΤˤϤޤбƤޤ󡥤äơ㤨ХɴϢ
ؿƤӽФƤ⡤ⵯޤ(δؿˤʤäƤ)


ɽ
¾äѤ

դʤФʤʤ

WonX ϡ WonderWitch ѤȤƽ񤫤줿(⤷ϡ񤫤)ץ
UNIX ǥѥ롦󥯤뤿Υ饤֥Ǥꡤϡɥ
ߥ졼ȤΤǤϤޤ
Ǥ顤WonderWitch UNIX CΥåפΤᡤĤʤ
ʤʤȤĤޤ WonX 塤̵ȤǤ

ʲΤȤϡռ뤳Ȥȡ줤ʥץ񤯤Ȥǡ
ʤǤȻפޤ(ӥåȥޥåʤɤǡshort int ˤ٤
ȤǤϡάˤ short int Ȥ)

ޤWonX ŪŪʥХᤤʳ̵ȤˤΤǡΤؤ
ΤȳڤäƻȤäƤ
WonX Ȥ¤ꡤʤ٤¸̵褦˿ޤ礦
(Ȥ int Υˤޤ¸ʤ褦ˤޤ礦)

[ѥ]

ˤ񤭤ޤѥǤʤȤ㳲Ф顤ϤƤ
إåեΥեꥯȤǤȤˡWonderWitch sys ʲ
ե򥤥󥯥롼ɤƤդƤ
ushort, ulong ʤɤϡsys/types.h Ƥ륷ƥ⤢뤷
Ǥʤƥ⤢ޤΤؤϡwonx_include/system_configure.h
ĴƤ
(FreeBSD Ǥ ushort ΤƤ뤬RedHat Linux Ǥϡ
uchort, ulong ȤƤΤǡΤޤޤȥѥ
Υ˥󥰤Фޤ)

[int ΰ]

WonderWitch Ǥ sizeof(short int) == sizeof(int) < sizeof(long int) Ǥ
UNIX ǤϤդĤ sizeof(short int) < sizeof(int) == sizeof(long int) Ǥ
ΤȤϡint ñʤ륫󥿤ȤƻѤ褦ʾˤ
ʤޤ󤬡ӥåȥޥåפγǼȤƻѤ褦ʤȤˤϡ
ˤʤޤ
ˤʤ䤹Τϡ饯Υӥåȥޥåפ򰷤Ǥ
font_set_colordata()ʤɤϡ16*8 ХȤΥ饯ǡ
short int Ȥư˻ޤWonderWitch Ǥ
sizeof(short int) == sizeof(int) ʤΤǡWonderWitch ѤΥץǤϡ
饯ǡ short int Ȥˡint ȤƤޤ
Ȥͤޤ( WonderWitch ʤ̵UNIX
¹Ԥ顤饯̯ʼʡȻפ)
Τ褦ʾˤϡUNIX ǥѥ뤹Ȥˤϡshort int
ɬפޤ

[ǥ]

WonderWitch CPU x86ϤǤSPARC ʤɤǻѤˤϡ
ǥդɬפޤ
font_set_colordata()ʤɤϡshort int ǥ饯ǡ
Τǡchar * 饯ǡ short int * ˥㥹Ȥ
font_set_colordata()ϤʤɤΤȤ򤷤ƤȡҤä֤
Ȥͤޤ
i386 Ϥ PC-UNIX ʤС餯̵Ǥ礦

[ߤ]

WonderWitch ˤϥ޳ߤޤWonX ư٤ᡤ
WonderWitch λñ̤򤽤Τޤ UNIX ˻äƤ顤ߤ
äѤʤˤʤäƤޤޤäƥ޳ߤλñ̤ϡ
WonderWitch ⤫ʤ礭ˤƤޤ
ϡwonx_configure.h ĴǤޤ
ߥϥɥǡ˻֤Τʤɤ򤷤Ƥ
ˤϡߤλñ̤礭ƤǤʤȡϥɥ餫
äִ֤ˤޤϥɥ餬ƤФơ¹Ԥ˿ʤޤʤȤȤ
ʤޤ

[ϤˤĤ]

ϤϡѴؿƤФ줿ȤΤߴΤΤǡĹ˲Ƥʤ
ȿʤȤޤ
ȿʤȤäƤʤɤⲡΤǤʤĹμ¤˲褦
Ƥ

[MS-DOS եΰ]

MS-DOS եϡβԥɤ UNIX Υƥȥե
ۤʤΤǡդƤ*.[ch] եξ̵ΤǤ
makefile դƤ
(UNIX ΥƥȥեǤϡԤ \n ǤMS-DOS Ǥ \r\n Ǥ)
㤨Сmakefile ˡ

gcc -g -o smac $(OBJS) -L. -L/usr/X11R6/lib -lwonx -lX11 -lXt

Τ褦ʹԤäȤơ줬 MS-DOS ΥƥȷΥեȡ
-lXt ΤȤ;ʬʲԥ(\r)ղäƤޤᡤUNIX make
Ƥ⡤-lXt 饤̵֥꤬פܤƤޤޤ
(⡤ե emacs less ʤɤǻȤƤ⡤ԥɤɽʤ
ᡤ狼ˤ)
ޤ

gcc -g -o smac $(OBJS) -lwonx -lX11 -lXt -L. -L/usr/X11R6/lib

Τ褦ˤƤȡ/usr/X11R6/lib ꤷĤʤΤˡºݤˤ
/usr/X11R6/lib\r Ȥǥ쥯ȥ꤬ꤵ줿ȤˤʤäƤޤ
-lX11, -lXt θ˼Ԥޤ

ɤ˴ؤƤ⡤ƱȤޤUNIX Ǥδɤ EUC ʤΤǡ
SJIS δäƤȡޤѥǤʤäꡤ
make ޤưʤäꡤѥǤƤץ༫Τ
ưƤޤ⸶˵ŤˤʤäƤޤǽޤ
makefile 䥽ɤɬ
> cat makefile | qkc -I -O -e -u > makefile.tmp
> mv makefile.tmp makefile
ʤɤ̤ơUNIXΥƥȥեѴޤ礦

[ե̾]

MS-DOS Ǥϥե̾Ϥ٤ʸǤgcc Ǥ *.C Τ褦
ե̾Υե C++ ǽ񤫤ƤȽǤ뤿ᡤ
SAMPLE.C Τ褦̾Υե򥳥ѥ뤹ȡޤ󥯤Ǥʤ
Ȥޤ
Τ褦ʾϡsample.c ˥͡षƥѥ뤷Ƥ

[ꥢ̿ˤĤ]

ꥢ̿μѴؿ(comm_receive_char())ϡfgetc(stdin)
ʸơ\n \r Ѵ֤ޤϡŪ̿
ü򥨥ߥ졼Ȥ뤿Ǥ

ޤcomm_send_char() ϤʸϡɸϤ˽Ϥޤ
֤ԥɤϡ"\t" "\n" Τ褦ʸѴƽϤޤ
źդ sout2str.pl ̤Ȥˤꡤꥢ̿ؤνϤΤФơ
üؤνϤΥ᡼ɽ뤳ȤǤޤ

[ WonX ¸ʬΤ꤫]

WonderWitch ѤΥץȯƤݤˡWonX ξΤȤ߹ߤơ
WonderSwan Ǽ¹ԤȤˤϼɤäȤޤ
(㤨СǥХåνϤΤ printf() ʤ)
Τ褦ʤȤΤˡwonx_include/types.h
#define _WONX_
ƤΤǡΤ褦ʾ #ifdef _WONX_ ǤäƤ

[ץǡμ꤫]

ˡ

#include "WonX.h"
#include "WonXDisplay.h"
#include "WWDisplay.h"
#include "WWColorMap.h"
#include "WWPalette.h"
#include "WWCharacter.h"
#include "WWSprite.h"

int i;
WWDisplay ww_display;

ww_display = WonXDisplay_GetWWDisplay(WonX_GetWonXDisplay());

WWColorMap_PrintData(WWDisplay_GetColorMap(ww_display), stdout);

for (i = 0; i < 16; i++)
WWPalette_PrintData(WWDisplay_GetPalette(ww_display, i), stdout);

for (i = 0; i < 512; i++)
WWCharacter_PrintData(WWDisplay_GetCharacter(ww_display, i), stdout);

for (i = 0; i < 128; i++)
WWSprite_PrintData(WWDisplay_GetSprite(ww_display, i), stdout);

Τ褦ʥɤ뤳ȤˤꡤǤդξǥ饯ѥåȤ
ץǡϤ뤳ȤǤޤ

ץˡ԰¤ʾ꤬ä顤

#ifdef _WONX_
ww_display = WonXDisplay_GetWWDisplay(WonX_GetWonXDisplay());
printf("Before setting:\n");
WWSprite_PrintData(WWDisplay_GetSprite(ww_display, 0), stdout);
#endif /* _WONX_ */

/* ˥ץ饤ȤˤĤƤ԰¤ʥɤ */

#ifdef _WONX_
printf("After setting:\n");
WWSprite_PrintData(WWDisplay_GetSprite(ww_display, 0), stdout);
#endif /* _WONX_ */

Τ褦ˤ԰¤ʥɤǥץǡȡǥХå
ΩĤǤ礦



WonX ϡ湰μʬ̶֤ż֤ Libretto ǽ񤤤
ż֥եȥפǤGPLۤޤ
ԤˤĤƤϡźդ OMAKE.jpn 򻲾ȤƤ

湰μϢΥ᡼륢ɥ쥹ϡ
sakai@seki.ee.kagu.sut.ac.jp
hsakai@pfu.co.jp
ǤޤܥեȥκǿǤ
http://www.seki.ee.kagu.sut.ac.jp/~sakai/WonderWitch/index.html
ۤƤޤ
ʲϥߥ顼ȤǤ
http://hp.vector.co.jp/authors/VA014157/index.html
http://www.people.or.jp/~hsakai/index.html
ߥ顼Ȥϡ椬Ȥ˥åץǡȤΤǡ˺ǿ
Ȥ櫓ǤϤޤ󡥤ޤǥХååѤǤ

ΥեϤޤ