Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:10 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : SplitScreen library for CMM2

Author Message
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 07:43pm 14 Dec 2021
Copy link to clipboard 
Print this post

Hello,
I have just written small SplitScreen library for CMM2. It can be used for splitting the screen into different areas, where can be then either printed text into or shown image, drawn anything. I have made it mainly for me, but maybe somebody can use it also...

It's very simple, but can:
* count of areas is limited just by free memory (for every area is just needed control string with 22 bytes)
* in control string is remembered cursor position, so you can switch the areas freely
* support for scrolling, different fonts, colors
* TAB/CHR$(8) and LF/CHR$(10) is supported in outputted text
* just 5 SUBs/FUNCTIONs, so it leaves many slots for main program free
* example program is included

What can't:
* not taken care of overlapping areas
* text in areas not stored, just cursor position

Enjoy!








Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
Goksteroo
Senior Member

Joined: 15/03/2021
Location: Australia
Posts: 114
Posted: 11:26pm 14 Dec 2021
Copy link to clipboard 
Print this post

Fantastic - I was just planning the same sort of thing for an adventure converted from a 'choose your own adventure' book. Nice work.
Geoff
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5090
Posted: 07:44am 15 Dec 2021
Copy link to clipboard 
Print this post

Wauw Jiri,

That is marvelous. Especially your second screenshot. Looking at this fond memories of the early adventure games (test supported with graphics). This is from a Speccie I guess.

Now it is time to port the old games to CMM2...
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 08:41am 15 Dec 2021
Copy link to clipboard 
Print this post

This is a lovely piece of work, Jiri :)

I agree, Volhout, it looks like it should be an early graphic adventure game. That pic isn't from The Hobbit is it? If not then it should be. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 03:41pm 15 Dec 2021
Copy link to clipboard 
Print this post

Thanks Geoff, Volhout and Mick!

I'm preparing some improvements, this library is really planned for some text adventures, but can be also used for many more things (play with turtle commands for example )

The biggest picture is converted from C64, name is midear, but I don't know where is coming from - I used it to test my graphics conversion routines...

Gorilla is from Atari ST and astronaut from ZX Spectrum.
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 03:45pm 15 Dec 2021
Copy link to clipboard 
Print this post

  jirsoft said  The biggest picture is converted from C64, name is midear, but I don't know where is coming from


https://csdb.dk/release/?id=93530

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 03:48pm 15 Dec 2021
Copy link to clipboard 
Print this post

Thanks Tom!
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 09:39pm 15 Dec 2021
Copy link to clipboard 
Print this post

Hi,
version v0.05:
* corrected really, really, really stupid bug (TAB=CHR$(9) and not CHR$(8)   )
* fixed buggy calculation for scrolling
* added input function
FUNCTION input.SPLIT(cs$, allowedChars$, maxLen%) AS STRING
 'allows to input string in any split area, use any charaters from allowedChar$ (or any, if this string is empty)
 'you can delete last character with BACKSPACE, finish the input with ENTER or RETURN (this will be not part of the returned string)
 'with maxLen% you can limit length of the input, if it's <=0 or >255 then the limit will be 255 characters
* updated demo program, so you can see input.SPLIT in action

Limitation of input function is, when already part of the input string is scrolled away and you are in left upper corner of area where input happens, you can't delete any more characters with backspace...

Enjoy!
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025