![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 betas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3998 |
Can TIMER be used as a COMMAND? It can be used as a variable (timer = 0 etc) but I tried timer 0 and got Error: Syntax (using mmb4l) John |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
ACKn, There is a better way. I will use it. But why does the convoluted way not work ? Is there a hidden snag, I was not aware of, or is there a flaw in the implementation ? Volhout PicomiteVGA PETSCII ROBOTS |
||||
dddns Senior Member ![]() Joined: 20/09/2024 Location: GermanyPosts: 259 |
It does!Try Str$(timer,0,0) Edited 2025-03-03 20:42 by dddns |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 217 |
in V6.00.02b15 I encoutered the following symptom: if the following line is entered f_speed = (f_len_mm/time_diff)*(1e6/3600000)*f_scale the firmware changes i immediately to f_speed = (f_len_mm/time_diff)&(1e6/3600000)*f_scale no matter if entered dirctly or via MMedit upload. BUT if the * is followed by a trailing blank, the * persists. Regards, Gerald 73 de OE1HGA, Gerald |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
Sorry - playing with an idea - will back it out in the next beta. In the meantime use the space before the ( |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Oh.... I feel so stupid... Thanks. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Peter, v6.00.02b15 has a nasty bug (found on 2040 VGA version). This is probably the same as ville56 found. It converts a "*" into an "&" symbol. See below error message > RUN [620] sy=180+8&(part>5):pt=Part-6&(part>5) Error : Expression syntax 'line 620 contains this code: sy=180+8*(part>5):pt=Part-6*(part>5) I have loaded the program from SD card, tried uploading it again through USB (Xmodem). Result is the same. This is a program that ran fine on b14. Options did not change (VGA design 2). Keyboard = US. Volhout Edited 2025-03-05 19:07 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
I know. The workround is to put a space before the bracket - will be fixed in next beta |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 217 |
@Peter, SEEK seems to work not properly on drive A: Symptopm: On drive A: opening a file for RANDOM, SEEK to a position and PRINT a char does not extend the file to the expected size. The char is written at some (for me) arbitrary position. Could be just appended at EOF position. Can evaluate this further if you want me to. On drive B: with the same procedure, the file has the proper size and the char ist stored at the expected position. Environment: RP2350A, V6.00.02b15 Regards, Gerald 73 de OE1HGA, Gerald |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
That's not functionality I would expect to work on the B: drive so I'm surprised it does. The fact that is doesn't on the A: drive is a function of LittleFS internals so can't be changed. |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 217 |
Sorry Peter, but I don't understand why it should not work at all. IMHO the SEEK is necessary to position the read- or writepointer within a RANDOM file. Otherwise random files would be useless as one cannot freely position the pointer. So the sequence open for random, seek, read or write should work even with LittleFS. Or asked the other way round ... what sequence should work for random file access? Where is my misunderstanding, please? Maybe I don't see the wood for the trees ... 73 de OE1HGA, Gerald |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7503 |
SEEK is for positioning the pointer at a position in an existing file. The file should be there otherwise there is no entry in it to SEEK. The idea is to open the file in RANDOM, write your records in any order you like then use SEEK to position the pointer to records within the file. It may be that the problem is with the implementation for drive B:. SEEK returns the number for the next record. It wouldn't make sense to use it to extend the file past the last record. OPEN RANDOM is for that. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 217 |
That is exactly what I wanted to do, but I'm stumbling over the problem of writing records "in any order". So my idea was to use seek to position to where I want to write, even if it is past EOF. But how do I write other than sequentially without specifying a position within the file ? ... I'm stuck here .... Gerald 73 de OE1HGA, Gerald |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Gerald, I wouldn't like to comment on whether the existing behaviour is "correct" (perhaps it should ERROR if you SEEK beyond the end of a file), but given it "is what it is" you could check the current file size before writing and if you want to SEEK beyond that point then first pad it with zeroes (or whatever your empty record is). EDIT: Not that it helps you, but it looks like MMB4L works as you originally expected and fills in with NULLs until reaching the SEEK point. Tom Edited 2025-03-06 20:59 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
I'll look at it |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
V6.00.02b16 posted https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Fixes silly bug in parser when ( follows directly after * Allows seek to increase file size on the A: drive Workaround for bug in RP2350 ROM that changes the QSPI-PAD configuration when writing to flash - in English ![]() |
||||
electricat![]() Senior Member ![]() Joined: 30/11/2020 Location: LithuaniaPosts: 295 |
USB/HDMI/2350 beta11 (I know there is newer betas but I do not think it would change somehow problem I`ve got) I need advice. And do not think it deserves separate thread. I wrote some library sub, which name i call from command prompt (as so named users, or custom or new command) and all works good according to manual. SUB declares some global variables, and other (helper) subs (sits in library too) reads/modifies declared few global vars if needed. So sub does it`s job and exits. Under exit I could erase vars, but there is also posibility - user just ctrl+C before sub would finish, and then vars vill not be erased. If I would run sub first time - all good. If I would ctrl+C and exit sub and would call it again (without any prior RUN or EDIT command) it throws error "variable already declared" It seems to me I understand how things work, but if sub could be run from library multiple times withour RUN/EDIT in between (commands which would reset and clear vars) should`n entering multiple times SUB reset vars too ? I see some ways how to work around this, but still need advice how I could solve this problem, before making something unnecesarry complicated. My MMBasic 'sand box' |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Peter, could you confirm (or otherwise) that this includes support for the PiHut and Buffalo gamepads I sent you the configuration for ? If not, then no hurry, I just won't be installing this firmware yet. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
Yes |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Lovely, I'll try to find 10 minutes to test. Tom 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 |