Welcome, Guest. Please login or register.


Author Topic: Where is the Channel Descriptor Chain? (Read 1908 times)

Online gflorez

  • EP addict
  • *
  • Posts: 2672
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Where is the Channel Descriptor Chain?
« 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?
« Last Edit: 2016.February.10. 00:04:34 by gflorez »

Offline ergoGnomik

  • EP lover
  • *
  • Posts: 841
  • Country: hu
  • Stray cat from Commodore alley
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 44.0 Firefox 44.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #1 on: 2016.February.10. 07:39:56 »
I'm not an expert of these computers at all, but isn't this what you are looking for?

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Where is the Channel Descriptor Chain?
« Reply #2 on: 2016.February.10. 09:41:29 »
It says that the zone starts on AB41h,
On which EXOS version? It is not fixed :oops:

Online gflorez

  • EP addict
  • *
  • Posts: 2672
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #3 on: 2016.February.10. 10:10:09 »
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....

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Where is the Channel Descriptor Chain?
« Reply #4 on: 2016.February.10. 10:46:58 »
if a channel exists?  
It is not enought. Also need to know the mode, size, memory address are don't changed.

Offline ergoGnomik

  • EP lover
  • *
  • Posts: 841
  • Country: hu
  • Stray cat from Commodore alley
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 44.0 Firefox 44.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #5 on: 2016.February.10. 11:02:15 »
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.

Online gflorez

  • EP addict
  • *
  • Posts: 2672
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #6 on: 2016.February.10. 11:05:20 »
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.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Where is the Channel Descriptor Chain?
« Reply #7 on: 2016.February.10. 11:09:46 »
Easy possible video page moved in memory when other channel(s) closed.

Online gflorez

  • EP addict
  • *
  • Posts: 2672
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #8 on: 2016.February.10. 11:15:02 »
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.

Online gflorez

  • EP addict
  • *
  • Posts: 2672
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #9 on: 2016.February.10. 11:26:40 »
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.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Where is the Channel Descriptor Chain?
« Reply #10 on: 2016.February.10. 11:35:44 »
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!

Online gflorez

  • EP addict
  • *
  • Posts: 2672
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #11 on: 2016.February.10. 11:42:31 »
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.

Online gflorez

  • EP addict
  • *
  • Posts: 2672
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #12 on: 2016.February.10. 12:36:10 »
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?

Offline ergoGnomik

  • EP lover
  • *
  • Posts: 841
  • Country: hu
  • Stray cat from Commodore alley
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 44.0 Firefox 44.0
    • View Profile
Re: Where is the Channel Descriptor Chain?
« Reply #13 on: 2016.February.10. 15:29:31 »
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?

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Where is the Channel Descriptor Chain?
« Reply #14 on: 2016.February.10. 15:57:16 »
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)