August 10, 2020, 05:31:30 am

Ko-Window exploration

Started by spyffe, July 26, 2020, 05:14:29 pm

Previous topic - Next topic

spyffe

Sharing this in case folks are interested in Ko-Window, an X11-like graphical user environment for X68K machines.  I haven't found many docs out there for basic installation, so I'll document as I go along and discover things.

To get Ko-Window basically working, you don't need very much.  It's free software, available from Vector completely above-board.

  • Make sure you get kowin14b.lzh and unpack it.
  • Put the contents of kowin14b.lzh on their own floppy.  They won't boot so you need Human68k (2.01+, but 3 preferred) to boot.
  • From the floppy, type 'kowin' and kowin.bat will launch the window manager.

On initial launch your screen should look like this:
kowindow.png

What you're seeing is:

  • Console: the shell.  It runs ordinary shell commands, but you need to prefix them with RUN (e.g., RUN SWITCH) if they want to take over the screen.  (RUN invokes a COMMAND.X shell underneath so the paths it uses are the ones you get in Human64k.)
  • KF: A sort of file system explorer.  It has lots of functions for manipulating files, and you open them by clicking on the little icon to the left of the file name.
  • The doc viewer: NOT an editor.

Right-click menus exist for the vast majority of things, and in particular right-click on the desktop has a list of useful apps:

  • SCRMODE opens the resolution selector
  • XF which you know from above
  • Exit which quits out of Ko-Window

I'm interested in setting up a native development environment so I'll be perusing NaRuHoDo.doc for recommendations on software and let you know what I find out.

neko68k

July 27, 2020, 05:55:56 pm #1 Last Edit: July 27, 2020, 06:28:52 pm by neko68k
you're gonna have a bad time finding software. the vector archive has been gone for so long even internet archive doesn't have it. I really need to get together the few things I found that are of any note... a web browser, a MCDRV player, a port of vi, a "multitasking" terminal, a wallpaper setting thing, an IRC client. some other stuff. if I remember tomorrow I'll wrap up the folder from my HDD and put it somewhere. <3

(edit)
ah screw it, I'll do it now. Make sure you check the paths and stuff in kowin.bat and the files win\microwm.rc and win\wsrv.rc

my ko-windows install

(edit 2)
I should probably talk about it a little... I set it up to use NeXT style windows so you have to have the mouse cursor over a window to interact with the keyboard. Also you have to click the window title bar to bring the window forward. It won't work if you click somewhere else. You can change that in either wsrv.rc or microwm.rc I don't remember anymore.

To use KoMCP you need to be running PCM8 and MCDRV. You can drag and drop MDX and MDC songs and also MID and probably RCP files from KF on top of it and they'll play as expected.

STEVIE is a port of vi, it works like you'd expect vi would. You can drag text files from KF onto it and it'll fill the whole path in for you. Very handy.

You can drag image files on top of the Ko-Slice window and they'll become your wallpaper. There are some samples in the PIC folder. Probably some not work safe stuff in there. Don't say I didn't warn you ;)

KIRC is an IRC client, setting internet up is detailed on the wiki but it's a little weird in Ko-win and I don't remember the details anymore.

I don't think I put KoNetJoker in there. It's a web browser but it's useless these days. It's available here.

I also don't think I included BGTERM. That lets you run console programs in the background. For instance you can fire up a command prompt in it and still use the rest of the system at the same time. Useful for editing code with STEVIE and running the compiler at the same time. It's available somewhere in the RetroPC library. Oh bgterm.win is in there but you still need the driver in config.sys and that's a whole other thing.

116264022_10214166049104181_6218734723348475265_n.jpg

megatron-uk

Interesting. It's got a very 'twm' or 'motif lite' look to it. Is there any X11 underpinnings to it, or is it merely a visual similarity?

neko68k

July 29, 2020, 09:15:02 am #3 Last Edit: July 29, 2020, 09:17:13 am by neko68k
It's just visually similar. The UI is drawn on TVRAM so it sorta makes sense to go with that old X11 style widget toolkit look.

spyffe

Quote from: neko68k on July 27, 2020, 05:55:56 pmyou're gonna have a bad time finding software. the vector archive has been gone for so long even internet archive doesn't have it.

Hi Neko68k!  Thanks for your reply, I really appreciate pointers from the more long-standing forumers, since I'm just getting started.

I haven't yet had a chance to play with Ko-Window more, but I did find two interesting URLs.


I don't know how extensive the original Vector archive you were talking about was, but both of these have enough freeware to get me started.  (The Vector link has GCC, and "Bigmoney" has a very fat kowin folder.)

megatron-uk

If you are interested in GCC development, have a look at my wiki page:

https://www.target-earth.net/wiki/doku.php?id=blog:x68_devtools

I've tried to summarise the different versions of GCC that are available, as well as collect all of the dev documents in one place.

I'm currently using the "lydux" GCC 4.6.2 cross compiler toolchain quite successfully:

https://nfggames.com/forum2/index.php?topic=6764.0

I've also written some examples of how to get started with the toolchain and quick ideas if how to use the graphics hardware:

https://www.target-earth.net/wiki/doku.php?id=blog:x68_devcode

Hope that's useful!

neko68k

Quote from: spyffe on July 29, 2020, 01:59:26 pm
Quote from: neko68k on July 27, 2020, 05:55:56 pmyou're gonna have a bad time finding software. the vector archive has been gone for so long even internet archive doesn't have it.

Hi Neko68k!  Thanks for your reply, I really appreciate pointers from the more long-standing forumers, since I'm just getting started.

I haven't yet had a chance to play with Ko-Window more, but I did find two interesting URLs.


I don't know how extensive the original Vector archive you were talking about was, but both of these have enough freeware to get me started.  (The Vector link has GCC, and "Bigmoney" has a very fat kowin folder.)

Ah yeah I must have got some of this from Ground Zero Org years ago. The old Ko-win vector archive had basically everything there ever was but yeah its decades gone. Too bad. Of course you're welcome to ask questions. I might even have answers! I'd say the SIG forum is probably more active in general than this one though. At least, I usually don't pay attention to this one ;)

spyffe

I got to play with this a very little tonight.  I installed vim (from Vector) by putting vim.win into the WIN¥ directory.  (I put the .hlp file into ETC¥ and the doc files into DOC¥ but I doubt it makes a big difference.)

I was pleasantly surprised to see vim launch into its own window in kowin.  I haven't dug a lot into it yet but it did work on config.sys.

vim screenshot.png

I noticed a few oddities.

  • vim complained about not being able to create a backup file when saving config.sys.
  • vim doesn't recognize the arrow keys as directional keys, so I was left using the home-row navigation keys.  I would say it felt nostalgic except I've never actually used a vim that didn't recognize the arrow keys.

Incidentally, I have been careful to back up my HDS each time I modify it with editdisk... do I need to worry about it corrupting files?

megatron-uk

The only time I used vi or vim and it didn't recognise cursor keys was when accessing a Unix box over a dedicated serial terminal which didn't have an appropriate termcap entry. Yes, very annoying!

spyffe

So this may be getting a bit off topic but I got the Sharp C compiler (XC) to build and run a test binary under Ko-Window.

The XC compiler images that Sharp released do not include a functioning installer, so I instead obtained
  • C COMPILER PRO-68K ver2.1_システムディスク.D88 (boot disk / install disk 1)
  • C COMPILER PRO-68K ver2.1_システムディスク 2.D88 (install disk 2)
from "C COMPILER PRO-68K ver2.1.zip".  With those disks in FDD0 and FDD1 respectively, I booted and got a prompt asking me if I wanted to install the C compiler.  Since I did, I went through the steps, see below
XC installer screenshot.png
Finally, it set up ¥C.BAT and rebooted.

I haven't yet set up my PATH right, so right now I have to do the following embarrassing contortion to get CC to work in Ko-Window:

C
CD ..
KOWIN

Then I can use the C compiler as shown below.  (I'm fresh off the boat from Linux, forgive me)
programming.png
I'll follow up when I've done something more substantial.  In particular, I'd like to make sure I can actually use the Ko-Window developer kit with this setup.

spyffe

Quote from: megatron-uk on August 01, 2020, 06:29:18 pmThe only time I used vi or vim and it didn't recognise cursor keys was when accessing a Unix box over a dedicated serial terminal which didn't have an appropriate termcap entry. Yes, very annoying!
The attached documentation (VimKoWin.doc) suggests the author was aware of the lack of support for arrow keys (along with function keys) but "since it's vi, it's not a big deal..."

spyffe

As discussed above, I've installed XC and verified that it can generate working binaries.  However, Ko-Window's development kit requires GCC, so I'm working now on getting a native GCC toolchain.

I've tried installing gcc130.lzh (Vector) and resolving dependencies as gcc asks for them.  -I/xc/include seemed to get past unhappiness about stdio.h (I assume I may have to revisit this if I switch libc releases but I believe XC's libc should work for now).  However, I got stopped in my tracks by a has.x error.  GCC expects to see has, so I installed has309.lzh (Vector)... but then it passes has a command line it's not expecting, as seen in the attached image.  The command line is:

has.x -e -w -u -i hello.s -o hello.o

According to has's error messages / usage(), several of these are being used incorrectly (-w takes an integer parameter with the desired warning level, and -i should be an include path).  Hand-running has with the errors fixed runs into an undefined symbol for printf, so presumably undefined-symbol handling is also not being set up correctly.

All in all, I'm guessing this gcc expected a different has.  Should I be using a v2 has with GCC, or something else entirely?  Any other recommendations for tools?

spyffe

August 05, 2020, 05:30:11 pm #12 Last Edit: August 05, 2020, 05:32:55 pm by spyffe
Okay, I'm learning more about Mariko and Charlie and it looks like the package on Vector might be an out of date version of Mariko.

Thankfully there seem to be numerous pack rats in the community so I've been able to scare up a newer Mariko with docs. I'll play with that and report back.

neko68k

August 05, 2020, 07:36:54 pm #13 Last Edit: August 05, 2020, 08:01:28 pm by neko68k
fwiw I use gcc mariko, libc don, has060 and hlk evolution.

[edit]
also IIRC I had to use a very old version of MAKE to build ko from source. and also iirc I needed XC _and_ gcc to build it. currently it doesn't build for me and I don't know why but I haven't looked at doing that in years and years. I also don't think I ever got all the libraries together for KF. it wants a library for symbolic link handling that I couldn't find. I have ln and libln but it wants liblink or something else that I only found dead links and no IA backups for :/

[edit edit]
heres a screenshot of my autoexec.bat. it might not be appropriate for building ko stuff but it works for everything else I do.

Untitled.png

spyffe

August 07, 2020, 04:33:58 pm #14 Last Edit: August 08, 2020, 01:56:37 am by spyffe
Thank you for your autoexec.bat and description of your setup!

I've got Mariko GCC producing working binaries.  On top of the base XC installation, I needed
I put the contents of gcc142.lzh in ¥soft¥gcc142 and the contents of has309.lzh in ¥soft¥has309.  Then I took just libgcc.a out of gnub1502.tgz, renamed it to gcclib.l, and placed it in ¥xc¥lib.

One other file GCC wanted was doscall.equ, which as near as I can tell are symbolic constants for the published human68k entry points.  The XC installation provides a variant that its compiler supports, but GCC wants a slightly different symbol format.  I went into ¥xc¥include and copied doscall.mac to doscall.equ.  Then with an editor I changed each line that started with _, removing the leading _.  This produced a file GCC could work with.

I finally added the following lines to kowin.bat

path a:\;a:\sys;a:\bin;a:\etc;a:\xc;a:\xc\cc;a:\xc\bin;a;\win;a:\soft\gcc142;a:\soft\has309
set include=A:\XC\INCLUDE
set lib=A:\XC\LIB
set GCC_LIB=.l

There was only one other thing that was irritating: I got errors about missing symbols (__FCVT __ECVT __SRAND).  The only way I found around that (thanks neozeed!) was -lfloateml (using floating-point emulation from XC).  But after that -- a working binary!

gcc screenshot.png

Future work:
  • Extra configuration required to make Ko-Window software build (I'll be referring to your autoexec.bat and kowin_p2.txt)
  • Figure out how to make the floateml part implicit instead of having to specify it on every command line.

spyffe

Success!  I took the kowin14d distribution (Vector) and follwed kowin_p2.txt closely.

I put the kowin headers in a:¥xc¥include and its libraries in a:¥xc¥lib.
I also installed hlk301.x from hlk301b (Vector).
Then I updated my kowin.bat to set a bunch of custom variables:

set include=A:\XC\INCLUDE
set lib=A:\XC\LIB
set GCC_AS=a:\soft\has309\has.x
set GCC_LINK=a:\soft\hlk301\hlk301.x
set GCC_LIB=.l
set GCC_OPTION=LFIOAM
set HAS=-u -w
set SILK=-x -l

Now I was able to build the wlib samples, as shown in the attachment.