Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:48 26 Nov 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 : PicoMite/VGA/Web V5.08.00: back to betas

     Page 2 of 7    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4040
Posted: 11:10am 01 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Here's another one that used to work but doesn't now:


I've reduced the number of nested saves to 8 to save memory


Ack, should be more than sufficient. I will adjust my unit-tests.

I've now run all my automated tests and found nothing else Gerry hasn't already reported.

I'll test b1 and do some manual testing over the weekend.

Best wishes,

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

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:26am 01 Dec 2023
Copy link to clipboard 
Print this post

I think there is a bug in MATH M_TRANSPOSE

The transposed matrix is not fully filled with all the elements if they are not square matrix. It is in all systems , CMM2, Picomites H7,F4, probably MMX.

The change below seems to fix it, the rows and columns for matrix2 have already been swapped so should not be reversed again.

MFLOAT **matrix1=alloc2df(numcols1,numrows1);
//MMFLOAT **matrix2=alloc2df(numrows2,numcols2);
MMFLOAT **matrix2=alloc2df(numcols2,numrows2);

test_matrix:
  1.0000,    2.0000,    3.0000
  4.0000,    5.0000,    6.0000
  7.0000,    8.0000,    9.0000
 10.0000,   11.0000,   12.0000
 13.0000,   14.0000,   15.0000

  1.0000,    4.0000,    7.0000,   10.0000,   13.0000
  2.0000,    5.0000,    8.0000,   11.0000,   14.0000
  3.0000,    6.0000,    9.0000,   12.0000,   15.0000
Latest F4 Latest H7
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:52am 01 Dec 2023
Copy link to clipboard 
Print this post

  thwill said   Gerry do you have my transpiler running or did you manually #INCLUDE everything, or something else ?

Hi Tom,

I have my MMReplace addon to MMEdit which handles the #INCLUDES at load time. The tests get loaded and run but also copy themselves to the A:/tests directory, so they can be all run with BASE 0 and BASE 1. A couple of directives #LOADLIBRARY and
#IGNORELIBRARY allow the includes to be stored in the library so you are only reloading the actual tests when you are developing. It is your framework with a few tweaks to make it work off the A: drive.
There is just a few tweaks to the header to use your test files so we could trade some test files without much work. I am adding most of the MATH command options to tst_math.bas so I can exercise them. I will also add anything missing in LONGSTRING.
I have found your unit testing a great help when developing the H7 and F4.
I can give you my(your) updated tests if you are interested.

Gerry
Latest F4 Latest H7
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9116
Posted: 12:15pm 01 Dec 2023
Copy link to clipboard 
Print this post

V5.08.08b1

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Should fix everything mentioned above and includes Gerry's MATH fix
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 172
Posted: 04:40pm 01 Dec 2023
Copy link to clipboard 
Print this post

Hi Peter,

I am testing my solar panel display program, which uses MQTT. Sofar, it runs with V5.08.08b1. I'll monitor it over the next days.

Best
Thomas

Edit: I also tested my 6-legged, 3DOF robot software (VGA firmware, V5.08.08b1), which makes heavy use of the MATH commands/functions. So far, it works.
Edited 2023-12-02 03:02 by karlelch
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9116
Posted: 05:16pm 01 Dec 2023
Copy link to clipboard 
Print this post

Thomas - thanks for the feedback - sounds good
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 05:45pm 01 Dec 2023
Copy link to clipboard 
Print this post

Straightforward I2C with an MCP23017 I/O expander works on Mick's PicoMiteVGA Mini PCB with:
PicoMiteVGA MMBasic Version 5.08.08b1
OPTION SYSTEM I2C GP14,GP15
OPTION KEYBOARD US
OPTION SDCARD GP13, GP11, GP12, GP10
OPTION AUDIO GP6,GP7', ON PWM CHANNEL 3
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4235
Posted: 08:44pm 01 Dec 2023
Copy link to clipboard 
Print this post

Hi Peter,

On VGA using 50800beta1
The stack issue with chess is solved.
The layer and color issue is not solved.

What it boils down to (I think) is that when leaving PETSCII robots with control C, the default background color is remembered (was magenta in layer L).
When RUN a new program (i.e. chess, but below 2 line program is sufficient to demonstrate) the CLS clears in magenta color. Not black.


MODE 2
CLS


I would expect that default color to be reset at start of a new program (RUN), and not inherited from previous program.

Volhout

P.S. maybe related: after a cold boot you can FRAMEBUFFER WRITE L, without even creating the framebuffer with FRAMEBUFFER LAYER.
Edited 2023-12-02 06:58 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9116
Posted: 10:38pm 01 Dec 2023
Copy link to clipboard 
Print this post

This is nothing to do with the latest changes but I'll look at it when I have a chance
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 01:34am 02 Dec 2023
Copy link to clipboard 
Print this post

I have added a few more test to MATH and found these.


MATH V_NORMALISE
  Normalising this vector
  1.0000,    2.0000,    3.0000
  results in this one
  INF, INF, INF
must be a divide by zero in there somewhere. Works before the update.




MATH(M_DETERINANT
 test_determinant on this matrix complains about the dimension:
  1.0000,    4.0000,    7.0000
  2.0000,    5.0000,    8.0000
  3.0000,    6.0000,    9.0000
[1645] assert_float_equals(0.0, Math(M_DETERMINANT a!()), 1e-10)
Error : Argument 1 must be a 1D floating point array




MATH(V_MULTIPLY gives incorrect result. causes a restart before the update so
probably something wrong.
This 2D array
  3.0000,    3.0000,    3.0000
  3.0000,    3.0000,    3.0000
  3.0000,    3.0000,    3.0000
This Vector
  1.0000,    2.0000,    3.0000
This result
  0.0000,    0.0000,    0.0000
Expected
  18.000     18.000     18.000
FAIL (1/2)
   2: Assert equals failed, expected 18 but actually 1.709015797e-304




MATH Q_CREATE complains about varaiable
sub test_quaterions()
 'Quaternion arithmetic
  local outRQ!(BASE%+4)
  MATH Q_CREATE 1, 2, 2, 2, outRQ!()
 'MATH V_PRINT outRQ!()
  assert_float_equals(0.4672, outRQ!(BASE%), 1e-6)
end sub
 test_quaterions:
[1382] Math Q_CREATE 1, 2, 2, 2, outRQ!()
Error : Variable name




LONGSTRING PRINT array%()  is OK
LONGSTRING PRINT #1,array%() gives error.

[1475] LongString Print #1, array%()
Error : Variable name




LONGSTRING COPY fails. Have not verified if it was previously OK
Sub test_copy()
 Local src%(100), dest%(100)
 LongString Append src%(), "Hello World"
 LongString Copy dest%(), src%()
 assert_string_equals("Hello World", LGetStr$(dest%(), 1, LLen(dest%())))
End Sub

test_copy:                                         FAIL (1/1)
   1: Assert equals failed, expected "Hello World" but actually "<0><0><0><0><0><0><0><0><0><0><0>

Edited 2023-12-02 12:18 by disco4now
Latest F4 Latest H7
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9116
Posted: 10:09am 02 Dec 2023
Copy link to clipboard 
Print this post

V5.08.08b2

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Gerry: thanks for all the great testing

b2 should fix all of the above and Harm's issue (not tested). In addition I have added functionality for Frank.

PLAY HALT - stops playback for MP3 files via the VS1053 and notes the current location in the file
PLAY CONTINUE track$ - restarts playback of an mp3 track from the position halted. "track$" will be the name of the file with all file attributes removed

e.g.

PLAY MP3 "B:/mp3/mymp3.mp3"
sometime later
PLAY HALT
later again
PLAY CONTINUE "mymp3"
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:03am 02 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  b2 should fix all of the above

Confirmed that all are fixed.
Gerry
Latest F4 Latest H7
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4040
Posted: 11:13am 02 Dec 2023
Copy link to clipboard 
Print this post

  disco4now said  ... A couple of directives #LOADLIBRARY and #IGNORELIBRARY allow the includes to be stored in the library so you are only reloading the actual tests when you are developing ...


Hi Gerry,

That hadn't occurred to me, I may take a look, though since it's unit-test specific I might just live with the existing inefficiency of completely pre-processing each file as I send it.

  disco4now said  It is your framework with a few tweaks to make it work off the A: drive.


I thought it did work off the A:/ drive, that's at least how I am using it.

  disco4now said  I will also add anything missing in LONGSTRING.
I have found your unit testing a great help when developing the H7 and F4.
I can give you my(your) updated tests if you are interested.


I would struggle without unit-testing now, it's the only way to efficiently keep on top of regressions.

Yes, please I would appreciate adding anything you've got to my test suite, it might even encourage me to put some work into MMB4L.

Best wishes,

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

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:42am 02 Dec 2023
Copy link to clipboard 
Print this post

One more.
MATH(M_DETERMINANT is now OK with OPTION BASE 0
but with same tests some have incorrect results when OPTION BASE 1



SUB test_determinant
local a!(BASE%+2,BASE%+2)
a!(BASE%,BASE%)=1
a!(BASE%,BASE%+1)=2
a!(BASE%,BASE%+2)=3
a!(BASE%+1,BASE%)=4
a!(BASE%+1,BASE%+1)=5
a!(BASE%+1,BASE%+2)=6
a!(BASE%+2,BASE%)=7
a!(BASE%+2,BASE%+1)=8
a!(BASE%+2,BASE%+2)=9
'print
'MATH M_PRINT a!()
assert_float_equals(0.0, Math(M_DETERMINANT a!()), 1e-10)
a!(BASE%,BASE%+2)=2
assert_float_equals(3.0, Math(M_DETERMINANT a!()), 1e-10)
a!(BASE%,BASE%+2)=4
assert_float_equals(-3.0, Math(M_DETERMINANT a!()), 1e-10)

end sub

These failures when OPTION BASE 1 is set.

test_determinant:                                  FAIL (2/3)
   2: Assert equals failed, expected 3 but actually 0
   3: Assert equals failed, expected -3 but actually 0

Latest F4 Latest H7
 
matherp
Guru

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

Found and fixed - keep em coming  

I hate and despise OPTION BASE
Edited 2023-12-02 22:05 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4040
Posted: 03:02pm 02 Dec 2023
Copy link to clipboard 
Print this post

Probably unrelated bug:

1. EDIT "foo.txt"
2. Type "Bananas" with no newline
3. Press F1 (Save)
4. EDIT "foo.txt"
5. File just contains "Banana" with no trailing "s"

Best wishes,

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

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 213
Posted: 03:13pm 02 Dec 2023
Copy link to clipboard 
Print this post

Version V5.08.08b1 was compiled from source codes and worked with changes for my hardware (Murmulator).
Source Code
Version V5.08.08b2 is built but doesn't work at all! :(
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9116
Posted: 03:31pm 02 Dec 2023
Copy link to clipboard 
Print this post

  Quote  Probably unrelated bug


Also found and fixed - thanks
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 213
Posted: 02:32pm 03 Dec 2023
Copy link to clipboard 
Print this post

Starting from beta version V5.08.08b2, the program for PicoMiteVGA compiled from source code does not work!
https://github.com/UKTailwin/PicoMite
In this case, the assembly of the same codes, the PicoMite version, starts normally.
In my opinion, the reason is due to file changes:
Audio.c
Audio.h
MMBasic.h
MM_Misc.c
Edited 2023-12-04 00:33 by javavi
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9116
Posted: 02:38pm 03 Dec 2023
Copy link to clipboard 
Print this post

  Quote  the program for PicoMiteVGA compiled from source code does not work!


I don't provide any support for building from github. It works for me and the files are up-to-date
 
     Page 2 of 7    
Print this page
© JAQ Software 2024