Sin descripción

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

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
ߥ顼Ȥϡ椬Ȥ˥åץǡȤΤǡ˺ǿ
Ȥ櫓ǤϤޤ󡥤ޤǥХååѤǤ

ΥեϤޤ