I'm writing my console driver - some troubles occur:
1. I added support for four virtual consoles - everything's working fine when running my kernel in Bochs: I can switch consoles and cursor is updated. But when running my Operating System on a real machine, the cursor isn't printed. Everything's o.k. except this. I just cannot see any cursor. After playing a bit, I noticed that the cursor is only printed if it is placed at an position where I already printed some text out. Seems strange, heh - I may show you some code if you need, just tell me...
2. I'm willing to have sort of banner on top of each console - similar to Clicker's one. Any idea how I could implement this. I saw that Clicker is implementing it by just declaring a banner as a console (don't know how this should work? two consoles on one screen ?!).
Anyways, a banner as a console is perhaps not the only solution - any other design ideas?
thanks,
Alexander
Little trouble with console
Re:Little trouble with console
I cannot help you with the cursor problem, but for number two, I am implementing console via all software. Basically every virtual console has it's own structure defining it size, location, cursor x&y, and it's own memory location - maybe a few other things. More then one console can be maked visible at one time, and the refresh routine just draws them one after another by copying the memory from within the structure to the real video memory at a given location. As long as they do not overlap, then it all looks fine. If they do overlap, then the last one drawn appears on top. So far it is unoptimised and can kind of flicker, but I'll fix that later with a list of dirty regions. To take this one step further I have the concept of a "virtual screen" which allows collections of these consoles to be displayed together.
I have not seen clicker, so I'm not sure what is in the banner, but sense my console (in theory) should be able to run any app within it, I was planning on having an application just display status bar info. I have not really thought about what to display yet though. It could include memory usage, and cpu usage etc... Or perhaps it will just be a title to identify each console. I don't know yet.
Now, if I could just get past my puts() problem in real mode, I should have virtual console working there also.
Hope this helps...
_mark()
I have not seen clicker, so I'm not sure what is in the banner, but sense my console (in theory) should be able to run any app within it, I was planning on having an application just display status bar info. I have not really thought about what to display yet though. It could include memory usage, and cpu usage etc... Or perhaps it will just be a title to identify each console. I don't know yet.
Now, if I could just get past my puts() problem in real mode, I should have virtual console working there also.
Hope this helps...
_mark()
Re:Little trouble with console
ok the problem is that your virtual console arrays are set with 0 for charcter and 0 for attribute. The cursor is shown in the foreground colour. Until you print somewhere the foreground colour will be 0 (black), the same as the BG.
therx
therx
Re:Little trouble with console
You won't believe it, but I found exactly this out right nowok the problem is that your virtual console arrays are set with 0 for charcter and 0 for attribute.
Anyways, thanks very much
@consoles:
Yes, I'll do a software implementation - not yet sure how I'm going to manage it in detail...still collecting ideas
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Little trouble with console
gonna do it via software too.
Funny thing: I have experienced the same as you, abless, with my "video driver thing" - when I wrote spaces with the correct foreground/background attributes to video memory to have it erased - I got a neat lovely blinking cursor. I felt blessed after on.
stay safe.
Funny thing: I have experienced the same as you, abless, with my "video driver thing" - when I wrote spaces with the correct foreground/background attributes to video memory to have it erased - I got a neat lovely blinking cursor. I felt blessed after on.
stay safe.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Little trouble with console
Alright, implemented banners - I got a nice console environment working now
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Little trouble with console
There are basically 2 ways implementing "banners" for consoles: hardware or software. The software way (which Clicker uses) consist in having structures declaring the console geometry (characters per row, "pitch" for going one row down, amount of rows, etc) and base address.
The small assembly function that performs the video output refers on that console structure to select the place where characters should be emitted, so writing to the "main" part of the screen can't overwrite the banner ...
The hardware way would consist of using VGA "screen split" register to have the screen sliced in 2 different regions, so that you can (for instance) have a smooth scrolling on the main area while keeping the banner static (may lead to funny visual effects )
You could even imagine a graphical banner and a text main area if you're very comfortable with vga hardware programming
The small assembly function that performs the video output refers on that console structure to select the place where characters should be emitted, so writing to the "main" part of the screen can't overwrite the banner ...
The hardware way would consist of using VGA "screen split" register to have the screen sliced in 2 different regions, so that you can (for instance) have a smooth scrolling on the main area while keeping the banner static (may lead to funny visual effects )
You could even imagine a graphical banner and a text main area if you're very comfortable with vga hardware programming
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Little trouble with console
consoles...
I have now a sort of Idea how to do it: I declare an array of console structures - say 8 of them (there may be more). Each of these structures has also a Keyboard Input buffer assigned to (maybe this is foolish design/idea). Each console knows about cursor-X/Y and it has a memory area for saving its video memory.
dumb question: should console switching occur whilst an interrupt? say during execution of the keyboard interrupt service routine?
I have now a sort of Idea how to do it: I declare an array of console structures - say 8 of them (there may be more). Each of these structures has also a Keyboard Input buffer assigned to (maybe this is foolish design/idea). Each console knows about cursor-X/Y and it has a memory area for saving its video memory.
dumb question: should console switching occur whilst an interrupt? say during execution of the keyboard interrupt service routine?
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image