Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #12

Closed
simias opened this issue Oct 16, 2015 · 2 comments
Closed

Windows support #12

simias opened this issue Oct 16, 2015 · 2 comments

Comments

@simias
Copy link
Owner

simias commented Oct 16, 2015

Make sure the emulator works on Windows, write a guide on how to build it there.

@simias
Copy link
Owner Author

simias commented Oct 28, 2015

I managed to build rustation on Windows 7, here's the procedure I followed:

I used the 32bit version but the 64bit version should work as well.

By default the setup doesn't add rustc and cargo to PATH but there's
an option in the setup to do it, I enabled it.

  • Next you need a C compiler

https://github.com/alexcrichton/gcc-rs#compile-time-requirements

I installed MinGW 32bits (it must match rust's architecture). You can find an installer here:

http://sourceforge.net/projects/mingw/files/MinGW/

Yes, people still use sourceforge in 2015. Try to avoid the malware.

I used the custom package manager because apparently Windows developpers are still stuck in the dark ages.

For 64bit builds you might need http://mingw-w64.org/doku.php but I haven't tried it.

Don't forget to add the path to gcc.exe to the PATH in your
environment variables.

It's possible to use Visual Studio's compiler instead by using a
different target triple. I haven't tried it myself because the less I
use VS the better. Look at gcc-rs' README above for more info.

  • Once the toolchain is setup you can download/clone Rustation.
  • Open the command line and cd to the rustation directory.
  • Type cargo build --release to build the emulator.

You should end up with a linking error since cargo won't find SDL2.dll

Download the 32 or 64bit version depending on the rust/MinGW architecture you chose.

  • Put SDL2.dll in the target/release/ directory inside the rustation
    project. It's a bit crappy and there's supposedly a better way by
    putting the path to the DLL in .cargo/config file but I haven't
    managed to get it to work.
  • Run cargo build --release once again, this time it should make it to the end.

Finally you should be able to run the emulator using cargo run --release path\to\bios [path\to\game.bin]. If you don't provide the
game binary image it'll just boot to the BIOS menu.

The result:

rustation-windows

It's not great though, the image flickers a lot and the performance is much worse than on my linux box (even though it has both a weaker CPU and GPU...), probably an OpenGL issue?

@simias
Copy link
Owner Author

simias commented Jun 2, 2016

Hopefully this is not relevant anymore since we moved to libretro.

@simias simias closed this as completed Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant