Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  
Evil Steve


Ugh @ Lua. Well, ugh in general.

PC is little endian. Wii is big endian. A compiled lua script is stored in the byt order of the machine it was compiled on. Begin to see the problem here?
On the plus side, Lua is remarkably safe, it does a check on various things like the version (obviously), size of the types it uses, and the byte order when loading a compiled lua chunk. So at least I got a helpful error message from it instead of a random crash or gibberish data.

End result; I spent a couple of hours today making luac swap the byte order of stuff it outputs. It was surprisingly simple actually, most of the time was spent testing it and fixing stupid bugs like me closing the Lua state then trying to use it, and I thought the crash was something wrong with the Lua source I changed.

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!