What's new

Solved VirtualBox x64 Windows: getting VboxSDL to work

Hopachi

Polyhedric Stellation
VIP Member
Pro User
How to get VboxSDL to work - VirtualBox x64 on Windows

information   Information
Update:
Virtualbox 6.1.0 solved the VboxSDL issue on Windows hosts.
This tweak is no longer needed!

- VBoxSDL frontend: Fixed running on Windows hosts
(Changelog-6.1 – Oracle VM VirtualBox)



How I got the VBoxSDL interface working for VirtualBox 4.3.12 x64.

A long time ago, ever since I read the VirtualBox user manual I saw the VboxSDL interface mentioned.
Chapter 9. Advanced topics

Works nice, on Linux, It seems you can get native full-screen on any supported resolution in a VM.

We need to run it in a command line /terminal.

basic command:
Code:
[B]VBoxSDL[/B] [B]--startvm "vm-name"[/B]

In this example I use an exising VM of Windows XP called simply "xp"
vbox-list.png
Don't start the VM here,
This window was just to see the VM names: we won't use the normal interface because that one works, we know it.

To start the VM called "xp" with the SDL interface, use the command like this:
Code:
VBoxSDL --startvm "xp"

Big chance for that to fail since we dn't have a path variable for that location.

So to be safe, the full command wil work like this:
Code:
"%programfiles%\Oracle\VirtualBox\VBoxSDL.exe" --startvm "xp"

So we try that vboxsdl command line on Windows, here x64, in a cmd window, assuming that we run from the install of VirtualBox in Program Files. Used VirtualBox here in example is 4.3.12 64bit.

We get this famous result:
vboxsdl-error.png
(notice version number)

Hmmm... Direct what?
After searching that up, we find out that the official Windows version of provided VBoxSDL.exe isn't maintained or is outdated. The sdl.dll that is provided on Windows misses a dependency to msvcr80.dll (why?!) but I assume that's not the only reason why it's failing. It's still in the user manual and I guess some people will like to use that (maybe don't wan't to buy VMware Workstation to use exclusive mode, yet, if VBox can do stretched full-screen as well).

To fix this on Windows:
-> either use custom build files (1) that work in older versions (see zip 4.3.12 x64) or apply an environment variable (2) SDL_VIDEODRIVER = windib

(1) Version 4.3.12 x64 custom build
Luckily I got tired of all this useless stuff and built VBox 4.3.12 from source (crazy decision, but they provide a manual for that too) with a more recent SDL version and it seems that the built one works well on Windows! Using the whole OSE build isn't recommended because all files are unsigned (unless you pay for driver signatures...) but you can use the official release (already signed) and just replace the SDL with the one built. :dinesh:

Getting it running fast and easy:
Install the official VirtualBox, here Windows x64, 4.3.12...
To ease things up, I used the new built SDL.dll and VBoxSDL.exe and replaced the ones from the original install in Program Files with the new (two) files.

vboxsdl-files.png

Then firing up that command line again gives:
vboxsdl.png
(notice version number: OSE)
That window gets directly followed by a VM window in the SDL interface.

Nice!

Click inside the vm window. To switch from there to full screen using keyboard shortcuts, use: <hostkey> + f (hostkey is usually right-ctrl).

You can turn of the VM with the power button from the guest OS, or use <hostkey> + h to initiate a guest shutdown.

information   Information

VBoxSDL - Keyboard controls:

<hostkey> + f -> Switch to full screen / restore to previous view
<hostkey> + h -> Press ACPI power button
<hostkey> + n -> Take a snapshot and continue execution
<hostkey> + p -> Pause / resume execution
<hostkey> + q -> Power off
<hostkey> + r -> VM reset
<hostkey> + s -> Save state and power off
<hostkey> + <del> -> Send <ctrl><alt><del>
<hostkey> + <F1>...<F12> -> Send <ctrl><alt><Fx>

* by default, the <hostkey> is right ctrl


To directly launch a VM in fullscreen:
vboxsdl-fs.png

Problem solved.


[DEL]Until they decide to provide a decent build of the VBoxSDL interface on Windows, this is the only way to get it working (replace the files with working ones).
Now that it works I just hope they don't remove it in future versions. :zip:[/DEL]

The zip is VirtualBox 4.3.12 64bit, the 32bit one wasn't tested since I don't have it available.
For those interested and those who know the vboxsdl from Linux, you can use the provided files from zip attachment.
Install the official VirtualBox 4.3.12 x64 for Windows: (backup) and replace the SDL.dll and VBoxSDL.exe with the new files.

Files I provided here are OK.
In case you need to check the zip's checksums:
CRC32: 517C58BE
MD5: 0F7819792C68D553407CA13E25B9BCB0
SHA-1: B7F4ADDE85013BBEBB1CC6DC965030C1EC58F0DF

(2) recommended workaround
See the environment variable workaround post:
No need to replace any files.
SDL Error: 'DirectInputDevice::SetDataFormat: Invalid parameters'Error is gone after creating a windows
environment variable called 'SDL_VIDEODRIVER' with a value of 'windib'

#11517 (VBoxSDL error before launching VM) – Oracle VM VirtualBox

Now we can use VBoxSDL in the latest versions of VirtualBox.

information   Information

IMPORTANT:
The provided zip below is for version 4.3.12 x64 ONLY.

That solution is no longer recommended and doesn't work for other versions.


The SDL interface was indeed missing, for some specific cases, tons of times people needed stretched full-screen mode on smaller resolution, for older apps and games, but each time the VM used some crappy screen resolution or aspect ratio...
Native full-screen was needed for some tests so I'm glad I got that running now. :cool:

I might not be able to do this for future releases since each time you need to build it again, but it seems to work for now, enjoy the moment.


That's all.

Cheers!
Hopachi
 

Attachments

  • VBoxSDL-OSE-4.3.12-Win64.zip
    207.6 KB · Views: 138
Last edited:

My Computer

System One

  • OS
    Windows 10 x64
    Name
    Horace Lucas
    Computer type
    Laptop
    System Manufacturer/Model
    HP Envy DV6 7250
    CPU
    Intel i7-3630QM
    Motherboard
    HP, Intel HM77 Express Chipset
    Memory
    16GB
    Graphics Card(s)
    Intel HD4000 + Nvidia Geforce 630M
    Sound Card
    IDT HD Audio
    Monitor(s) Displays
    15.6' built-in + Samsung S22D300 + 17.3' LG Phillips
    Screen Resolution
    multiple resolutions
    Hard Drives
    Samsung SSD 250GB + Hitachi HDD 750GB
    PSU
    120W adapter
    Occupation
    Improving Skills
    Case
    small
    Cooling
    laptop cooling pad
    Keyboard
    Backlit built-in + big one in USB
    Mouse
    SteelSeries Sensei
    Internet Speed
    slow and steady
    Browser
    Chromium, Pale Moon, Firefox Developer Edition
    Antivirus
    Windows Defender
    Other Info
    That's basically it.
    State/Region Flag
    european union

nickbeee

New Member
Thanks for this. I can now start a NetBSD VM which requires VBoxSDL --norawr0 to run on a non VT-x/AMD-V host.
 

My Computer

System One

  • OS
    Windows 8.1 professional
    Computer type
    Laptop
    CPU
    i5
    Internet Speed
    dial-up

Hopachi

Polyhedric Stellation
VIP Member
Pro User
Thanks for this. I can now start a NetBSD VM which requires VBoxSDL --norawr0 to run on a non VT-x/AMD-V host.

You're welcome.

Keep in mind that this is only for version 4.3.12. I'm unable to build the latest hardened versions.
Since 4.3.14, security was improved.

Although the older versions are faster, they don't contain the latest fixes.

I've noted the extra VBoxSDL info on an official ticket here, but that doesn't seem to have importance for the moment.

EDIT: workaround in the next post.
 
Last edited:

My Computer

System One

  • OS
    Windows 10 x64
    Name
    Horace Lucas
    Computer type
    Laptop
    System Manufacturer/Model
    HP Envy DV6 7250
    CPU
    Intel i7-3630QM
    Motherboard
    HP, Intel HM77 Express Chipset
    Memory
    16GB
    Graphics Card(s)
    Intel HD4000 + Nvidia Geforce 630M
    Sound Card
    IDT HD Audio
    Monitor(s) Displays
    15.6' built-in + Samsung S22D300 + 17.3' LG Phillips
    Screen Resolution
    multiple resolutions
    Hard Drives
    Samsung SSD 250GB + Hitachi HDD 750GB
    PSU
    120W adapter
    Occupation
    Improving Skills
    Case
    small
    Cooling
    laptop cooling pad
    Keyboard
    Backlit built-in + big one in USB
    Mouse
    SteelSeries Sensei
    Internet Speed
    slow and steady
    Browser
    Chromium, Pale Moon, Firefox Developer Edition
    Antivirus
    Windows Defender
    Other Info
    That's basically it.
    State/Region Flag
    european union

Hopachi

Polyhedric Stellation
VIP Member
Pro User
It's fixed!

No need to replace any files.
SDL Error: 'DirectInputDevice::SetDataFormat: Invalid parameters'

Error is gone after creating a system environment variable called 'SDL_VIDEODRIVER' with a value of 'windib'

https://www.virtualbox.org/ticket/11517

Now we can use VBoxSDL in the latest versions of VirtualBox. (Works in 4.3.26)

 
Last edited:

My Computer

System One

  • OS
    Windows 10 x64
    Name
    Horace Lucas
    Computer type
    Laptop
    System Manufacturer/Model
    HP Envy DV6 7250
    CPU
    Intel i7-3630QM
    Motherboard
    HP, Intel HM77 Express Chipset
    Memory
    16GB
    Graphics Card(s)
    Intel HD4000 + Nvidia Geforce 630M
    Sound Card
    IDT HD Audio
    Monitor(s) Displays
    15.6' built-in + Samsung S22D300 + 17.3' LG Phillips
    Screen Resolution
    multiple resolutions
    Hard Drives
    Samsung SSD 250GB + Hitachi HDD 750GB
    PSU
    120W adapter
    Occupation
    Improving Skills
    Case
    small
    Cooling
    laptop cooling pad
    Keyboard
    Backlit built-in + big one in USB
    Mouse
    SteelSeries Sensei
    Internet Speed
    slow and steady
    Browser
    Chromium, Pale Moon, Firefox Developer Edition
    Antivirus
    Windows Defender
    Other Info
    That's basically it.
    State/Region Flag
    european union

Hopachi

Polyhedric Stellation
VIP Member
Pro User
We can simplify the process adding the environment variable at command line, when needed:
Code:
set SDL_VIDEODRIVER=windib
"%programfiles%\Oracle\VirtualBox\VBoxSDL.exe" --startvm "xp"

Or by creating a bat file for the VM that needs stretched fullscreen:
Code:
@echo off
set SDL_VIDEODRIVER=windib
"%programfiles%\Oracle\VirtualBox\VBoxSDL.exe" --startvm "xp" --fullscreen --fullscreenresize

Replace "xp" with our own vm name.

The environment variable doesn't need to be added permanently on the system, but it works either way.
 

My Computer

System One

  • OS
    Windows 10 x64
    Name
    Horace Lucas
    Computer type
    Laptop
    System Manufacturer/Model
    HP Envy DV6 7250
    CPU
    Intel i7-3630QM
    Motherboard
    HP, Intel HM77 Express Chipset
    Memory
    16GB
    Graphics Card(s)
    Intel HD4000 + Nvidia Geforce 630M
    Sound Card
    IDT HD Audio
    Monitor(s) Displays
    15.6' built-in + Samsung S22D300 + 17.3' LG Phillips
    Screen Resolution
    multiple resolutions
    Hard Drives
    Samsung SSD 250GB + Hitachi HDD 750GB
    PSU
    120W adapter
    Occupation
    Improving Skills
    Case
    small
    Cooling
    laptop cooling pad
    Keyboard
    Backlit built-in + big one in USB
    Mouse
    SteelSeries Sensei
    Internet Speed
    slow and steady
    Browser
    Chromium, Pale Moon, Firefox Developer Edition
    Antivirus
    Windows Defender
    Other Info
    That's basically it.
    State/Region Flag
    european union

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top