|
Post by jj0 on Feb 7, 2021 15:34:53 GMT
The attached fake upgrade opens op a full-screen command line shell on your TV/monitor. Tested on the Mini and Maxi but should also work on the VIC20. Pre v4.0 this used Yaft as framebuffer console but as of v4.0 it uses a big-fixed standard kernel framebuffer console. Sources of the kernel modules I've changed/added are included. To use this: - Extract the THE64_on-screen_command_shell_v4.1.7z file onto the root of a USB drive that you know works with THE64/VIC20
- Insert the USB drive in your THE64/VIC20
- Go to the System information menu and you'll see a (fake) firmware update
- Apply the firmware update and you will get the full-screen command prompt
- Use CTRL-D to exit back to the Carousel
Your use of this is entirely your own responsibility, I'm not responsible for any issues this causes on your THE64/VIC20. v1: I've not included any additional tools so you are limited to what THE64 has. As the standard framebuffer console modules appear to have issues I've used Yaft as I already had that working in my C64 Mini FEL mode tool. I did make some minor changes to the source: - changing the hardcoded terminal type to 'linux' - changing the hardcoded shell path to '/tmp/bash' v2: - Changed shell to bash - Added some additional binaries/tools in /mnt/Yaft/bin - Mapped THE64 keyboard SHIFT-DOWN and SHIFT-UP to up/left. More remappings can be added to /mnt/Yaft/THEC64-keyboard.map. Use 'showkey' to find out what a key's keycode is. v3: - Added the 'screen' command for easier multi-tasking - Added htop - Added joy2key for mapping joystick to keyboard. Example script kt.sh maps directions to cursor keys and fire buttons to enter and CTRL-C. v3.1: THE64_on-screen_command_shell_v3.1.7z for those that prefer Yaft. - Fixed 'the Carousel not starting after exiting the command shell' - Fixed version number in banner Thanks mobluse for bug-finding v4: - Changed from Yaft to a big-fixed standard kernel framebuffer console - Instead of /mnt/Yaft there is now /mnt/Console v4.1: - Updated nano editor to support syntax highlighting
|
|
|
Post by gurce on Feb 7, 2021 22:33:31 GMT
Holy moly man, your wonders never cease! Excellent stuff! :-)
|
|
|
Post by grasshopper on Feb 9, 2021 16:24:40 GMT
I've just had a quick go at this. Very nice indeed, and a lot more convenient than loading X-Windows.
Most of the Linux tools seem to be the Busybox versions, but that's good enough.
It's interesting that the font and background colour has a C64 theme. Was that intentional, or just a coincidence?
I might try using it with THEVIC20 firmware, and see if the background colour is different.
|
|
|
Post by jj0 on Feb 9, 2021 19:37:28 GMT
I've just had a quick go at this. Very nice indeed, and a lot more convenient than loading X-Windows. <snip> Thanks It was easier than I thought, the reason it didn't run seems to be that it didn't like /bin/sh.100% intentional, I spent quite a bit of time on getting the C64 look when I originally did this for the Mini FEL mode.
|
|
|
Post by spannernick on Feb 10, 2021 12:59:46 GMT
Well you are the Linux man...
|
|
|
Post by mobluse on Feb 20, 2021 4:28:25 GMT
I tested it on THEVIC20, THEC64, and THEC64 MINI and it started very quickly. It could be useful to learn a more embedded Linux and to quickly change filename flags. I have used BasicLinux distro.ibiblio.org/baslinux/ on old laptops and that also used Busybox. It was a bit difficult to use the keyboard, because this Linux uses US keyboard that is rather different from what is printed on the keys. Also, left and up arrows don't work. I fixed the keyboard for XWM, but that was easier since X than it will be to fix for console (Yaft). Does this start.sh script change the firmware? I saw some changes to /tmp/bash, are these to the USB stick or the internal flash memory? If these are to the internal flash, how do you undo them? I have made backups of all my THE*C*-computers. Does Yaft support the sound escape codes that some Linux consoles have? ESC [ 10 ; n ] Set bell frequency in Hz. ESC [ 11 ; n ] Set bell duration in msec. man7.org/linux/man-pages/man4/console_codes.4.htmlDid you compile Yaft yourself? If so, which environment did you use? I suppose one could compile in Raspbian Jessie, because that might be rather similar.
|
|
|
Post by jj0 on Feb 20, 2021 9:29:26 GMT
I tested it on THEVIC20, THEC64, and THEC64 MINI and it started very quickly. It could be useful to learn a more embedded Linux and to quickly change filename flags. I have used BasicLinux distro.ibiblio.org/baslinux/ on old laptops and that also used Busybox. It was a bit difficult to use the keyboard, because this Linux uses US keyboard that is rather different from what is printed on the keys. Also, left and up arrows don't work. I fixed the keyboard for XWM, but that was easier since X than it will be to fix for console (Yaft). The arrow keys work for me if I use an external keyboard. I assume you mean the left/up arrow that on the THE64 MAxi keyboard would be SHIFT-right/down don't work? I've now updated the version in the first post to remap those keys to the correct function. There are other keys that don't map correctly, if you're interested you can change those mappings too.My guiding principle is to not change the firmware and leave the internal nand read-only. The /tmp directory is a ramdisk so the firmware is still untouched.There's only one way to find out and try it out yourself Yes, I compiled it myself (and made minor changes). I used my Ubuntu laptop and cross-compiled it there. But you could also compile it directly it in Raspbian, or in XWM or in any arm7hf environment I think because Yaft appears to have no dependencies on specific library versions.
|
|
|
Post by spannernick on Feb 20, 2021 11:01:01 GMT
Maybe cause of this we could run Midnight Commander now...
|
|
|
Post by jj0 on Feb 21, 2021 10:32:21 GMT
v3 released, see first post for details. On adding Midnight Commander, this requires some configuration files on the internal nand in various places so for now it's not possible to do this without changing the firmware. But you can add it manually following these (old but still valid) instructions.
|
|
|
Post by spannernick on Feb 21, 2021 12:09:41 GMT
v3 released, see first post for details. On adding Midnight Commander, this requires some configuration files on the internal nand in various places so for now it's not possible to do this without changing the firmware. But you can add it manually following these (old but still valid) instructions.Commander.cpio.gz is a image file like the image for XWM, could you chroot it instead, I tried that in a script and it didn't work, I try it again, now I know more, I probably get it working now... hopefully.. I didn't know it was a image before.. It says at the bottom of that page... Did you run it in FEL Mode only...? Thanks..
|
|
|
Post by spannernick on Feb 21, 2021 13:50:26 GMT
This command... What command do I add to get this to work inside PCUAE and midnight-commander.cpio.gz(its an initial ramdisk) boot image file) is in the folder ... I need to know what this line does and what its doing to understand it... cpio is like winzip or 7zip, its a general file archiver utility for Linux... mmm.. ok.. cpio -i is copying the files from the archive to /tmp/ramfs/midnight...? maybe.. ? Anyway I worked out I could unzip it and maybe mount it like VICE so here is the script, it not that much in it, have not tested it yet... echo " Starting Midnight Commander..." >/dev/ttyS0 mount -o remount,rw /tmp/pcu
# Kill the64 just incase killall the64 # Redirect stderr to stdout and then stdout to /dev/ttyS0 exec 2>&1 exec >/dev/ttyS0
echo " Loading lib and bin files ..." >/dev/ttyS0 # Ensure required extra libraries can be found export LD_LIBRARY_PATH=/tmp/pcu/Carousel_Games/Options/Midnight_Commander/lib
# Ensure required binaries can be found export PATH=/tmp/pcu/Carousel_Games/Options/Midnight_Commander/usr/bin:$PATH
echo " Setting up other stuff..." >/dev/ttyS0 mount -o remount,rw / mount --bind /tmp/pcu/Carousel_Games/Options/Midnight_Commander/usr /usr 2>/dev/ttyS0 mount --bind /tmp/pcu/Carousel_Games/Options/Midnight_Commander/etc /etc 2>/dev/ttyS0
echo " Booting MC..." >/dev/ttyS0 # Now run Midnight Commander.. sleep 1 mc & 2>/dev/ttyS0
echo " Closing Midnight Commander..." >/dev/ttyS0 # Run TheCarousel after closing Midnight Commander... umount /usr umount /etc mount -o remount,ro /
echo " Restarting TheCarousel..." >/dev/ttyS0 sleep 1 the64 & Hopefully it will run with no problems but it will tell me if there is one because I added "2>/dev/ttyS0" to the mc & line so I know if there is a error, it will say it on Putty..
|
|
|
Post by jj0 on Feb 21, 2021 14:01:09 GMT
The cpio.gz file is just an archive that includes file access rights. Midnight Commander expects certain files to be in certain directories and as explained in the original thread by extracting it in / the required files will extracted into those directories. But that would change the internal nand. Maybe MC has some commandline switches to make it look elsewhere for those files so you could put them in the PCU directories, you'd have to experiment.
|
|
|
Post by spannernick on Feb 21, 2021 15:31:00 GMT
Ok I typed the commands in putty one by one and then run mc and nothing came up on the screen...? # exec 2>&1 # exec >/dev/ttyS0 # export LD_LIBRARY_PATH=/tmp/pcu/Carousel_Games/Options/Midnight_Commander/lib export PATH=/tmp/pcu/Carousel_Games/Options/Midnight_Commander/usr/bin:$PATH # mount -o remount,rw / s/Midnight_Commander/usr /usr 2>/dev/ttyS0 mount --bind # mount --bind /tmp/pcu/Carousel_Games/Options/Midnight_Commander/usr /usr 2>/ dev/ttyS0 ght_Commander/etc /etc 2>/dev/ttyS0# mount --bind /tmp/pcu/Carousel_Games/Options/Midnight_Commander/etc /etc 2>/ dev/ttyS0 # mc & got working but it showing in putty...? so it needs a shell to work... ok time to use Yaft.. Left File Command Options Right +<- ~ ----------------------------.[^]>++<- ~ ----------------------------.[^]>+ |.n Name | Size |Modify time ||.n Name | Size |Modify time | |/.. |UP--DIR|Jan 1 00:00||/.. |UP--DIR|Jan 1 00:00| |/.cache | 4096|Jan 22 02:52||/.cache | 4096|Jan 22 02:52| |/.config | 4096|Jan 22 02:52||/.config | 4096|Jan 22 02:52| |/.local | 4096|Jan 22 02:52||/.local | 4096|Jan 22 02:52| | .ash_history | 8049|Jan 22 02:58|| .ash_history | 8049|Jan 22 02:58| |!libcaca.so.0 | 18|Jan 1 08:20||!libcaca.so.0 | 18|Jan 1 08:20| |!libpulse.so.0 | 18|Jan 2 11:02||!libpulse.so.0 | 18|Jan 2 11:02| | | | || | | | | | | || | | | | | | || | | | | | | || | | | | | | || | | | | | | || | | | | | | || | | | | | | || | | | +--------------------------------------++--------------------------------------+ |UP--DIR ||UP--DIR | +---------------------- 19M/69M (27%) -++---------------------- 19M/69M (27%) -+ Hint: You may specify the editor for F4 with the shell variable EDITOR. root@redquarktwo:~$ [^] 1Help 2Menu 3View 4Edit 5Copy 6RenMov 7Mkdir 8Delete 9PullDn10Quit
|
|
|
Post by mobluse on Feb 21, 2021 21:00:48 GMT
Great! but I'm more well acquainted with Tmux than GNU Screen and have read tutorials about Tmux. Would it be possible to get Tmux? linuxhint.com/tmux_vs_screen/
|
|
|
Post by jj0 on Feb 21, 2021 21:30:26 GMT
Great! but I'm more well acquainted with Tmux than GNU Screen and have read tutorials about Tmux. Would it be possible to get Tmux? linuxhint.com/tmux_vs_screen/For now, I'll leave this as an exercise for the reader. The usual way for me to add this type of stuff is: - Start XWM, either on my PC (easiest way, see first post of XWM) or on THE64 - with networking enabled
- Check if the app is already available and if not install it with apt or apt-get
- When installed, copy the binary to the Yaft/bin directory of the on-screen command shell fake firmware upgrade
- Start the on-screen command shell fake firmware upgrade on THE64
- Type 'ldd /mnt/Yaft/bin/<app name> | grep found'. This will tell you if any libraries are missing
- If libraries are missing, they should be available on XWM. Copy them from their location in XWM to Yaft/lib/, using 'cp -L <XWM path+lib name> <mount point of fake upgrade>/Yaft/lib'. The -L is to make sure that symbolic links are translated to the actual file they point to
- Repeat 5 until no libraries are missing anymore
Once you get the hang of this you can add as many binaries as you want - except when they are not compatible with the glib version of THE64.
|
|
|
Post by mobluse on Feb 21, 2021 22:36:29 GMT
I have two issues with v3: 1. When I press Ctrl+D in the terminal it hangs instead of restarting THEVIC20 (but maybe this is a new feature, because I see the64 is commented in start.sh). 2. It says "...BASH SHELL v2..." (but I can fix that in bashrc.)
|
|
|
Post by jj0 on Feb 22, 2021 7:26:50 GMT
I have two issues with v3: 1. When I press Ctrl+D in the terminal it hangs instead of restarting THEVIC20 (but maybe this is a new feature, because I see the64 is commented in start.sh). 2. It says "...BASH SHELL v2..." (but I can fix that in bashrc.) 1. This is a bug, when testing I don't want the64 to start every time. Thanks for pointing this out, you can uncomment the64 in start.sh, I'll update the download later. 2. The v2 is my 'release' version, not related to the version of bash.
|
|
|
Post by jj0 on Feb 22, 2021 7:33:35 GMT
Great! but I'm more well acquainted with Tmux than GNU Screen and have read tutorials about Tmux. Would it be possible to get Tmux? linuxhint.com/tmux_vs_screen/For now, I'll leave this as an exercise for the reader. The usual way for me to add this type of stuff is: - Start XWM, either on my PC (easiest way, see first post of XWM) or on THE64 - with networking enabled
- Check if the app is already available and if not install it with apt or apt-get
- When installed, copy the binary to the Yaft/bin directory of the on-screen command shell fake firmware upgrade
- Start the on-screen command shell fake firmware upgrade on THE64
- Type 'ldd /mnt/Yaft/bin/<app name> | grep found'. This will tell you if any libraries are missing
- If libraries are missing, they should be available on XWM. Copy them from their location in XWM to Yaft/lib/, using 'cp -L <XWM path+lib name> <mount point of fake upgrade>/Yaft/lib'. The -L is to make sure that symbolic links are translated to the actual file they point to
- Repeat 5 until no libraries are missing anymore
Once you get the hang of this you can add as many binaries as you want - except when they are not compatible with the glib version of THE64.
Adding to this, it is much easier to copy the XWM rootfs.img to the USB drive you use to run the on-screen command shell and then either: - mount it to e.g. /media or a a /tmp/xxx directory then you can copy stuff over much easier
or - copy the start.sh as well to start-XWM.sh but change the 'startx' to /bin/bash. When you then run start-XWM.sh it will put you in a bash command shell in the XWM rootfs environment. You can then run e.g. dhclient to enable networking and any other command that's available.
|
|
|
Post by mobluse on Feb 22, 2021 17:39:08 GMT
I have two issues with v3: 1. When I press Ctrl+D in the terminal it hangs instead of restarting THEVIC20 (but maybe this is a new feature, because I see the64 is commented in start.sh). 2. It says "...BASH SHELL v2..." (but I can fix that in bashrc.) 1. This is a bug, when testing I don't want the64 to start every time. Thanks for pointing this out, you can uncomment the64 in start.sh, I'll update the download later. 2. The v2 is my 'release' version, not related to the version of bash. I didn't believe v2 was related to the version of Bash, but that it should be the same as in the filename of the download. I downloaded v3.
|
|
|
Post by jj0 on Feb 22, 2021 18:06:48 GMT
1. This is a bug, when testing I don't want the64 to start every time. Thanks for pointing this out, you can uncomment the64 in start.sh, I'll update the download later. 2. The v2 is my 'release' version, not related to the version of bash. I didn't believe v2 was related to the version of Bash, but that it should be the same as in the filename of the download. I downloaded v3. Oops! Another bug, it's definitely going downhill...
|
|
|
Post by spannernick on Feb 26, 2021 19:20:17 GMT
Not to sure that joy2key works on THEC64 Mini properly, THEC64 Joystick is not working with the PCU Option Menu in THEC64 Mini but THEC64 Joystick works fine on THEVIC20 in the menu.
|
|
|
Post by spannernick on May 11, 2021 10:07:48 GMT
I found a Bug in Yaft... The C64 font in Yaft is bigger so still using the spacing it would have if it was using the original font, each line is to close to each other so if you look at "g" you can see it crossing over to the next line or if you use Capitals, the spacing is not right. Look at the Tittle and part of its text at the top is cut off, look at the word "THE" and you see the top of the "T" is missing cause it has no spacing or wrong spacing. Look at the spacing on the second Tittle "CBM 64 is Set as Default in VICE Mode" you can see it has none when it should, look at the words "VICE Mode" and the same words below it and they are to close to each other. You can not read the menu far away from the screen cause all the lines intermingle with each other. This is the spacing it should have, it needs 2 spaces between lines.... It needs a space above the font and a space below the font, only way this can be fixed is in its source code and then recompiled. I would do this myself and fix it but 1. I do not know how to compile Yaft(I need some kind of walkthrough) and if it can even be compiled on a RPI3, 2. I have to setup my RPI3, 3. I need the source code with the C64 Font in Yaft, can not use the original code, and 4. I would have to look for the spacing in the code so like looking for a needle in a hay stack.. jj0 would be better at doing this cause he knows where he change the font in the code and properly that where the spacing is for it.
|
|
|
Post by jj0 on May 11, 2021 11:04:15 GMT
Here's the source code including the C64 font I used. But instead of trying to add line spacing in the source code you would be better off by either changing the font back to the standard font, or by changing the C64 font and add the blank space to each character. As for compiling you should be able to do it in XWM or similar to how you compiled the RGL libs.
|
|
|
Post by jj0 on Nov 11, 2021 15:23:39 GMT
Updated to v4.0
|
|
|
Post by jj0 on Nov 18, 2021 14:44:44 GMT
And now v4.1
|
|