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 : PicoMiteVGA - change to edit, please test and comment
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9124 |
Prompted by Volhout I have modified the MMBasic editor to allow editing files to and from disk (similar to the CMM2). This hasn't been done on other versions of MMbasic, other than the CMM2, as there is no guarantee that any sort of disk is available. However the PicoMite always have at least the "A:" drive available so it now makes sense and avoids tokenising corrupting non-Basic files and the clunky workflow of loading non-Basic files as a program and then editing them and subsequently saving. Should make working with html files and sprites much easier. PicoMiteVGA.zip Use: edit fname$ to edit a disk file. This will be on the current disk unless the filename is fully specified. escape will work as before when editing a disk file either F1,and F2 will work as follows: A backup file will be created with the name fname$.bak on the same disk as the original file. The original file will be overwritten with the new data if no extension is specified the firmware will default to ".bas" NB: nothing will be done if the file has not changed. If colour coding is enabled this will be switched off when editing files other than .bas files Previously on the VGA version you were able to invoke the editor using EDIT 1 or EDIT 2 to define the mode in which the editing should happen. This functionality is removed and the firmware will automatically switch to mode 1 for editing. Comments and bug reports appreciated Edited 2023-09-18 00:52 by matherp |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
Hi Peter, When I edit a sprite that is completely okay with EDIT "gras.spr" And change the color of one pixel from (in this case green (8) to pink (F)) And save with F1, the file is usable as a sprite. That is good. It confused me however. When you open a basic program, and save with F1, the program is saved in program memory, but not on disk. When you open a text file, and save with F1, it is saved on disk. Probably per design, but I made the mistake to also save the text file with "save "xxx.spr" and that corrupts the file. Anyway, this works, but is a bit confusing. PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9124 |
EDIT works like it always has - reads program memory saves to program memory EDIT fname$ is new and reads a file, saves to a file simples |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Hi Peter I noticed the Webmite has been revved up to b18. Does this include the new edit fname$ functionality? I've tried edit "index.html" edit "A:/index.html" edit index.html but they all return Error : Unexpected text: "index.html" Hope this is just a small tweak and it'll work on the Webmite. Cheers Carl Retirement is tough on Hobbies without a day job |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9124 |
I just posted the VGA version as a test but try the attached on the Web version and if no issues I'll do a proper update WebMiteV5.07.08b18.zip |
||||
carlschneider Senior Member Joined: 04/08/2023 Location: South AfricaPosts: 158 |
Thanks Peter I can confirm that it operates as advertised with a few 'features' :) edit "index.html" opens without colour coding. F1 with no changes makes no changes. F1 with changes saves index.html and creates a file index.html.bak. edit "index.html. <-- no trailing " opens the file in the editor. edit 'index.html" <-- NB single opening quote, opens the program memory in the editor {accidentally found :)} edit "index.html/bak" opens a blank EDITor which won't F1 with Error : Entry is a dir {another typing accident} edit "index.html.bak" opens fine but not sure what happens when the ?63 character? path/filename limit is exceeded with the .bak? This will help with non bas file tweaks in the dev cycle. Many thanks Cheers Carl Retirement is tough on Hobbies without a day job |
||||
pwillard Senior Member Joined: 07/06/2022 Location: United StatesPosts: 292 |
So far, so good for me... a nice added feature. the .BAK creation is a nice addition as well. Edited 2023-09-19 00:36 by pwillard |
||||
Print this page |