                         HEXVIEW v.1.00
              Copyright (c) Konstantin Saliy, 1996

 HexView  is  a  program  for hackers,  code  diggers,  software
developers. The name is misnomer (see next chapter).

                         Basic features
  1.Shows  files, raw data on SSD or internal disk, memory  dump
     by  segment base or handle, O/S data segment in  both  dump
     ("text") or hexadecimal modes
  2.Allows  to  edit  files and memory segments  in  hexadecimal
     mode.
  3.Context search for text or bytes sequence.
  4.Quick access to ROM files.
  5.Save part of file, disk or memory to another file.
  6.Shows   list  of  memory  blocks  and  processes  with  some
     attributes.
  7.Displays  .PIC  and .FON (only 1st font) files,  headers  of
     .APP and .IMG files.
 Application  has two modes: hexadecimal and text representation
of  data.  First is a table with offsets from beginning  of  the
data  (if  file or disk is greater than 1Mb - offset in  current
megabyte),  hexadecimal codes of bytes and  bytes  itself.  Text
representation  shows  raw  dump  without  interpreting  of  any
control symbols (e.g. tab, cr, lf). It has two zoom modes (60*20
and 80*20).
 Both  modes works asynchronously, i. e. changing offset in  one
mode   doesn't   affect   offset  in  another.   User   can   do
synchronisation manually by Psion+Y.

                      How to install ad run
 The  application has .OPA format. It was developed for  use  on
Psion  Series 3a only. Copy HEXVIEW.OPA into \APP\ directory  on
any  drive  and  then refer to your User Manual how  to  install
application on system screen (for US/UK Psion press Psion+I  and
select  HEXVIEW.OPA in the Install dialog). To quick start  just
select HexView icon and press Enter.
 You  may press Tab under HexView icon and select file to  view.
You may create new list to easy access to group of files.

              Problems, known bugs and limitations
 Application  has  hardcoded limit to show only  first  16Mb  of
data.
 Edit  mode  allows to move cursor below end of  file,  but  all
typing is ignored.
 Application doesn't check against:
  - valid segment handles (program crashes in this case),
  - valid  ROM bank and address frame when ROM bank has non-zero
     value,
  - internal disk size changes since it was selected.
 The  method  I  use to read raw data from disk is  incompatible
with  drive  C  from 3Link and 3Fax. I have a  method  but  it's
incompatible with Internal disk and RAM SSD so ... to  the  next
release if any.

                     Menu commands and keys
File
 Open Psion+O - select file to open. Be sure it is not in use by
other application.
 Open ROM Psion+R - quick access to ROM:: files. Pressing a  Tab
will reset file list to default drive.
 Memory Psion+M - select memory block to view. You can type  any
value at Bank field, but only from F0 to FF are useful (see Tips
below).  If  you select Segment mode, Base must be valid  handle
(e.g.  from  Sysinfo/Memory list) and size of  segment  will  be
determine  for you. In Absolute mode Base can be any  value  and
size will be 64Kb.
 Disk  Psion+D  -  select disk to view. It was  tested  only  on
internal and Flash SSD but should work with ROM and RAM SSD.
 Save  Psion+S - saves dump from given offset and size to  file.
Do not try to use the same file!

Search
 Find Psion+F - searches data in dump. If the first character in
string  is  '&', the following bytes must be hexadecimal  codes,
e.g. enter
     &000102
to search 3 bytes with values 0,1,2.
 Find again Psion+G - searches for next occurrence.
 Jump to Psion+J - jumps to offset given.
 Synchronise Psion+Y - synchronises offset in current view  mode
with other (useful after search).

Sysinfo
 Memory Psion+Shift+M - shows list of memory blocks. You can use
handles  listed  to view segments but be sure  it  still  exists
(multitasking, sir!).
 Processes  Psion+Shift+P - shows list  of  processes.  If  code
segment  of process is greater than $8000, this is segment  base
(not  handle!)  of ROM application. Sorry, you couldn't  see  it
(see Tips).
 OS  data Psion+Shift+O - first 16Kb of OS data segment.  Really
it  is  smaller and you can see first application segments here,
but  I  don't know how to determine its size (from first segment
base - not a common solution).

Special
 View  Special  Psion+V (for files only) -  shows  pics,  fonts,
headers  of  .IMG and .APP files. For executables it  calculates
checksum of code segment. You can see that for ROM files  result
is  not  matches header value - this is one of the reasons  that
ROM application couldn't be run from another place. You can copy
CALC.APP  from  ROM::, change checksum and run it from  internal
disk.
 Edit  Psion+E  (files and memory segments in Hex mode  only)  -
hexadecimal  editor for visible data. Tab switches  between  hex
and  text  parts. Delete restores bytes. To save  changes  press
Enter, to return from editor and discard changes press Esc.
 ASCII  filter on/off Psion+I - displays characters  with  codes
<32 and >128 as dots or as symbols.
 Redraw Psion+W - force to redraw current screen.
 Zoom  Psion+Z  (text mode only) - switches  between  60x20  and
80x20 resolutions.
 About Psion+A - you can find my name and e-mail here.
 Exit Psion+X - exits.

Diamond
 Text Psion+T - text (dump) mode.
 Hex Psion+H - hexadecimal mode.
 Of course you can use Diamond key to switch between modes.

Scrolling windows
 Up and down arrows, PgUp, PgDn, Home and End.
 You can press Help key.

                              Tips
 I  have Psion Series 3a with 512K and OS version 3.22F. Not all
information  below is valid for other computers, especially  all
about ROM banks and internal disk.
Memory locations
 Base 0000, size $400 bytes is of course interrupt vector table.
If  you  wish  to disassemble ROM it helps you to  determine  OS
entry points.
 Base  $40, size $4B00 is video memory. First 9600 bytes is  b/w
plane, second - grey. Does anybody need it?
 Base  $4B0,  size unknown is OS data segment on  S3a.  Yes,  it
overlaps  last  $400 bytes of video memory. But on  S3  OS  data
segment  was  at  $0000 (video memory at  $A000),  and  OS  data
started  with  offset $400 because of IVT. HexView  doesn't  use
grey plane so first $400 bytes will be always zero.
 Base  $8000, size 64Kb is a frame (like EMS) for code  segments
of ROM applications (this is the reason of 512K limit of RAM for
applications). You will always see RunOpl code here.
 Base  $9000, size 64Kb is a frame for access to ROM "disk".  By
selecting  bank from $F0-$FF you can examine 1Mb of ROM  not  in
the  8086 CPU address space. US/UK models with 1 and 2Mb of  RAM
have  2Mb  of ROM (to hold spell checker and Patience  game).  I
don't  know  how  to  access second megabyte  of  ROM  on  those
machines..
 Base $A000-$F000 is ROM.
 Base  $FFFF,  size  16 bytes is the top of 1Mb  address  space.
First  5  bytes (80x86 architecture) is far jump to  boot  code.
Next follow ASCII text '010170' (release date :) ?), 2 bytes  of
OS version and 2 bytes of ROM version (or vice versa).
ROM disk
 ROM  disk  consists  of  2  parts: accessed  directly  (header,
important files) and 1Mb or 2Mb of banked ROM. The first file on
ROM disk since S3 is always SYS$CTRY.CFO. You can find your disk
header following the next steps:
  1.Select Memory at $B000.
  2.Find 'SYS$CTRY.CFO' in hex mode.
  3.Press Up arrow.
  4.Base address of ROM disk header is
          $B000+(current offset)/16
 From offset $0C directory starts:
  2 bytes size
  2 bytes ROM bank
  14 bytes file name (zero terminated)
  2 bytes offset in segment $9000
 with total 20 bytes per entry.
Process data segment
 I want to tell a story here.
 I  wrote  a  document on my Psion and it was  about  40Kb  long
(almost maximum). I had to write it to next morning and made  it
in time. But when I pressed Psion+S to save it Word hung! On the
internal  disk file was with size 0 (Word already started  write
to it). But my document was in Word data segment.
 I wrote an OPL program (HexView had no this ability those time)
to  save Word data segment into file, reset Psion and then wrote
a  simple program which restored text of my document (Word keeps
text  in  heap as double linked list). For less than 2 hours  my
document was restored.
 Of course you can find another application for this function.

                        Conditions of use
 All  rights reserved. I accept no responsibility for any damage
caused by direct or indirect use of this application.
 This  application is freeware for personal non-profit  use.  In
other  cases  please,  contact me for details.  No  fee  may  be
charged for this product.
 Reverse  engineering  is prohibited. If you  need  to  add  new
features  you'd better ask me. If you like to learn or even  use
my source code please, contact me.
 If  you'll  find  HexView useful please, let me  know.  It  was
designed for my personal needs and I will make new versions only
if somebody else need it.

                             Support
 You  can  reach  me  at <kis@ipmce.ru>. Bugs,  suggestions  for
future  versions are welcome. Please, use the word "HexView"  in
the subject of all your mails about this application.

                    Another software from me
KbdMap v.1.10F
 It  was  designed primarily to help non-English  user  who  has
US/UK Psion (which is less expensive that local versions and has
more features) to type non-English characters. It uses less than
10Kb of RAM and allows to remap keyboard. With KbdMap user has 2
keyboard  layouts switchable at any time by pressing  2  Shifts.
KbdMap is fully compatible with any Psion applications.
 Also  it  allows  to change language code so that  multilingual
applications will use another language.
 You  can even make Application Bar from e.g. numeric row if you
have broken one.

Undelete v.1.00F
 Undelete helps to restore data from deleted files on Flash SSD.
It can handle up to 350 deleted entries on one SSD.
 
