Welcome, Guest. Please login or register.


Author Topic: Enterprise Graphical Interface (Read 16774 times)

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Unknown Unknown
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #60 on: 2015.September.20. 16:53:13 »
What if the EGI were an interpreted language?

I suspect it is. I am searching on the assembly code how an EGI module is loaded in it to track how it works.

Imagine the posibilities....

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #61 on: 2015.September.23. 00:47:42 »
It isn't an interpreted language, it is better, a library of  calls for graphics tasks.

The EGI  uses "rst 8" the same as EXOS uses "rst 30h".  For that purpose some code has been put at addresses 08h and 80h. Just before the call the registers are loaded with parameters. A byte is put just after the call, and so the EGI knows what command is.

The header of  EGI modules begin with 00h 80h mark and their content is  positioned on address 100h. It is Z80 code, but as it has EGI calls mixed, it can't run outside of the graphical environment.
« Last Edit: 2015.September.23. 20:19:53 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #62 on: 2015.September.23. 23:13:59 »
This is the disassembly of the "word count" module(WRDCOUNT.EGI).

I still have to discover what the calls do, but fortunately the program is very simple and short.
« Last Edit: 2015.September.24. 10:25:56 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #63 on: 2015.September.24. 20:07:27 »
This post is to put the curiosities I find inside the EGI:

-Like the PCs, pressing Ctrl+Alt+Del makes the Enterprise reset towards the flashing letters.......

-Ctrl+Alt+P sends a snapshot to a connected printer if......you have installed the  Boxsoft  Screen Utilities. When you press the keys-combination  the string "SCRDUMP 254" is send to the system extensions.

-Coordinates on EGI are counted by rows and columns of characters inside the rectangles, but on the screen they are counted by real pixels. X and Y begin at the upper-left corner.
« Last Edit: 2015.October.18. 16:47:01 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #64 on: 2015.September.27. 17:42:23 »
This is the description of the EGI calls (rst 8 ) with the information I am finding.

CAUTION! this information can be packed of errors....

Call 0 returns doing nothing.

-------------------------

Call 1

-Option A=0, without other parameters, initializes some vars and the latch  byte_CE27=1, Also is initialised the screen for EGI(channel FEh), puts the stock menu and initializes the mouse.

-Option A=1, serves to change the base of icons. They are contained on ICS-taged files. DE points to a device filename string. Closes channel FAh if exists, then opens it with the filename string in DE, loads an ICS block(user-created Icon files always  have 2304 bytes, except the internal EGI.ICS that has 72 bytes) at unk_F6O4 and closes the FAh channel. The buffer unk_F604(Icons) is manipulated by call 2, obviously.

-Option A=255, 100h is loaded at address word_CE25.  I still don't know why.

-------------------------

Call 2

-Option A=1 draws an icon and puts an event that waits for a click inside the icon-drawn zone. BC contains the coordinates of the left-upper corner. DE the number of icon, HL the Z80 address where to jump when the icon is clicked.

-Option A=0, I think it only draws the icon but without putting a click zone.

-------------------------

Call 3 with A=1 puts a personal menu at the Right side of the EGI stock one, but I still don't know how to fill the parameters.

-------------------------

Call 4 draws windows on the screen, only the graphics, it doesn't create a space to put things.

It needs BC, DE and A registers as operands.

BC contains the column and row where the left-upper corner will be drawn.

D contains the number of columns the window will have. E contains the number of lines.

A contains the stile on bits 0, 1, 2, 3, 4. But only some bits seem to do something.

Stile 0 is rectangle without frame.
Stile 1 is line frame,
Stile 2 makes the rectangle a click-event zone, but I still don't know how.
Stile 4 is thick texture frame.
Stile 1+4 is thick solid frame
--------------------------

Call 5 with A=6 selects in L the window where to put the printing cursor, in the same order that they where opened, beginning at 0.

-------------------------

Call 6

-Option A=1 changes the graphics of the mouse pointer. Both HL(shape) and DE(mask) can't be higher than 25h nor 0(observe it can get past number 32 icon upto Arrow shape and Arrow mask). Of course you must have been loaded before buffer Unk_F604 with an ICS-tagged file with 32 icons(call 1, a=1). If not, the pointer will have a strange look.

If HL=0 then file arrshp.dat(arrow shape, 76 bytes ) is loaded at buffer (unk_ff94h ), and file arrmsk.dat(arrow mask, 76 bytes ) loaded at buffer (unk_ff4ch ). It is the default pointer graphic loaded at EGI startup

-Option A=2. If HL is empty then it's loaded with the value of (unk_cdf6=00aah ). (word_cda3 ) is loaded with the value of HL.

-Option A=3. (word_cda1) is loaded with the value of HL.

-Option A=4. If (byte_c429)=ffh, load (word_cd9d) with the content of (word_c427) and (word_c427) with ffh.
                       If (byte_c429)<>ffh, load (word_c427) with the content of (word_cd9d) and (byte_c429) with ffh.

-Option A=6. If L>11 then returns. The value of L is loaded on (byte_c3f8 ) and returns.

-------------------------

Call 8 simply closes channel FEh and puts byte_CE27=0. This var is like a latch that only allows calls 1, 6, 125 and 255 to work.

------------------------

call 9

Deals with opening zones to print and printing of strings:

-Option A= 0 opens a space on the screen to print strings. Then BC and DE operands act the same as with call 4.

BC contains the coordinates of the point in the screen where the left-upper corner will be drawn. B as X and C as Y.
D contains the number of columns the window will have. E contains the number of lines.


-Option A=1, implies printing on a zone previously opened with option A=0. "BC" contains the length and "DE" the z80 address where the string begins. It isn't the standard EP string mode "length+string".

The text can have a stile: normal, bold, italic or inverse just inserting a escape sequence on the string:

ESCP,I,0=normal
ESCP,I,1=Bold
ESCP,I,2=italic
ESCP,I,4=inverse

They are binary so, for example, mode 3 is bold+italic.

Also there are the usual LF, ERA, DEL, INS etc.

I still don't know what register L does(displaces the box some lines down).

------------------------

Call 13

Loads and executes a new EGI module. DE points to a device filename string.

------------------------

Call 126

Register A can have options 1 and 2 that are converted to 1 and 0 respectively and stored on byte_C231. I still don't know what it does.

------------------------
Call 255

Starts a sort of script of EGI calls. HL holds the start address. The eight bytes starting on (HL ) contain:

(HL)     = Register A
(HL+1 )= Number of call
(HL+2 )= Register C
(HL+3 )= Register B
(HL+4 )= Register E
(HL+5 )= Register D
(HL+6 )= Register L
(HL+7 )= Register H

Once transferred the data to the appropriate register or var address, the routine sub_c195(sorting of EGI calls) is called.

When returned HL is incremented by 8 and the following eight bytes are read and so on.

The way to exit from that loop is putting a zero on the two first bytes of a group of eight.

------------------------
I still don't know what the rest of calls do (7, 10, 125 and 127).
« Last Edit: 2015.October.19. 11:45:37 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #65 on: 2015.October.07. 11:19:57 »
I've found new details of the EGI calls. You can read them on the two previous posts.


Also, here it is a preliminary disassembly of the EGI FileManager. Still remains a lot of work.
« Last Edit: 2015.October.09. 09:37:14 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #66 on: 2015.October.13. 18:54:49 »
Zozo said it on a previous post. The colour appearance of the EGI is contained on a file named EGIOPT.DAT on the EGI.SYS directory. But There isn't an option to change it on the menu.

Searching with an Hex editor I've found the mystery: the two last bytes of the file are the paper and the ink.
« Last Edit: 2015.October.14. 08:28:34 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #67 on: 2015.October.14. 10:41:34 »
With the EGI you can change the shape of the pointer editing the files  ARRSHP.DAT and ARRMSK.DAT. It can be done comfortably with the ICON.EGI module but you can't save a one-icon file(72 bytes), it saves all the 32 icon base even if it is not loaded(2304 bytes). The solution is to put the pointer's graphic on the first position, then you can later erase all the rest with an Hex editor.

Why two files? because the EGI needs a mask to erase the shape to the background.

This is my first attempt:
https://www.dropbox.com/s/try23fyieltrvbg/Hand%20pointer.bmp?dl=0

Edit: I have edited the dropbox link because it doesn't show properly. Also I have changed the shape. An oversize shape is better to see the solid arrow, but for the hand an exact shape is sufficient.
« Last Edit: 2015.October.16. 23:12:48 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #68 on: 2015.November.05. 17:31:29 »
The HEASS.rom is compatible with the EGI, what happens is that the ".EGI" tag is associated with HEASS when that rom is present. So first the HEASS is loaded because the EXDOS.INI batch file tried to load Fman,egi without the Graphical Environment.

Once loaded EGI.REL, the programs loading with that tag is correctly redirected to the EGI.

This is the fixed EXDOS.INI:

:uk  This is to avoid the EGI File Manager incompatibility with Language Roms(BRD: HUN: ESP:)
:var 7 1    This is to cancel Key-click on Internal Joystick mode.
:var 6 1
:var 10 8
:var 11 20
:echo EGI-I-101-wmstrt-Warm starting  These two lines must be deleted.
:load \egi.sys\fman.egi

:cls
:echo Creating Ramdisk E:  The RAMDISK creation can be avoided deleting that lines.
:ramdisk 2 /d
                      <----|
:vol e: EGI Ramdisk          <----|
:echo EGI-I-102-cdstrt-Cold starting  This line must be deleted.
:load \egi.sys\mouse.xr
:load \egi.sys\egi.rel
:assign a: f:
   These two assigns are for compatibility with the SD-reader without EXDOS card. Delete them if not the case  
:assign b: g:   /
:var 189 0
   This is to select the internal joystick to move the pointer.
:load \egi.sys\fman.egi


A better way for warm re-entering the EGI can be  putting "load a:\egi.sys\fman.egi" inside a text file named "EGI" or the name you want.

Put that batch file inside the root of the disc, and then you can return from Basic to EGI only typing ":EXDOS A:EGI".



edit: the EGI needs other auxiliary files that must be present on the a:\egi.sys\ directory, but the unit can be anyone, F, G or B. If not found this screen is shown:

« Last Edit: 2015.November.06. 12:46:20 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 43.0 Firefox 43.0
    • View Profile
Re: Enterprise Graphical Interface
« Reply #69 on: 2016.February.05. 15:04:31 »
This is an image of my modified EGI disk. It has the EGI batch file, so you can return from other program only executing :EXDOS EGI from the root directory of the disk. Also, it has the last version of the Mouse driver.

I want to put the image disk as a link on the wiki pages.



Edit: I sort of fixed an error that prevented using Zozo-tools  with the File Manager of EGI. Now 12 h time(system var 79 put to 27) is set every time an EGI module is launched.

Edit: EnterMice wiki links updated.
« Last Edit: 2016.February.13. 19:32:17 by gflorez »