![]() |
Forum Index : Microcontroller and PC projects : CMM2: v5.05.04RC7 - RAM and FLASH flexibility
![]() ![]() |
|||||
Author | Message | ||||
mkopack73 Senior Member ![]() Joined: 03/07/2020 Location: United StatesPosts: 261 |
Agreed with both of the above... I was excited for the x16 but some of the choices they made really make it clear that if you want to do anything substantial you will need to use assembly and I don’t have time for that. So far I’ve been outright amazed at how nearly everything I can think of that I might want is available with the Cmm2 and relatively easy to do. Only things that stumble me up are lack of threads and no OO (hard to push myself back into the non-OO world and way of thinking after nearly 30 years of embracing it. Both things I can work around. I do wish there was a way to do dynamic length data structures (linked lists and such). Maybe there is a way to get that that I’m not aware of. But yeah I’m not even sure I’m going to bother with the x16 now. It’s slower CPU, lack of a reasonable basic, huge case, and insistence on being Commodore-like (I have a 64 and 128, I don’t need a new slightly faster one) just really aren’t appealing given the CMM2 exists and is cheaper, faster, and easier to program. |
||||
MauroXavier Guru ![]() Joined: 06/03/2016 Location: BrazilPosts: 303 |
I updated the firmware from RC6 to RC10 and now Wolfenstein 3D gives me a curious syntax error. This is the original line, that worked on RC6: PAGE WRITE 1: BOX 0,0,MM.HRES,MM.VRES,0,,RGB(0,0,0,15) But to solve the "syntax error", I must split the commands into two lines: PAGE WRITE 1 BOX 0,0,MM.HRES,MM.VRES,0,,RGB(0,0,0,15) |
||||
MauroXavier Guru ![]() Joined: 06/03/2016 Location: BrazilPosts: 303 |
I fixed all problems running again from FLASH. All these problems occur if use OPTION RAM. I had other strange problems using RAM on RC10. In some places of the current code of Wolf3D (published yesterday on GitHub) this line gives a "syntax error": BOX 0,0,MM.HRES,MM.VRES,0,,RGB(0,0,0,15) But in other places, exactly the same line is interpreted correctly. Edited 2020-07-25 03:53 by MauroXavier |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Likewise I am having problems with Z-MIM (EDIT: develop build, not Release 3) running from RAM which I'm fairly certain were not occurring with RC6. > option ram > chdir "zmim" > run "zmim.bas" [13] Error: Cannot find M > list "zmim.bas" ' Transpiled on 22-07-2020 12:43:48 ' Copyright (c) 2020 Thomas Hugo Williams ' ' Optimised CMM2 version of Z-MIM If Mm.Device$<>"Colour Maximite"Then Option Explicit On Option Default Integer EndIf Mode 1 Dim m(128*1024/8+16) Dim MAD=Peek(VarAddr m())+8 <---- This is Line 13 Dim fsz Dim bst ... And if I run Release 3 which begins almost identically: ' Autogenerated on 11-07-2020 21:20:58 If Mm.Device$<>"Colour Maximite"Then Option Explicit On Option Default Integer EndIf Mode 1 Dim m(128*1024/8+16) Dim MAD=Peek(VarAddr m())+8 Dim fsz Dim bst ... then I get a: [692] Error: Syntax instead ... and there is no Syntax error on that line: For i=1 To Len(s$) Most peculiar, Tom Edited 2020-07-25 04:09 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Not a wonderful way but you can use arrays as linked lists if you think about it (make each next pointer an index to another array element, with say -1 meaning the end). I'm sure they could add more data types & OO but it'll be slower - not attractive to those many using it for games etc. Threads would be harder and depend on the CPU really or else you start needing a scheduler etc and that'll add complexity & may well reduce speed for non-threaded code. Everything's a trade-off and what we have is pretty good, really. (Peter will now release the OO threaded version...) John |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Here is a short standalone example to reproduce the FLASH/RAM difference: > list "test2.bas" SEARCH_PATH$ = "/bin/" If LCase$(Mm.CmdLine$) = "reset" Or LCase$(Mm.CmdLine$) = "clear" Then Print "One" ElseIf LCase$(Mm.CmdLine$) = "list" Or s$ = SEARCH_PATH$ Then Print "Two" ElseIf Mm.CmdLine$ <> "" Then Print "Three" ElseIf Mm.Info$(Search Path) = "" Then Print "Four" ElseIf Mm.Info$(Search Path) = "/magic/" Then Print "Five" Else Print "Six" EndIf And here's an execution sequence: > option reset > option list CURRENT VGA mode 800x600 RGB332 CURRENT DISPLAY 50,100 OPTION USBKEYBOARD UK > run "test2.bas" Four > option reset > option ram > run "test2.bas" [12] Error: Expression syntax No doubt "test2.bas" includes some unnecessary krud, I just quickly chopped down something I was working on. Hope it helps, Tom Edited 2020-07-25 04:48 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
I'm not at home and not using my normal development environment. It appears something is different so I won't be able to fix this for the next two weeks. To prove this I've just rebuilt RC6 which worked properlyu and it now has the same problems as RC10. So no updates for the next 2 weeks. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Bug in the FIELD$ function. A space is required after the second quote character NO space: s$ = "foo, 'boo, zoo', doo" r$ = FIELD$(s$, 2, ",", "'") print r$ 'boo, zoo', doo > With space: s$ = "foo, 'boo, zoo' , doo" r$ = FIELD$(s$, 2, ",", "'") print r$ 'boo, zoo' > The example in the manual uses S1 instead of S$ so gives an error when run. Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Change the variable name SEARCH_PATH$ to SEARCH_PATH1$ then rerun. Then please explain WTF is going on ![]() Edited 2020-07-25 18:34 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
I'm away from the hardware but I assume it works if you change the variable name and that the question is rhetorical? If it weren't for the fact that you had it working previously but are now building with a slightly different build environment I would guess something fundamental is subtly broken in the lexer. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Womble![]() Senior Member ![]() Joined: 09/07/2020 Location: United KingdomPosts: 267 |
So no updates for the next 2 weeks. Peter, I hope you are on a well deserved holiday, somewhere nice, chilling with a beer ![]() Many thanks for your sterling work with the CMM2 firmware. I'm sure we all wish you well and eagerly await new updates once you have had a chance to recharge from the blistering pace the updates have been published. Best wishes Womble |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
V5.05.04RC11 http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Fixes buglet in FIELD$ function Change to configuration of memory controller for SDRAM used as program space (OPTION RAM). Tested with test2.bas, zmim (from github), wolfenstein (from github), my CSUB test program - all work as expected. This line executed from the command line in mode 3,12 using teraterm will always give an error as it is longer than the number of characters in a line on a 320x200 display. This is a red herring. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
... Change to configuration of memory controller for SDRAM used as program space (OPTION RAM). Tested with test2.bas, zmim (from github), wolfenstein (from github), my CSUB test program - all work as expected. Thanks Peter, I've run it against everything I've got and you seem to have squashed that bug. I sincerely hope you have a well paid day-job since we don't have any way to recompense you here except with endless praise (and some annoyance). Regards, Tom Edited 2020-07-25 22:38 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
BUG: dodgy characters in Mm.CmdLine$ when using EXECUTE Sorry Peter, but I'm not sure where we are now meant to be logging bugs with the latest RCs. At least it doesn't involve * or SEARCH PATH. > Colour Maximite 2 MMBasic Version 5.05.04RC11 Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > list "test.bas" Print Mm.CmdLine$ > > Run "test.bas", --all --all > > Execute "RUN " + Chr$(34) + "test.bas" + Chr$(34) + ", --all" ÀÀall Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Some synapses fired and I realised I brought up what might be equivalent before: http://www.thebackshed.com/forum/ViewTopic.php?TID=12250&PID=149543#149543 You said you "may have a way" and indeed I have been using -- for options in my command lines for a while now. Did this "way" only apply to a direct RUN from the command-line ? can it be made to apply to use of EXECUTE. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
thwill Please could you benchmark the attached using your zmim scripting and let me know lines per second on RC11 vs this version - thanks CMM2V5.05.04RC12.zip Thanks Re your question above. Can you put the parameters in quotes to avoid tokenising? |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Please could you benchmark the attached ... Hi Peter, I'm out with the family at the moment but will run a benchmark when I get back. Note I can only measure Z-Machine instructions per second, not lines of basic per second. I'll take a look at the command line options again. Really hoping for a generic mechanism where the client being called doesn't have limitations placed on its command line processing, but if it can't be done then it can't be done. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Hi Peter, I'm getting tired of congratulating you, you need to something badly ... but maybe not something I suggest ![]() Z-MIM r3 timings RC11: FLASH: 916.6 ZMIPS RAM: 914.7 ZMIPS RC12: FLASH: 1048.3 ZMIPS !!!! Woo hoo, broken the 1000 ZMIPS barrier RAM: 1034.3 ZMIPS I am noticing slight variation between runs, especially when using RAM. In the past (2 weeks ago) the timings used to be the same every time. Regards, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Hi Peter, Not without including special-case handling for the possibility that they were quoted, and that doesn't help if the program being called is not under my control. Note the problem also occurs with "/flag", i.e. the DOS variant, so none of the "standard" ways of passing command-line options will work when using EXECUTE with RUN. Unless this is fixable in the firmware I don't think there is a generic way of dealing with it and either: 1) the programs being called need to be able to handle their options being quoted. 2) or, the programs being called need to be able to decode the tokens they receive to reconstruct their command-line. 3) or, the caller and callee need to agree on an encoding standard (a variant of base64 or such like) that they will apply to command lines in order to get them past the tokenizer. Here's a potentially "clever" idea. Could you have the firmware automatically prefix the command line with the comment character and then remove it when it is written to Mm.CmdLine$ ? that would get it past the tokenizer, i.e. > Dim Q$=Chr$(34) > execute "run "+Q$+"test.bas"+Q$+", '--foo "+Q$+"hello"+Q$ test.bas, '--foo "hello" Can such a thing be implemented? Regards, Tom Edited 2020-07-27 02:37 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |