Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:51 30 Mar 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.07.02b1: Minor bug fixes

     Page 2 of 2    
Author Message
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1081
Posted: 03:03am 02 Apr 2022
Copy link to clipboard 
Print this post

Am I going nuts?

> list
for i = 0 to 10
 read a,b,c
next i
data 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10,10


> run
Error in line 2: Syntax

A minor change of breaking the data into two lines clears the error. What is going on?
> list
for i = 0 to 10
 read a,b,c
next i
data 0,0,0
data 1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10,10


> run

>


===============
Any thoughts on the my posting just above? My CMM2 freezes from time to time if 3D objects are drawn too close to the origin, perhaps if some vertices are crossing the z=0 boundary.
Edited 2022-04-02 13:08 by vegipete
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 06:55am 02 Apr 2022
Copy link to clipboard 
Print this post

  Quote  Am I going nuts?


The CMM2 supports a maximum of 32 parameters on a line. Because the data statement accepts expressions these are considered parameters. This limitation is specified in the MMBasic Implementation Characteristics in the manual.

I haven't had a chance to look at the 3D issue - sorry
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 09:11am 06 Apr 2022
Copy link to clipboard 
Print this post

V5.07.02b5

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

Fixes crashing bug when drawing polygons with y coordinates exceeding 1080 (i.e.off screen) as used in the 3D rouitines
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1081
Posted: 03:43pm 06 Apr 2022
Copy link to clipboard 
Print this post

  Quote  The CMM2 supports a maximum of 32 parameters on a line.

And wouldn't you know it, my example had 33 parameters. Doh! Thanks for explaining.

  Quote  Fixes crashing bug when drawing polygons with y coordinates exceeding 1080 (i.e.off screen) as used in the 3D rouitines

Awesome, I'll test tonight.

On the topic of 3D routines, the 3D Engine manual says
  Quote  If the optional parameter fill() is omitted then the 3D object will be drawn as a wireframe
When I try this, the faces away from the camera are not drawn, even though I can see through the object. Do I need to set 'nocull' to 1? If so, the manual should mention this.

As always, a huge thanks to you Peter for your awesome programming work, giving us such a slick toy to play with.
Visit Vegipete's *Mite Library for cool programs.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1081
Posted: 03:02am 07 Apr 2022
Copy link to clipboard 
Print this post

Alas, V5.07.02b5 seems to have broken something in the 3D engine - objects are no longer drawn with solid faces. Behaves the same as if the fill() parameter is omitted.

Edit: Is there a chance that this latest version is somehow shutting down the VGA output after a period of time? I power cycled my monitor a few times, thinking it had failed because the screen went blank. Reverting to b4 and the monitor is working normally again.
Edited 2022-04-07 13:59 by vegipete
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 08:20am 07 Apr 2022
Copy link to clipboard 
Print this post

Oops - sorry. Did the testing on MMB4W and left a diagnostic return in the H7 code.

Please download again.

There is a sleep timer on the screen which is set with an option. Check your options and the manual to see if it is set.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3808
Posted: 03:21pm 11 Aug 2022
Copy link to clipboard 
Print this post

New "bug", this may well get filed in the category of "weird sh*t that only Tom would try", but here we go:

> 480MHz Colour Maximite 2 G2
MMBasic Version 5.07.02b2
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> Dim i% = Mm.Info(Exists Dir ".")
Expected a number

> ? Mm.Info(Exists Dir ".")
0

> i% = Mm.Info(Exists Dir ".")
Expected a number

>


Of course Mm.Info(Exists Dir ".") should return 1 which is widely recognised as a number, but not a prime .

Best wishes,

Tom
Edited 2022-08-12 01:33 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 05:53pm 11 Aug 2022
Copy link to clipboard 
Print this post

V5.07.02b6

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

Fixes bug in MM.INFO(EXISTS DIR)
Fixes possible crashing bug in GUI DELETE found in PicoMite
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3808
Posted: 01:57pm 12 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  V5.07.02b6


Thanks Peter, that addresses the EXISTS DIR "." problem. Took me a while to remind myself how to re-flash the CMM2, twelve months ago I used to do that two or three times a day.

I know it is dismissable as nonsense, but is there any chance you could give an opinion on what you think the output should be given the empty string?

CMM2:
> ? Mm.Info(Exists Dir "")
1
> ? Mm.Info(Exists File "")
0

Note that the CMM2 has no MM.INFO(EXISTS f$) command .


MMB4W:
> ? Mm.Info(Exists Dir "")
0
> ? Mm.Info(Exists File "")
0
> ? Mm.Info(Exists "")    
0



MMB4L:
> ? Mm.Info(Exists Dir "")
1
> ? Mm.Info(Exists File "")
0
> ? Mm.Info(Exists "")    
1


My initial thought is that only MMB4W has this correct ... note I'd rather it didn't throw an ERROR as handling them in MMBasic is not particularly nice.

EDIT: And on second thoughts you could argue that commands that operate on directories like CD/DIR/LS/FILES all treat no argument/directory as meaning the current directory which would make the behaviour of the CMM2 and MMB4L correct.

Best wishes,

Tom
Edited 2022-08-13 00:14 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 04:37pm 13 Jan 2023
Copy link to clipboard 
Print this post

V5.07.02b9

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

Fixes bug in ON ERROR SKIP (thanks Tom)
New commands

LINE AA x1, y1, x2, y2 [, LW[, C]]
Draws a line with anti-aliasing . The parameters are as per the LINE
command above. However this version will use variable intensity values of
the specified colour to reduce the “staggered” quality of diagonal lines. In
addition this version can draw diagonal lines of any width.

PWM channel,frequency, duty1 [,duty2] [,duty3] [,phase
Phase is a new parameter that causes the waveforms to be centred such that a wave form with a shorter duty cycle starts and ends equal times from a longer one

New Functions
MATH(CRC8 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate an 8 bit CRC
MATH(CRC12 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate a 12 bit CRC
MATH(CRC16 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate a 16 bit CRC
MATH(CRC32 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate a 32 bit CRC
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 02:47pm 19 Dec 2023
Copy link to clipboard 
Print this post

V5.07.02b10

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

Math routines up-to-date with all the goodness from the PicoMite (but much faster)

Added BLIT/SPRITE MEMORY as per the PicoMite - should make porting Petscii much easier
Added LINE PLOT commmand
Added PAGE MERGE from1, from2, to [,colour] ' colour defaults to BLACK

The copies page "from1" to "to" but overlays any pixels in "from2" that aren't "colour"
Edited 2023-12-20 03:41 by matherp
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1081
Posted: 06:18pm 19 Dec 2023
Copy link to clipboard 
Print this post

  Quote  Added BLIT/SPRITE MEMORY as per the PicoMite - should make porting Petscii much easier

4 bit colour, I presume? Can the PicoMite colour names be added to the CMM2 recognized colour names?
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 07:07pm 19 Dec 2023
Copy link to clipboard 
Print this post

Done, I've updated the beta. Also fixed a bug for overlapping BLIT regions when in 32-bit colour mode
Edited 2023-12-20 05:10 by matherp
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 433
Posted: 07:35pm 19 Dec 2023
Copy link to clipboard 
Print this post

Matherp, are you adding these fixes/features to the MMB4W?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8518
Posted: 11:31am 07 Feb 2024
Copy link to clipboard 
Print this post

Minor update to fix bug in reading pixels in 8-bit mode just posted - no version change

https://geoffg.net/Downloads/Maximite/CMM2_Beta.zip
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024