浏览代码

* Updated Wii rtl (unicode support broken .dol executables) and libogcfpc to ver.1.8.12. Fixed a dependency to Mad library too

git-svn-id: trunk@30125 -
Legolas 10 年之前
父节点
当前提交
ffd03563d0

+ 2 - 0
.gitattributes

@@ -5457,6 +5457,7 @@ packages/libogcfpc/src/ogc/ios.inc svneol=native#text/plain
 packages/libogcfpc/src/ogc/ipc.inc svneol=native#text/plain
 packages/libogcfpc/src/ogc/irq.inc svneol=native#text/plain
 packages/libogcfpc/src/ogc/isfs.inc svneol=native#text/plain
+packages/libogcfpc/src/ogc/libversion.inc svneol=native#text/plain
 packages/libogcfpc/src/ogc/lwp.inc svneol=native#text/plain
 packages/libogcfpc/src/ogc/lwp_config.inc svneol=native#text/plain
 packages/libogcfpc/src/ogc/lwp_heap.inc svneol=native#text/plain
@@ -9330,6 +9331,7 @@ rtl/wii/classes.pp svneol=native#text/plain
 rtl/wii/dos.pp svneol=native#text/plain
 rtl/wii/libc.inc svneol=native#text/plain
 rtl/wii/libch.inc svneol=native#text/plain
+rtl/wii/rtl.cfg svneol=native#text/plain
 rtl/wii/rtldefs.inc svneol=native#text/plain
 rtl/wii/sysdir.inc svneol=native#text/plain
 rtl/wii/sysfile.inc svneol=native#text/plain

+ 5 - 2
compiler/systems/t_wii.pas

@@ -238,6 +238,9 @@ begin
     Add('  stub PT_LOAD FLAGS(5);');
     Add('  text PT_LOAD FLAGS(5);');
     Add('  data PT_LOAD FLAGS(6);');
+    Add('  bss1 PT_LOAD;');
+    Add('  bss2 PT_LOAD;');
+    Add('');
     Add('}');
     Add('');
     Add('SECTIONS');
@@ -431,7 +434,7 @@ begin
     Add('		PROVIDE (___sbss_end = .);');
     Add('		. = ALIGN(32);   /* REQUIRED. LD is flaky without it. */');
     Add('		__sbss_end = .;');
-    Add('	}');
+    Add('	} :bss1');
     Add('');
     Add('	.bss       :');
     Add('	{');
@@ -450,7 +453,7 @@ begin
     Add('');
     Add('		PROVIDE (__bss_end = .);');
     Add('		__bss_end = .;');
-    Add('	}');
+    Add('	} :bss2');
     Add('');
     Add('	_end = .;');
     Add('	PROVIDE(end = .);');

+ 1 - 0
packages/libogcfpc/Makefile.fpc.fpcmake

@@ -29,6 +29,7 @@ fpcdir=../..
 
 [require] 
 nortl=y
+packages=mad
 
 [shared]
 build=n

+ 1 - 1
packages/libogcfpc/examples/audio/mp3player/Makefile.fpc

@@ -7,7 +7,7 @@ loaders=
 programs=playmp3
 
 [require]
-packages=libogcfpc
+packages=libogcfpc mad
 tools=bin2s rmdir gxtexconv
 nortl=y
 

+ 131 - 3
packages/libogcfpc/fpmake.pp

@@ -13,15 +13,143 @@ begin
 {$endif ALLPACKAGES}
 
     P:=AddPackage('libogcfpc');
+    P.OSes:=[wii];
+    P.CPUs:=[powerpc];
 {$ifdef ALLPACKAGES}
     P.Directory:=ADirectory;
 {$endif ALLPACKAGES}
     P.Version:='3.1.1';
-    P.SourcePath.Add('src');
+    P.Author := 'Library: libogc, libfat, libmad and libmodplay from devkitPPC; headers: Francesco Lombardi';
+    P.License := 'LGPL';
+    P.HomepageURL := 'www.freepascal.org';
+    P.Email := '';
+    P.Description := 'Some libraries for Nintendo Wii.';
+    P.NeedLibC:= false;
     P.Dependencies.Add('mad');
-    P.OSes:=P.OSes-[embedded];
 
-    // not linux compilable, skip
+    P.SourcePath.Add('src');
+    T:=P.Targets.AddUnit('aesndlib.pp');
+    T:=P.Targets.AddUnit('asndlib.pp');
+    T:=P.Targets.AddUnit('debug.pp');
+    T:=P.Targets.AddUnit('fat.pp');
+    T:=P.Targets.AddUnit('gccore.pp');
+    T:=P.Targets.AddUnit('gcmodplay.pp');
+    T:=P.Targets.AddUnit('gctypes.pp');
+    T:=P.Targets.AddUnit('iso9660.pp');
+    T:=P.Targets.AddUnit('mp3player.pp');
+    T:=P.Targets.AddUnit('network.pp');
+
+     T.IncludePath.Add('src/bte');
+     with T.Dependencies do
+     begin
+       AddInclude('bd_addr.inc');
+       AddInclude('bte.inc');
+     end;
+
+     T.IncludePath.Add('src/di');
+     with T.Dependencies do
+     begin
+       AddInclude('di.inc');
+     end;
+
+     T.IncludePath.Add('src/ogc');
+     with T.Dependencies do
+     begin
+       AddInclude('aram.inc');
+       AddInclude('arqmgr.inc');
+       AddInclude('arqueue.inc');
+       AddInclude('audio.inc');
+       AddInclude('cache.inc');
+       AddInclude('card.inc');
+       AddInclude('cast.inc');
+       AddInclude('color.inc');
+       AddInclude('cond.inc');
+       AddInclude('conf.inc');
+       AddInclude('consol.inc'); 
+       AddInclude('context.inc');
+       AddInclude('disc_io.inc');
+       AddInclude('dsp.inc');
+       AddInclude('dvd.inc');
+       AddInclude('es.inc');
+       AddInclude('exi.inc');
+       AddInclude('gu.inc');
+       AddInclude('gx.inc');
+       AddInclude('gx_struct.inc');
+       AddInclude('ios.inc');
+       AddInclude('ipc.inc');
+       AddInclude('irq.inc');
+       AddInclude('isfs.inc');
+       AddInclude('libversion.inc');
+       AddInclude('lwp.inc');
+       AddInclude('lwp_config.inc');
+       AddInclude('lwp_heap.inc');
+       AddInclude('lwp_messages.inc');
+       AddInclude('lwp_mutex.inc');
+       AddInclude('lwp_objmgr.inc');
+       AddInclude('lwp_priority.inc');
+       AddInclude('lwp_queue.inc');
+       AddInclude('lwp_sema.inc');
+       AddInclude('lwp_stack.inc');
+       AddInclude('lwp_states.inc');
+       AddInclude('lwp_threadq.inc'); 
+       AddInclude('lwp_threads.inc');
+       AddInclude('lwp_tqdata.inc');
+       AddInclude('lwp_watchdog.inc');
+       AddInclude('lwp_wkspace.inc');
+       AddInclude('message.inc');
+       AddInclude('mutex.inc');
+       AddInclude('pad.inc');
+       AddInclude('semaphore.inc');
+       AddInclude('si.inc');
+       AddInclude('stm.inc');
+       AddInclude('system.inc');
+       AddInclude('sys_state.inc');
+       AddInclude('texconv.inc');
+       AddInclude('tpl.inc');
+       AddInclude('usb.inc');
+       AddInclude('usbgecko.inc');
+       AddInclude('usbmouse.inc');
+       AddInclude('usbstorage.inc');
+       AddInclude('video.inc');
+       AddInclude('video_types.inc');
+       AddInclude('wiilaunch.inc');
+     end;
+       
+     T.IncludePath.Add('src/ogc/machine');
+     with T.Dependencies do
+     begin
+       AddInclude('asm.inc');
+       AddInclude('processor.inc');
+       AddInclude('spinlock.inc');
+     end;
+
+
+     T.IncludePath.Add('src/sdcard');
+     with T.Dependencies do
+     begin
+       AddInclude('card_buf.inc');
+       AddInclude('card_cmn.inc');
+       AddInclude('card_io.inc');
+       AddInclude('gcsd.inc');
+       AddInclude('wiisd_io.inc');
+     end;
+
+     T.IncludePath.Add('src/wiikeyboard');
+     with T.Dependencies do
+     begin
+       AddInclude('keyboard.inc');
+       AddInclude('usbkeyboard.inc');
+       AddInclude('wsksymdef.inc');
+     end;
+
+     T.IncludePath.Add('src/wiiuse');
+     with T.Dependencies do
+     begin
+       AddInclude('wiiuse.inc');
+       AddInclude('wpad.inc');
+     end;
+
+     P.Sources.AddExampleFiles('examples/*',true,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 2 - 0
packages/libogcfpc/src/bte/bte.inc

@@ -121,6 +121,8 @@ function BTE_InitSub(cb: btecallback): cint32; cdecl; external;
 function BTE_ReadStoredLinkKey(keys: Plinkkey_info; max_cnt: cuint8;
   cb: btecallback): cint32; cdecl; external;
 
+function BTE_ReadBdAddr(bdaddr: P_bd_addr; cb: btecallback): cint32; cdecl; external;
+
 type
   TAuxCCB1 = procedure(bdaddr: P_bd_addr; reason: cuint8); cdecl;
   TAuxCCB0 = procedure(bdaddr: P_bd_addr; reason: cuint8); cdecl;

+ 2 - 1
packages/libogcfpc/src/gccore.inc

@@ -1,3 +1,4 @@
+{$include ogc/libversion.inc}
 {$include ogc/disc_io.inc}
 
 {$include debug.inc}
@@ -86,7 +87,7 @@
   {$include wiiuse/wiiuse.inc}
   {$include wiiuse/wpad.inc}
   
-  { $include wiikeyboard/wsksymdef.inc}
+  {$include wiikeyboard/wsksymdef.inc}
   {$include wiikeyboard/keyboard.inc}
   {$include wiikeyboard/usbkeyboard.inc}
 

+ 83 - 7
packages/libogcfpc/src/ogc/gx.inc

@@ -1702,7 +1702,7 @@ procedure GX_PokeARGB(x, y: cuint16; color: GXColor); cdecl; external;
  * \return none
   *)
 
-procedure GX_PeekARGB(x, y: cuint16; color: PGXColor); cdecl; external;
+procedure GX_PeekARGB(x, y: cuint16; var color: GXColor); cdecl; external;
 
 
 (*!
@@ -1741,7 +1741,7 @@ procedure GX_PokeZ(x, y: cuint16; z: cuint32); cdecl; external;
  * \return none
   *)
 
-procedure GX_PeekZ(x, y: cuint16; z: pcuint32); cdecl; external;
+procedure GX_PeekZ(x, y: cuint16; var z: cuint32); cdecl; external;
 
 
 (*!
@@ -1801,6 +1801,82 @@ function GX_GetTexObjMipMap(obj: PGXTexObj): cuint32; cdecl; external;
 function GX_GetTexObjUserData(obj: PGXTexObj): pointer; cdecl; external;
 
 
+(*!
+ * \fn void* GX_GetTexObjData(GXTexObj *obj)
+ * \brief Used to get a pointer to texture data from the \ref GXTexObj structure.
+ *
+ * \note The returned pointer is a physical address.
+ *
+ * \param[in] obj ptr to a texture object
+ *
+ * \return Physical pointer to texture data.
+ *)
+function GX_GetTexObjData(obj: PGXTexObj): pointer; cdecl; external;
+
+(*!
+ * \fn u8 GX_GetTexObjWrapS(GXTexObj* obj)
+ * \brief Returns the texture wrap s mode described by texture object \a obj.
+ *
+ * \note Use GX_InitTexObj() or GX_InitTexObjCI() to initialize the texture wrap s mode.
+ *
+ * \param[in] obj ptr to a texture object
+ *
+ * \return wrap s mode
+ *)
+function GX_GetTexObjWrapS(obj: PGXTexObj): cuint8; cdecl; external;
+
+(*!
+ * \fn u8 GX_GetTexObjWrapT(GXTexObj* obj)
+ * \brief Returns the texture wrap t mode described by texture object \a obj.
+ *
+ * \note Use GX_InitTexObj() or GX_InitTexObjCI() to initialize the texture wrap t mode.
+ *
+ * \param[in] obj ptr to a texture object
+ *
+ * \return wrap t mode
+ *)
+function GX_GetTexObjWrapT(obj: PGXTexObj): cuint8; cdecl; external;
+
+(*!
+ * \fn u16 GX_GetTexObjHeight(GXTexObj* obj)
+ * \brief Returns the texture height described by texture object \a obj.
+ *
+ * \note Use GX_InitTexObj() or GX_InitTexObjCI() to initialize the texture height.
+ *
+ * \param[in] obj ptr to a texture object
+ *
+ * \return texture height
+ *)
+function GX_GetTexObjHeight(obj: PGXTexObj): cuint16; cdecl; external;
+
+(*!
+ * \fn u16 GX_GetTexObjWidth(GXTexObj* obj)
+ * \brief Returns the texture width described by texture object \a obj.
+ *
+ * \note Use GX_InitTexObj() or GX_InitTexObjCI() to initialize the texture width.
+ *
+ * \param[in] obj ptr to a texture object
+ *
+ * \return texture width
+ *)
+function GX_GetTexObjWidth(obj: PGXTexObj): cuint16; cdecl; external;
+
+(*!
+ * \fn void GX_GetTexObjAll(GXTexObj* obj, void** image_ptr, u16* width, u16* height, u8* format, u8* wrap_s, u8* wrap_t, u8* mipmap);
+ * \brief Returns the parameters described by a texture object. Texture objects are used to describe all the parameters associated with a texture, including size, format, wrap modes, filter modes, etc. Texture objects are initialized using either GX_InitTexObj() or, for color index format textures, GX_InitTexObjCI().
+ *
+ * \param[in] obj ptr to a texture object
+ * \param[out] image_ptr Returns a physical pointer to the image data for a texture.
+ * \param[out] width Returns the width of the texture or LOD 0 for mipmaps
+ * \param[out] height Returns the height of the texture or LOD 0 for mipmaps
+ * \param[out] format Returns the texel format
+ * \param[out] mipmap Returns the mipmap enable flag.
+ *
+ * \return none
+ *)
+procedure GX_GetTexObjAll(obj: PGXTexObj; var image_ptr: Pointer; var width: cuint16; var height: cuint16; var format: cuint8; var wrap_s: cuint8; var wrap_t: cuint8; var mipmap: cuint8); cdecl; external;
+
+
 (*!
  * \fn u32 GX_GetTexBufferSize(u16 wd,u16 ht,u32 fmt,u8 mipmap,u8 maxlod)
  * \brief Returns the amount of memory in bytes needed to store a texture of the given size and \a fmt.
@@ -2741,7 +2817,7 @@ procedure GX_InitXfRasMetric; cdecl; external;
  * \return none
   *)
 
-procedure GX_ReadXfRasMetric(xfwaitin, xfwaitout, rasbusy, clks: pcuint32); cdecl; external;
+procedure GX_ReadXfRasMetric(var xfwaitin: cuint32; var xfwaitout: cuint32; var rasbusy: cuint32; var clks: cuint32); cdecl; external;
 
 
 (*!
@@ -2774,7 +2850,7 @@ procedure GX_ClearVCacheMetric; cdecl; external;
  * \return none
   *)
 
-procedure GX_ReadVCacheMetric(check, miss, stall: pcuint32); cdecl; external;
+procedure GX_ReadVCacheMetric(var check: cuint32; var miss: cuint32; var stall: cuint32); cdecl; external;
 
 
 (*!
@@ -2812,7 +2888,7 @@ procedure GX_SetVCacheMetric(attr: cuint32); cdecl; external;
  * \return none
   *)
 
-procedure GX_GetGPStatus(overhi, underlow, readIdle, cmdIdle, brkpt: pcuint8); cdecl; external;
+procedure GX_GetGPStatus(var overhi: cuint32; var underlow: cuint8; var readIdle: cuint8; var cmdIdle: cuint8; var brkpt: cuint8); cdecl; external;
 
 
 (*!
@@ -2834,7 +2910,7 @@ procedure GX_GetGPStatus(overhi, underlow, readIdle, cmdIdle, brkpt: pcuint8); c
  * \return none
   *)
 
-procedure GX_ReadGPMetric(cnt0, cnt1: pcuint32); cdecl; external;
+procedure GX_ReadGPMetric(var cnt0: cuint32; var cnt1: cuint32); cdecl; external;
 
 
 (*!
@@ -2855,7 +2931,7 @@ procedure GX_ReadGPMetric(cnt0, cnt1: pcuint32); cdecl; external;
  * \return none
   *)
 
-procedure GX_ReadBoundingBox(top, bottom, left, right: pcuint16); cdecl; external;
+procedure GX_ReadBoundingBox(var top: cuint16; var bottom: cuint16; var left: cuint16; var right: cuint16); cdecl; external;
 
 
 (*!

+ 15 - 0
packages/libogcfpc/src/ogc/libversion.inc

@@ -0,0 +1,15 @@
+
+{$IFDEF OGC_INTERFACE}
+
+const
+  _V_MAJOR_ = 1;
+  _V_MINOR_ = 8;
+  _V_PATCH_ = 12;
+
+  _V_DATE_ = {$I %DATE%};
+  _V_TIME_ = {$I %TIME%};
+
+  _V_STRING = 'libOGC Release 1.8.12';
+
+{$ENDIF}
+

+ 453 - 449
packages/libogcfpc/src/wiikeyboard/wsksymdef.inc

@@ -1,437 +1,441 @@
 
 {$IFDEF OGC_INTERFACE}
-const
-  KS_BackSpace = $08;
-  KS_Tab = $09;
-  KS_Linefeed = $0a;
-  KS_Clear = $0b;
-  KS_Return = $0d;
-  KS_Escape = $1b;
-  KS_space = $20;
-  KS_exclam = $21;
-  KS_quotedbl = $22;
-  KS_numbersign = $23;
-  KS_dollar = $24;
-  KS_percent = $25;
-  KS_ampersand = $26;
-  KS_apostrophe = $27;
-  KS_parenleft = $28;
-  KS_parenright = $29;
-  KS_asterisk = $2a;
-  KS_plus = $2b;
-  KS_comma = $2c;
-  KS_minus = $2d;
-  KS_period = $2e;
-  KS_slash = $2f;
-  KS_0 = $30;
-  KS_1 = $31;
-  KS_2 = $32;
-  KS_3 = $33;
-  KS_4 = $34;
-  KS_5 = $35;
-  KS_6 = $36;
-  KS_7 = $37;
-  KS_8 = $38;
-  KS_9 = $39;
-  KS_colon = $3a;
-  KS_semicolon = $3b;
-  KS_less = $3c;
-  KS_equal = $3d;
-  KS_greater = $3e;
-  KS_question = $3f;
-  KS_at = $40;
-  KS_A = $41;
-  KS_B = $42;
-  KS_C = $43;
-  KS_D = $44;
-  KS_E = $45;
-  KS_F = $46;
-  KS_G = $47;
-  KS_H = $48;
-  KS_I = $49;
-  KS_J = $4a;
-  KS_K = $4b;
-  KS_L = $4c;
-  KS_M = $4d;
-  KS_N = $4e;
-  KS_O = $4f;
-  KS_P = $50;
-  KS_Q = $51;
-  KS_R = $52;
-  KS_S = $53;
-  KS_T = $54;
-  KS_U = $55;
-  KS_V = $56;
-  KS_W = $57;
-  KS_X = $58;
-  KS_Y = $59;
-  KS_Z = $5a;
-  KS_bracketleft = $5b;
-  KS_backslash = $5c;
-  KS_bracketright = $5d;
-  KS_asciicircum = $5e;
-  KS_underscore = $5f;
-  KS_grave = $60;
-  KS_a = $61;
-  KS_b = $62;
-  KS_c = $63;
-  KS_d = $64;
-  KS_e = $65;
-  KS_f = $66;
-  KS_g = $67;
-  KS_h = $68;
-  KS_i = $69;
-  KS_j = $6a;
-  KS_k = $6b;
-  KS_l = $6c;
-  KS_m = $6d;
-  KS_n = $6e;
-  KS_o = $6f;
-  KS_p = $70;
-  KS_q = $71;
-  KS_r = $72;
-  KS_s = $73;
-  KS_t = $74;
-  KS_u = $75;
-  KS_v = $76;
-  KS_w = $77;
-  KS_x = $78;
-  KS_y = $79;
-  KS_z = $7a;
-  KS_braceleft = $7b;
-  KS_bar = $7c;
-  KS_braceright = $7d;
-  KS_asciitilde = $7e;
-  KS_Delete = $7f;
-  KS_nobreakspace = $a0;
-  KS_exclamdown = $a1;
-  KS_cent = $a2;
-  KS_sterling = $a3;
-  KS_currency = $a4;
-  KS_yen = $a5;
-  KS_brokenbar = $a6;
-  KS_section = $a7;
-  KS_diaeresis = $a8;
-  KS_copyright = $a9;
-  KS_ordfeminine = $aa;
-  KS_guillemotleft = $ab;
-  KS_notsign = $ac;
-  KS_hyphen = $ad;
-  KS_registered = $ae;
-  KS_macron = $af;
-  KS_degree = $b0;
-  KS_plusminus = $b1;
-  KS_twosuperior = $b2;
-  KS_threesuperior = $b3;
-  KS_acute = $b4;
-  KS_mu = $b5;
-  KS_paragraph = $b6;
-  KS_periodcentered = $b7;
-  KS_cedilla = $b8;
-  KS_onesuperior = $b9;
-  KS_masculine = $ba;
-  KS_guillemotright = $bb;
-  KS_onequarter = $bc;
-  KS_onehalf = $bd;
-  KS_threequarters = $be;
-  KS_questiondown = $bf;
-  KS_Agrave = $c0;
-  KS_Aacute = $c1;
-  KS_Acircumflex = $c2;
-  KS_Atilde = $c3;
-  KS_Adiaeresis = $c4;
-  KS_Aring = $c5;
-  KS_AE = $c6;
-  KS_Ccedilla = $c7;
-  KS_Egrave = $c8;
-  KS_Eacute = $c9;
-  KS_Ecircumflex = $ca;
-  KS_Ediaeresis = $cb;
-  KS_Igrave = $cc;
-  KS_Iacute = $cd;
-  KS_Icircumflex = $ce;
-  KS_Idiaeresis = $cf;
-  KS_ETH = $d0;
-  KS_Ntilde = $d1;
-  KS_Ograve = $d2;
-  KS_Oacute = $d3;
-  KS_Ocircumflex = $d4;
-  KS_Otilde = $d5;
-  KS_Odiaeresis = $d6;
-  KS_multiply = $d7;
-  KS_Ooblique = $d8;
-  KS_Ugrave = $d9;
-  KS_Uacute = $da;
-  KS_Ucircumflex = $db;
-  KS_Udiaeresis = $dc;
-  KS_Yacute = $dd;
-  KS_THORN = $de;
-  KS_ssharp = $df;
-  KS_agrave = $e0;
-  KS_aacute = $e1;
-  KS_acircumflex = $e2;
-  KS_atilde = $e3;
-  KS_adiaeresis = $e4;
-  KS_aring = $e5;
-  KS_ae = $e6;
-  KS_ccedilla = $e7;
-  KS_egrave = $e8;
-  KS_eacute = $e9;
-  KS_ecircumflex = $ea;
-  KS_ediaeresis = $eb;
-  KS_igrave = $ec;
-  KS_iacute = $ed;
-  KS_icircumflex = $ee;
-  KS_idiaeresis = $ef;
-  KS_eth = $f0;
-  KS_ntilde = $f1;
-  KS_ograve = $f2;
-  KS_oacute = $f3;
-  KS_ocircumflex = $f4;
-  KS_otilde = $f5;
-  KS_odiaeresis = $f6;
-  KS_division = $f7;
-  KS_oslash = $f8;
-  KS_ugrave = $f9;
-  KS_uacute = $fa;
-  KS_ucircumflex = $fb;
-  KS_udiaeresis = $fc;
-  KS_yacute = $fd;
-  KS_thorn = $fe;
-  KS_ydiaeresis = $ff;
-  KS_Odoubleacute = $150;
-  KS_odoubleacute = $151;
-  KS_Udoubleacute = $170;
-  KS_udoubleacute = $171;
+VAR
+  KS_BackSpace: byte = $08;
+  KS_Tab: byte = $09;
+  KS_Linefeed: byte = $0a;
+  KS_Clear: byte = $0b;
+  KS_Return: byte = $0d;
+  KS_Escape: byte = $1b;
+  KS_space: byte = $20;
+  KS_exclam: byte = $21;
+  KS_quotedbl: byte = $22;
+  KS_numbersign: byte = $23;
+  KS_dollar: byte = $24;
+  KS_percent: byte = $25;
+  KS_ampersand: byte = $26;
+  KS_apostrophe: byte = $27;
+  KS_parenleft: byte = $28;
+  KS_parenright: byte = $29;
+  KS_asterisk: byte = $2a;
+  KS_plus: byte = $2b;
+  KS_comma: byte = $2c;
+  KS_minus: byte = $2d;
+  KS_period: byte = $2e;
+  KS_slash: byte = $2f;
+  KS_0: byte = $30;
+  KS_1: byte = $31;
+  KS_2: byte = $32;
+  KS_3: byte = $33;
+  KS_4: byte = $34;
+  KS_5: byte = $35;
+  KS_6: byte = $36;
+  KS_7: byte = $37;
+  KS_8: byte = $38;
+  KS_9: byte = $39;
+  KS_colon: byte = $3a;
+  KS_semicolon: byte = $3b;
+  KS_less: byte = $3c;
+  KS_equal: byte = $3d;
+  KS_greater: byte = $3e;
+  KS_question: byte = $3f;
+  KS_at: byte = $40;
+
+  KS_A: byte = $41; public name 'KS_A';
+  KS_B: byte = $42; public name 'KS_B';
+  KS_C: byte = $43; public name 'KS_C';
+  KS_D: byte = $44; public name 'KS_D';
+  KS_E: byte = $45; public name 'KS_E';
+  KS_F: byte = $46; public name 'KS_F';
+  KS_G: byte = $47; public name 'KS_G';
+  KS_H: byte = $48; public name 'KS_H';
+  KS_I: byte = $49; public name 'KS_I';
+  KS_J: byte = $4a; public name 'KS_J';
+  KS_K: byte = $4b; public name 'KS_K';
+  KS_L: byte = $4c; public name 'KS_L';
+  KS_M: byte = $4d; public name 'KS_M';                  
+  KS_N: byte = $4e; public name 'KS_N';
+  KS_O: byte = $4f; public name 'KS_O';
+  KS_P: byte = $50; public name 'KS_P';
+  KS_Q: byte = $51; public name 'KS_Q';
+  KS_R: byte = $52; public name 'KS_R';
+  KS_S: byte = $53; public name 'KS_S';
+  KS_T: byte = $54; public name 'KS_T';
+  KS_U: byte = $55; public name 'KS_U';
+  KS_V: byte = $56; public name 'KS_V';
+  KS_W: byte = $57; public name 'KS_W';
+  KS_X: byte = $58; public name 'KS_X';
+  KS_Y: byte = $59; public name 'KS_Y';
+  KS_Z: byte = $5a; public name 'KS_Z';
+
+  KS_bracketleft: byte = $5b;
+  KS_backslash: byte = $5c;
+  KS_bracketright: byte = $5d;
+  KS_asciicircum: byte = $5e;
+  KS_underscore: byte = $5f;
+  KS_grave: byte = $60;
+
+  KS_a_: byte = $61; public name 'KS_a';
+  KS_b_: byte = $62; public name 'KS_b';
+  KS_c_: byte = $63; public name 'KS_c';
+  KS_d_: byte = $64; public name 'KS_d';
+  KS_e_: byte = $65; public name 'KS_e';
+  KS_f_: byte = $66; public name 'KS_f';
+  KS_g_: byte = $67; public name 'KS_g';
+  KS_h_: byte = $68; public name 'KS_h';
+  KS_i_: byte = $69; public name 'KS_i';
+  KS_j_: byte = $6a; public name 'KS_j';
+  KS_k_: byte = $6b; public name 'KS_k';
+  KS_l_: byte = $6c; public name 'KS_l';
+  KS_m_: byte = $6d; public name 'KS_m';
+  KS_n_: byte = $6e; public name 'KS_n';
+  KS_o_: byte = $6f; public name 'KS_o';
+  KS_p_: byte = $70; public name 'KS_p';
+  KS_q_: byte = $71; public name 'KS_q';
+  KS_r_: byte = $72; public name 'KS_r';                  
+  KS_s_: byte = $73; public name 'KS_s';
+  KS_t_: byte = $74; public name 'KS_t';
+  KS_u_: byte = $75; public name 'KS_u';                   
+  KS_v_: byte = $76; public name 'KS_v';
+  KS_w_: byte = $77; public name 'KS_w';
+  KS_x_: byte = $78; public name 'KS_x';
+  KS_y_: byte = $79; public name 'KS_y';
+  KS_z_: byte = $7a; public name 'KS_z';
+
+  KS_braceleft: byte = $7b;
+  KS_bar: byte = $7c;
+  KS_braceright: byte = $7d;
+  KS_asciitilde: byte = $7e;
+  KS_Delete: byte = $7f;
+  KS_nobreakspace: byte = $a0;
+  KS_exclamdown: byte = $a1;
+  KS_cent: byte = $a2;
+  KS_sterling: byte = $a3;
+  KS_currency: byte = $a4;
+  KS_yen: byte = $a5;
+  KS_brokenbar: byte = $a6;
+  KS_section: byte = $a7;
+  KS_diaeresis: byte = $a8;
+  KS_copyright: byte = $a9;
+  KS_ordfeminine: byte = $aa;
+  KS_guillemotleft: byte = $ab;
+  KS_notsign: byte = $ac;
+  KS_hyphen: byte = $ad;
+  KS_registered: byte = $ae;
+  KS_macron: byte = $af;
+  KS_degree: byte = $b0;
+  KS_plusminus: byte = $b1;
+  KS_twosuperior: byte = $b2;
+  KS_threesuperior: byte = $b3;
+  KS_acute: byte = $b4;
+  KS_mu: byte = $b5;
+  KS_paragraph: byte = $b6;
+  KS_periodcentered: byte = $b7;
+  KS_cedilla: byte = $b8;
+  KS_onesuperior: byte = $b9;
+  KS_masculine: byte = $ba;
+  KS_guillemotright: byte = $bb;
+  KS_onequarter: byte = $bc;
+  KS_onehalf: byte = $bd;
+  KS_threequarters: byte = $be;
+  KS_questiondown: byte = $bf;
+  KS_Agrave: byte = $c0; public name 'KS_Agrave';
+  KS_Aacute: byte = $c1; public name 'KS_Aacute';
+  KS_Acircumflex: byte = $c2; public name 'KS_Acircumflex';
+  KS_Atilde: byte = $c3; public name 'KS_Atilde';
+  KS_Adiaeresis: byte = $c4; public name 'KS_Adiaeresis';
+  KS_Aring: byte = $c5; public name 'KS_Aring';
+  KS_AE: byte = $c6; public name 'KS_AE';
+  KS_Ccedilla: byte = $c7; public name 'KS_Ccedilla';
+  KS_Egrave: byte = $c8; public name 'KS_Egrave'; 
+  KS_Eacute: byte = $c9; public name 'KS_Eacute';
+  KS_Ecircumflex: byte = $ca; public name 'KS_Ecircumflex';
+  KS_Ediaeresis: byte = $cb; public name 'KS_Ediaeresis';
+  KS_Igrave: byte = $cc; public name 'KS_Igrave';
+  KS_Iacute: byte = $cd; public name 'KS_Iacute';
+  KS_Icircumflex: byte = $ce; public name 'KS_Icircumflex';
+  KS_Idiaeresis: byte = $cf; public name 'KS_Idiaeresis';
+  KS_ETH: byte = $d0; public name 'KS_ETH';
+  KS_Ntilde: byte = $d1; public name 'KS_Ntilde';
+  KS_Ograve: byte = $d2; public name 'KS_Ograve';
+  KS_Oacute: byte = $d3; public name 'KS_Oacute';
+  KS_Ocircumflex: byte = $d4; public name 'KS_Ocircumflex';
+  KS_Otilde: byte = $d5; public name 'KS_Otilde';
+  KS_Odiaeresis: byte = $d6; public name 'KS_Odiaeresis';
+  KS_multiply: byte = $d7;
+  KS_Ooblique: byte = $d8; public name 'KS_Ooblique';
+  KS_Ugrave: byte = $d9; public name 'KS_Ugrave';
+  KS_Uacute: byte = $da; public name 'KS_Uacute';
+  KS_Ucircumflex: byte = $db; public name 'KS_Ucircumflex';
+  KS_Udiaeresis: byte = $dc; public name 'KS_Udiaeresis';
+  KS_Yacute: byte = $dd; public name 'KS_Yacute';
+  KS_THORN: byte = $de; public name 'KS_THORN';
+  KS_ssharp: byte = $df;
+  KS_agrave_: byte = $e0; public name 'KS_agrave';
+  KS_aacute_: byte = $e1; public name 'KS_aacute';
+  KS_acircumflex_: byte = $e2; public name 'KS_acircumflex';
+  KS_atilde_: byte = $e3; public name 'KS_atilde';
+  KS_adiaeresis_: byte = $e4; public name 'KS_adiaeresis';
+  KS_aring_: byte = $e5; public name 'KS_aring';
+  KS_ae_: byte = $e6; public name 'KS_ae';
+  KS_ccedilla_: byte = $e7; public name 'KS_ccedilla';
+  KS_egrave_: byte = $e8; public name 'KS_egrave';
+  KS_eacute_: byte = $e9; public name 'KS_eacute';
+  KS_ecircumflex_: byte = $ea; public name 'KS_ecircumflex';
+  KS_ediaeresis_: byte = $eb; public name 'KS_ediaeresis';
+  KS_igrave_: byte = $ec; public name 'KS_igrave';
+  KS_iacute_: byte = $ed; public name 'KS_iacute';
+  KS_icircumflex_: byte = $ee; public name 'KS_icircumflex';
+  KS_idiaeresis_: byte = $ef; public name 'KS_idiaeresis';
+  KS_eth_: byte = $f0; public name 'KS_eth';
+  KS_ntilde_: byte = $f1; public name 'KS_ntilde';
+  KS_ograve_: byte = $f2; public name 'KS_ograve';
+  KS_oacute_: byte = $f3; public name 'KS_oacute';
+  KS_ocircumflex_: byte = $f4; public name 'KS_ocircumflex';
+  KS_otilde_: byte = $f5; public name 'KS_otilde';
+  KS_odiaeresis_: byte = $f6; public name 'KS_odiaeresis';
+  KS_division: byte = $f7;
+  KS_oslash: byte = $f8;
+  KS_ugrave_: byte = $f9; public name 'KS_ugrave';
+  KS_uacute_: byte = $fa; public name 'KS_uacute';
+  KS_ucircumflex_: byte = $fb; public name 'KS_ucircumflex';
+  KS_udiaeresis_: byte = $fc; public name 'KS_udiaeresis';
+  KS_yacute_: byte = $fd; public name 'KS_yacute';
+  KS_thorn_: byte = $fe; public name 'KS_thorn';
+  KS_ydiaeresis_: byte = $ff; public name 'KS_ydiaeresis';
+  KS_Odoubleacute: word = $150; public name 'KS_Odoubleacute';
+  KS_odoubleacute_: word = $151; public name 'KS_odoubleacute';
+  KS_Udoubleacute: word = $170; public name 'KS_Udoubleacute';
+  KS_udoubleacute_: word = $171; public name 'KS_udoubleacute';
   (*
  * Group Dead (dead accents)
   *)
 
 
-  KS_dead_grave = $0300;
-  KS_dead_acute = $0301;
-  KS_dead_circumflex = $0302;
-  KS_dead_tilde = $0303;
-  KS_dead_diaeresis = $0308;
-  KS_dead_abovering = $030a;
-  KS_dead_cedilla = $0327;
+  KS_dead_grave: word = $0300;
+  KS_dead_acute: word = $0301;
+  KS_dead_circumflex: word = $0302;
+  KS_dead_tilde: word = $0303;
+  KS_dead_diaeresis: word = $0308;
+  KS_dead_abovering: word = $030a;
+  KS_dead_cedilla: word = $0327;
   (*
  * Group Cyrillic (koi8-r)
   *)
 
 
-  KS_Cyrillic_A = $e1;
-  KS_Cyrillic_BE = $e2;
-  KS_Cyrillic_VE = $f7;
-  KS_Cyrillic_GE = $e7;
-  KS_Cyrillic_DE = $e4;
-  KS_Cyrillic_IE = $e5;
-  KS_Cyrillic_YO = $b3;
-  KS_Cyrillic_ZHE = $f6;
-  KS_Cyrillic_ZE = $fa;
-  KS_Cyrillic_I = $e9;
-  KS_Cyrillic_ISHORT = $ea;
-  KS_Cyrillic_IUKR = $b6;
-  KS_Cyrillic_YI = $b7;
-  KS_Cyrillic_KA = $eb;
-  KS_Cyrillic_EL = $ec;
-  KS_Cyrillic_EM = $ed;
-  KS_Cyrillic_EN = $ee;
-  KS_Cyrillic_O = $ef;
-  KS_Cyrillic_PE = $f0;
-  KS_Cyrillic_ER = $f2;
-  KS_Cyrillic_ES = $f3;
-  KS_Cyrillic_TE = $f4;
-  KS_Cyrillic_U = $f5;
-  KS_Cyrillic_EF = $e6;
-  KS_Cyrillic_HA = $e8;
-  KS_Cyrillic_TSE = $e3;
-  KS_Cyrillic_CHE = $fe;
-  KS_Cyrillic_SHA = $fb;
-  KS_Cyrillic_SCHA = $fd;
-  KS_Cyrillic_HSIGHN = $ff;
-  KS_Cyrillic_YERU = $f9;
-  KS_Cyrillic_SSIGHN = $f8;
-  KS_Cyrillic_E = $fc;
-  KS_Cyrillic_YU = $e0;
-  KS_Cyrillic_YA = $f1;
-  KS_Cyrillic_a = $c1;
-  KS_Cyrillic_be = $c2;
-  KS_Cyrillic_ve = $d7;
-  KS_Cyrillic_ge = $c7;
-  KS_Cyrillic_de = $c4;
-  KS_Cyrillic_ie = $c5;
-  KS_Cyrillic_yo = $a3;
-  KS_Cyrillic_zhe = $d6;
-  KS_Cyrillic_ze = $da;
-  KS_Cyrillic_i = $c9;
-  KS_Cyrillic_ishort = $ca;
-  KS_Cyrillic_iukr = $a6;
-  KS_Cyrillic_yi = $a7;
-  KS_Cyrillic_ka = $cb;
-  KS_Cyrillic_el = $cc;
-  KS_Cyrillic_em = $cd;
-  KS_Cyrillic_en = $ce;
-  KS_Cyrillic_o = $cf;
-  KS_Cyrillic_pe = $d0;
-  KS_Cyrillic_er = $d2;
-  KS_Cyrillic_es = $d3;
-  KS_Cyrillic_te = $d4;
-  KS_Cyrillic_u = $d5;
-  KS_Cyrillic_ef = $c6;
-  KS_Cyrillic_ha = $c8;
-  KS_Cyrillic_tse = $c3;
-  KS_Cyrillic_che = $de;
-  KS_Cyrillic_sha = $db;
-  KS_Cyrillic_scha = $dd;
-  KS_Cyrillic_hsighn = $df;
-  KS_Cyrillic_yeru = $d9;
-  KS_Cyrillic_ssighn = $d8;
-  KS_Cyrillic_e = $dc;
-  KS_Cyrillic_yu = $c0;
-  KS_Cyrillic_ya = $d1;
-  KS_Cyrillic_gheukr = $ad;
-  KS_Cyrillic_GHEUKR = $bd;
-  KS_Cyrillic_yeukr = $a4;
-  KS_Cyrillic_YEUKR = $b4;
+  KS_Cyrillic_A: byte = $e1; public name 'KS_Cyrillic_A';
+  KS_Cyrillic_BE: byte = $e2; public name 'KS_Cyrillic_BE';
+  KS_Cyrillic_VE: byte = $f7; public name 'KS_Cyrillic_VE';
+  KS_Cyrillic_GE: byte = $e7; public name 'KS_Cyrillic_GE';
+  KS_Cyrillic_DE: byte = $e4; public name 'KS_Cyrillic_DE';
+  KS_Cyrillic_IE: byte = $e5; public name 'KS_Cyrillic_IE';
+  KS_Cyrillic_YO: byte = $b3; public name 'KS_Cyrillic_YO';
+  KS_Cyrillic_ZHE: byte = $f6; public name 'KS_Cyrillic_ZHE';
+  KS_Cyrillic_ZE: byte = $fa; public name 'KS_Cyrillic_ZE';
+  KS_Cyrillic_I: byte = $e9; public name 'KS_Cyrillic_I';                
+  KS_Cyrillic_ISHORT: byte = $ea; public name 'KS_Cyrillic_ISHORT';
+  KS_Cyrillic_IUKR: byte = $b6; public name 'KS_Cyrillic_IUKR';
+  KS_Cyrillic_YI: byte = $b7; public name 'KS_Cyrillic_YI';
+  KS_Cyrillic_KA: byte = $eb; public name 'KS_Cyrillic_KA';
+  KS_Cyrillic_EL: byte = $ec; public name 'KS_Cyrillic_EL';
+  KS_Cyrillic_EM: byte = $ed; public name 'KS_Cyrillic_EM';
+  KS_Cyrillic_EN: byte = $ee; public name 'KS_Cyrillic_EN';
+  KS_Cyrillic_O: byte = $ef; public name 'KS_Cyrillic_O';
+  KS_Cyrillic_PE: byte = $f0; public name 'KS_Cyrillic_PE';
+  KS_Cyrillic_ER: byte = $f2; public name 'KS_Cyrillic_ER';
+  KS_Cyrillic_ES: byte = $f3; public name 'KS_Cyrillic_ES';
+  KS_Cyrillic_TE: byte = $f4; public name 'KS_Cyrillic_TE';
+  KS_Cyrillic_U: byte = $f5; public name 'KS_Cyrillic_U';
+  KS_Cyrillic_EF: byte = $e6; public name 'KS_Cyrillic_EF';
+  KS_Cyrillic_HA: byte = $e8; public name 'KS_Cyrillic_HA';               
+  KS_Cyrillic_TSE: byte = $e3; public name 'KS_Cyrillic_TSE';
+  KS_Cyrillic_CHE: byte = $fe; public name 'KS_Cyrillic_CHE';
+  KS_Cyrillic_SHA: byte = $fb; public name 'KS_Cyrillic_SHA';
+  KS_Cyrillic_SCHA: byte = $fd; public name 'KS_Cyrillic_SCHA';
+  KS_Cyrillic_HSIGHN: byte = $ff; public name 'KS_Cyrillic_HSIGHN';
+  KS_Cyrillic_YERU: byte = $f9; public name 'KS_Cyrillic_YERU';
+  KS_Cyrillic_SSIGHN: byte = $f8; public name 'KS_Cyrillic_SSIGHN';
+  KS_Cyrillic_E: byte = $fc; public name 'KS_Cyrillic_E';
+  KS_Cyrillic_YU: byte = $e0; public name 'KS_Cyrillic_YU';
+  KS_Cyrillic_YA: byte = $f1; public name 'KS_Cyrillic_YA';
+  KS_Cyrillic_a_: byte = $c1; public name 'KS_Cyrillic_a';
+  KS_Cyrillic_be_: byte = $c2; public name 'KS_Cyrillic_be';
+  KS_Cyrillic_ve_: byte = $d7; public name 'KS_Cyrillic_ve';
+  KS_Cyrillic_ge_: byte = $c7; public name 'KS_Cyrillic_ge';
+  KS_Cyrillic_de_: byte = $c4; public name 'KS_Cyrillic_de';
+  KS_Cyrillic_ie_: byte = $c5; public name 'KS_Cyrillic_ie';
+  KS_Cyrillic_yo_: byte = $a3; public name 'KS_Cyrillic_yo';
+  KS_Cyrillic_zhe_: byte = $d6; public name 'KS_Cyrillic_zhe';
+  KS_Cyrillic_ze_: byte = $da; public name 'KS_Cyrillic_ze';
+  KS_Cyrillic_i_: byte = $c9; public name 'KS_Cyrillic_i';                
+  KS_Cyrillic_ishort_: byte = $ca; public name 'KS_Cyrillic_ishort';
+  KS_Cyrillic_iukr_: byte = $a6; public name 'KS_Cyrillic_iukr';
+  KS_Cyrillic_yi_: byte = $a7; public name 'KS_Cyrillic_yi';
+  KS_Cyrillic_ka_: byte = $cb; public name 'KS_Cyrillic_ka';
+  KS_Cyrillic_el_: byte = $cc; public name 'KS_Cyrillic_el';
+  KS_Cyrillic_em_: byte = $cd; public name 'KS_Cyrillic_em';
+  KS_Cyrillic_en_: byte = $ce; public name 'KS_Cyrillic_en';
+  KS_Cyrillic_o_: byte = $cf; public name 'KS_Cyrillic_o';
+  KS_Cyrillic_pe_: byte = $d0; public name 'KS_Cyrillic_pe';
+  KS_Cyrillic_er_: byte = $d2; public name 'KS_Cyrillic_er';
+  KS_Cyrillic_es_: byte = $d3; public name 'KS_Cyrillic_es';
+  KS_Cyrillic_te_: byte = $d4; public name 'KS_Cyrillic_te';
+  KS_Cyrillic_u_: byte = $d5; public name 'KS_Cyrillic_u';
+  KS_Cyrillic_ef_: byte = $c6; public name 'KS_Cyrillic_ef';
+  KS_Cyrillic_ha_: byte = $c8; public name 'KS_Cyrillic_ha';
+  KS_Cyrillic_tse_: byte = $c3; public name 'KS_Cyrillic_tse';
+  KS_Cyrillic_che_: byte = $de; public name 'KS_Cyrillic_che';
+  KS_Cyrillic_sha_: byte = $db; public name 'KS_Cyrillic_sha';
+  KS_Cyrillic_scha_: byte = $dd; public name 'KS_Cyrillic_scha';
+  KS_Cyrillic_hsighn_: byte = $df; public name 'KS_Cyrillic_hsighn';
+  KS_Cyrillic_yeru_: byte = $d9; public name 'KS_Cyrillic_yeru';
+  KS_Cyrillic_ssighn_: byte = $d8; public name 'KS_Cyrillic_ssighn';
+  KS_Cyrillic_e_: byte = $dc; public name 'KS_Cyrillic_e';
+  KS_Cyrillic_yu_: byte = $c0; public name 'KS_Cyrillic_yu';
+  KS_Cyrillic_ya_: byte = $d1; public name 'KS_Cyrillic_ya';
+  KS_Cyrillic_gheukr_: byte = $ad; public name 'KS_Cyrillic_gheukr';
+  KS_Cyrillic_GHEUKR: byte = $bd; public name 'KS_Cyrillic_GHEUKR';
+  KS_Cyrillic_yeukr_: byte = $a4; public name 'KS_Cyrillic_yeukr';
+  KS_Cyrillic_YEUKR: byte = $b4; public name 'KS_Cyrillic_YEUKR';
   (*
  * Group Latin-2 (iso8859-2)
   *)
 
 
-  KS_L2_Aogonek = $a1;
-  KS_L2_breve = $a2;
-  KS_L2_Lstroke = $a3;
-  KS_L2_Lcaron = $a5;
-  KS_L2_Sacute = $a6;
-  KS_L2_Scaron = $a9;
-  KS_L2_Scedilla = $aa;
-  KS_L2_Tcaron = $ab;
-  KS_L2_Zacute = $ac;
-  KS_L2_Zcaron = $ae;
-  KS_L2_Zdotabove = $af;
-  KS_L2_aogonek = $b1;
-  KS_L2_ogonek = $b2;
-  KS_L2_lstroke = $b3;
-  KS_L2_lcaron = $b5;
-  KS_L2_sacute = $b6;
-  KS_L2_caron = $b7;
-  KS_L2_scaron = $b9;
-  KS_L2_scedilla = $ba;
-  KS_L2_tcaron = $bb;
-  KS_L2_zacute = $bc;
-  KS_L2_dblacute = $bd;
-  KS_L2_zcaron = $be;
-  KS_L2_zdotabove = $bf;
-  KS_L2_Racute = $c0;
-  KS_L2_Abreve = $c3;
-  KS_L2_Lacute = $c5;
-  KS_L2_Cacute = $c6;
-  KS_L2_Ccaron = $c8;
-  KS_L2_Eogonek = $ca;
-  KS_L2_Ecaron = $cc;
-  KS_L2_Dcaron = $cf;
-  KS_L2_Dstroke = $d0;
-  KS_L2_Nacute = $d1;
-  KS_L2_Ncaron = $d2;
-  KS_L2_Odoubleacute = $d5;
-  KS_L2_Rcaron = $d8;
-  KS_L2_Uring = $d9;
-  KS_L2_Udoubleacute = $db;
-  KS_L2_Tcedilla = $de;
-  KS_L2_racute = $e0;
-  KS_L2_abreve = $e3;
-  KS_L2_lacute = $e5;
-  KS_L2_cacute = $e6;
-  KS_L2_ccaron = $e8;
-  KS_L2_eogonek = $ea;
-  KS_L2_ecaron = $ec;
-  KS_L2_dcaron = $ef;
-  KS_L2_dstroke = $f0;
-  KS_L2_nacute = $f1;
-  KS_L2_odoubleacute = $f5;
-  KS_L2_rcaron = $f8;
-  KS_L2_uring = $f9;
-  KS_L2_udoubleacute = $fb;
-  KS_L2_tcedilla = $fe;
-  KS_L2_dotabove = $ff;
+  KS_L2_Aogonek: byte = $a1; public name 'KS_L2_Aogonek';
+  KS_L2_breve: byte = $a2;
+  KS_L2_Lstroke: byte = $a3;
+  KS_L2_Lcaron: byte = $a5;
+  KS_L2_Sacute: byte = $a6;
+  KS_L2_Scaron: byte = $a9;
+  KS_L2_Scedilla: byte = $aa;
+  KS_L2_Tcaron: byte = $ab;
+  KS_L2_Zacute: byte = $ac;
+  KS_L2_Zcaron: byte = $ae;
+  KS_L2_Zdotabove: byte = $af;
+  KS_L2_aogonek_: byte = $b1; public name 'KS_L2_aogonek';
+  KS_L2_ogonek: byte = $b2;
+  KS_L2_lstroke_: byte = $b3; public name 'KS_L2_lstroke';
+  KS_L2_lcaron_: byte = $b5; public name 'KS_L2_lcaron';
+  KS_L2_sacute_: byte = $b6; public name 'KS_L2_sacute';
+  KS_L2_caron: byte = $b7;
+  KS_L2_scaron_: byte = $b9; public name 'KS_L2_scaron';
+  KS_L2_scedilla_: byte = $ba; public name 'KS_L2_scedilla';
+  KS_L2_tcaron_: byte = $bb; public name 'KS_L2_tcaron';
+  KS_L2_zacute_: byte = $bc; public name 'KS_L2_zacute';
+  KS_L2_dblacute: byte = $bd;
+  KS_L2_zcaron_: byte = $be; public name 'KS_L2_zcaron';
+  KS_L2_zdotabove_: byte = $bf; public name 'KS_L2_zdotabove';
+  KS_L2_Racute: byte = $c0;
+  KS_L2_Abreve: byte = $c3;
+  KS_L2_Lacute: byte = $c5;
+  KS_L2_Cacute: byte = $c6;
+  KS_L2_Ccaron: byte = $c8;
+  KS_L2_Eogonek: byte = $ca;
+  KS_L2_Ecaron: byte = $cc;
+  KS_L2_Dcaron: byte = $cf;
+  KS_L2_Dstroke: byte = $d0;
+  KS_L2_Nacute: byte = $d1;
+  KS_L2_Ncaron: byte = $d2;
+  KS_L2_Odoubleacute: byte = $d5;
+  KS_L2_Rcaron: byte = $d8;
+  KS_L2_Uring: byte = $d9;
+  KS_L2_Udoubleacute: byte = $db;
+  KS_L2_Tcedilla: byte = $de;
+  KS_L2_racute_: byte = $e0; public name 'KS_L2_racute';
+  KS_L2_abreve_: byte = $e3; public name 'KS_L2_abreve';
+  KS_L2_lacute_: byte = $e5; public name 'KS_L2_lacute';               
+  KS_L2_cacute_: byte = $e6; public name 'KS_L2_cacute';
+  KS_L2_ccaron_: byte = $e8; public name 'KS_L2_ccaron';
+  KS_L2_eogonek_: byte = $ea; public name 'KS_L2_eogonek';
+  KS_L2_ecaron_: byte = $ec; public name 'KS_L2_ecaron';
+  KS_L2_dcaron_: byte = $ef; public name 'KS_L2_dcaron';                
+  KS_L2_dstroke_: byte = $f0; public name 'KS_L2_dstroke';
+  KS_L2_nacute_: byte = $f1; public name 'KS_L2_nacute';
+  KS_L2_odoubleacute_: byte = $f5; public name 'KS_L2_odoubleacute';
+  KS_L2_rcaron_: byte = $f8; public name 'KS_L2_rcaron';
+  KS_L2_uring_: byte = $f9; public name 'KS_L2_uring';
+  KS_L2_udoubleacute_: byte = $fb; public name 'KS_L2_udoubleacute';
+  KS_L2_tcedilla_: byte = $fe; public name 'KS_L2_tcedilla';
+  KS_L2_dotabove: byte = $ff;
   (*
  * Group Latin-5 (iso8859-9)
   *)
 
-
-  KS_L5_Gbreve = $d0;
-  KS_L5_Idotabove = $dd;
-  KS_L5_Scedilla = $de;
-  KS_L5_gbreve = $f0;
-  KS_L5_idotless = $fd;
-  KS_L5_scedilla = $fe;
+var
+  KS_L5_Gbreve: byte = $d0; public name 'KS_L5_Gbreve';
+  KS_L5_Idotabove: byte = $dd;
+  KS_L5_Scedilla: byte = $de; public name 'KS_L5_Scedilla';
+  KS_L5_gbreve_: byte = $f0; public name 'KS_L5_gbreve';
+  KS_L5_idotless: byte = $fd;
+  KS_L5_scedilla_: byte = $fe; public name 'KS_L5_scedilla';
   (*
  * Group Latin-7 (iso8859-13)
   *)
 
-
-  KS_L7_rightdblquot = $a1;
-  KS_L7_dbllow9quot = $a5;
-  KS_L7_Ostroke = $a8;
-  KS_L7_Rcedilla = $aa;
-  KS_L7_AE = $af;
-  KS_L7_leftdblquot = $b4;
-  KS_L7_ostroke = $b8;
-  KS_L7_rcedilla = $ba;
-  KS_L7_ae = $bf;
-  KS_L7_Aogonek = $c0;
-  KS_L7_Iogonek = $c1;
-  KS_L7_Amacron = $c2;
-  KS_L7_Cacute = $c3;
-  KS_L7_Eogonek = $c6;
-  KS_L7_Emacron = $c7;
-  KS_L7_Ccaron = $c8;
-  KS_L7_Zacute = $ca;
-  KS_L7_Edot = $cb;
-  KS_L7_Gcedilla = $cc;
-  KS_L7_Kcedilla = $cd;
-  KS_L7_Imacron = $ce;
-  KS_L7_Lcedilla = $cf;
-  KS_L7_Scaron = $d0;
-  KS_L7_Nacute = $d1;
-  KS_L7_Ncedilla = $d2;
-  KS_L7_Omacron = $d4;
-  KS_L7_Uogonek = $d8;
-  KS_L7_Lstroke = $d9;
-  KS_L7_Sacute = $da;
-  KS_L7_Umacron = $db;
-  KS_L7_Zdot = $dd;
-  KS_L7_Zcaron = $de;
-  KS_L7_aogonek = $e0;
-  KS_L7_iogonek = $e1;
-  KS_L7_amacron = $e2;
-  KS_L7_cacute = $e3;
-  KS_L7_eogonek = $e6;
-  KS_L7_emacron = $e7;
-  KS_L7_ccaron = $e8;
-  KS_L7_zacute = $ea;
-  KS_L7_edot = $eb;
-  KS_L7_gcedilla = $ec;
-  KS_L7_kcedilla = $ed;
-  KS_L7_imacron = $ee;
-  KS_L7_lcedilla = $ef;
-  KS_L7_scaron = $f0;
-  KS_L7_nacute = $f1;
-  KS_L7_ncedilla = $f2;
-  KS_L7_omacron = $f4;
-  KS_L7_uogonek = $f8;
-  KS_L7_lstroke = $f9;
-  KS_L7_sacute = $fa;
-  KS_L7_umacron = $fb;
-  KS_L7_zdot = $fd;
-  KS_L7_zcaron = $fe;
-  KS_L7_rightsnglquot = $ff;
+var
+  KS_L7_rightdblquot: byte = $a1;
+  KS_L7_dbllow9quot: byte = $a5;
+  KS_L7_Ostroke: byte = $a8;
+  KS_L7_Rcedilla: byte = $aa;
+  KS_L7_AE: byte = $af;
+  KS_L7_leftdblquot: byte = $b4;
+  KS_L7_ostroke_: byte = $b8; public name 'KS_L7_ostroke';
+  KS_L7_rcedilla_: byte = $ba; public name 'KS_L7_rcedilla';
+  KS_L7_ae_: byte = $bf; public name 'KS_L7_ae';
+  KS_L7_Aogonek: byte = $c0;
+  KS_L7_Iogonek: byte = $c1;
+  KS_L7_Amacron: byte = $c2;
+  KS_L7_Cacute: byte = $c3;
+  KS_L7_Eogonek: byte = $c6;
+  KS_L7_Emacron: byte = $c7;
+  KS_L7_Ccaron: byte = $c8;
+  KS_L7_Zacute: byte = $ca;
+  KS_L7_Edot: byte = $cb;
+  KS_L7_Gcedilla: byte = $cc;
+  KS_L7_Kcedilla: byte = $cd;
+  KS_L7_Imacron: byte = $ce;
+  KS_L7_Lcedilla: byte = $cf;
+  KS_L7_Scaron: byte = $d0;
+  KS_L7_Nacute: byte = $d1;
+  KS_L7_Ncedilla: byte = $d2;
+  KS_L7_Omacron: byte = $d4;
+  KS_L7_Uogonek: byte = $d8;
+  KS_L7_Lstroke: byte = $d9;
+  KS_L7_Sacute: byte = $da;
+  KS_L7_Umacron: byte = $db;
+  KS_L7_Zdot: byte = $dd;
+  KS_L7_Zcaron: byte = $de;
+  KS_L7_aogonek_: byte = $e0; public name 'KS_L7_aogonek';
+  KS_L7_iogonek_: byte = $e1; public name 'KS_L7_iogonek';
+  KS_L7_amacron_: byte = $e2; public name 'KS_L7_amacron';
+  KS_L7_cacute_: byte = $e3; public name 'KS_L7_cacute';
+  KS_L7_eogonek_: byte = $e6; public name 'KS_L7_eogonek';
+  KS_L7_emacron_: byte = $e7; public name 'KS_L7_emacron';
+  KS_L7_ccaron_: byte = $e8; public name 'KS_L7_ccaron';
+  KS_L7_zacute_: byte = $ea; public name 'KS_L7_zacute';
+  KS_L7_edot_: byte = $eb; public name 'KS_L7_edot';
+  KS_L7_gcedilla_: byte = $ec; public name 'KS_L7_gcedilla';
+  KS_L7_kcedilla_: byte = $ed; public name 'KS_L7_kcedilla';
+  KS_L7_imacron_: byte = $ee; public name 'KS_L7_imacron';
+  KS_L7_lcedilla_: byte = $ef; public name 'KS_L7_lcedilla';
+  KS_L7_scaron_: byte = $f0; public name 'KS_L7_scaron';
+  KS_L7_nacute_: byte = $f1; public name 'KS_L7_nacute';
+  KS_L7_ncedilla_: byte = $f2; public name 'KS_L7_ncedilla';
+  KS_L7_omacron_: byte = $f4; public name 'KS_L7_omacron';
+  KS_L7_uogonek_: byte = $f8; public name 'KS_L7_uogonek';
+  KS_L7_lstroke_: byte = $f9; public name 'KS_L7_lstroke';
+  KS_L7_sacute_: byte = $fa; public name 'KS_L7_sacute';
+  KS_L7_umacron_: byte = $fb; public name 'KS_L7_umacron';
+  KS_L7_zdot_: byte = $fd; public name 'KS_L7_zdot';
+  KS_L7_zcaron_: byte = $fe; public name 'KS_L7_zcaron';
+  KS_L7_rightsnglquot: byte = $ff;
   (*
  * Group 1 (modifiers)
   *)
 
-
+const
   KS_Shift_L = $f101;
   KS_Shift_R = $f102;
   KS_Control_L = $f103;
@@ -500,47 +504,48 @@ const
  * Group 3 (function)
   *)
 
-
-  KS_f1 = $f300;
-  KS_f2 = $f301;
-  KS_f3 = $f302;
-  KS_f4 = $f303;
-  KS_f5 = $f304;
-  KS_f6 = $f305;
-  KS_f7 = $f306;
-  KS_f8 = $f307;
-  KS_f9 = $f308;
-  KS_f10 = $f309;
-  KS_f11 = $f30a;
-  KS_f12 = $f30b;
-  KS_f13 = $f30c;
-  KS_f14 = $f30d;
-  KS_f15 = $f30e;
-  KS_f16 = $f30f;
-  KS_f17 = $f310;
-  KS_f18 = $f311;
-  KS_f19 = $f312;
-  KS_f20 = $f313;
-  KS_F1 = $f340;
-  KS_F2 = $f341;
-  KS_F3 = $f342;
-  KS_F4 = $f343;
-  KS_F5 = $f344;
-  KS_F6 = $f345;
-  KS_F7 = $f346;
-  KS_F8 = $f347;
-  KS_F9 = $f348;
-  KS_F10 = $f349;
-  KS_F11 = $f34a;
-  KS_F12 = $f34b;
-  KS_F13 = $f34c;
-  KS_F14 = $f34d;
-  KS_F15 = $f34e;
-  KS_F16 = $f34f;
-  KS_F17 = $f350;
-  KS_F18 = $f351;
-  KS_F19 = $f352;
-  KS_F20 = $f353;
+var
+  KS_f1_: word = $f300; public name 'KS_f1';
+  KS_f2_: word = $f301; public name 'KS_f2';
+  KS_f3_: word = $f302; public name 'KS_f3';
+  KS_f4_: word = $f303; public name 'KS_f4';
+  KS_f5_: word = $f304; public name 'KS_f5';
+  KS_f6_: word = $f305; public name 'KS_f6';               
+  KS_f7_: word = $f306; public name 'KS_f7';
+  KS_f8_: word = $f307; public name 'KS_f8';
+  KS_f9_: word = $f308; public name 'KS_f9';
+  KS_f10_: word = $f309; public name 'KS_f10';
+  KS_f11_: word = $f30a; public name 'KS_f11';
+  KS_f12_: word = $f30b; public name 'KS_f12';
+  KS_f13_: word = $f30c; public name 'KS_f13';
+  KS_f14_: word = $f30d; public name 'KS_f14';
+  KS_f15_: word = $f30e; public name 'KS_f15';
+  KS_f16_: word = $f30f; public name 'KS_f16';               
+  KS_f17_: word = $f310; public name 'KS_f17';
+  KS_f18_: word = $f311; public name 'KS_f18';
+  KS_f19_: word = $f312; public name 'KS_f19';
+  KS_f20_: word = $f313; public name 'KS_f20';
+  KS_F1: word = $f340; public name 'KS_F1';
+  KS_F2: word = $f341; public name 'KS_F2';
+  KS_F3: word = $f342; public name 'KS_F3';
+  KS_F4: word = $f343; public name 'KS_F4';               
+  KS_F5: word = $f344; public name 'KS_F5';
+  KS_F6: word = $f345; public name 'KS_F6';
+  KS_F7: word = $f346; public name 'KS_F7';
+  KS_F8: word = $f347; public name 'KS_F8';
+  KS_F9: word = $f348; public name 'KS_F9';
+  KS_F10: word = $f349; public name 'KS_F10';
+  KS_F11: word = $f34a; public name 'KS_F11';
+  KS_F12: word = $f34b; public name 'KS_F12';
+  KS_F13: word = $f34c; public name 'KS_F13';
+  KS_F14: word = $f34d; public name 'KS_F14';
+  KS_F15: word = $f34e; public name 'KS_F15';
+  KS_F16: word = $f34f; public name 'KS_F16';
+  KS_F17: word = $f350; public name 'KS_F17';
+  KS_F18: word = $f351; public name 'KS_F18';
+  KS_F19: word = $f352; public name 'KS_F19';
+  KS_F20: word = $f353; public name 'KS_F20';
+const
   KS_Home = $f381;
   KS_Prior = $f382;
   KS_Next = $f383;
@@ -624,7 +629,6 @@ const
   KS_GROUP_Keycode = $f803;  (* not encoded in keysym  *)
   KS_NUMKEYCODES = $1000;
 
-function KS_KEYCODE(v: cint): cint; inline;
 function KS_KEYCODE(v: cint): cint; inline;
 function KS_GROUP(k: cint): cint; inline;
 function KS_VALUE(k: cint): cint; inline;
@@ -669,7 +673,7 @@ const
   KB_IOPENER = $000040;  (* f1-f12 -> ESC,f1-f11  *)
   KB_MACHDEP = $000080;  (* machine dependent  *)
   KB_APPLE = $010000;  (* Apple specific layout  *)
-
+(*
   KB_ENCTAB = (( KB_USER,	'user' ),
   	( KB_US,	'us' ),
   	( KB_DE,	'de' ),
@@ -706,7 +710,7 @@ const
   	( KB_METAESC,	'metaesc' ),
   	( KB_IOPENER,	'iopener' ),
   	( KB_MACHDEP,	'machdep' ),
-  	( KB_APPLE,	'apple' ));
+  	( KB_APPLE,	'apple' ));        *)
 {$ENDIF}
 
 

+ 1 - 1
packages/mad/fpmake.pp

@@ -17,7 +17,7 @@ begin
     P.Directory:=ADirectory;
 {$endif ALLPACKAGES}
     P.Version:='3.1.1';
-    P.OSes := [linux,win32,win64];
+    P.OSes := [linux,win32,win64,wii];
     P.SourcePath.Add('src');
 
     T:=P.Targets.AddUnit('mad.pas');

+ 36 - 7
rtl/wii/Makefile.fpc

@@ -7,10 +7,10 @@ main=rtl
 
 [target]
 loaders=
-units=$(SYSTEMUNIT) uuchar objpas macpas strings \
-#      dos \
+units=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings \
+      dos \
       sysutils \
-#      classes \
+      classes \
       math typinfo ctypes \
       charset cpall getopts \
       types rtlconsts sysconst lineinfo fgl cmem
@@ -45,10 +45,8 @@ COMMON=$(RTL)/common
 PROCINC=$(RTL)/$(CPU_TARGET)
 UNITPREFIX=rtl
 SYSTEMUNIT=system
+override [email protected]
 
-# Use new feature from 1.0.5 version
-# that generates release PPU files
-# which will not be recompiled
 ifdef RELEASE
 override FPCOPT+=-Ur
 endif
@@ -83,6 +81,7 @@ $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS) $(INC)/softfpu.pp
         $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
 
 uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
+	$(COMPILER) $(INC)/uuchar.pp
 
 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
@@ -90,6 +89,10 @@ objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
                    $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
                    $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/strings.pp
+
+iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(INC)/iso7185.pp
 
 #
 # System Dependent Units
@@ -105,10 +108,11 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
 
 dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
                $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) dos.pp
 
 #crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
 
-objects$(PPUEXT) : $(INC)/objects.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+#objects$(PPUEXT) : $(INC)/objects.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 
 #printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
 
@@ -167,16 +171,21 @@ macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
 #
 
 ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/ucomplex.pp
 
 getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/getopts.pp
 
 heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
 
 lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(INC)/lineinfo.pp
+
 #lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
 
 charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/charset.pp
 
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
         $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
@@ -186,43 +195,63 @@ cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
 #
 
 exec$(PPUEXT)    : exec.pp execf.inc execd.inc
+	$(COMPILER) exec.pp
 
 timer$(PPUEXT)   : timer.pp timerd.inc timerf.inc
+	$(COMPILER) timer.pp
 
 utility$(PPUEXT) : utility.pp exec$(PPUEXT) utilf.inc utild1.inc utild2.inc
+	$(COMPILER) utility.pp
 
 doslib$(PPUEXT)  : doslib.pp exec$(PPUEXT) timer$(PPUEXT) doslibd.inc doslibf.inc
+	$(COMPILER) doslib.pp
 
 hardware$(PPUEXT): hardware.pas exec$(PPUEXT)
+	$(COMPILER) hardware.pas
 
 inputevent$(PPUEXT): inputevent.pas exec$(PPUEXT) timer$(PPUEXT) utility$(PPUEXT)
+	$(COMPILER) inputevent.pas
 
 graphics$(PPUEXT): graphics.pas exec$(PPUEXT) utility$(PPUEXT) hardware$(PPUEXT)
+	$(COMPILER) graphics.pas
 
 layers$(PPUEXT)  : layers.pas exec$(PPUEXT) graphics$(PPUEXT) utility$(PPUEXT)
+	$(COMPILER) layers.pas
 
 intuition$(PPUEXT): intuition.pas exec$(PPUEXT) graphics$(PPUEXT) utility$(PPUEXT) \
                     inputevent$(PPUEXT) timer$(PPUEXT) layers$(PPUEXT)
+	$(COMPILER) intuition.pas
 
 aboxlib$(PPUEXT): aboxlib.pas
+	$(COMPILER) aboxlib.pas
 
 clipboard$(PPUEXT): clipboard.pas exec$(PPUEXT)
+	$(COMPILER) clipboard.pas
 
 datatype$(PPUEXT): datatypes.pas exec$(PPUEXT) doslib$(PPUEXT) intuition$(PPUEXT) \
                    utility$(PPUEXT) graphics$(PPUEXT)
+	$(COMPILER) datatypes.pas
 
 asl$(PPUEXT): asl.pas exec$(PPUEXT) graphics$(PPUEXT) utility$(PPUEXT)
+	$(COMPILER) asl.pas
 
 ahi$(PPUEXT): ahi.pas exec$(PPUEXT) utility$(PPUEXT)
+	$(COMPILER) ahi.pas
 
 mui$(PPUEXT): mui.pas exec$(PPUEXT) utility$(PPUEXT) intuition$(PPUEXT) graphics$(PPUEXT)
+	$(COMPILER) mui.pas
 
 tinygl$(PPUEXT): tinygl.pp exec$(PPUEXT)
+	$(COMPILER) tinygl.pp
 
 get9$(PPUEXT): get9.pas exec$(PPUEXT)
+	$(COMPILER) get9.pas
 
 muihelper$(PPUEXT): muihelper.pas intuition$(PPUEXT) mui$(PPUEXT) doslib$(PPUEXT) utility$(PPUEXT)
+	$(COMPILER) muihelper.pas
 
 ctypes$(PPUEXT) :  $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/ctypes.pp
 
 cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/cmem.pp

+ 23 - 0
rtl/wii/rtl.cfg

@@ -0,0 +1,23 @@
+ -Sf-
+ -SfHEAP
+ -SfINITFINAL
+ -SfCLASSES
+ -SfEXCEPTIONS
+ -SfEXITCODE
+ -SfANSISTRINGS
+ -SfWIDESTRINGS
+ -SfTEXTIO
+# -SfCONSOLEIO
+ -SfFILEIO
+ -SfRANDOM
+ -SfVARIANTS
+ -SfOBJECTS
+ -SfDYNARRAYS
+ -SfTHREADING
+ -SfCOMMANDARGS
+ -SfPROCESSES
+ -SfSTACKCHECK
+ -SfDYNLIBS
+ -SfEXITCODE
+ -SfSOFTFPU
+ -SfRTTI

+ 4 - 18
rtl/wii/sysdir.inc

@@ -20,36 +20,22 @@
 *****************************************************************************}
 procedure do_mkdir(const s: rawbytestring);
 begin
-  { TODO: convert callback to use rawbytestring to avoid conversion }
-  if FileIODevice.DirIO.DoMkdir <> nil then
-    FileIODevice.DirIO.DoMkdir(s);
+
 end;
 
 procedure do_rmdir(const s: rawbytestring);
 begin
-  { TODO: convert callback to use rawbytestring to avoid conversion }
-  if FileIODevice.DirIO.DoRmdir <> nil then
-    FileIODevice.DirIO.DoRmdir(s);
+
 end;
 
 procedure do_chdir(const s: rawbytestring);
 begin
-  { TODO: convert callback to use rawbytestring to avoid conversion }
-  if FileIODevice.DirIO.DoChdir <> nil then
-    FileIODevice.DirIO.DoChdir(pchar(s));
+
 end;
 
 procedure do_GetDir(DriveNr: byte; var Dir: RawByteString);
-var
-  TmpDir: ShortString;
 begin
-  { TODO: convert callback to use rawbytestring to avoid conversion }
-  if FileIODevice.DirIO.DoGetdir <> nil then
-    begin
-      FileIODevice.DirIO.DoGetdir(DriveNr, TmpDir);
-      Dir:=TmpDir;
-      SetCodePage(Dir,DefaultFileSystemCodePage,false);
-    end;
+
 end;
 
 

+ 7 - 8
rtl/wii/system.pp

@@ -231,11 +231,11 @@ end;
 
 procedure SysInitStdIO;
 begin
-  OpenStdIO(Input,fmInput,0);
-  OpenStdIO(Output,fmOutput,0);
-  OpenStdIO(ErrOutput,fmOutput,0);
-  OpenStdIO(StdOut,fmOutput,0);
-  OpenStdIO(StdErr,fmOutput,0);
+  OpenStdIO(Input,fmInput,StdInputHandle);
+  OpenStdIO(Output,fmOutput,StdOutputHandle);
+  OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
+  OpenStdIO(StdOut,fmOutput,StdOutputHandle);
+  OpenStdIO(StdErr,fmOutput,StdErrorHandle);
 end;
 
 
@@ -251,15 +251,14 @@ begin
 { OS specific startup }
 
 { Set up signals handlers }
-//  fpc_cpucodeinit;
+
 
 { Setup heap }
   InitHeap;
   SysInitExceptions;
-
+  initunicodestringmanager;
   SetupCmdLine;
   
-  
 {$ifdef FPC_HAS_FEATURE_CONSOLEIO}
   { Setup stdin, stdout and stderr }
   SysInitStdIO;

+ 19 - 2
rtl/wii/sysutils.pp

@@ -28,7 +28,7 @@ interface
 {$MODESWITCH OUT}
 { force ansistrings }
 {$H+}
-
+{$DEFINE HAS_SLEEP}
 { used OS file system APIs use ansistring }
 {$define SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL}
 { OS has an ansistring/single byte environment variable API }
@@ -212,7 +212,24 @@ Procedure SysBeep;
 begin
 end;
 
-
+Procedure Sleep(Milliseconds : Cardinal);
+var
+  i,j : Cardinal;
+  calib : Cardinal;
+begin
+{ $warning no idea if this calibration value is correct (FK) }
+{ I estimated it roughly on the CPU clock of 16 MHz and 1+3 clock cycles for the loop }
+{ 
+  calib:=4000000;
+  for i:=1 to Milliseconds do
+    asm
+      ldr r0,calib
+    .L1:
+      sub r0,r0,#1
+      bne .L1
+    end;
+    }
+end;
 {****************************************************************************
                               Locale Functions
 ****************************************************************************}