I want to change my PicoCalc default drive from A: to B: on startup. I found these directions on the internet (Google). I’d like to run these by you so that I don’t mess up my PicoCalc:
1. Create a new basic file (e.g., onboot.bas). I’ll turn my PicoCalc on and it will boot up with A: being the current drive. I’ll then type “edit” at the command prompt. In the editor I will type “B:” on the first line. Then I will hit the F1 key. That will take me to the command prompt again. I will then Type ‘ Save “A:onboot.bas” ‘
2. That should bring me back to the command prompt. There I type “ flash save 1 “ . (I have already used “ flash list “ and know that all three slots are currently empty.)
3. That should bring me back to the command prompt. Now I type and enter “ option autorun 1 “
4. I’m guessing that will put me be back at the command prompt again.
5. Is that it? Am I missing anything?
BTW, I am running picomite_Pico_v6.00.03 with MMBasic RP2040 Edition V6.00.03 If that makes any difference. Another question - When I start up, the screen flashes and puts that information up at the top of the screen. If I enter B: nothing happens. That is, if I do a “ Files ” at this point I still get a list of what is on A: drive. I have to do B: after I do the “ Files “ to get the computer to make the B: drive the default drive. Is that normal?
But there is a simple method to implement a drive change on reboot.
Enter the following commands:
NEW <ENTER>
EDIT <ENTER>
DRIVE "B:" <ENTER>
F1
FLASH OVERWRITE 1 <ENTER> // = SAVE if 1 is empty
OPTION AUTORUN 1 <ENTER>
On page 37 of the Ver 6.00.03 user manual for the Raspberry Pi Pico it is says: The default drive can be set with the DRIVE command and then the drive prefix is not needed.
Please note that the banner message will not be shown if autorun is active.
If you’re not using the library slot for anything else, you can set the drive in MM.STARTUP. See the manual for details. I have this in my startup:
OPTION CONSOLE NONE
ON ERROR SKIP 2
CONST TRUE=-1
CONST FALSE=0
OPTION CONSOLE SCREEN
SUB MM.STARTUP
DRIVE B:
END SUB
SUB MM.END
PRINT:PRINT:PRINT "END PROGRAM":PRINT
OPTION CONSOLE SCREEN
END SUB
SUB LLIST(fname$)
OPTION SERIAL
IF fname$="" THEN
LIST all
ELSE
LIST all fname$
END IF
PRINT :PRINT :PRINT :PRINT :PRINT
PRINT :PRINT
OPTION CONSOLE SCREEN
END SUB
This makes B: the default drive and adds three new keywords, TRUE, FALSE, and LLIST. TRUE and FALSE are used in many programs and I have a serial printer (thermal receipt printer) on COM1: so LLIST lists a program to it so I can work with hardcopy.
Thank you, Ernst. I tried your method but my PicoCalc is still booting up with the A: drive being the default. I don’t understand what you meant here:
FLASH OVERWRITE 1 // = SAVE if 1 is empty
I first tried: FLASH SAVE 1 (1 was empty)
I then tried FLASH OVERWRITE 1 (That didn’t work either)
NEW <ENTER>
EDIT <ENTER>
DRIVE "B:" <ENTER>
F1
FLASH OVERWRITE 1 <ENTER> // = SAVE if 1 is empty
OPTION AUTORUN 1 <ENTER>
The NEW command clears the program memory.
The EDIT command starts the editor for you to enter lines into program memory
The DRIVE “B:” line is placed in program memory
FLASH SAVE 1 saves program memory in to flash slot 1,
FLASH OVERWRITE 1 saves program memory into flash slot 1 if the slot is not empty. This can also be used if slot 1 is empty.
OPTION AUTORUN 1 will cause the code in flash slot 1 on reboot.
I have tested this with PicoMite_PICO_V6.00.03_PicoCalc.uf2.
Please note the following: I have found a problem with some Pico (RP2040) boards showing an error “Invalid Address - Resetting” shortly after reboot. With these boards the option autorun may automatically be deleted and the above may not be successful. If you have one of these boards I suggest you get a Pico2 board.
Thanks Ernst. I must have one of the “bad” boards. I’ve tried and tried and just can not make it work. Before I try Tom’s method I would like to clean out my slot 1 on A:drive. Can you or anybody here tell me how to delete the “DRIVE B:” from slot 1? Thanks - Jim
Oh, and also, Tom - Is this what I should type in on the screen”?
SUB MM.STARTUP
DRIVE B:
END SUB
Thank you! - Jim
P.S. Where is this subroutine saved? I can’t find “MM.STARTUP” anywere. Which manual am I missing? OH, I just Google it. It’s, a special subroutine. So do I save the subroutine in Slot 1? OH, wait a minute - I just re-read your first post and I see that this is saved in a slot (slao 1). I’m going to do this now and will get back to you! ********** YEA! This worked!!! Thank you both. Tom, had to put yours in only twice. The ‘ DRIVE B: ‘ line had to be changed to ‘ DRIVE “B:”
This might have taken me most of the day to get it running, but in a short haul it will save me a lot of time. Thank you both again! - Jim
After FLASH ERASE 1, you go into the editor, type your subroutine(s) and press F1 (save) then save your program on drive B:
SAVE “B:myoptions”
myoptions is just a suggestion. You can call it anything you like.
Now type LIBRARY SAVE and the text in the editor will be put into the library. It will disappear from the editor which is why you save it to drive B: first.
TOM - It work one time and then it booted up with A: again. I then put it in again and used the LIBRARY SAVE command and this seems to have done it! I’ve tested it three times and all three time booted up in B: drive! Thank you so very much. What a great Forum!!! - Jim