Page 1 of 1

Aprom project, USB era (ver. 150826)

Posted: Wed Aug 26, 2015 1:43 pm
by Artlav
Previous thread: http://forum.osdev.org/viewtopic.php?f=2&t=22667

Aprom is a weird modular 32bit OS. Tightly bound, roughly microkernel design.
Been in development every now and then over the past two decades.

The topic of today's release is USB.

You can get the images here: http://orbides.org/ape/aprom_150826.zip (3.2 Mb)

Running options:
I'm most interested in how it does on real HW, with USB devices.
You can either find a floppy image (a.img) in the package, or use the content of "img" directory with a multiboot bootloader like GRUB.
There are also scripts for running it in Bochs and Qemu.

If you want to just take a look at it and you run Windows, you can run kernel_vm.exe, which is a colinux/wine-like user mode kernel.

For folks on Windows, there is also rbuild.bat.
It builds arosroot.img, the ram disk filesystem image, from the files in "root" directory.
This lets you tweak options and so on.
Most interesting one - in /cfg/gui.cfg, first line defines the graphics mode it would be looking for. Only 16bit are supported.

Inside:
Most interesting runlevel is 3.
If the GUI does not work, you can go into text mode - runlevel 1.
Most programs quit on esc or enter.
Text editor is kind of broken, and there is no compiler in this package, so it does not do much anyway.

USB:
USB might take time to initialize, and might take a key press/click to kick-start.
Plugging in and removing devices should just work, transparently.
Only keyboards and mice are supported, but other devices will have their info polled.

In the runlevel 4 you can see detailed USB info dump, with message content.
In other runlevels, you can see the same with ulogw command, but with less details.

Try plugging in various devices.
For some reason half of them fail to respond, i'm interested which are, and whether the rest work.

Tips
-The tasks are switched by the rectangles in the upper-left corner.
-If the mouse doesn't work, Caps Lock toggles them one by one.
-If all windows are closed, click in upper-right corner.
-There is no current directory, all paths are absolute
-Language is changed by Win key

Etc
From terminal, you can have a bit of fun with "msgtool" command.
It's a debug tool that can send messages to endpoints (list of them is "msginfo"). First parameter is the destination, second is the message.
Anything ending on .version would return a version string.
If you call exec.simple with a full file name (msgtool exec.simple /bin/ps", then that file will get ran.
Sending messages somewhere else can result in anyhting from nothing to something random or something crashing, depending on how good the error handlers are.
Which can also be FUN.

The whole thing is fairly stable, and i ran pretty complex applications in it.
If you want some games or a pascal compiler, i can upload them.
There is also a support for CDROM and floppy, but it's not compiled in in this build.

All in all, have fun (assuming it would work)!

Screenshots
Runlevel 3's "Desktop".
Image

CPUID in terminal emulator:
Image

OpenGL:
Image

X Commander:
Image

Re: Aprom project, USB era (ver. 150826)

Posted: Wed Sep 02, 2015 12:29 pm
by Artlav
Hm. No one?
Or is everything working perfectly? :)

Re: Aprom project, USB era (ver. 150826)

Posted: Wed Sep 02, 2015 3:17 pm
by Octocontrabass
I meant to try this, but recent events have gotten in the way. Hopefully I will find the time soon. I have a few USB devices that will be interesting to test.

By the way, what are the minimum hardware requirements? I'd like to know ahead of time if I should expect things to fail on certain hardware.

Re: Aprom project, USB era (ver. 150826)

Posted: Wed Sep 02, 2015 5:06 pm
by Artlav
Pretty low, i would think.
I had it working on everything old i have - Via C3, 533Mhz, 64Mb RAM and Celeron 366Mhz, 32Mb RAM.
I think the lower limit is somewhere around 8-16Mb RAM, and a CPU with FPU and CPUID in it.
A GUI+desktop takes 24Mb RAM, simpler GUI - 18Mb.
Don't have an easy way to check it in console mode.

Re: Aprom project, USB era (ver. 150826)

Posted: Thu Sep 03, 2015 4:03 am
by Octocontrabass
Does the desktop have any keyboard shortcuts to make navigation possible without a mouse? The mouse didn't work at all, so I ended up using runlevel 2 instead of 3.

Image

I don't think mm[11] is being displayed correctly. Hopefully it's just a display issue! (Speaking of display issues, that mouse pointer keeps flickering.)

Image

PCI looks okay. USB, maybe not so much. I didn't see anything happen when I plugged in the mouse and keyboard.

Image

The keyboard still works, though. Did you forget the BIOS handoff?

Re: Aprom project, USB era (ver. 150826)

Posted: Thu Sep 03, 2015 9:52 am
by Artlav
Octocontrabass wrote:Does the desktop have any keyboard shortcuts to make navigation possible without a mouse? The mouse didn't work at all, so I ended up using runlevel 2 instead of 3.
Caps lock switches windows, and that's about it...
X commander is keyboard-only.
In terminal, SHift+pgup and -dwn scroll.
Octocontrabass wrote:I don't think mm[11] is being displayed correctly. Hopefully it's just a display issue! (Speaking of display issues, that mouse pointer keeps flickering.)
Weird. How much RAM is in there? 2Gb, or more?
Octocontrabass wrote:PCI looks okay. USB, maybe not so much. I didn't see anything happen when I plugged in the mouse and keyboard.
The keyboard still works, though. Did you forget the BIOS handoff?
I don't see a UHCI in there, so it's a matter of a lack of a controller it can understand.
More precisely, i think it's a problem with parsing PCI-PCI bridges.
Lacking USB, it uses the standard PS/2 driver for keyboard.

Re: Aprom project, USB era (ver. 150826)

Posted: Thu Sep 03, 2015 1:27 pm
by Octocontrabass
Artlav wrote:Weird. How much RAM is in there? 2Gb, or more?
64GB.

Re: Aprom project, USB era (ver. 150826)

Posted: Thu Sep 03, 2015 2:56 pm
by piranha
I ran it first with qemu-system-x86_64 -fda a.img, and I ran into: http://i.imgur.com/cod8TCB.png.
Running it with -enable-kvm got it to start up with runlevel 1, but there seems to be a bug in the input handling of the shell: http://i.imgur.com/DOMbdyA.png
Finally, I tried to start the GUI runlevels, and got https://gist.github.com/dbittman/773c8bd15ce3ba5b3df6 for runlevel 2 and a black screen for runlevel 3.

My version of qemu is 2.3.0, and I'm on linux.

Re: Aprom project, USB era (ver. 150826)

Posted: Fri Sep 04, 2015 7:54 am
by glauxosdever
Hi,
Octocontrabass wrote:
Artlav wrote:Weird. How much RAM is in there? 2Gb, or more?
64GB.
If I recall correctly you had a computer with only 64 MB of RAM. Are you sure you didn't mistake the unit? Also, I have not heard of any ordinary computers having that much memory.

Regards,
glauxosdever

Re: Aprom project, USB era (ver. 150826)

Posted: Fri Sep 04, 2015 8:11 am
by Octocontrabass
glauxosdever wrote:If I recall correctly you had a computer with only 64 MB of RAM. Are you sure you didn't mistake the unit?
Rest assured, it would be very difficult to confuse the two.
glauxosdever wrote:Also, I have not heard of any ordinary computers having that much memory.
It's not an ordinary computer.

Re: Aprom project, USB era (ver. 150826)

Posted: Mon Sep 07, 2015 11:12 am
by Octocontrabass
I only got around to running one test over the weekend. I was hoping I would have time for more, but I guess this will have to do for now.

The test machine is a crusty old Gateway laptop. USB is actually functional on this machine, but that turns out to be a bad thing: now that the keyboard is properly detected as a USB device, it simply doesn't work. The touchpad doesn't work eiuther, so I can't use anything other than runlevel 4.

All logs are prefixed with timestamps and "UHCI", so it's safe to assume this machine has a UHCI controller.

A USB keyboard: (plugged in when it boots)

Code: Select all

UHCI device 0, IO=$1020
Ports=2
Port 0/1, status on enable=CON EN D- LS
Adding (ls=1), settling delay...
Device processed.
Device 1
 USBsp=0110
 MaxPacketSize0=8
 Vid:Pid=413C:2003
 Manufacturer(1)=
 Product(2)=
 NumConfigs=1
  cfg[0].max_power=35
  cfg[0].num_interfaces=1
   if[0].class=0:0:0 (CL_0:Unk_scl:Unk_pr)
   if[0].num_endpoints=0
UHCI Status: $02
Device 1 removed.
A USB chip programmer:

Code: Select all

Device inserted...
Port 0/1, status on enable=CON EN D+
Adding (ls=0), settling delay...
Device processed.
Device 1
 USBsp=0200
 MaxPacketSize0=8
 Vid:Pid=04D8:E11C
 Manufacturer(1)=www.autoelectric.com
 Product(2)=MiniPro TL-866 Programmer
 NumConfigs=1
  cfg[0].max_power=50
  cfg[0].num_interfaces=1
   if[0].class=0:0:0 (CL_0:Unk_scl:Unk_pr)
   if[0].num_endpoints=2
    ep[0]=1:$02:64:1
    ep[1]=129:$02:64:1
Device 1 removed.
Three flash drives, a webcam, and a monitor: (all reported the same messages)

Code: Select all

Device inserted...
Port 0/1, status on enable=CON EN D+
Adding (ls=0), settling delay...
Failed to address device
Device won't proces.
UHCI Status: $02
Device 1 removed.
A microphone:

Code: Select all

Device inserted...
Port 0/1, status on enable=CON EN D+
Adding (ls=0), settling delay...
It looks like the microphone causes some problems, because it stops printing messages at that point.

Re: Aprom project, USB era (ver. 150826)

Posted: Thu Dec 14, 2017 7:32 am
by updater3
Artlav wrote:Aprom is a weird modular 32bit OS. Tightly bound, roughly microkernel design.
Been in development every now and then over the past two decades
Good day, Artlav! Currently I am updating the OSDev Projects wiki page.
Please tell, your Aprom OS - is it open source? Or closed source?

Unfortunately I was unable to find the source code of Aprom OS,
so (for now) I am listing Aprom OS as "Proprietary :(" at the OSDev Projects wiki page,
but - if you could show me where is a source code (or maybe upload it somewhere, e.g. github)
then I could post a link to it and write to OSDev wiki that your Aprom OS is open source