![]() |
Forum Index : Microcontroller and PC projects : MMBasic for Windows - alphas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
After grain.bas has finished, after "open with" the graphics console restarts (unable to read result) Michal Edited 2022-02-22 02:51 by Michal |
||||
KD5ZXG Regular Member ![]() Joined: 21/01/2022 Location: United StatesPosts: 53 |
I launch COLORDEMO2.BAS and use CTRL-C to break, then type >EDIT Last version that was working: 2022-02-20_050054_MMBasic.zip Two versions released after have broken console that shows only > and the cursor _. The cursor moves, but no character is displayed. Does not respond to LIST or EDIT. I roll back to any older version, this problem does not yet exist. |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Thank you ![]() Even the open source is Great!! What about MAP commands? Plasma |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Not relevant when everything is RGB888 |
||||
MauroXavier Guru ![]() Joined: 06/03/2016 Location: BrazilPosts: 303 |
Well... Now some of my games will need to detect this MMBasic Windows version and get some advantages about it ;) Thanks a lot, matherp! |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
Font 7 - is a 6x8 font. On the CMM2 mm.info(fontheight) reports the correct 8 but uses a line spacing of 10 so the printout is more readable. MMB4W uses 8 for font height and line spacing. Does this need to be changed for compatibility or not? |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1111 |
I've done something wrong but I can't figure out what!! Under a5, if I do the following > load "junk1.bas" > list ' comment print "abc" do ' comment ' comment ' comment loop end > save "junk4.bas" > list ' comment print "abc" do ' comment ' comment ' comment loop end > load "junk4.bas" > list Print "abc"'|2 Do '|3 Loop '|7 End '|8 junk1.bas is 74 bytes long and is correct when viewed with Notepad, junk4.bas is 43 bytes long and appears in the strange debug style when viewed with Notepad. The same action occurs for any file I load then save. It appears that the SAVE commands is somehow saving the file in some sort of debug mode/format? Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2415 |
Yes got similar result. Comments and blank lines have been removed. The "'|number" at the end of each line seems to be the original line number before removal. Edit. When loaded the modified file works normally. Edited 2022-02-22 16:59 by phil99 |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
Looks like the file resulting from the pre-processing CMM2 does to speed up a program when run.... and is the reason CMM2 does not have a save command and uses F1 or F2 instead. Looks like MMB4W is saving this post processed file and not the original text file. Edited 2022-02-22 17:42 by Goksteroo |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Correct. I forgot to remove the SAVE command as everything now works from disk and it is no longer needed - same as the CMM2. Major update coming where I will fix this and include a rework of all the file handling |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
V5.07.03a6 MMBasic.zip This reworks all the file handling to properly "Canonicalize" all filenames (look it up ![]() SAVE command is removed as SAVE is automatic on exit from the editor or autosave Re the comments about text disappearing: This one is difficult. In the last release I followed the CMM2 which is to reset the mode and font to the default at the end of running a program and after an error. This is because with the COLOUR, FONT and PAGE commands it is possible to be in a situation where text is not visible (e.g. being written to a non-displayed page) In this version I don't change the mode but set the font to the default for that mode and reset the colours to white on black. There is no right answer on this one so see how you go. Tom: up to you now for SAAINT. Let me know if there are any MM.INFO functions I am missing that are in the CMM2 |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Here we go then: 1. LS as an alias of FILES is not supported, is this intentional? I don't object since it was an anacronysm on the CMM2. I might even remove it from MMB4L since I'm intending to allow access to all the Linux console commands simply by prefixing them with a ! 2. It's a damn nuisance when it comes to bug reporting that I can't copy from the MMB4W console. 3. OPTION DEFAULT PATH error handling would benefit from improvement: ![]() 4. OPTION LIST uses an exciting mixture of cases ![]() ![]() 5. Are you going to provide compatibility with the CSUB structure being (mis)used to include binary blobs in MMBasic files? If not then is there an alternative other than DATA statements ... I seem to recall something about misusing fonts ? 6. MM.CMDLINE$ is not supported !!! That's me out again ![]() Best wishes, Tom Edited 2022-02-22 20:08 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Could you (temporarily?) provide a flag/option to duplicate all console *output* into the "DOS Window" so I can copy error messages out of there ? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
Pressing F1 or typing 'FILES' on the initial screen prints the list of files in my default font, but changes to Font 3 once list is done. edit: Also changes to font 3 when an error is produced. eg. funt 4 Personally I'd like to return to my default mode and font... but in Black/White - either way it's no biggy and I'm sure I can can handle exits/errors in basic to do the same thing. Edited 2022-02-22 20:29 by Goksteroo |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
Yes. I don't currently intend to include the CMM2 "FILES" command as it seems unnecessary on an operating based system but I'm open to thoughts Done Given no significant limitation on program memory I think using DATA/READ is the correct "Basic" approach so don't intend to include CSUB. You can't use a font because I'm not allowing peek/poke access other than to HEAP, VARIABLES and PROGRAM space. You can use LOAD DATA to load a data file direct into an array I'll look at it I'll set all errors to duplicate on the console window permanently - no downside I can see Edited 2022-02-22 20:31 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Fine by me, I always thought it should have been FILES & FILEMAN (or FM) rather than LS & FILES. Given no significant limitation on program memory I think using DATA/READ is the correct "Basic" approach so don't intend to include CSUB. You can't use a font because I'm not allowing peek/poke access other than to HEAP, VARIABLES and PROGRAM space. You can use LOAD DATA to load a data file direct into an array As we've discussed previously the DATA/READ approach has a major downside for using libraries (.INC files) in BASIC. To be safe it requires both the library and client code to label all DATA and use RESTORE <label> religiously. Otherwise there is a distinct danger of the client code reading the wrong data from the global "data pointer" ... just changing the order of #INCLUDE statements can change the behaviour. I don't suppose you'd consider adding some sort of BINARY or BLOB language structure deliberately for this use-case and then I'll do the same for MMB4L ? I'll set all errors to duplicate on the console window permanently - no downside I can see For the purposes of reporting errors to you it would be nice to have more context than just the error message. Think back to the format I used for all the CMM2 error reports where I could just do a LIST followed by a RUN and send you the console output. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
On reflection is that going too far "off piste" ? Could we instead have LOAD DATA added to the PicoMite and the command syntax on both platforms enhanced to include optional arguments for the byte in the file to start reading from and the number of bytes to read. EDIT: Meh, still a problem, a .INC file doesn't know where it is located so it can't really make use of LOAD DATA in a general fashion. Really do need to have capacity to embed data in the file itself which probably means DATA statements despite their problems ... sorry for the stream of consciousness. Best wishes, Tom Edited 2022-02-22 21:13 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3998 |
Are CSUBs supported? If not, why not? If they are, then it seems BINARY (BLOBS) should just work (with a bit of user effort to figure out how to get a PEEKable address) - right? John |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Nope. I'm not sure that MMBasic style embedded CSUBs make sense. MMB4{W|L} should probably have something completely different so they can dynamically load and call .dll/.so with C API. Peter has restricted what can be PEEKed "to HEAP, VARIABLES and PROGRAM space". For the moment I've implemented CSUBs in MMB4L just sufficient that I can use them as blobs. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3998 |
Dynamically using DLLs would be useful but I was just thinking of the ability to call C (or other language if anyone can be bothered to add whatever stuff it might require). With that would come BLOBs I think. C could bypass the restrictions, if that's required. I suspect minimal CSUB support would be easy; the DLL stuff rather harder. John |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |