Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to convert a file that is written initially in big endian. How do I convert it to little endian format?

For further detail: The file is a game save from the No$GBA emulator. When I save in-game, No$GBA writes the save in big endian format. However, the one I'm importing it to (GameBoid) seems to only accept little endian. Is there a converter or sorts to do it?

I've contemplated posting this to StackOverflow but I'm looking for a tool to do it, not make a tool for it.

share|improve this question
    
This thread supposedly has one. –  David Schwartz Mar 5 '13 at 4:55
    
Most programming languages has a built-in method that allows for something like this. You would need to read the bytes of the program and create a new file. –  Ramhound Mar 5 '13 at 11:12
add comment

1 Answer

If you can get to a *nix system (including a Unix-emulator like Cygwin), use dd conv=swab (swabytes).

share|improve this answer
    
Is mac one of these so-called *nix system? –  Propeller Mar 5 '13 at 6:29
    
I’m not sure. It (probably) depends on what operating system you have –– I believe OS X is. If you have one, why don’t you just see if you can run dd? –  Scott Mar 5 '13 at 6:33
    
os x is a *nix system for sure. –  Ярослав Рахматуллин Mar 5 '13 at 6:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.