Porting Lua issues

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting Lua issues

jose marin2
Hello.

If you had ported Lua to some platform (WindowsCE,
Gameboy, Palm, consoles, etc), I would like very much
to know how you did it, and what challenges did you
face.

I need to identify the portions of Lua that needed to
be changed in every port.

Thanks!

Jose



__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 

Reply | Threaded
Open this post in threaded view
|

Re: Porting Lua issues

jason zhang-4
I guess it depend on how the C Library is supported by the platform.

----- Original Message ----- 
From: "Jose Marin" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, October 24, 2006 3:31 PM
Subject: Porting Lua issues


> Hello.
> 
> If you had ported Lua to some platform (WindowsCE,
> Gameboy, Palm, consoles, etc), I would like very much
> to know how you did it, and what challenges did you
> face.
> 
> I need to identify the portions of Lua that needed to
> be changed in every port.
> 
> Thanks!
> 
> Jose
> 
> 
> 
> __________________________________________________
> Fale com seus amigos  de graça com o novo Yahoo! Messenger 
> http://br.messenger.yahoo.com/ 
>


Reply | Threaded
Open this post in threaded view
|

Re: Porting Lua issues

Roger Ivie
In reply to this post by jose marin2
On Tue, 24 Oct 2006, Jose Marin wrote:
If you had ported Lua to some platform (WindowsCE,
Gameboy, Palm, consoles, etc), I would like very much
to know how you did it, and what challenges did you
face.

I need to identify the portions of Lua that needed to
be changed in every port.

I've run it under OpenVMS/Alpha, Windows (compiled using Open Watcom),
and VxWorks/PowerPC. Not had any difficulty in any of the ports.

For the Windows and OpenVMS compiles, it was just a matter of commenting
out the bits involving isatty; I just made it always assume stdin was a
terminal.

On VxWorks, I replaced the wrapper stuff in lua.c with my own code.
There were two places in the system that I had to include <vxworks.h>,
but I made no other changes to the code. I don't recall where those
places were at the moment.

I've been pleased enough with how easy it was to make go and extend that
I've tossed my hand-crafted odd FORTH dialect in favor of Lua in the
embedded project I'm working on. I've extended it to include vector and
matrix arithmetic as well as allowing Lua scripts to manipulate key
native data structures wothout having to modify ANY of the original Lua
code.
--
roger ivie
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Porting Lua issues

Asko Kauppi
In reply to this post by jason zhang-4

There are existing ports on the net for PocketPC, and Palm at least. Both of those are not trivial; PocketPC/Wince for example has to cope with Ansi/Unicode issues. I wouldn't do the work again, or at least I would look at the existing ports first.

Gameboy I do not know, but if you get Lua running on DS so that I can run my own scripts on it...... !!!

For PSP, Lua is the basis of a thriving hobbyist game development undercurrent, I've heard (my friend showed me).

-asko


Jason Zhang kirjoitti 24.10.2006 kello 21.17:

I guess it depend on how the C Library is supported by the platform.

----- Original Message -----
From: "Jose Marin" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, October 24, 2006 3:31 PM
Subject: Porting Lua issues


Hello.

If you had ported Lua to some platform (WindowsCE,
Gameboy, Palm, consoles, etc), I would like very much
to know how you did it, and what challenges did you
face.

I need to identify the portions of Lua that needed to
be changed in every port.

Thanks!

Jose



__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/



Reply | Threaded
Open this post in threaded view
|

Re: Porting Lua issues

Paul Hudson-2
In reply to this post by jose marin2
We have Lua as part of our product m-Network running on all flavours of Windows Mobile and all versions of Symbian (S60 all versions and UIQ all versions). I'm not sure how much detail I can give out, but if you have some specific questions I can ask.

We also have it running on the RIM Blackberry. Quite a lot had to be done there, for fairly obvious reasons :)

P.

----- Original Message -----
From: "Jose Marin" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, October 24, 2006 8:31 PM
Subject: Porting Lua issues

Hello.

If you had ported Lua to some platform (WindowsCE,
Gameboy, Palm, consoles, etc), I would like very much
to know how you did it, and what challenges did you
face.

I need to identify the portions of Lua that needed to
be changed in every port.

Thanks!

Jose



__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/



Reply | Threaded
Open this post in threaded view
|

Re: Porting Lua issues

Luiz Henrique de Figueiredo
> I'm not sure how much detail I can give out, but if you have some 
> specific questions I can ask.

We'd be especially interested in changes needed to please a compiler
or in any assumptions made by the Lua core that failed in your platform.
Thanks.
--lhf

Reply | Threaded
Open this post in threaded view
|

Re: Porting Lua issues

Zachary P. Landau-4
In reply to this post by Asko Kauppi
Gameboy I do not know, but if you get Lua running on DS so that I can
run my own scripts on it...... !!!

If you search the mailing lists, I made a post (with a pretty screenshot) about
running Lua on a DS emulator.  I don't think I ever got to trying it on the
real hardware though.  Someone recently emailed me about possibly continuing to
work on this, but I don't know how far he got.

The work to get it running on the DS emulator was pretty minimal.  I had to
change the compiler to use the cross compiler and I had to write a couple lines
to initialize the console.  That's it.  You'll find a patch in that
post I mentioned.

Reply | Threaded
Open this post in threaded view
|

Re: Porting Lua issues

Gerhard Sittig-2
In reply to this post by Luiz Henrique de Figueiredo
[ late reply to an old message from last October, mostly to get a
  reference to the (to be) new thread into this one should somebody
  use the archive ]

On Wed, Oct 25, 2006 at 12:49 -0300, Luiz Henrique de Figueiredo wrote:
> 
> We'd be especially interested in changes needed to please a compiler
> or in any assumptions made by the Lua core that failed in your platform.
> Thanks.

As I tried to "port" Lua to the PalmOS environment lately there were a
few things I needed to change in the Lua 5.1.1 source tree.  Some of
them were necessary to circumvent this system's limitations, others I'm
not yet done investigating (they seem to be compiler or optimizer
related, I had to "unroll" a few preprocessor macros into "real"
routines before things started working correctly; although the "spirit"
of the source did not change at all, explicitely formulating the code
"magically" removed funny effects; having a routine with a prototype
instead of a mere preprocessor macro might as well have triggered some
type propagation which could have been missing before -- I don't know).

I intend to release that PalmOS port under the MIT license as Lua itself
was released under.  But the Lua core is not completely functional yet
and the current source is more of a hack than something "presentable".
Especially those program flow control instructions like "for" or "if"
seem to break the software (damage either the VM's "pc" upon execution
or the "go wild" in the parser's jump control determination upon
compiling).  I suspect that this is related to the fact that the "int"
datatype only has 16bits on PalmOS.  I did spot a bug in the Instruction
handling for the "below 32bits int" case, but that only solved part of
the problem and I still didn't grok completely how the Bx/sBx operand
"encoding" works.  The list archive suggests that there are other 16bit
ports of Lua, even to m68k embedded systems, and they seem to work after
the fixes of almost exactly one year ago.


Once these problems have been sorted out and the basic functionality is
there, I will do some cleanup and probably create a luaforge project.
I'm aware that there are other PalmOS implementations of Lua, but
several issues with these projects made me start another one.  The most
important reason was that I wanted to have "all the fun" which comes
with such a thing. :)  In a kind of Zen way that journey was more
important to me than the actual result ...

The currently accumulated modifications which I have made to the Lua
source tree I intend to discuss here much earlier in another (new)
thread -- probably with "(Another) PalmOS port of Lua" or a similar
subject.  After I have found some time to summarize what's happened so
far, and maybe after trying some more to find out what's going wrong
there.  I feel that none of this is urgent enough to be rushed into the
upcoming 5.1.2 release, it may even be not important enough to make it
at all into the upstream.  So don't mind if I should be silent for a few
more weeks ...  ( I'm having fun then. :> )


virtually yours
Gerhard Sittig
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.