Enterprise Forever
:UK => Programming => Topic started by: gflorez on 2016.February.10. 00:00:07
-
A mouse channel always needs a video channel where to draw the pointer. But on some circumstances the video channel disappears and the mouse driver doesn't have a way to detect the situation.
I'm implementing a detection routine that is triggered when the mouse is on idle for more than a second.
The problem I've found is that I can't use any EXOS call to check if the video channel is still open, because the routine is in the middle of an interruption and the calls return 254, (EXOS call not allowed).
I have to find a way to check directly the opened channels in the Channel Descriptor Chain, but the Explanations on the Kernel Manual are very confusing.
It says that the zone starts on AB41h, but I've not found more information about how it is organized. Peeking near the address gives apparently random numbers.
Can somebody teach me about this?
-
I'm not an expert of these computers at all, but isn't this (http://ep.homeserver.hu/Dokumentacio/Konyvek/EXOS_2.1_technikal_information/exos/kernel/Ch6.html) what you are looking for?
-
It says that the zone starts on AB41h,
On which EXOS version? It is not fixed :oops:
-
OK, not fixed but, is there a way to easily check(within an interrupt) if a channel exists?
Of course it must be EXOS version independent....
-
if a channel exists?
It is not enought. Also need to know the mode, size, memory address are don't changed.
-
I think it is a bad idea to check if a given channel exists every time an interrupt is triggered. It'd be better to hook all the given channel's handler calls and change the setup of your driver according to the changes happening.
-
You are right, but these are things that a programmer has to know while coding, not an error that happens easily when a user types TEXT exiting from a GRAPHICS mode associated to a Mouse channel.
I think that only checking if the channel exists is enough.
-
Easy possible video page moved in memory when other channel(s) closed.
-
I think it is a bad idea to check if a given channel exists every time an interrupt is triggered. It'd be better to hook all the given channel's handler calls and change the setup of your driver according to the changes happening.
The check is done only every 50 interrupts, and only if the mouse is stopped, so the routine is not time hungry...
It is good Idea to save the entry of the video channel at the initialisation, but it can disappear suddenly and EXOS moves the channel buffers by itself.
-
I think, the normal use of the mouse driver is in a static screen, no changes of modes nor dimensions or colours. EGI is static. PaintBox seems to use two static video channels(three more for the canvas stripes), and alternates on both the unique possible mouse channel. The paint zone even scrolls...
Then, the modes, colours or dimensions can be changed, but are calculated inside the PaintBox.
-
I think it is can be done on safe way when the mouse driver will be built in the EXOS. Then possible to combine the mouse and video driver, and mouse driver can directly use video driver data.
Currently write to the User Manual: close MOUSE channel before any other channels closed!
-
I think, the most important is to know if the video channel exists. Later, deeper checking can be done, but the existence of the channel is capital.
Currently write to the User Manual: close MOUSE channel before any other channels closed!
Yes, I will follow your advice.
The Mouse driver integrated on the Video driver..... sounds good.
-
Done on the English and Spanish Wiki pages. Pear will do later on the other languages.
I miss the necessary Magyar version. Where is Szipucsu?
-
Obviously you do it as it pleases you, but checking the channel availability in the interrupt handler, no matter how seldom you are doing it, has nothing lost there. At least that's how I see it.
And I have a vague feeling that integrating the mouse driver into the video driver is a big kick in the balls of EXOS. (What about you, Zozo?)
Is there any specific reason that you wrote Magyar but did not write Español a line before it?
-
And I have a vague feeling that integrating the mouse driver into the video driver is a big kick in the balls of EXOS. (What about you, Zozo?)
Driver not integrated. But when both are in the EXOS ROM, the possible call directly video driver routines.
These special function calls:
@@SIZE = 2 - return mode & size of page
@@ADDR = 3 - return video RAM address
needed, which are normaly called by EXOS 11, but EXOS call not allowed in interrupt handling. If both in same ROM then possible the direct calls.
The EXOS currently also use some direct calls, for example the KEYBOARD directly call DATE/TIME handler, when PAUSE pressed, for keep the time running. (This function missing from BRD, because it is external ROM, direct call don't possible)
-
Is there any specific reason that you wrote Magyar but did not write Español a line before it?
I wrote as this because it reminds me when I collected postal stamps when I was a child, long, long ago..."Magyar Posta"(the world most colorful stamps at that time.)
On the other side, my idiom is Castellano, or Castillian in English, one of the languages spoken on Spain. But as it is the common language, it is named Spanish outside Spain....
-
Obviously you do it as it pleases you, but checking the channel availability in the interrupt handler, no matter how seldom you are doing it, has nothing lost there. At least that's how I see it.
I only want to do the correct, if it can be done. I don't want the driver causing errors. I want to implement a solution.
I have fixed other errors on it. May be I'm not the most experienced coder, but I put all my effort on it....
-
This one second(50 interrupts) routine will also serve to check which is the active(moving) controller and assign it automatically.
But fortunately that check can be done without EXOS calls.
-
Zozo, seems that the memory map has not changed from EXOS 2.1.
Do you mean that it can change on next versions?
Following the addresses on the memory section on your information page(BFBA/B/Ch) I've discovered how the channels are stored. Still I don't know what are saved there, I'm only studying how to extract it.