
I. CBM - Command Bar Menu          CBM.TXT         Version 2.2.5 - 2024.12.19
=========================          -------

1. Introduction
---------------
You need an interface for your application? Some framework? You found it! :-D
CBM provides a text/semigraphical Menu-System for FutureOS. You can use Mice,
Joysticks or Cursor keys and Copy to browse through PULL DOWN MENUes etc. And
in addition hot keys can be used.  CBM can be used as a menu-system for EVERY
program, so you haven't to code it all again. Further, different programs can
use the same look, which makes them similar and more easy to be used.

CBM knows your mother language (FutureOS configuration). That way it displays
all dialogues in your mother language.  In the current version of CBM you can
use English, French, German, Nederlands and Spanish. (Ask for your language).
If you want to change the language just go to Options, then to Language. Then
change your language there. Or use the tool "ConfigOS" to change the ROM.

You have to add your own program code to the "CBM.MAX" source code. And adapt
the source files for your own program / purpose. Then just have fun with it.

Only few functions are implemented, because every thinkable program will use
the same functions lightly different. Ask for help everytime!

The following functions are implemented as default (you can change them):

Submenu File
------------
<L>oad          Hotkey: l or L  ---  To load a file
<S>ave          Hotkey: s or S  ---  To save a file
L<o>ad Blk.     Hotkey: o or O  ---  To load a block of text or data
Save <B>lk.     Hotkey: b or B  ---  To save a block of text or data
Re<a>d DIRs     Hotkey: a or A  ---  Select Devices and read DIRectories
<C>lose         Hotkey: c or C  ---  Saves the data and quits this app.
<I>mport        Hotkey: i or I  ---  Import text or data
<E>xport        Hotkey: e or E  ---  Export data or text
<Q>uit          Hotkey: q or Q  ---  Quit this application

Submenu Process
---------------
C<a>ll OS       Hotkey: a or A  ---  Call the Desktop, return with the OK icon

Submenu Options
---------------
<M>ode          Hotkey: m or M  ---  Select the screen MODE 0-3
<C>olour        Hotkey: c or C  ---  Select color for Pen, Paper or Border
<F>ormat        Hotkey: f or F  ---  Select screen format (80x25, 64x32, ...)
<L>anguage      Hotkey: l or L  ---  Select your desired language

Submenu Help
------------
<H>elp          Hotkey: h or H  ---  Show a help screen
<M>enu          Hotkey: m or M  ---  Shows help about this surface
-$<$>$-         Hotkey: $ or 4  ---  Tells how to spend money to YOU
.w<w>w.         Hotkey: w or W  ---  Tells where to find you in the internet

The Submenus: "<U>ser Func 1"  and  "<M)enu User 2" are dummies.  Your program
decides what should be written there and what you have to do with it. Normally
you will implement the special functions of your application into them.

All the source code is provided!!! The file 'CBM.MAX' contains the main program
CBM and the files 'CBM-LNG1.MAX' and 'CBM-LNG2.MAX' contains language dependent
tables and text. The file 'CBM-SUB1.MAX' contain menu and sub functions.
And file 'CBM-SUM4.MAX' contains the source for the M4 SD card.

To have a look at the CBM, just start the file '-ComBarMenu' under FutureOS.
This is just the pure menu-system without any program. You see how it works.

It should be easy to add functions and text (in all languages) if you have a
look at the source code. Z80 knowledge and the knowledge of some facts about
FutureOS are an advantage. Else ask for help!
If you want to use CBM and you need help, just mailto: FutureSoft@gmx.de
I really look forward to help you with your own programs!

2. Files
--------
'-ComBarM.enu': This file is a demonstration of the command-bar-menu alone.

'CBM     .MAX': The source code of the program itself. You can add your own
                program-code here, to use CBM.
                This file links 'CBM-LNG1.MAX', 'CBM-LNG2.MAX' & 'CBM-SUB1.MAX'
                when you assemble 'CBM.MAX' with the MAXAM assembler o.e.

'CBM     .TXT': Equates usually to this file ;-)

'CBM-LNG1.MAX': This file contains text (only English, French, German, Spanish)
                which should be displayed through CBM and your program-code
'CBM-LNG2.MAX': That file contains text (Dutch). Other languages can be added

'CBM-SUB1.MAX': Contains various sub functions of 'CBM for single languages'

'CBM-SUM4.MAX': Contains functions to use the SD card of the M4 expansion

3. Assembler
------------
Use the MAXAM assembler (or something compatible) to assemble the source file
'CBM.MAX'. This file automatically loads and links the two language files and
the two subroutine source code file.

4. Memory-Map
-------------
&0000-&0AFF: Program-Code of CBM itself. But you can use the REStarts 1-7 at
             the beginning of the program (look at "CBM.MAX"). But don't use
             RST 0, which is a cold boot for CBM / your application itself.

&0D00-&37FF: Nearly 11 KB SPACE for YOUR own application. More RAM after &8000.

&3800-&3FFF: Charset for all 256 characters. Either a copy of the lower ROM or
             your own. Place your personal character set here if you want to.

&4000-&7AFF: Tables and texts for all supported languages. You have to add the
             texts for your own program here, please support English at least.

&7B00-&7FFF: About 1 KB free space for your application, f.e. texts and tables.

&8000-&80FF: These routines are needed here for calling OS functions.
             They must be located between &8000 and &9FFF.

&8100-&9FFF: Main SPACE for YOUR application code or what ever you need. :-)

&A000-&B7FF: System buffers of FutureOS. If you want to use it, take a look
             at the manual. Your application can go up to &AFFF and use the
             space between &B000 and &B7FF for buffers.

5. How to implement own functions?
----------------------------------
5.1 Implement the code
----------------------
Place your applicatins source code in file "CBM.MAX" before the character set,
the "DS &4000-$,&C9" instruction. And / Or place it between &8000 and &9FFF.

To access your code, you have to bend the vectors/pointers of the tables after
the labels "T1_PF1" and "T1_PF2". But you can also implement your own program-
functions in the tables after the labels:  "T1_FIL" , "T1_PRC" , "T1_OPT"  and
"T1_HLP". You just have to insert the target-address/label of your own target-
routine after the DW instruction.

5.2 Implement the text
----------------------
The text(s) of your own program have to be implemented in the source-code-files
'CBM-LNG1.MAX' and 'CBM-LNG2.MAX'.
To implement text for your own program-functions just rename the dummies after
the following labels:

For English...: "F1E_00", "F1E_01".."F1E_05" or "F2E_00", "F2E_01".."F2E_05".
For German....: "F1_00" , "F1_01"..."F1_05"  or "F2_00" , "F2_01"..."F2_05".
For French....: "F1F_00", "F1F_01".."F1F_05" or "F2F_00", "F2F_01".."F2F_05".
For Spanish...: "F1S_00", "F1S_01".."F1S_05" or "F2S_00", "F2S_01".."F2S_05".
For Nederlands: "F1N_00", "F1N_01".."F1N_05" or "F2N_00", "F2N_01".."F2N_05".
But surely you can use and alter all other menus too!  Maybe you have to adapt
the sizes of the windows. You can do that by altering the width of a window in
the source of 'CBM-LNG1.MAX' and 'CBM-LNG2.MAX'.

6. Version
----------
Actual version: 2.2.5 from 2024-12-19 with support for German, English, French,
Spanish and Nederlands.

















7. Updates
----------
since 2.1.9: Work with short file-names / M4 file-names polished, polishing
since 2.1.6: Load and Save to/from the M4 SD card: Devices 'N' and 'O'
since 2.1.4: Mouse support enhanced, YWART function added (for now)
since 2.0.1: Mouse support added for SF2, SF3 and MultiPlay. Fire 2 breaks now
since 1.9.8: Function 'load file' more simple slim. Function 'version ' added
since 1.9.6: Function 'save file' enhanced. Menu remembers selected PEN and INK
since 1.9.5: Function 'set screen format' added (80 x 25, 64 x 32 or 68 x 30)
since 1.9.4: Source Code (->language dependent parts) reorganized and sorted
             The Return key can now be used like the Copy key or Fire.
since 1.8.9: Attemt to LOAD without a tagged file or medium will lead to the
             "Read DIRectrory" function. There you can select your medias.
since 1.8.7: Devices can be selected (A-M) and their DIRectories can be read
             without the need to return to the Desktop. This file overworked
             Icon for CBM created and added. Now using INRZ to copy char set
             ESC at file select restarts now. Save SP is reset in main menu.
since 1.8.0: Hot keys for YES/NO file question
since 1.7.1: Hot keys added
since 1.6.2: X-Menu added, more functionality
since 1.5.3: Debugging, File-Selector more error prone
since 1.4.4: File-Select-Menu implemented
since 1.3.5: Spanish Language interface has been added
since 1.3.0: some cosmetic changes; added function 'Call OS'

8. Credits
----------
Merci beaucoup, Thank you very much, Merce nachad and Muchas gracias are going
to the following sceners:

- SID ................. for the .....French language interface!
- CPC Freak Belgium ... for the ......Dutch language interface!
- Duke ................ for the ...talk about his M4 expansion!
- Miguel Sky .......... for the ...Spanisch language interface!


9. Last message
---------------
Keep our CPCs working! Work on CPCs!
Enjoy life with your CPCs and 6128plus :-D

Bye, TFM of FutureSoft







