Jump to content
IGNORED

Running AtariSIO in Windows WSL2


HiassofT

Recommended Posts

I recently wondered if I could make use of WSL2 to run AtariSIO on Windows 10 - and it turned out the answer is yes 🙂

 

I could successfully pass through my @lotharek Dual SIO2PC/1050-2-PC USB interface to linux, use atarixfer to create an image from a floppy in my 1050 and use atariserver to emulate a disk drive with it - including high speed SIO up to divisor 0

atarixfer-wsl.thumb.png.b5f242d88e02663b7dd5d7bbaac5463d.png

atariserver-wsl.thumb.png.54ec8495f425b49d12b665af563f8d92.png

 

Actually this is pretty easy and straight forward, the trickiest bit was to not get caught by outdated docs or guides that lead you into the wrong direction.

 

First make sure your Win 10 is fully up to date and WSL2 is up to date, too (current version is 1.0.0.0).


Open a power shell (or command prompt) with admin rights, (optionally) update WSL and then install Ubuntu - this will get you Ubuntu 22.04 with almost everything needed already installed

PS C:\Users\Hias> wsl --update

Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.
PS C:\Users\Hias> wsl --version
WSL version: 1.0.0.0
Kernel version: 5.15.74.2
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2311
PS C:\Users\Hias> wsl --install -d Ubuntu

 

After a few minutes this is finished and you are asked to enter a username and password for your linux account (spaces in the username won't work).

 

Next you need to download and install usbipd-win, this allows you to pass through USB devices connected to your Windows box to linux. Use the latest release (currently 2.4.1) from here:

https://github.com/dorssel/usbipd-win/releases

 

Now it's time to configure a few things in linux. Either switch to the "Ubuntu" terminal that opened after ubuntu iinstallation or close that and use Windows Terminal instead (I prefer the latter).

 

Even though it's a fresh Ubuntu installation there are several updates available, so install them (sudo will ask for the password of your linux account, hope you remembered it 🙂

sudo apt update
sudo apt upgrade

 

Next we'll add your user account to the "users" group (AtariSIO wants that by default), change "hias" to the username you chose before:

sudo usermod -a -G users hias

 

Although WSL gained systemd support about 2 months ago it's not enabled by default yet in Ubuntu. But it's just 2 lines to add to the file /etc/wsl.conf. Use an editor, eg nano, to change the file (actually it wasn't there at all in my Ubuntu installation)

sudo nano /etc/wsl.conf

and the following two lines then save and exit with ctrl-o ctrl-x

[boot]
systemd=true

 

Now you have to close the Ubuntu terminal (ctrl-d will log you out) and you need to wait avbout 10 seconds so windows shut down WSL and the change can take effect. Then open a new Ubuntu terminal to proceed.

 

Configuring the linux side of usbip is a bit tricky, but the usbipd-wiki has working instructions for it

https://github.com/dorssel/usbipd-win/wiki/WSL-support#wsl-setup

 

At the moment you need to run the following two commands in Ubuntu (double-check with the wiki page, this may change in the future)

sudo apt install linux-tools-virtual hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 20

 

Now we need AtariSIO. You could either compile it from source code on your own or just use the pre-compiled version (atarisio-ubuntu22.tar.gz) I've attached here. Just download it to your normal windows download folder or somewhere else on your drive, we can access that from windows via /mnt/c (or /mnt/d etc - as you might guess these are your windows drives). eg:

sudo tar xf /mnt/c/Users/Hias/Downloads/atarisio-ubuntu22.tar.gz -C /usr/local/bin/

We also need one additional library to run the lotharek-switch tool (to switch the interface between 1050-2-pc and sio-2-pc mode)

sudo apt install libftdi1-2

 

Now connect the USB SIO2PC/1050-2-PC interface and open a windows shell with admin rights and run the following command to get a list of the USB devices on your PC

usbipd.exe wsl list

Here the output looked like this:

BUSID  VID:PID    DEVICE                                                        STATE
1-3    0403:6001  USB Serial Converter                                          Not attached
1-13   046d:c52b  Logitech USB Input Device, USB Input Device                   Not attached

 

The "USB Serial Converter" is the interface we want to pass to linux (depending on your interface it might have a different name though).

Note the BUSID, we need it in the next command when we attach it to linux (replace 1-3 with your BUSID)

usbipd.exe wsl attach --busid 1-3

 

Now Ubuntu should have detected the interface and you should have got a /dev/ttyUSB0 device (that's the SIO2PC interface)

hias@hpmini:~$ ls -la /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Dec  3 17:33 /dev/ttyUSB0

 

The attached atariserver and atarixfer versions are configured to use /dev/ttyUSB0 by default so you don't need to care about that.

 

Now use eg lotharek-switch to switch the interface to 1050-2-PC mode (default is SIO2PC), connect it to your 1050, power up your 1050 and use atarixfer to create an image on your PC from the disk (-s 3 enabled full highspeed SIO support and -r means "read the disk", -w would write an image to disk).

cd /mnt/c/Users/Hias/Documents/
lotharek-switch 1050
atarixfer -s 3 -r mag150a.atr

 

or switch back to SIO2PC mode, connect it to your 800XL and use atariserver to emulate a disk drive (the -C option is needed to configure the command line to be CTS)

lotharek-switch sio
atariserver -C mag150a.atr

 

BTW: If you shut down your PC or unplug the interface you need to attach it again before you can use it.

 

so long,

 

Hias

atarisio-ubuntu22.tar.gz

  • Like 2
  • Thanks 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...