home *** CD-ROM | disk | FTP | other *** search
/ Amiga GigaPD 3 / Amiga_GigaPD_v3_3of3.iso / netbsd / docs / mailinglist-archive / 1993-12 / text0335.txt < prev    next >
Encoding:
Text File  |  1993-06-25  |  3.3 KB  |  75 lines

  1. Ack I just killed some mail (actually archived it but its pretty hard
  2. to get at now) So I don't have the Xami's authors name sorry.
  3.  
  4. What I wanted to say is about using the view stuff.  The problem is
  5. currently we have no way to to allow multiple things like console and
  6. X I guess we need to chnage some stuff (will be working on these now)
  7. in ite and other places to support swapping the input focus around and
  8. such.  This will allow multiple consoles etc.  Currently however I was
  9. under the impression (as markus informed me) that X somehow co-exists
  10. with /dev/console so that both cannot be run at the same time (displayed)
  11.  
  12. As for right now I would say code it using the mix of grf0 (ick).
  13. Currently grf0 is only a hack into the view code but this hack also
  14. works to syncronize things. -OR better yet-
  15.  
  16. If you wanted to open up other screens however you can use the view
  17. devices, actually you do all your graphics into views, how?  tell
  18. grf[0] to turn off (not needed but at least it avoids the consoel
  19. popinng up sometime when the user won't be able to type into it.)
  20.  
  21. Then open /dev/view00 .. /dev/viewXX for each screeen you want (view00
  22. currently will return EBUSY but thats ok you should be handling this :^)
  23.  
  24. Is your input and output coming from the /dev/console?
  25.  
  26. I am not sure that is all clear so I will try and do a walk through
  27. pseudo boot of an X like thing:
  28.  
  29. tell /dev/console to turn off. This should cause /dev/console to lose
  30. the input focus.
  31.  
  32. open /dev/ms and /dev/kbd to get input from user.
  33.  
  34. open /dev/viewXX where XX is 00 then 01 until you get either a valid
  35. fd or your error is not EBUSY (signifying someone else is using it)
  36.  
  37. use ioctl to get bitmap VIEW_GETBITMAP
  38. use ioctl to get colors VIEW_GETCOLORMAP
  39. use mmap to map the bitmap into your process space.
  40.  
  41. Now you can do anything to the view/bitmap that you want render into
  42. it using the mapped mem and can change the colors (ex: in iteconfig
  43. and view code I uploaded) using ioctl VIEW_SETCOLORMAP.  Whats so nice
  44. abou tthis?  You don't have to worry about the silly stuff behind
  45. whats happening.  Oh BTW ioctl VIEW_SETSIZE and VIEW_GETSIZE to set or
  46. find a new display size (whatchout however as this will possibly
  47. de-allocate and re-allocate the bitmap so you should get the bitmap
  48. struct again and remap it into your process.
  49.  
  50. As you can see this was my first attempt at RTG I guess becuase there
  51. are some really kooky boards out ther it doesn't quite work becuase
  52. the boards cannot mmap the entire bitmap at once.  Dunno how to handle
  53. this I have some ideas at how retina could be done but I don't know
  54. much about other display cards.
  55.  
  56. I also want to add to the view spec (and my grf monitor stuff) some
  57. more ways to ask for specific display types  Right nowit just uses a
  58. closest fit algorithm to pick the display mode.  This is not good
  59. enough as we need to allow programs to say *NO INTERLACE* or *NO
  60. HIRES* etc...
  61.  
  62. The view device alsocan be expanded (backward compatibly) to allow
  63. oversized bitmaps as my /dev/grf (in dev/grf/*) allows for this.
  64. Although my /dev/grf probably needs some more params to specify the X
  65. and Y deltas inside the oversized bitmap (I used the speced deltas for
  66. giving everyone there adustable display offsets :^) )
  67.  
  68. Anyway I really hope you do use this method as its the cleanest and
  69. will in the future I am sure add support transparently to your X
  70. server for other display cards (or AGA mode etc :^)
  71.  
  72. Chris.
  73.  
  74.  
  75.