g – a multitasking OS for Ultimem/VICMIDI (WIP)
Moderator: Moderators
Re: g – an Ultimem OS/GUI under construction
Phew! Killed processes release their resources now. Multitasking is quite a slow process but optimizing things would be a great mistake that early. There's now an VICMIDI image (VICE got problems with Ultimem sized ones) instead of an executable. http://hugbox.org/pixel/external/denial/g.zip
How it works
The core (aka kernel) is located in the +3K area. RAM bank 0 contains the master core. Every launched process gets its own copy of the core with per–process data to eliminate the need for bank switches for calls to the core. If you link a shared library instead of the core via the function at $0400 it'll also get its own core so it can link libraries as well. All in all every process or library occupies at least 16K RAM. The benefit of that is that each process or library could use up to 34K RAM. Accordingly calls to a library come with the overhead of banking. Again, lots of room for optimizing memory usage.
Multitasking… the task switcher saves the zero page from $0000–$008f, the stack starting from the stack pointer and the current bank configuration.
Am trying to keep the README at https://github.com/SvenMichaelKlose/g updated.
How it works
The core (aka kernel) is located in the +3K area. RAM bank 0 contains the master core. Every launched process gets its own copy of the core with per–process data to eliminate the need for bank switches for calls to the core. If you link a shared library instead of the core via the function at $0400 it'll also get its own core so it can link libraries as well. All in all every process or library occupies at least 16K RAM. The benefit of that is that each process or library could use up to 34K RAM. Accordingly calls to a library come with the overhead of banking. Again, lots of room for optimizing memory usage.
Multitasking… the task switcher saves the zero page from $0000–$008f, the stack starting from the stack pointer and the current bank configuration.
Am trying to keep the README at https://github.com/SvenMichaelKlose/g updated.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: g – an Ultimem OS/GUI under construction
please report them so it can be fixedVICE got problems with Ultimem sized ones

I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Re: g – an Ultimem OS/GUI under construction
Sorted.groepaz wrote:please report them so it can be fixedVICE got problems with Ultimem sized ones

A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
"launch" can now wait until the launched process has been killed.
Can now "halt" processes or "resume" them.
Can now "halt" processes or "resume" them.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
Added target "vic20g" to the cc65 C compiler, cloned at https://github.com/SvenMichaelKlose/cc65g
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
34K address space looks like a pretty bad idea. Comes with too much overhead. Will move the core's code to $a000 to get some peace for doing the file system.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
Codepage 437 – the IBM PC ROM charset reduced:

cc65's stdlib is doing odd things like trying to print char 0 or blocking I/O after a single console char read/print cycle. Otherwise there'd be a shell already.

cc65's stdlib is doing odd things like trying to print char 0 or blocking I/O after a single console char read/print cycle. Otherwise there'd be a shell already.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
beware: there are two fundamental problems with using the cc65 libs in a multitasking context:
- it uses kernal I/O, meaning an occasional CLI is executed when you dont want it (eg in CHROUT)
- the cc65 library is not reentrant
i rewrote a couple of those things for my little multitasking experiment (click) back then, you'll probably have to do the same.
- it uses kernal I/O, meaning an occasional CLI is executed when you dont want it (eg in CHROUT)
- the cc65 library is not reentrant
i rewrote a couple of those things for my little multitasking experiment (click) back then, you'll probably have to do the same.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
The cc65 part doesn't use the KERNAL and every process gets its own zeropage (not including the KERNAL area) and stack.groepaz wrote:beware: there are two fundamental problems with using the cc65 libs in a multitasking context:
- it uses kernal I/O, meaning an occasional CLI is executed when you dont want it (eg in CHROUT)
- the cc65 library is not reentrant

Nice and fast!i rewrote a couple of those things for my little multitasking experiment (click) back then, you'll probably have to do the same.

A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
- Mike
- Herr VC
- Posts: 5130
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
I know it's difficult enough to design something remotely readable (read: bearable) in 4x8 pixels, and besides the fact that the glyph '[' is errorneously doubled, but ... that font just looks hideous.pixel wrote:Codepage 437 – the IBM PC ROM charset reduced: [...]
Also, the inclusion of the graphic characters of CP 437 is questionable at least. The font is going to live on a bitmapped display anyway. Any 'graphic' elements that go beyond the letters, numbers and symbols of pure ASCII could be drawn directly. Finally, the choice of or restriction to ASCII surely won't be an impediment for implementing a shell.
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
It went through some typographical adjustments. Never mind.Mike wrote:I know it's difficult enough to design something remotely readable (read: bearable) in 4x8 pixels, and besides the fact that the glyph '[' is errorneously doubled, but ... that font just looks hideous.pixel wrote:Codepage 437 – the IBM PC ROM charset reduced: [...]
It's about compatibility with Unix (terminals). I've done that charset long before I joined Denial. As for the graphics:Also, the inclusion of the graphic characters of CP 437 is questionable at least. The font is going to live on a bitmapped display anyway. Any 'graphic' elements that go beyond the letters, numbers and symbols of pure ASCII could be drawn directly. Finally, the choice of or restriction to ASCII surely won't be an impediment for implementing a shell.

They're too damn wide–spread to be ignored.

A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
Looking better. Who thought that RTS and RTI store addresses on the stack differently? cc65 is doing fine.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose
- majikeyric
- Vic 20 Afficionado
- Posts: 354
- Joined: Fri Oct 24, 2014 2:08 pm
- Website: http://majikeyric.free.fr
- Location: France
- Mike
- Herr VC
- Posts: 5130
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
O.K. That being cleared up, here's another one for you in g/src/core/dev/con/charset-4x8.asm:pixel wrote:It went through some typographical adjustments. Never mind.
Code: Select all
[...]
; t
%0000
%1000
%1100
%1000
%1000
%1000
%1010
%0100
%0000
; u
[...]

(... actually, I went to insert the glyphs of ASCII 32..126 into an unsuspecting MG Text Edit to compare two instances of a Lorem Ipsum text, and found out about this. Judging from your example picture, that should be two rows of %1000 in the middle ...)
Re: g – a multitasking OS for Ultimem/VICMIDI (WIP)
O.K. But please take a look at this new set:Mike wrote: (... actually, I went to insert the glyphs of ASCII 32..126 into an unsuspecting MG Text Edit to compare two instances of a Lorem Ipsum text, and found out about this. Judging from your example picture, that should be two rows of %1000 in the middle ...)

A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
https://github.com/SvenMichaelKlose