How to use Linux Mint 20 Mate to Compile THEC64 Emulators
Aug 23, 2020 19:47:49 GMT
gurce and jj0 like this
Post by spannernick on Aug 23, 2020 19:47:49 GMT
This is a Walkthrough on how to compile the c64emu.rgl/vic20emu.rgl using Linux Mint 20 Mate on VMware Workstation 15 on Windows 10 with X-Windows mod rootfs.img.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. I am using VMWare Workstation 15 and Linux Mini 20, I not going to show you have to instaill them, look here for Linux Mint 20 and here for VMWare Workstation.
2. You will need the roofs.img from X-Windows Mod or from PCU and copy it into Linux Mint 20,I put it into its Documents folder.
3. The roofs.img is not big enough to compile the c64emu.rgl/vic20emu.rgl files on so we will need to make it bigger to about 3 GB in size.
Copy this one line at a time in terminal..
This will show the write permissions and size of the image, (change /home/commodoreos/Documents/ to wherever you put the rootfs.img, I have it in Documents)
this will resize it to 3GB
Now it will resize it to 3GB.
4. You need to have qemu-user-static installed and possibly binfmt installed,
use Synaptic Package Manager to find qemu-user-static and install it, binfmt is already installed in Linux Mint 20.
Mount (a copy of) the rootfs.img on a suitable directory in Linux Mint 20, mine is in Documents so, e.g.
Type..
Start a root command-line session from the rootfs image..
Type:
You should see this now in terminal showing you are in the xwm rootfs..
5. XWM rootfs will now need GCC to compile c64emurgl and vic20emu.rgl, now go to to this site and do whats on the page.. here then come back here after you installed GCC to continue.
6. You will need to compile libpng1.6(the emulators uses it for saving a snapshot and making a png for it, you see it in one of the 4 save slots per game)get it here and click on libpng-1.6.37.tar.gz to download it and then copy it to the root folder of the rootfs.img.
Now go into mnt folder then root folder in XWM System by using the Mate File Browser in Mint 20 Mate, mnt is in the root of Mint 20 File system, use the left panel where the quick links are, where it says Computer, and click on File System then double click on mnt folder then click on root folder.
If you can't get into root folder cause its locked.. then right click on root folder and go down to Open as Administrator and click on it then type password *******, you can then go into root folder and copy libpng-1.6.37.tar.gz in to that folder.
Now type this in one line at a time..
Now go in to "opt" folder in xwm rootfs and you will see a folder called libpng-1.6.37, in there are 4 folders, they need to be copied to the "usr" folder so thec64 emulators can use libpng16.
7. Now time to make the emulator files, type in to terminal one line at a time, this will take a while.
You should now find the c64emu.rgl and vic20emu.rgl in /mnt/root/redquark-sixtyfour/src/ in c64emu and vic20emu folders.
Done... Tested them with PCU and they work fine.
Thanks to everyone who helped me with this.. gurce and jj-0..
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. I am using VMWare Workstation 15 and Linux Mini 20, I not going to show you have to instaill them, look here for Linux Mint 20 and here for VMWare Workstation.
2. You will need the roofs.img from X-Windows Mod or from PCU and copy it into Linux Mint 20,I put it into its Documents folder.
3. The roofs.img is not big enough to compile the c64emu.rgl/vic20emu.rgl files on so we will need to make it bigger to about 3 GB in size.
Copy this one line at a time in terminal..
This will show the write permissions and size of the image, (change /home/commodoreos/Documents/ to wherever you put the rootfs.img, I have it in Documents)
ls -lh /home/commodoreos/Documents/rootfs.img
this will resize it to 3GB
resize2fs /home/commodoreos/Documents/rootfs.img 3G
Now it will resize it to 3GB.
4. You need to have qemu-user-static installed and possibly binfmt installed,
use Synaptic Package Manager to find qemu-user-static and install it, binfmt is already installed in Linux Mint 20.
Mount (a copy of) the rootfs.img on a suitable directory in Linux Mint 20, mine is in Documents so, e.g.
Type..
sudo mount /home/commodoreos/Documents/rootfs.img /mnt
then type admin password *********Start a root command-line session from the rootfs image..
Type:
sudo chroot /mnt /bin/sh
orsudo chroot /mnt /bin/bash
You should see this now in terminal showing you are in the xwm rootfs..
sh-4.3#
or root@username-virtual-machine:/#
5. XWM rootfs will now need GCC to compile c64emurgl and vic20emu.rgl, now go to to this site and do whats on the page.. here then come back here after you installed GCC to continue.
6. You will need to compile libpng1.6(the emulators uses it for saving a snapshot and making a png for it, you see it in one of the 4 save slots per game)get it here and click on libpng-1.6.37.tar.gz to download it and then copy it to the root folder of the rootfs.img.
Now go into mnt folder then root folder in XWM System by using the Mate File Browser in Mint 20 Mate, mnt is in the root of Mint 20 File system, use the left panel where the quick links are, where it says Computer, and click on File System then double click on mnt folder then click on root folder.
If you can't get into root folder cause its locked.. then right click on root folder and go down to Open as Administrator and click on it then type password *******, you can then go into root folder and copy libpng-1.6.37.tar.gz in to that folder.
Now type this in one line at a time..
cd /root
tar xvf libpng-1.6.37.tar.gz
cd libpng-1.6.37
sudo apt install zlib1g-dev
./configure --prefix=/opt/libpng-1.6.37
make
make install
should not take to long to make it.Now go in to "opt" folder in xwm rootfs and you will see a folder called libpng-1.6.37, in there are 4 folders, they need to be copied to the "usr" folder so thec64 emulators can use libpng16.
7. Now time to make the emulator files, type in to terminal one line at a time, this will take a while.
cd /root
git clone https://github.com/retro-games-ltd/redquark-sixtyfour.git
cd redquark-sixtyfour
cd src
git clone https://github.com/retro-games-ltd/vice-2.4.git vice2
sudo apt install pkg-config libasound2-dev libjpeg-dev bison flex g++
cd ..
PKG_CONFIG_PATH=/opt/libpng-1.6.37/lib/pkgconfig/ ./configure
make
This might take up to 20 minutes to complete so go and make a nice cup of tea.. You should now find the c64emu.rgl and vic20emu.rgl in /mnt/root/redquark-sixtyfour/src/ in c64emu and vic20emu folders.
Done... Tested them with PCU and they work fine.
Thanks to everyone who helped me with this.. gurce and jj-0..