![]() |
Forum Index : Microcontroller and PC projects : CMM2 V5.05.06exp: Huge performance improvement - please test
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4032 |
Maybe in "A:/crash.bas" it's the global & local k$ ? John |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10181 |
No: that one is just a timeout but unrelated to the main issue |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
If this isn't the issue then energy levels permitting I'll work on a menu-redux when I've got the family fed and to bed. I had a quick "play" and it looks like the issue is reproducible without the presence of EXECUTE. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10181 |
Tom Please find attached a version with lots of diagnostic prints - should be self explanatory. Any help to find the combination that fails greatly appreciated. Alternatively, if you can find a workaround in the real code that could also help track down the issue. CMM2V1.5.zip |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
I've not loaded the new firmware yet, but here is "proof" that it's nothing to do with EXECUTE: > list "menu-redux-1.bas" Option Explicit Option Default Float Option Base 0 Trace On Play MP3 "/TweakerRaySpaceFlight-160kb.mp3" Dim menu_label$ menu_label$ = show_menu$("") End Function show_menu$(menu_label$) Restore menu_top Local menu_name$ Read menu_name$ Local items$(20, 2) Local items_sz = read_string_array(items$()) End End Function ' @return number of elements (of first index) read. Function read_string_array(a$()) Local lbound = Bound(a$(), 0) Local i = lbound, j = lbound, s$ Do Read s$ If s$ = "end" Then Exit Do a$(i, j) = s$ j = j + 1 If j = Bound(a$(), 2) + 1 Then j = lbound : i = i + 1 Loop read_string_array = i - lbound End Function menu_top: Data "Contents" Data "1", "WHAT'S NEW?", "menu_new" Data "2", "Games", "menu_games" Data "3", "Other amusements", "menu_amusements" Data "4", "Utilities", "menu_utils" Data "5", "Demos - Graphics, 3D", "menu_3d" Data "6", "Demos - Graphics, Fractals", "menu_fractals" Data "7", "Demos - Graphics, Sprites", "menu_sprites" Data "8", "Demos - Graphics, Turtle", "menu_turtle" Data "9", "Demos - Sound", "menu_sound" Data "X", "Demos - CSUBs", "menu_csub" Data "C", "Show credits", "credits" 'Data "D", "COMING SOON", "menu_next" Data "Q", "Quit", "quit" Data "end" > run "menu-redux-1.bas" [7][8][9][13][14][15][16][17][23][24][25][26][27][28][29][30][31][26][27][28][29][30]Error: System fault - possible causes - Incorrect use of POKE - Faulty CSUB - Reserved words used as variables - Firmware problem > This crashes with "menu-redux-1.bas" in "A:/" 1. Reset CMM2 2. RUN "menu-redux-1.bas" 3. Error: System fault Note that the trace does not always get to the same line number !!! Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
New firmware, starting with a reset, two sequential executions: Colour Maximite 2 MMBasic Version 5.05.06RC6 Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather Searching for function: MM.STARTUP Searching for function: MM.PROMPT > run "menu-redux-1.bas" [7][8]Creating variable : MENU_LABEL, at depth : 0, hash key : 967 [9]Searching for function: SHOW_MENU Testing : SHOW_MENU Found : SHOW_MENU, hash key : 334 Creating variable : MENU_LABEL, at depth : 1, hash key : 455 Creating variable : SHOW_MENU, at depth : 1, hash key : 334 [13][14]Creating variable : MENU_NAME, at depth : 1, hash key : 60 [15][16]Creating variable : ITEMS, at depth : 1, hash key : 47 [17]Creating variable : ITEMS_SZ, at depth : 1, hash key : 345 Searching for function: READ_STRING_ARRAY Testing : READ_STRING_ARRAY Found : READ_STRING_ARRAY, hash key : 477 Searching for function: ITEMS Creating variable : A, at depth : 2, hash key : 204 Creating variable : READ_STRING_ARRAY, at depth : 2, hash key : 477 [23]Creating variable : LBOUND, at depth : 2, hash key : 145 [24]Creating variable : I, at depth : 2, hash key : 356 Creating variable : J, at depth : 2, hash key : 29 Creating variable : S, at depth : 2, hash key : 290 [25][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][28][29][30][31][26][27][32][33]Deleting S, 2, 290 Deleting J, 2, 29 Deleting I, 2, 356 Deleting LBOUND, 2, 145 Deleting READ_STRING_ARRAY, 2, 477 Deleting A, 2, 204 [18] Searching for function: MM.PROMPT > run "menu-redux-1.bas" [7][8]Creating variable : MENU_LABEL, at depth : 0, hash key : 967 [9]Searching for function: SHOW_MENU Testing : SHOW_MENU Found : SHOW_MENU, hash key : 334 Creating variable : MENU_LABEL, at depth : 1, hash key : 455 Creating variable : SHOW_MENU, at depth : 1, hash key : 334 [13][14]Creating variable : MENU_NAME, at depth : 1, hash key : 60 [15][16]Creating variable : ITEMS, at depth : 1, hash key : 47 [17]Creating variable : ITEMS_SZ, at depth : 1, hash key : 345 Searching for function: READ_STRING_ARRAY TeError: System fault - possible causes - Incorrect use of POKE - Faulty CSUB - Reserved words used as variables - Firmware problem Searching for function: MM.STARTUP Searching for function: MM.PROMPT Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
Subsequent RUNs without an intervening RESET don't seem to display the problem. ... I'm not convinced I'm looking at the same same issue as with the real "menu" program, but until this one is cleaned up it is difficult to make progress. Tom Edited 2020-10-25 05:26 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10181 |
Tom I'm beginning to think it is a caching issue - will look more tomorrow. Can you create any problems without mp3 playing? |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
Sorry Peter I haven't had any further time this evening and I don't think I'll have any tomorrow either. I did see a system fault when I tried *replay in "Pirate Adventure" but that then seemed to disappear with the version that fixed CLEAR ... not that I was using CLEAR. I'll try and make time to finish going through the Welcome Tape as soon as I can. Prior to this experimental version TweakerRay and I were seeing various peculiarities with playing this MP3 which he eventually concluded were because it had an embedded image. This version does not have that image. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10181 |
That was difficult - eventually tracked the problem to the 3rd party mp3 codec corrupting memory outside of its space. I've found an updated version and that seems to have fixed the problem. Please try and break (but no too hard ![]() CMM2V1.5.zip This version also fixes strange bug in blit when both the read and write pages are in SDRAM and the transfer is not word aligned Edited 2020-10-26 05:21 by matherp |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1566 |
FYI: The Welcome tape seems to work better now (5.05.06RC6). But from brownian.bas I get the following message: Error in ../../common/welcome.inc line 26: Variable type not specified line 26 is "Local i, s$" in Function we.sanitise_firmware_version$(v$) Local i, s$ For i = 1 To Len(v$) If InStr("0123456789", Mid$(v$, i, 1)) > 0 Then s$ = s$ + Mid$(v$, i, 1) Next i Do While Len(s$) < 5 : s$ = s$ + "0" : Loop If Len(s$) > 5 Then Error "Unexpected firmware version format: " + v$ we.sanitise_firmware_version$ = s$ End Function ?? Michael causality ≠correlation ≠coincidence |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
Thanks Michael, I found that for myself yesterday but haven't pushed the fix. 'i' needs to be changed to 'i%' throughout. I think "brownian.bas" must be using OPTION DEFAULT NONE. Tom Edited 2020-10-26 07:49 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1566 |
Hi Tom, that works! Great! ![]() BTW: the Brownian program is very impressive! ![]() Kind regards Michael causality ≠correlation ≠coincidence |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10181 |
Of course it is - as should every program!!!!! |
||||
NPHighview![]() Senior Member ![]() Joined: 02/09/2020 Location: United StatesPosts: 202 |
Peter - Maybe some blitting / framebuffer problems in 5.0506RC5. Please see my thread on Graphics Commands, Arrays, and Terminating Conditions. Due to my lack of experience with blitting / framebuffers on CMM2, this could easily be my problem, too. - Steve "NPHighview" Johnson Live in the Future. It's Just Starting Now! |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
It's Peter's work not mine, I'm just the curator. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
I still haven't come to a conclusion on that and have been quite happy with OPTION DEFAULT INTEGER. Though the fact that common library code does need to use explicit types means that if I keep going long enough I will probably come round to your point of view. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1566 |
@Tom I know! ![]() causality ≠correlation ≠coincidence |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4299 |
I know! ![]() Thanks, it is turning out to be a problem. Plus there is this bloke who keeps making amazing improvements to the firmware that require me to retest everything ![]() Edited 2020-10-26 09:04 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1566 |
![]() I think he must be overworked too. He does superhuman things. ![]() Edited 2020-10-26 09:06 by twofingers causality ≠correlation ≠coincidence |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |