Getting SMBX to work under Linux with Wine

Need help with any SMBX game-related issues? Ask your questions here.

Moderator: Userbase Moderators

Namyrr
Spike
Spike
Posts: 267
Joined: Fri Dec 06, 2013 7:31 pm

Getting SMBX to work under Linux with Wine

Postby Namyrr » Tue Jun 24, 2014 2:55 am

So I found this while browsing the old forums under the WayBackMachine. Dunno if it's helpful at all, but I thought I'd repost it here. Credits to Wario from the original forums.

SMBX is only availible for Windows. And since it is written in Visual Basic 8, there is little hope that there will ever be a Linux or Mac OS X port. But it works with Wine. Yes, really. Even the sound does (sometimes). People tend to ask about running SMBX with Wine, so I thought I share with you how it's done. Just don't blame me if this guide doesn't work for you.

For those of you that hate reading, here is the short and ugly version:

Download SMBX (obviously) and unzip it.
Install wine and winetricks.
Run 'winetricks quartz vb6run'.
Run 'WINEDEBUG=-all wine smbx.exe &'
Enjoy
Keep in mind these steps should be performed one after the other. There's no point in moving onto the next step if the previous step fails for some reason, as you won't be able to run SMBX.

-------------------------------------------------------

Turbo Mode:

Thanks to matthewbauer, it is now super easy to install SMBX under Linux. It just takes the two following steps:

Get PlayOnLinux
Download and Run this script

And that's it. Now you can run SMBX from your menu. If not, run 'wine smbx' from the terminal.

-------------------------------------------------------

Long, detailed and boring version:

Step 1: What You Need!

You will need a running Linux system, of course. Since Ubuntu is by far the most common Linux distribution (on desktops), I'm just gonna assume you have a recent version of it installed.
Some basic knowledge about the terminal. This is important. If you don't know what I'm talking about, take a look at the Ubuntu documentation about using the terminal.

Step 2: Installation

To make things easier, lets create a directory in your $HOME where we will install SMBX. You can do this with nautilus, or from the console:
CODE: SELECT ALL
mkdir smbx

And change into it:
CODE: SELECT ALL
cd smbx/


Download the current version of SMBX here and save the file in the directory you just created.

If not installed, install unzip:
CODE: SELECT ALL
sudo apt-get install unzip

Don't worry. If unzip already was installed, this won't do any harm.

Extract the .zip file:
CODE: SELECT ALL
unzip smbx12.zip


Now, run:
CODE: SELECT ALL
sudo apt-get install wine

This will install Wine on your system. We will need the shell script "winetricks", wich Ubuntu already included in the just installed "wine" package. Winetricks is a shell script that downloads missing DLLs and fonts for you from the best known source. If you (for some reason) want to use the current version of Wine, read this and this for the latest version of winetricks.

In the next step, we'll use winetricks to download and install quartz.dll and the Visual Basic Runtime. But first, let's make sure you have cabextract installed, as winetricks will need this.
CODE: SELECT ALL
sudo apt-get install cabextract

Then run:
CODE: SELECT ALL
winetricks quartz vb6run

If you see something like: "winetricks done.", you're golden.

Step 3: Run SMBX

A simple
CODE: SELECT ALL
wine smbx.exe

should do it.

Be patient. SMBX takes a while to load, especially with Wine.

As SMBX runs, you should see a lot of output on the terminal you have started it from. Stuff like this:
CODE: SELECT ALL
fixme:ole:OleLoadPictureEx (0xf8cfe4,886,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
fixme:ole:OleLoadPictureEx (0xf8cfd4,1125,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
fixme:ole:OleLoadPictureEx (0xf8cfe4,886,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
fixme:ole:OleLoadPictureEx (0xf8cfd4,1125,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
...


These fixme: lines are debug messages, kind of reminders for the Wine developers. We don't need them, so we're gonna deactivate them. Simply prefix "WINEDEBUG=-all". The resulting command should look like this:
CODE: SELECT ALL
WINEDEBUG=-all wine smbx.exe

This should improve performance a little bit.

And that's it. Enjoy!

To do: Write section about sound. I'm sure it's just my configuration / my system.

Changelog:
6/4/2010:
- Replaced downloading msvbvm60.dll manually with 'winetricks vb6run' as matthewbauer pointed it out to me.
- Added a "Turbo Mode" section for the PlayOnLinux way.
- Removed some typos and added some colors.


So, what else does work?

The editor runs, but I haven't tested anything yet.
One-player and two-player modes run perfectly fine. No glitches here.
Sound works, even if a little buggy. Sometimes the music won't play. Need to investigate.

Conclusion

I didn't think I would try running SMBX with Wine again, after my failed attempts last year. In fact, I almost had forgotten about SMBX until joystiq blogged about the version 1.2 trailer (hence the traffic here in the last 2 days). But here I am, writing this insanely long guide. Redigit, your work is awesome. Let's all hope Nintendo won't sue us to death.

Also: To be honest, I don't actually use Ubuntu, but another Linux distribution named "Arch Linux". The software is the same, so i guess this won't make any difference. It would be great if those of you running Ubuntu would try running SMBX with this guide and tell me if it worked.

I will try to keep this post up to date, but I can't promise it.

If you encounter any problems, or have questions or suggestions, please post them in this thread.

HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: Getting SMBX to work under Linux with Wine

Postby HenryRichard » Wed Jun 25, 2014 12:49 pm

Yay! You found it! Now I can install it on my linux! Thanks a lot!

Raster
Banned
Posts: 798
Joined: Fri Dec 20, 2013 12:35 pm

Re: Getting SMBX to work under Linux with Wine

Postby Raster » Wed Jun 25, 2014 5:13 pm

Winetricks returned an error in the terminal and the script in the second guide is probably lost forever. I recommend installing Windows on a virtual disk instead of using WINE, since results can be pretty disappointing.

Namyrr
Spike
Spike
Posts: 267
Joined: Fri Dec 06, 2013 7:31 pm

Re: Getting SMBX to work under Linux with Wine

Postby Namyrr » Thu Jun 26, 2014 1:43 am

Topic stickied because I guess the topic isn't as dusty and outdated as I thought.

Raster
Banned
Posts: 798
Joined: Fri Dec 20, 2013 12:35 pm

Re: Getting SMBX to work under Linux with Wine

Postby Raster » Thu Jun 26, 2014 5:52 am

And since it is written in Visual Basic 8...
SMBX was written in Visual Basic 6.

SuperWingedYoshi
Volcano Lotus
Volcano Lotus
Posts: 547
Joined: Thu Feb 27, 2014 9:23 am

Re: Getting SMBX to work under Linux with Wine

Postby SuperWingedYoshi » Wed Jul 02, 2014 7:47 am

Ahhhhh, this is THE tutorial I needed. I've already tried earlier on to make SMBX work on Linux, but failed for some reason. The missing Visual Basic and quartz.dll are probably the reason why. Gotta try the things in the first post out. Thanks a lot!

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Getting SMBX to work under Linux with Wine

Postby Axiom » Mon Jul 07, 2014 8:48 am

SMBX was written in Visual Basic 6.
Second of all, I tried the SMBX PlayOnLinux script a while back on a fairly recent version of Ubuntu and it didn't work. This guide is kinda eh now that Wohl's editor is around anyway.
Good find though

Raster
Banned
Posts: 798
Joined: Fri Dec 20, 2013 12:35 pm

Re: Getting SMBX to work under Linux with Wine

Postby Raster » Wed Jul 09, 2014 10:47 am

Yeah, sorry but it's not going to work that way. SMBX is incompatible with WINE and the only way to play it on Linux is to install a Windows VM (I've had problems with XP, but I managed to get it working). To set up a Windows Virtual Machine simply get VirtualBox from Oracle's website and create a new Virtual Machine, then install Windows on it. You might not be able to install recent versions of Windows on a VM in case your CPU is old, however, as the new versions require additional things for virtualization.

Blck_Guy
Guest

Re: Getting SMBX to work under Linux with Wine

Postby Blck_Guy » Sat Jul 12, 2014 8:57 pm

SMBX was made with Visual Basic 6 not 8....Now only if we could have the Source Code fro Andrew we could.....

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Getting SMBX to work under Linux with Wine

Postby Axiom » Mon Jul 14, 2014 2:51 pm

Raster wrote:Winetricks returned an error in the terminal and the script in the second guide is probably lost forever. I recommend installing Windows on a virtual disk instead of using WINE, since results can be pretty disappointing.
The script isn't lost forever, a bit of googling turned it up so I forked and updated to use the newest version. Going to test it now
https://raw.githubusercontent.com/Luigi ... r/smbx.pol

If it works, I'll submit to PlayOnLinux I guess.

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Getting SMBX to work under Linux with Wine

Postby Axiom » Mon Jul 14, 2014 4:34 pm

Double post, but it's for a good cause
I spent most of the afternoon getting this to work with PlayOnLinux and I fully intend to submit this to them later on.

The script: https://raw.githubusercontent.com/Luigi ... r/smbx.pol

And now, the following.
  • Install PlayOnLinux via your package manager. or just "sudo apt-get install playonlinux" should be the package name.
  • Download the script and save it anywhere
  • Start up PlayOnLinux and let it do its thing
  • Click Tools>Run A Local Script
  • Select the smbx.pol (smbx.pol.txt will work fine too) script for it to run and agree to let it run
  • Afterwards, launch via the shortcut provided. Preferrably run it in debug mode and send the logs to me so I can help debug them.
What works
Game loads and I was able to play a couple levels
Level editor loads
I could load a level in the editor
Fullscreen (kinda, use maximize button not in game fullscreen)

What doesn't work
Music, as of right now it only plays when you're off screen which is kind of useless and probably just something I'm missing in wine
Sound is kind of buggy
Sometimes levels take FOREVER to load

What I haven't tested
Gamepad
Online (but I assume this will never work)
LunaDLL (don't expect this to work either)

Screenshots: (i don't feel like individually doing each one so just look at the imgur link) http://imgur.com/a/JX9xA#0
Tested under Linux Mint 17. This is extremely buggy and I will keep trying with other versions of WINE to see which one works best with this.

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Getting SMBX to work under Linux with Wine

Postby Wohlstand » Sat Jan 03, 2015 11:14 am

Luigifan2010 wrote:Double post, but it's for a good cause
I spent most of the afternoon getting this to work with PlayOnLinux and I fully intend to submit this to them later on.

The script: https://raw.githubusercontent.com/Luigi ... r/smbx.pol

And now, the following.
  • Install PlayOnLinux via your package manager. or just "sudo apt-get install playonlinux" should be the package name.
  • Download the script and save it anywhere
  • Start up PlayOnLinux and let it do its thing
  • Click Tools>Run A Local Script
  • Select the smbx.pol (smbx.pol.txt will work fine too) script for it to run and agree to let it run
  • Afterwards, launch via the shortcut provided. Preferrably run it in debug mode and send the logs to me so I can help debug them.
What works
Game loads and I was able to play a couple levels
Level editor loads
I could load a level in the editor
Fullscreen (kinda, use maximize button not in game fullscreen)

What doesn't work
Music, as of right now it only plays when you're off screen which is kind of useless and probably just something I'm missing in wine
Sound is kind of buggy
Sometimes levels take FOREVER to load

What I haven't tested
Gamepad
Online (but I assume this will never work)
LunaDLL (don't expect this to work either)

Screenshots: (i don't feel like individually doing each one so just look at the imgur link) http://imgur.com/a/JX9xA#0
Tested under Linux Mint 17. This is extremely buggy and I will keep trying with other versions of WINE to see which one works best with this.
Try to apply this LunaDLL build which replacing MCI audio engine with SDL2_mixer http://www.smbxgame.com/forums/v ... =69&t=7427 and run SMBX again. SDL2_mixer should play MP3's anyway because it have INTERNAL decoder and doesn't using external codecs (which you usually haven't under Wine).

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Getting SMBX to work under Linux with Wine

Postby Wohlstand » Fri Mar 06, 2015 2:31 pm

My little test of working SMBX on the Linux Mint

Daltonk7
Guest

Re: Getting SMBX to work under Linux with Wine

Postby Daltonk7 » Tue Mar 31, 2015 3:47 pm

I was having a similar sound issue whilst running SMBX on mac using wine. I managed to fix it using the DirectPlay and DirectMusic winetricks (With vb6 too, but I assume you're already using that one). I am however having a common crash that says "Invalid Picture". If you know anything I can do to fix that I would greatly appreciate it.

HeroLinik
Larry Koopa
Larry Koopa
Posts: 3464
Joined: Fri Dec 20, 2013 1:28 pm
Contact:

Re: Getting SMBX to work under Linux with Wine

Postby HeroLinik » Wed Jul 08, 2015 5:45 am

Just a question: do these steps also apply when you're trying to get SMBX on the Mac? Because my cousin (the one who made Thisisnotmylevel.lvl a year ago) owns a Mac and can't get SMBX to run on it.

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Getting SMBX to work under Linux with Wine

Postby Axiom » Wed Jul 08, 2015 9:05 am

I'm not 100% sure about my pol script. I don't have a Mac to test on, all I have is a virtual machine with non-existent QE drivers (aka no OpenGL for video). But what I can say is that PlayOnMac is available. Maybe I'll do some research into getting the game to run on there?

EDIT: I just found this snippet regarding PlayOnMac
Your script will also be available under GNU/Linux using PlayOnLinux

It may be useful to clarify (for those who would not know) that PlayOnLinux and PlayOnMac are really the same software, sharing the same code. Only the name changes depending on the operating system.
When you submit a script, it will be automatically available to PlayOnLinux, since if your script works with Mac OS X, it will also work under GNU/Linux (the reverse is not always true).
While the reverse (Linux scripts -> Mac) may not always be true, I'd say it's still worth a shot. If that doesn't work then I will look into rewiring my script for OS X :) (but be warned, as I run an AMD computer the highest OS X version I can get is 10.8.3)

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Getting SMBX to work under Linux with Wine

Postby Wohlstand » Wed Jul 08, 2015 9:58 am

Luigifan2010 wrote:I'm not 100% sure about my pol script. I don't have a Mac to test on, all I have is a virtual machine with non-existent QE drivers (aka no OpenGL for video). But what I can say is that PlayOnMac is available. Maybe I'll do some research into getting the game to run on there?

EDIT: I just found this snippet regarding PlayOnMac
Your script will also be available under GNU/Linux using PlayOnLinux

It may be useful to clarify (for those who would not know) that PlayOnLinux and PlayOnMac are really the same software, sharing the same code. Only the name changes depending on the operating system.
When you submit a script, it will be automatically available to PlayOnLinux, since if your script works with Mac OS X, it will also work under GNU/Linux (the reverse is not always true).
While the reverse (Linux scripts -> Mac) may not always be true, I'd say it's still worth a shot. If that doesn't work then I will look into rewiring my script for OS X :) (but be warned, as I run an AMD computer the highest OS X version I can get is 10.8.3)
Are you tries clear SMBX or LunaLua based? LunaLua based version will work fine under wine but vanilla usually freezes

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Getting SMBX to work under Linux with Wine

Postby Axiom » Wed Jul 08, 2015 11:06 am

I just tried running your LunaLua version under Mint 17.1 with Wine 1.6.2 (just ran it through my POL script) and I got a crash on startup. I submitted it as your dialogue suggested.

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Getting SMBX to work under Linux with Wine

Postby Wohlstand » Wed Jul 08, 2015 11:10 am

Are you placed MSVC2013 libs?

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Getting SMBX to work under Linux with Wine

Postby Axiom » Wed Jul 08, 2015 1:07 pm

Wohlstand wrote:Are you placed MSVC2013 libs?
i grabbed the complete package and threw it in, do i need to manually place those libs in or is there a .msi i can install?


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari