Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:11 26 Apr 2024 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 : CMM2: V5.05.06RC1

     Page 1 of 4    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8579
Posted: 05:05pm 05 Oct 2020
Copy link to clipboard 
Print this post

V5.05.06RC1 now posted

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

The release notes are included in the ZIP file and attached below. The only change from RC18 is the inclusion of MODE 13 - 400x300. The updated manual will be available with the final release but the readme should give adequate info on the changes. Bugs that were introduced and then resolved during the beta process are not included in the listing.

  Quote  Colour Maximite 2, Version 5.05.06 release notes

BREAKING CHANGES FROM V5.05.05:
IMAGE ROTATE direction reversed to match IMAGE ROTATE_FAST, positive angles are clockwise
MM.INFO(AUTORUN) replaced with MM.INFO(OPTION AUTORUN)

Bug fixes from V5.05.05:
Fixed bug if a program is terminated with Sprites hidden using SPRITE HIDE ALL.
Fixed bug where switching off the console output to the serial port didn't wait for buffered transmission to complete
Fixed issue where the short form help line shown in editor and filemanager in some high resolution modes.
Fixed bug in SPRITE LOADPNG which misses the last pixel in the png file.
Fixes bug where closing quotes are missing in program lines and improves error reporting of same
Fixes memory management bug in mode 7,12
Traps error when a static variable name and function/sub name are greater than 32 chars combined.
Fixes bug in ARC command in 16-bit modes
Fixes bug where PEEK(SHORT n) returns a 4-byte answer rather than 2
Fixes bug where IMAGE ROTATE command rotates in the wrong direction.
Fixes bug when trying to edit a file with an invalid pathname the error will only occur when exiting the editor.
Fixes bug when typing RUN "filename without the closing quote can lock up the system.
Fixes bug when typing PRINT and then some reserved words such as AS or FOR can lock up the system.
Fixes bug when running a program with a loadable font and then setting to that font at the command line then running another program can give obscure issues.
Fixes misalignment in Font 5 - thanks Jim
Fixes bugs in TRACE and TRACE LIST when multiple commands separated by colons are on a line
Fixed bug when you use page down in the filemanager on a less than full screen
Fixed bug where setting repeat rate to 25 cause options to be reset on next power up
Fixed bugs in search in editor
Fixed bug in LOAD SPRITE in 12-bit mode
Fixed bug where pressing F2 in the filemanager when the cursor is on a top line in a sub directory will hang the system.
Fixed bug in memory page allocation for modes 7,12, 7,16, 8,8
Fixed bug using TAB at the command line

New Functionality in V5.05.06 see the updated manual for more details

Usability changes:
Page up/down functionality in filemanager now goes to top or end of current display on first press and then pages by the number of lines showing on subsequent presses
Page up/down functionality in editor now goes to top or end of current display on first press and then pages by the number of lines showing on subsequent presses
Editor now renames the original file by appending .bak to the filename before saving the changed version
OPTION TAB 3 is now valid
Changing frequency when using the SOUND command will no longer create a click when the same channel is used for the same type of sound
The system implements a hardware watchdog which will reset the firmware in case of any sort of lockup: faulty CSUB, incorrect POKE, firmware error, untrapped code error

New Commands and sub-commands:
New MODE 13 supporting 400x300 display
LONGSTRING additions, together with LGETBYTE these additions make it easy to use a longstring as a byte array.
LONGSTRING SETBYTE n, data 'sets byte n to the value data, n respects OPTION BASE
LONGSTRING RESIZE n 'sets the stored size of a long string to n
@ function can now be used with the Y coordinate not specified
New SPRITE function calls:
SPRITE(D,spriteno1, spriteno2) 'returns the distance between the centres of spriteno1 and spriteno2 (returns -1 if either sprite is not active)
SPRITE(T,spriteno) ' returns a bitmap showing all the sprites currently in collision with the requested sprite Bits 0-63 in the returned integer represent a current collision with sprites 1 to 64 respectively
SPRITE(E,spriteno) ' returns a bitmap showing which if any edges of the screen the sprite is in contact with
New parameter for OPTION USBKEYBOARD: OPTION USBKEYBOARD lang [,noLED]. Set noLED to 1 to disable sending the light LED command to the keyboard after caps lock etc. Can avoid hangs on some keyboards. Defaults to 0
New graphics modes for widescreen monitors: Mode 11 (1280 x 720), Mode 12 (960 x 540)
MM.INFO(RESET) returns the cause of the last restart of the firmwaree and then clears it. Possible values are Switch, Power-On, Software, and Watchdog (NB the latter is the H/W watchdog and unrelated to the MMbasic version)
MM.INFO(OPTION option) returns the state of options that are relevant to how a program will run. i.e. ANGLE, AUTORUN, BASE, BREAK, DEFAULT, EXPLICIT, LEGACY, Y_AXIS
OPTION Y_AXIS DOWN(default) or UP sets whether 0,0 is at top left (DOWN) or bottom left. Can only be used in a program and cleared to default on exit.
OPTION ANGLE mode
mode can be DEGREES or RADIANS (default)
This command switches trig functions between degrees and radians. Acts on SIN, COS, TAN, ATN, ATAN2, MATH ATAN3, ACOS, ASIN
This is a temporary option that is cleared to default when programs end, after an error, or after Ctrl-C so should be set at the top of any program that requires to use angles in degrees.
LOAD SPRITE in 12-bit mode: The code now distinguishes between 0 = solid black and space = transparent
ON KEY [ASCIIcode,] interrupt routine
There is a new optional first parameter for ON KEY. This allows you to associate an interrupt routine with a specific key press. This operates at a low level for both the USB keyboard and a serial console and if activated the key does not get put into the input buffer but merely triggers the interrupt.
On the USB keyboard the "print screen" key generates ASCII code &H9D and the "pause/break" key generates &H9E

 
IanT
Regular Member

Joined: 29/11/2016
Location: United Kingdom
Posts: 84
Posted: 09:58am 06 Oct 2020
Copy link to clipboard 
Print this post

I've often wondered when you actually sleep Peter?

The CCM2 does seem to be very popular.

Maybe I should get one for Christmas? Or maybe I should just finish a few of my existing MMB projects first.  :-)

Anyway - well done.

Regards,

IanT
 
Sasquatch

Senior Member

Joined: 08/05/2020
Location: United States
Posts: 296
Posted: 02:08pm 07 Oct 2020
Copy link to clipboard 
Print this post

The "option_s" structure in ARMCFunctions.h is out of date.  I patched mine from the V5.05.05 source code, so no hurry unless there have been major changes since then.
-Carl
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8579
Posted: 02:14pm 07 Oct 2020
Copy link to clipboard 
Print this post

  Quote  The "option_s" structure in ARMCFunctions.h is out of date.


Thanks - will update with RC2
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8579
Posted: 06:42pm 09 Oct 2020
Copy link to clipboard 
Print this post

V5.05.06RC2 now posted

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

ARMCFunctions.h updated and DrawCircle, DrawTriangle and VideoColour added.
GUI functionality a la MM+ with Basic callbacks for cursor positioning
PIXEL function now has optional parameter to specify the page to read
XMODEM receive and send now both support using COM1 or COM2 as well as the console (default)
MATH ADD can be used to add a fixed amount to every cell in a single or multidimensional array

IMAGE SAVE now respects OPTION Y_AXIS
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 03:18pm 10 Oct 2020
Copy link to clipboard 
Print this post

Hi Peter,

with V5.05.06RC2 I get the following errors:
ARMCFunctions.h:187:5: error: unknown type name 'uint32_t'
 187 |     uint32_t RunInRam;
     |     ^~~~~~~~
ARMCFunctions.h:188:5: error: unknown type name 'uint32_t'
 188 |     uint32_t  PIN;
     |     ^~~~~~~~
ARMCFunctions.h:189:5: error: unknown type name 'uint32_t'
 189 |     uint32_t  Baudrate;
     |     ^~~~~~~~
ARMCFunctions.h:195:14: error: unknown type name 'uint8_t'
 195 |     volatile uint8_t USBPolling;
     |              ^~~~~~~
ARMCFunctions.h:196:5: error: unknown type name 'uint8_t'
 196 |     uint8_t mode;
     |     ^~~~~~~
ARMCFunctions.h:206:5: error: unknown type name 'int8_t'
 206 |     int8_t colourmode;
     |     ^~~~~~
ARMCFunctions.h:208:5: error: unknown type name 'uint8_t'
 208 |     uint8_t showstatus;
     |     ^~~~~~~
ARMCFunctions.h:211:5: error: unknown type name 'uint8_t'
 211 |     uint8_t editfont;
     |     ^~~~~~~
ARMCFunctions.h:213:5: error: unknown type name 'uint8_t'
 213 |     uint8_t F11Key[24];
     |     ^~~~~~~
ARMCFunctions.h:214:5: error: unknown type name 'uint8_t'
 214 |     uint8_t F12Key[24];
     |     ^~~~~~~
ARMCFunctions.h:216:5: error: unknown type name 'uint8_t'
 216 |     uint8_t rtcdrive;
     |     ^~~~~~~
ARMCFunctions.h:217:5: error: unknown type name 'uint8_t'
 217 |     uint8_t noLED;
     |     ^~~~~~~
ARMCFunctions.h:222:2: error: unknown type name 'uint8_t'
 222 |  uint8_t path[24];


Just for your information.

EDIT: Adding this

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;
typedef unsigned long long uint64_t;
typedef signed char int8_t;
typedef short int16_t;
typedef long int32_t;
typedef long long int64_t;
helps. (No doubt that you would have figured it out yourself.)

Michael
Edited 2020-10-11 01:34 by twofingers
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 06:59pm 10 Oct 2020
Copy link to clipboard 
Print this post

There is an inconsistency between BLIT and BLIT READ/WRITE. Perhaps this is intentional.

If I "blit 350,0,10,300,100,100", the block of pixels is copied as expected, including black pixels.

If I "blit read 1,350,0,100,100" and then "blit write 1,150,300", the black pixels are _not_ copied.

Perhaps BLIT WRITE would benefit from the same optional [,orientation] parameter as BLIT. BLIT READ should always copy the entire block, including black. Only BLIT WRITE should allow optional flipping or black=invisible pixels

ps: BLIT READ/WRITE are a great pair, because it makes splatting the same block all over the screen very easy.
.
Edited 2020-10-11 05:00 by vegipete
Visit Vegipete's *Mite Library for cool programs.
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 09:16pm 10 Oct 2020
Copy link to clipboard 
Print this post

Hi Peter,

The DrawCircle routine in V5.05.06RC2 made my LIFE extremely easy ... and fast.
Thanks for that!

Michael
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 444
Posted: 09:49pm 10 Oct 2020
Copy link to clipboard 
Print this post

  matherp said  V5.05.06RC2 now posted

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

ARMCFunctions.h updated and DrawCircle, DrawTriangle and VideoColour added.
GUI functionality a la MM+ with Basic callbacks for cursor positioning
PIXEL function now has optional parameter to specify the page to read
XMODEM receive and send now both support using COM1 or COM2 as well as the console (default)
MATH ADD can be used to add a fixed amount to every cell in a single or multidimensional array

IMAGE SAVE now respects OPTION Y_AXIS


Peter, thank you for adding the drawing routines to the ARMCFunctions file
Edited 2020-10-11 07:51 by LeoNicolas
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 444
Posted: 10:13pm 10 Oct 2020
Copy link to clipboard 
Print this post

Is it possible to add the control+left and controle+right navigation shortcuts to jump words?
Edited 2020-10-11 08:17 by LeoNicolas
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3840
Posted: 11:24am 11 Oct 2020
Copy link to clipboard 
Print this post

Hi Peter,

Apologies if I've blanked out previous discussion, but does this missing-quote really need to cause an "Error: System fault" ?

ls "foo/


Best regards,

Tom
Edited 2020-10-11 21:39 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 08:30am 12 Oct 2020
Copy link to clipboard 
Print this post

  matherp said  V5.05.06RC1 now posted

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

The release notes are included in the ZIP file and attached below. The only change from RC18 is the inclusion of MODE 13 - 400x300.


Could be good for portrait mode arcade games on a regular screen. Pac man and Dig Dug both had 224x288 displays.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3840
Posted: 01:43pm 12 Oct 2020
Copy link to clipboard 
Print this post

Hi Peter,

An inconsistency:

This also clears the VGA screen:

OPTION CONSOLE SERIAL
CLS


But this does not clear the serial console:

OPTION CONSOLE SCREEN
CLS


I think the latter is the correct behaviour and that CLS should not clear the VGA screen (any pages) when using OPTION CONSOLE SERIAL.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8579
Posted: 01:13pm 16 Oct 2020
Copy link to clipboard 
Print this post

V5.05.06RC3 now posted

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

Fixes bug with missing-quote causing an "Error: System fault" ?
Fixed memory leak when using EXECUTE command to RUN a program

PAGE COPY now includes an extra optional parameter

PAGE COPY frompage TO topage [,when] [,dontcopyblack]

If dontcopyblack is set to 1 then only non-black pixels are copied. This is more efficient than using BLIT with bit 2 of the orientation set.

This release includes a new "amazing" cursor capability and support for the Hobbytronics mouse I/F

The GUI functionality has be removed ready for the full release

The cursor controls are:

GUI CURSOR ON [cursorno] [x, y] [cursorcolour] Cursor no can be 0 (Default: mouse type pointer) or 1 (cross), in addition the user can load his own cursor using a SPRITE look-alike file in which case this is cursor no. 2 For cursor numbers 0 and 1 the programmer can override the default white cursor by specifying the colour in the open command.
GUI CURSOR x, y 'moves the cursor to x, y GUI CURSOR OFF  ' turns off the cursor and allows you to select a different one (see test prog)
GUI CURSOR HIDE ' hides the cursor but maintains its position
GUI CURSOR SHOW 'Shows a hidden cursor in its original position
GUI CURSOR COLOUR cursorcolour 'changes the colour of cursor number 0 or 1. Does not impact loaded cursors where colour is specified by the programmer.
GUI CURSOR LOAD "fname" 'this loads a user cursor using the Maximite sprite mechanism with a minor change. The header is now Width, height, xoffset, yoffset. The two offsets determine where on the cursor the pointer is defined to be. So the mouse cursor has offsets 0,0 and the cross has offsets 7,7

The cursor is magic and sits above all other graphics. Nothing you can do will overwrite it (unless I've forgotten something). You can blit, page copy, text, sprite, box etc. as much as you want and the cursor will stay in view unless deliberately hidden. The cursor is always on PAGE 0 for colours 8 and 16 and page 1 for 12-bit colour and it can be moved even if the write page is somewhere else.

New command:
CONTROLLER - WII is now deprecated and acts as a synonym so you can use CONTROLLER NUNCHUK or WII NUNCHUK etc.

CONTROLLER MOUSE OPEN [i2channel] [,LEFTBUTTONint] [,RIGHTBUTTONint] 'i2c channel defaults to 2:  i.e. pins 27 and 28 on the header This opens any device that supports the Hobbytronic mouse calling sequence. It initialises the device to restrict mouse movement to 0-MM.HRES-1, 0-MM.VRES-1. The position is set to MM.HRES\2, MM.VRES\2 and the speed is tuned to match the display resolution. Any non Hobbytronic emulation should support this initialisation as well as the return values.

CONTROLLER MOUSE CLOSE [i2cchannel]  'i2c channel defaults to 2, Closes the controller

When open the mouse data is sampled automatically in the background using non-blocking I2C routines every 16mSec

The mouse is interrogated using the MOUSE function
MOUSE(X [,i2channel]) ' returns the X coordinate
MOUSE(Y [,i2channel]) ' returns the Y coordinate
MOUSE(L [,i2channel]) ' returns the status of the left button (1=pressed)
MOUSE(R [,i2channel]) ' returns the status of the right button (1=pressed)
MOUSE(W [,i2channel]) ' returns the status of the wheel click (1=pressed)

I do not currently support the scroll wheel counter as there seems to be a minor bug in the Hobbytronic implementation - I'm chasing them on this.
Edited 2020-10-16 23:25 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3840
Posted: 01:31pm 16 Oct 2020
Copy link to clipboard 
Print this post

Thank you as always Peter.

<FlameRetardantSuit>
Now if only the firmware provided support for launching on startup, and returning control to a custom shell ? Then someone could write a mouse driven GUI shell that could be used for selecting and launching applications ... we could call it Windows ... or maybe not
</FlameRetardantSuit>

P.S. I know that Windows is rather more than a launcher shell, but we all have to start somewhere.

Best wishes from Manchester ... until we are cast adrift into Tier 3.

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 02:19pm 16 Oct 2020
Copy link to clipboard 
Print this post

It looks like the Hobytronics is the easiest way to get a mouse now so, is there any way to build a Hobytroinic mouse without paying like 26 to 40 dollars to get one anywhere else but the UK? Covad is Kicking my ass and I would like cheaper option. If not Then I will get one when I can scrap together some money. I hope there is a way to roll your own cheaper.  That CMM2 Delux from Polish vendor is going to have a socket for that chip and HT is saying they sell the programmed chip for about $10 plus $6 shipping to US.  I am not sure what to do.  Maybe I will also wait until this becomes the defacto standard going forward FOR SURE. Any help would be appeaciated.  Thanks
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1082
Posted: 04:17pm 16 Oct 2020
Copy link to clipboard 
Print this post

Official mouse support! Awesome! (Are the GUI CURSOR commands synced to the vertical refresh, so there is no flicker?)

I've been playing with my "chuk-ulator", a chip that emulates a nunchuk and encodes a PC joystick and a PS/2 mouse into the nunchuk data fields. Using a mouse to paint on the CMM2 screen is a joy. (Or maybe small minds are easily amused.)

So now I will set about emulating the Hobbytronics protocol. At the start, it will be PS/2 mouse only, but later I'll deal with USB. I'll see if I can get the PS/2 version running on a PIC16F18313, a chip that costs less than $1US.
Visit Vegipete's *Mite Library for cool programs.
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 04:48pm 16 Oct 2020
Copy link to clipboard 
Print this post

  thwill said  Thank you as always Peter.
P.S. I know that Windows is rather more than a launcher shell, but we all have to start somewhere.


Actually the early 1.0 and 2.0 versions really weren't much more than that! It really wasn't until 3.0 that it became more of a full work environment...
 
Sasquatch

Senior Member

Joined: 08/05/2020
Location: United States
Posts: 296
Posted: 04:56pm 16 Oct 2020
Copy link to clipboard 
Print this post

The new mouse functions look great and seem to work as advertised.


  matherp said  

I do not currently support the scroll wheel counter as there seems to be a minor bug in the Hobbytronic implementation - I'm chasing them on this.


From my testing it appears that the HobbyTronic Mouse module simply keeps reporting the previous scroll wheel movement until something else changes to force an update to 0.  This also applies to the X and Y "scroll values" which you are not using.  These values should likely be cleared to 0 when read on the I2C port and then updated when additional scrolling takes place.  For serial output the module wouldn't send fresh data until something changes anyways so likely not an issue for serial users of the module.  Such are the vagaries of using a proprietary module.


I have found some strange behavior in the serial port functions.  If you open a port (say Com1:) in inverted logic mode, the inverted logic remains active for the receive side even after the port has been closed and re-opened with default settings.  This is apparently not a big deal as it has not be reported yet.  I can foresee someone trying to open a connection to a device and then instructing the device to change it's settings, and re-opening the connection with the new settings.  In this case it would not work as all the settings are not changed upon re-opening the Com: port.
-Carl
 
Sasquatch

Senior Member

Joined: 08/05/2020
Location: United States
Posts: 296
Posted: 05:00pm 16 Oct 2020
Copy link to clipboard 
Print this post

  vegipete said  Official mouse support! Awesome! (Are the GUI CURSOR commands synced to the vertical refresh, so there is no flicker?)

I've been playing with my "chuk-ulator", a chip that emulates a nunchuk and encodes a PC joystick and a PS/2 mouse into the nunchuk data fields. Using a mouse to paint on the CMM2 screen is a joy. (Or maybe small minds are easily amused.)

So now I will set about emulating the Hobbytronics protocol. At the start, it will be PS/2 mouse only, but later I'll deal with USB. I'll see if I can get the PS/2 version running on a PIC16F18313, a chip that costs less than $1US.


Yes!  This is exactly what we need at this point, a lower cost option.  Having an open-source option also frees us from reliance on a proprietary module that we can't modify if the need arises and may not be supported or even available in the future.
-Carl
 
     Page 1 of 4    
Print this page
© JAQ Software 2024