X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=doc%2Fgeos.sgml;h=d58a8764f4f2c37f2bf893282afc382eb4920690;hb=9d7b1e9755e03eab64670684115d4726908a6443;hp=efbb6e19a415daf68b679f40f9370aa191fd77fc;hpb=aaf1db13dd7d87816492ef80a327d045b4871afd;p=cc65 diff --git a/doc/geos.sgml b/doc/geos.sgml index efbb6e19a..d58a8764f 100644 --- a/doc/geos.sgml +++ b/doc/geos.sgml @@ -6,10 +6,10 @@
You will not need c64 or c128 for development. The only hardware requirement is a PC capable of
-runing cc65. You will however need c64 or c128 emulator and GEOS image disks (.d64) to test your
+running cc65. You will however need c64 or c128 emulator and GEOS image disks (.d64) to test your
programs.
The software needed:
@@ -86,7 +88,7 @@ The software needed:
disk image files.
-Legal
@@ -123,13 +125,13 @@ This chapter describes some rules you ought to obey, and how to use GEOSLib.
Apart from this file, which merely describes only standard GEOS library functions, you should read
All in all, you just need to place
@@ -162,6 +164,14 @@ series of
+The
You might wonder why I have chosen sometimes weird order of arguments in functions. I just
wanted to avoid unnecessary pushing and popping arguments from stack because cc65 can pass single
-It is possible to use dynamicaly loaded modules, three such modules are provided:
+It is possible to use dynamically loaded modules, three such modules are provided:
GEOS TGI driver, GEOS EMD driver (for VDC extended memory) and GEOS JOY driver.
Just make sure that their filenames appear UPPERCASE in DeskTop. There are no more special
recommendations, read cc65 documentation about modules and demo programs source code.
@@ -278,10 +288,13 @@ number as set in DrawLine
-
Point Functions
@@ -290,9 +303,10 @@ proper values.
-
-Draws single point on the screen, no matter what the current pattern is.
+Depending on TestPoint
@@ -314,7 +328,7 @@ fixed like PutChar
-
This function outputs single character using current style and font to screen.
@@ -328,12 +342,12 @@ See PutDecimal
-
This function converts Font Handling
@@ -395,7 +409,7 @@ Here you will find information about functions related with menus and icons.
-Menus are essencial for GUI. GEOS can handle only one menu at a time, but each menu can call
+Menus are essential for GUI. GEOS can handle only one menu at a time, but each menu can call
another one, which results in submenu tree. There can be up to 8 menu levels, each one with up
to 32 items.
@@ -450,7 +464,7 @@ same as MessageBox
+
+
+This function is a more general one. It works very much like
+Note: use it if you really need (or if you will use it in many places) as
+it adds quite amount of code to your program.
+
+Note: the formatted text Mouse, Sprites and Cursors
You will find here functions related to sprite and mouse drawing and handling.
@@ -544,7 +575,7 @@ calls
-This function disables all mouse actitivies - icons and menus stop to respond to mouse events,
+This function disables all mouse activities - icons and menus stop to respond to mouse events,
but they are not cleared from the screen.
@@ -689,7 +720,7 @@ Note that passed pointer must point to an array of at least 17 bytes.
-These functions are reading and writting the directory header. You should use
Both functions are allocating enough disk sectors to fit the number of
The difference between those two is that
In this example
-NOTE that you Low-level disk IO
@@ -806,7 +837,7 @@ hang on disk access. Use safe, large numbers. Note that safe IEC range is 8-31.
-GEOS has two functions for initialization ('logging' as they say on CP\M) the disk.
+GEOS has two functions for initialization ('logging in' as they say on CP\M) the disk.
ReadFile
You have to declare a
When saving sequential files two most important fields in
+However some of them have slightly different calling convention (order of arguments to be specific),
so please check their syntax here before direct replacing.
-
-Please note that the memory described as
+Please note that the memory areas described here as CopyString
@@ -1085,17 +1117,17 @@ compatible with standard CRC routines.
-
-
-Both functions are filling given memory range. MoveData
-
This functions copies one memory region to another. There are checks for overlap and the
non-destructive method is chosen. Be warned that this function destroys contents of
@@ -1120,7 +1152,8 @@ This is done with
These functions are interface to REU - Ram Expansion Unit. I think that they are self-explanatory.
-You can check for REU presence by taking value of Processes and Multitasking
@@ -1171,6 +1204,7 @@ after
Sleep
-This function is multitasking sleep - the program is halted, but it doesn't block other functions.
-The only argument here is the number of jiffies to wait until app will wake up.
-
-You can force to sleep not only the main application routine, but also processes-tasks. Be warned
-that the maximum number of sleeping functions is 20. If it would be larger it will overwrite
-parameters of already sleeping functions in GEOS kernal data space, leading to crash.
+This function is multitasking sleep - the program is halted, but it doesn't block other functions
+e.g. callbacks from menus and icons.
+The only argument here is the number of jiffies to wait until app will wake up. It depends on
+video mode (PAL or NTSC) how many jiffies there are per second (50 or 60, respectively).
+If you don't want to worry about it and need only full second resolution, call standard
+System Functions
@@ -1210,7 +1244,8 @@ up. You shouldn't use this unless you know what you are doing.
These functions are called by some disk routines. You should call them only if you want to
-do something with IO registers or call one of Kernal's routines.
+do something with IO registers or call one of Kernal ROM routines. Note that this is rather an
+expensive way of turning off IRQs and enabling IO.
@@ -1225,10 +1260,9 @@ proper handlers before that.
-Calling this function will instantly terminate your program and bring you back to DeskTop.
-WARNING! It is not an equivalent of ToBASIC
@@ -1236,7 +1270,9 @@ registered with
This one is another way of finishing application - forcing GEOS to shutdown and exit to BASIC.
I was considering whether to include it or not, but maybe someone will need it. Which is I doubt.
-It has the same dangerous features as
+Panic
@@ -1247,7 +1283,8 @@ This calls system's
where
System is halted after call to
Note that it is not the same as
To simplify usage and optimize passing parameters to functions I have declared several structures
which describe most common objects. Some of these structures are bound to static addresses in
-GEOS data space ($8000-$8fff), so you can use their fields directly in optimized way.
+GEOS data space (
This structure describes a font in one pointsize. There is current font - window
@@ -1446,10 +1485,10 @@ just in the content.
Here is how single descriptor looks like:
+It is possible to intercept and hook in the GEOS Kernal using vectors. Here is a little example:
+
+In your
+It is critical to restore old vector values before exiting the program. If you have more than one
+place where you call
+That little example above intercepts
+