home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / utilities / viewer / viewer.doc < prev    next >
Encoding:
Text File  |  1999-08-13  |  16.8 KB  |  486 lines

  1.  
  2.  
  3. Viewer - simply a simple program
  4.  
  5.  
  6. Author:    Jörg van de Loo
  7.     Hövel 15
  8.     47559 Kranenburg
  9.     Germany
  10.  
  11.  
  12.  
  13. OVERVIEW
  14.  
  15. Viewer  V4.4  is  a simple program to display ASCII-text-files. It does only
  16. support  standard  functions  like  scrolling  up  and  down.  It's  not  so
  17. comfortable as PPMore, MuchMore, Less and so on.
  18.  
  19.  
  20. The  main  reason  to  create  Viewer was because PPMore, MuchMore, Less are
  21. much  too  tall  for the functions they offer. Viewer is only 24 KB in size,
  22. resident  capable  and  offers  functions which are not implemented in Less,
  23. PPMore    and    so   on,   this   are:   displaying   binary   files   like
  24. Amiga-object-files;  a picture viewer which can display super bitmap screens
  25. and  also  offers a very easy way to display those hidden parts, brushes can
  26. be  displayed  as  well.  Of  course AA-images become supported (BURST-FETCH
  27. mode  supported  (used  all  the  time)).  It's  also  possible  to  display
  28. IFF-files  containing  plain  characters,  mainly  the IFF-FTXT and IFF-SWRT
  29. formats;  first  one  used in older applications and for clipboard handling,
  30. the  second  is  known as a FinalCopy-II document. Additional, IFF-8SVX mono
  31. sound files can be made audible.
  32.  
  33.  
  34.  
  35.  
  36. COPYRIGHT
  37.  
  38. Viewer  is  placed  in  the  public  domain  as  freeware. Because I ask for
  39. nothing,  you  can't ask for anything. Don't blame me when Viewer bombs your
  40. Amiga. All use is at your own risk.
  41.  
  42. You  can  do  what you want with the object-file of Viewer so long you don't
  43. remove  the  copyright  notice  and  you  have a non-criminal aim. All other
  44. things are up to you.
  45.  
  46. The  source-code  of  Viewer  is  also  placed in the public domain, also as
  47. freeware  - although you have got the possibility to improve Viewer's source
  48. code,  as  long you don't change the copyright notice. After having improved
  49. Viewer,  you  have  to  place  the  modified  source-code  and of course the
  50. object- file of it in the public domain pool (e.g. Fish-Disks, Aminet).
  51.  
  52.  
  53.  
  54.  
  55. SUMMARY
  56.  
  57. A -key        About page
  58. I -key        Internal info about Viewer
  59.  
  60. H -key        Help page
  61. E -key        Enlarge? window to specified size
  62. L -key        Load new file (ASCII, binary, image)
  63. R -key        Refresh window and set new limits
  64.  
  65. C -key        Window contents to file
  66. W -key        Window contents to printer (prt:)
  67. F -key        Print file to file
  68. P -key        Print file to printer (prt:)
  69.  
  70. S -key        Search insensitive for a string
  71. N -key        Search for next occurring of this string
  72.  
  73. B -key        Bottom of file
  74. T -key        Top of file
  75.  
  76. CRSR_UP        Scroll up one page
  77. CRSR_DN        Scroll down one page
  78. CRSR_LEFT    One line back
  79. CRSR_RIGHT    One line further
  80.  
  81. ENTER        One line down
  82. RETURN        One line down
  83. Right SHIFT    One line back
  84.  
  85. LEFT MOUSE BUTTON    One line down
  86. RIGHT MOUSE BUTTON    One line up
  87.  
  88. PG_UP        One complete page up
  89. PG_DN        One complete page down
  90. HOME        Top of file
  91. END        Bottom of file
  92. PrtSc        Print window contents to printer (prt:)
  93.  
  94.  
  95.  
  96.  
  97. REQUESTER
  98.  
  99. Only  the  'arp'  and  'reqtools'  file-requesters will be supported. If the
  100. above  named libraries are not available, Viewer will terminate immediately.
  101. It  is  possible  to  work  without  those  file-requesters  when you choose
  102. directly  from  Shell  or  Workbench  the  file Viewer should display (comes
  103. later).
  104.  
  105. Viewer  will display an auto-requester of an own kind. There are two gadgets
  106. in  it;  I  think  you  understand  their  meanings.  Because of this simple
  107. auto-requester  font-sizes  up  to 15*10 pixels can only be used, so if your
  108. default-font  is  larger,  it  will trash the auto-requester window. Because
  109. I'm  using an own made fixed width font of 11*6 pixel this auto-requester is
  110. no troubleshooter on my system.
  111.  
  112.  
  113.  
  114.  
  115. IMAGES/PICTURES
  116.  
  117. At  the  moment  only the IFF-ILBM/IFF-ACBM formats are supported, but up to
  118. 256  colours  or  HAM-8  images  (64/262144 colours). When the image size is
  119. taller  than  the  screen-size,  you have got the possibility to scroll that
  120. picture.  Move  the  mouse into the direction you want to scroll the screen.
  121. When  the mouse-pointer hits the screen limits, the scrolling is started. If
  122. the  mouse-pointer  is  moved  away  from  the  screen  border, scrolling is
  123. stopped.  To  scroll  the  screen faster, press while the mouse-pointer hits
  124. the screen-border the right mouse-button.
  125.  
  126. To close the image screen press the left mouse button.
  127.  
  128.  
  129.  
  130.  
  131. FOREIGN GRAPHIC DEVICES
  132.  
  133. On  a  graphic  accelerator  board  images  can  be shown up to 24 bit (16.7
  134. million colours) if your board supports such a depth.
  135. The  IFF-ILBM  format  is  not limited to a rigid depth so Viewer will use a
  136. screen  depth  of  8  bit  planes  for  all images with less or equal to 256
  137. colours  and a screen depth of 15 bit for images with more than 257 and less
  138. than 32768 colours.
  139. A  screen depth of 16 bit would require an image with at most 65536 colours.
  140. Viewer  supports  only  images  with a colour-map with at most 65536 colours
  141. (CLUT  -  colour look up table). A 65536 colour image will need 196608 bytes
  142. for  the  colour  look  up  table  -  and  additional  bytes  for  the  data
  143. themselves.  If  images has got more colours Viewer will treat them as 8 bit
  144. -  exception  if  the  image  is a real 24 bit image. This is rendered using
  145. true colour mode (a 24 bit screen will be opened in this case).
  146.  
  147. Viewer  can  display  such  images  only  if  you have already installed the
  148. CystLord  or  the  vanGogh84  package  and  when you own a 3rd party graphic
  149. device.
  150.  
  151. By  the  way,  HAM6  and  HAM8 will be decoded into 24 bits and then in high
  152. quality and even quite quick.
  153.  
  154. Prove:
  155. MultiView using picture.dt 43.41 and ilbm.dt 44.11
  156.  
  157. 24 bit 640*480 pixels full-screen display (ilbm, 620 Kb file size)
  158.    MultiView  Viewer
  159.    5.91 sec     5.63 sec    68040 caches on
  160.    14.65 sec    14.94 sec    68040 caches off    
  161.  
  162. HAM-8 736*654 pixels full-screen display (ilbm, 320 Kb file size)
  163.    5.82 secs     5.35 sec    68040 caches on
  164.    14.91 sec    18.57 sec    68040 caches off
  165.  
  166. Note:    EHB  images are supported and also 24 bit images up to 1360 pixel in
  167.     width,  taller  images  are  forced  to  16 bit - this is due to the
  168.     limit of the 3rd party graphic device I use.
  169.  
  170.  
  171.  
  172.  
  173. IFF-FTXT/IFF-SWRT
  174.  
  175. You  are  able  to load IFF-documents. Viewer will use two passes to extract
  176. the  ASCII-character  codes  out  of  those files. The maximum limit for one
  177. line  I  set  to  the  amount of characters that can fit into one line, this
  178. means  at least at the last letter of the window a word-wrap is made. Please
  179. note:  Don't  expect  too  much  from  the  extractor,  Viewer  itself  is a
  180. RAM-based text-viewer rather than a desktop publishing program!
  181.  
  182. To  convert  e.g.  a  FinalCopy-II  document  to  ASCII  simply  load in the
  183. document.  A  requester  will  appear;  response to this requester should be
  184. "Okay".  After  this  is  done,  the plain characters are shown. Simply save
  185. that  file  with  Viewer  (press  key "F"). Read the new created file with a
  186. text editor (like CygnusED) and modify.
  187.  
  188. Currently supported file types are:
  189.     Plain ASCII
  190.     IFF-Text
  191.     FinalCopyII
  192.     WordWorth
  193.     KindWords
  194.  
  195.  
  196.  
  197.  
  198. IFF 8SVX MONO SOUND FILES
  199.  
  200. Viewer  is  able  to  make  8SVX  mono sound files audible over the build-in
  201. original  Amiga  hardware and software. Viewer will use the audio device for
  202. this task.
  203. Viewer  will  ever  use  28kbyte of CHIP-RAM for the sound-data to make them
  204. audible   (required   by  the  Amiga  built-in  audio  hardware)  while  the
  205. audio-data  that  are  currently  unused will be hold in fast-memory. By the
  206. way,  no check if done whether FAST-RAM is available. Viewer will ever think
  207. that  the unused audio data are in non-CHIP-RAM! So you should have FAST-RAM
  208. otherwise this routine to make data audible is crap.
  209. The  main  reason  why  is: through this trick it's possible to play samples
  210. that  are  taller  than 128 Kbytes, which is the current limit for the Amiga
  211. audio hardware (and software - namely audio device).
  212. You  may play samples up to the size of a sample that fits into your memory,
  213. e.g.  you  have got 16 Mbytes of FAST-MEM free, then the sample size must be
  214. smaller  than  16 MB, or for a F.-Delta compressed audio file, then the file
  215. can  be up to 5 Mbytes tall. The additional memory when decompressed is used
  216. for the decrunch buffer.
  217.  
  218.  
  219.  
  220.  
  221.  
  222. POWERPACKER-LIBRARY PACKED FILES
  223.  
  224. Viewer does support Powerpacker-library packed files.
  225.  
  226.  
  227.  
  228.  
  229. LOADING
  230.  
  231. The  easiest  way  to load a file in is to select it via one of the two file
  232. requesters that will offer this.
  233. Another way is to select it via its name from the CLI or Shell:
  234.  
  235. 1> Viewer hd2:sources/viewerv3.c11.asm
  236.  
  237.   as second argument you can specify the scroll width, e.g.:
  238.  
  239. 1> Viewer hd2:sources/viewerv3.c11.asm scrollwidth=11
  240.  
  241. From  Workbench  you can enter in the default-tool field of the project-icon
  242. (-file) the path and the name where Viewer can be found:
  243.  
  244. DefaultTool: Workbench:Utilities/Viewer
  245.  
  246. You  may  also  press the shift key and click once the program-icon (Viewer)
  247. and while the shift key is not released click twice the project-icon.
  248.  
  249.  
  250. If  you  choose  only  the  volume/directory name where the file you want to
  251. display  stays  (either  from  both:  Shell  or  Workbench)  -  then  a file
  252. requester  occurs with this volume/directory and all to it belonging files -
  253. if the arp- or reqtools-libraries are available.
  254.  
  255.  
  256. In  case  you  have  chosen  an incorrect file- or pathname in the requester
  257. module like:
  258.  
  259. "1> Viewer SYS:Prefs/Env-Archive/Szs/font.prefs"
  260.  
  261. Viewer attempts to get the last valid directory, here:
  262.  
  263. "SYS:Prefs/Env-Archive/"
  264.  
  265. and set up the requester-module with this path.
  266.  
  267.  
  268.  
  269.  
  270. TOOL-TYPES
  271.  
  272. Supported tool types are:
  273.  
  274. EXECUTE=<dos-command-line>    Execute command on start
  275.  
  276. EXTENTWINDOW=w,h        Console window width, height
  277. WINDOWOFFSET=x,y        Console window x-, y-offsets
  278.  
  279. FONT=topaz,8            Use other than default font
  280. SCROLLWIDTH=n            Use other than computed
  281.                 lines to scroll up or down
  282.  
  283. WRAP=ON                Make a word wrap when
  284.                 contents of a line doesn't
  285.                 fit into console window
  286.  
  287. NOWARN                Don't display warnings
  288.  
  289. NOPRTCHECK            Do not check printer (PrintCheck()
  290.                  does only work well with Epson-printers)
  291.  
  292.  
  293.  
  294.  
  295. WINDOWOFFST
  296.  
  297. You  can  specify  the  X- and Y-offsets for the console window on your own,
  298. e.g.  0,16  although you can let Viewer do the work, the command for this is
  299. "WINDOWOFFSET=AUTO".  Viewer  will  then  adjust  the  window  so that it is
  300. placed directly under the screen's top border.
  301.  
  302.  
  303. When the EXTENTWINDOW command is set, the settings of the
  304. WINDOWOFFSET is subtracted from it, e.g.
  305.  
  306. EXTENTWINDOW=872,612
  307. WINDOWOFFSET=20,16
  308.  
  309.  == window 852 * 596 on position 20,16.
  310.  
  311.  
  312.  
  313.  
  314. SHELL
  315.  
  316. When Viewer is started from the Shell, some outputs will be made, e.g.
  317.  
  318. 1> Viewer
  319. 21;79R
  320. 20
  321.  
  322. This  means  that  one  page  can  contain  21  lines  (20  will be used for
  323. scrolling) where each line can contain 79 columns.
  324.  
  325.  
  326.  
  327.  
  328. KNOWN BUGS
  329.  
  330. When  running  under  Kickstart 1.2 or 1.3 (including A2024 monitor ROM) and
  331. displaying a picture, the picture's top border shows blank.
  332.  
  333. On  default  no  word-wrap is made. When you now scroll via PgUp and or PgDn
  334. one   complete  page  and  only  one  line  contains  more  characters  than
  335. characters  fit in a line (window limits), the output is stopped at the last
  336. displayable char. To avoid this you have to set the tool types to "WRAP=ON". 
  337. When  showing  ASCII-files  with escape-sequences and scrolling up via mouse
  338. or keys (CRSR-left) the escape-sequences are started but not finished, e.g.: 
  339. Text set
  340. <ESC>[1m
  341. This is a test     <- this text should be shown in bold
  342. <ESC>[0m
  343.  
  344. If  you  scroll up these lines, the text "Text set" is shown bold instead of
  345. "This is a test". To avoid this change the above to:
  346.  
  347. Text set
  348. <ESC>[1mThis is a test<ESC>[0m
  349.  
  350. and  all  works  correctly - but, if you are using sequences that exceed one
  351. line, you have to set and unset each line for its own.
  352.  
  353. Viewer  has  got  a  small  bug  in its audio set-up that doesn't render the
  354. gadget  into  the  window  in  some circumstances and thus doesn't allow the
  355. sample  to  be  played.  Occurs  when the audio device is already used by an
  356. other  task, meanwhile Viewer attempts open the audio device, it will get no
  357. access  to  the  audio  device,  therewith an error occurred and thus Viewer
  358. will not display the gadget.
  359.  
  360. Audio file treated ever as mono file although it could be a stereo one.
  361.  
  362.  
  363.  
  364.  
  365. SEARCH/NEXT
  366.  
  367. Viewer  offers only a simple search routine that compares the entered string
  368. (comes  later)  and  the text in the text buffer of Viewer case insensitive.
  369. It's very slow but it works.
  370.  
  371. The  case insensitive search supports the full ASCII-one character code set,
  372. this means for example that the character "ø" is treated the same as "Ø".
  373.  
  374. To  enter the string you want to search for, press key "S" on your keyboard.
  375. The  window is cleared and a cursor is shown behind the text "Search for: ".
  376. You can now enter the string.
  377.   Please note:
  378.    Only Viewer with extension LE (source) will support cursor-keys (left/right), tabulators and the DEL-key.
  379.    Plain versions not! (At the moment I don't know which version I will enclose).
  380.  
  381. To delete a letter use the "BackSpace" key.
  382.  
  383. It's  allowed  to  enter  an Escape sequence to search for. If you press the
  384. Escape-key,   the   character   "·"   is   shown   as   a  synonym  for  the
  385. Escape-character. 
  386. Tabulators  will  be  handled  correctly;  this  means  you can search for a
  387. string, which contains tabulators.
  388.  
  389. If  the  string  has been found, the first line with the occurring string is
  390. displayed  as  first  line  in  the window - if it is not found, the current
  391. page is restored and the screen will be flashed.
  392.  
  393. Press  the  N-key  to  search  for  the  next  occurring  string. If no more
  394. occurring  string is found, the screen is short flashed and the current page
  395. is  restored,  otherwise  the line with the occurring string is displayed as
  396. first line in the window.
  397.  
  398. Viewer  will  not  search  backward  for a string nor it continues searching
  399. after  the  last occurring has been found. To re-search you have to re-enter
  400. the string.
  401.  
  402. Examining  binary  files is a little difficult because the file is converted
  403. to ASCII. Example: search string "dos.library".
  404.  
  405. 00000110: 222F001C 4EAEFCA6 224B2C6F 00204EAE  "/..N(r)ü¦"K,o. N(r)
  406. 00000120: FE626010 307C0004 22502069 0114707A  þb`.0|.."P i..pz
  407. 00000130: 21400094 20074CDF 4CCC4E5D 4E75646F  !@.. .LßLÌN]Nudo
  408. 00000140: 732E6C69 62726172 79004452 4956452F  s.library.DRIVE/
  409. 00000150: 412C4255 46464552 532F4E00 24564552  A,BUFFERS/N.$VER
  410. 00000160: 3A206164 64627566 66657273 2033372E  : addbuffers 37.
  411.  
  412. At  offset  0x13E  the  string  in  the  binary file starts ("dos.library").
  413. Because  this  file is first converted to ASCII, the string "dos.library" is
  414. split  into  "do"RETURNxxx...xxx"s.library".  Now it should be clear why the
  415. string couldn't be found.
  416.  
  417.  
  418.  
  419.  
  420. REQUIREMENTS
  421.  
  422. Viewer  will  run up from Kickstart 1.2 (V33) and up to Kickstart 3.1 (V40).
  423. It  works  correctly  with  a  68000  CPU  but  a  better CPU is recommended
  424. (68060?). 
  425.  
  426. Required libraries:
  427. exec     (V33+)    ROM
  428. dos     (V33+)    ROM
  429. intuition (V33+)    ROM
  430. graphic     (V33+)    ROM
  431. icon     (V33+)    DISK (WBench start only)
  432. diskfont (V33+)    DISK (when a disk resident font is used)
  433. ----------------------------
  434. arp      (V39)        DISK (for file requester)
  435.      (do not use arp 40 - no file requester)
  436. reqtools (V37+)    DISK (for file requester)
  437. cybergfx (V40+)    DISK (for 24 bit images)
  438.  
  439.  
  440.  
  441.  
  442. MEM-EATER
  443.  
  444. Viewer  is memory-hungry when displaying screens and/or brushes, also when a
  445. binary  file  should  be  converted  to ASCII. When you are going to display
  446. ECS/AA-pictures,  make  sure  the monitor-driver is available, otherwise the
  447. screen  is  forced  to  NTSC/PAL  (depending  on  video  system).  Also 2 MB
  448. chip-memory is not wrong!
  449. Displaying  24  bit  images  requires no chip-memory but a 68020 (or better)
  450. CPU.  There is no CPU checking routine although it (Viewer) attempts to open
  451. the  CyberGraphics library and this library itself requires and checks for a
  452. 68020 CPU (hopefully).
  453. By  the  way,  no screen promoter is required to display images on a foreign
  454. gfx board neither chip-memory!
  455.  
  456.  
  457. Memory usage:
  458.     Plain ASCII = file length + 3 bytes
  459.     Binary   = file length + 3 + (file length * 4.25) + 72 bytes
  460.     Picture   = file length + 3 + unpacked picture size
  461.     Picture24  = file length + 3 + unpacked picture size + one temporary RGB row
  462.     Brush    = file length + 3 + unpacked brush size
  463.     FTXT    = file length + 3 + ASCII-codes + 3 bytes
  464.     SWRT    = file length + 3 + ASCII-codes + number of RULErs + 3 bytes
  465.     8SVX    = file length + 3 + 28 Kbytes CHIP-RAM
  466.     8SVX F.DELTA= file length + 3 + uncompressed audio size + 28 Kbytes CHIP-RAM
  467.  
  468. Viewer  will free the not needed memory as fast as possible, i.e. the "basic
  469. file" is freed after successful converting / depacking.
  470.  
  471.  
  472.  
  473. FUTURE
  474.  
  475. Currently  Viewer does my daily work, displaying images and text-files, make
  476. audio  data audible and so on. Because I mostly use Viewer on CD-ROMs in the
  477. near or far future it will convert HTML files into ASCII.
  478.  
  479. If  I  find  a  well-documented  guide  to  use  PNG I will extend Viewer to
  480. support PNG images.
  481.  
  482.  
  483.  
  484. 30.6.1994 ONIX
  485. (Updated '94 to '99)
  486.