Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 16:08 15 May 2024 Privacy Policy
Jump to

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 : Pico Board makers - give me your options

     Page 2 of 3    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 10:17am 19 Mar 2024
Copy link to clipboard 
Print this post

However it's implemented I like the idea. Especially when you are asking someone to type the OPTION AUDIO VS1053 string. :)

OPTION RESET [<board_name>] works well for me. It's elegant.

And yes, I should have included the following in my entries:
OPTION PLATFORM "PicoGAME4"
OPTION CPUSPEED 252000
Thanks for reminding me Tom. :)

I don't know about MODBUFF? I've not knowingly used it to date.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8601
Posted: 11:30am 19 Mar 2024
Copy link to clipboard 
Print this post

Tom

Please test the following

OPTION RESET gamemite

Note the lack of the *. It will be in the option platform but can't be used in the command as it gets tokenised

For fun I've set the touch calibration and am interested how good it is on another display


PicoMite.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3859
Posted: 11:54am 19 Mar 2024
Copy link to clipboard 
Print this post

I will try and test this evening Peter, a change in circumstances means that there is now a clearer distinction between my work and play ... posting on TBS excluded.

Best wishes,

Tom
Edited 2024-03-19 21:59 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2294
Posted: 12:31pm 19 Mar 2024
Copy link to clipboard 
Print this post

  matherp said  God, you try and make things easier and people wade in trying to make fundamental changes

Let me explain how options work: When you set an option it writes the value to an area of flash memory and then reboots. The first thing the firmware does on startup is to read that area of memory to configure itself. This sets things like clocks and pin usage. Without a significant re-write, which isn't going to happen, it isn't possible to read in options in whatever format from the A: drive as part of the bootup sequence. I re-iterate, OPTIONS ARE SET BEFORE TRIGGERING A REBOOT. ...


it would actually be super easy to implement, barely an inconvenience.

just follow these simple instructions. keep everything exactly as it currently is, but just before displaying the signon message ("PicoMiteVGA MMBasic Version 5.08.00 [...]") do the following:

1. read in the A:OPTIONS.CFG file,

2. parse the file and calculate what the configuration memory should contain,

3. compare the calculated configuration bytes to the actual (in flash) configuration bytes,

4. if any differences are found, rewrite the configuration bytes in flash with the just calculated valued and reboot.


added points for:

A. ensuring that the file A:OPTIONS.CFG can not be accidentally deleted, perhaps even only allowing it to be edited with the built-in editor,

B. early on in the bootup sequence configuring GPIO25 as an input with a weak pulldown, then reading back the pin's state - if it reads as HIGH then use a default set of options rather than those held in flash; this (may) allow a 470 ohm resistor pulling TP5 high to be used as a signal to bypass a dud set of options without needing to reload the firmware.


cheers,
rob   :-)
Edited 2024-03-19 22:43 by robert.rozee
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 01:23pm 19 Mar 2024
Copy link to clipboard 
Print this post

That might fall over as at boot up there is no OS to read A:. There may be no way to read it before the sign-on message as reading A: is a function of MMBasic, which has to be running...

Even if you can, the system will have to reboot if there are *any* changes to the file so that the new option(s) can be used.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2294
Posted: 02:29pm 19 Mar 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  [...] Even if you can, the system will have to reboot if there are *any* changes to the file so that the new option(s) can be used.


well, that would be the whole point of the exercise!
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 02:38pm 19 Mar 2024
Copy link to clipboard 
Print this post

But, as Peter said, you run the risk of continual uncontrolled reboots in the event of a misconfigured or corrupted file.

Aside from any programming difficulties, the existing system works well. This latest idea gives a useful addition to it without changing the whole boot concept. Sometimes the KISS principal is the best idea.

.
Edited 2024-03-20 00:42 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3573
Posted: 03:19pm 19 Mar 2024
Copy link to clipboard 
Print this post

Peter,

The more I think about it, the more I see complications everywhere.
Maybe it is best to drop the idea. Leave it as is.

Volhout
PicomiteVGA PETSCII ROBOTS
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2294
Posted: 03:31pm 19 Mar 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  [...] you run the risk of continual uncontrolled reboots in the event of a misconfigured or corrupted file.

Aside from any programming difficulties, the existing system works well [...]


you already run exactly the same risks if an incorrect OPTION line is entered, so do not end up any worse off. at least with the picomite (of any variant) you can just enter the bootloader with a single button press and drop a clean .uf2 file onto it.

as for the existing system, across all the picomite variations we seem to have accumulated dozens of options, some of which can not even be entered on a standard 80-column screen. it is currently, on all accounts, quite the quagmire.


cheers,
rob   :-)
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 03:38pm 19 Mar 2024
Copy link to clipboard 
Print this post

IMHO it depends on how it works. For me the ideal would be:
enter OPTION RESET picogame4

That automatically fills in all the default options for that board, but the OPTION RESET line doesn't appear - it works like a command rather than an OPTION. It would be nice if there was an automatic OPTION LIST to show how things had been configured. You are then free to change any options that are listed by OPTION LIST as usual. I suspect this is the sort of thing Peter has in mind.

The worst way would be to replace the system with a simple OPTION BOARD picogame4. That would be confusing and awkward.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8601
Posted: 04:03pm 19 Mar 2024
Copy link to clipboard 
Print this post

  Quote  For me the ideal would be:
enter OPTION RESET picogame4


That's exactly how it will work

  Quote  It would be nice if there was an automatic OPTION LIST to show how things had been configured.


That's always been there

  Quote  You are then free to change any options that are listed by OPTION LIST as usual.


Exactly so

Mick: I think your original backpack is worth supporting - can you suggest a name for it?
Edited 2024-03-20 02:06 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 04:51pm 19 Mar 2024
Copy link to clipboard 
Print this post

PMBackpack?

It never really had a name as such.
I've got a version 2.1 in the pipeline but it's virtually identical - just an improved layout.

OPTION SYSTEM SPI GP18, GP19, GP16
OPTION LCDPANEL ILI9341, L, GP20, GP21, GP17
OPTION TOUCH GP14, GP15
OPTION SDCARD GP22
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3859
Posted: 07:03pm 19 Mar 2024
Copy link to clipboard 
Print this post

  matherp said  Tom

Please test the following

OPTION RESET gamemite


Seems to work, although OPTION COLOURCODE ON is also present.

  matherp said  Note the lack of the *. It will be in the option platform but can't be used in the command as it gets tokenised.


If (once you've pushed to GitHub) I hack handling the asterisk in "Game*Mite" as a special case will you accept that into the mainline ?

  matherp said  For fun I've set the touch calibration and am interested how good it is on another display


Out by ~2mm on my 3.2" display and also perhaps more than the usual number of false positives (random dots with GUI TEST TOUCH) but that may well be the display. Touch on my 2.8" seems to be completely fritzed. Note whilst the Game*Mite is wired for touch I haven't made any use of it.

  matherp said  
  Mixtel90 said  It would be nice if there was an automatic OPTION LIST to show how things had been configured.


That's always been there


Correct me if I'm wrong but I think you may have misunderstood Mick's suggestion that after an OPTION RESET [board] the firmware should automatically do an OPTION LIST ... but that may well not be possible given the PicoMite has to reboot for the options to take effect ... and if you are not using TeraTerm you lose connection at that point.

Best wishes,

Tom
Edited 2024-03-20 05:13 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8601
Posted: 08:55am 20 Mar 2024
Copy link to clipboard 
Print this post

  Quote  Seems to work, although OPTION COLOURCODE ON is also present.


I always set that - do you really want me to remove it?

  Quote  If (once you've pushed to GitHub) I hack handling the asterisk in "Game*Mite" as a special case will you accept that into the mainline ?


I can do it if you want - simple hack in tokenize

  Quote  Correct me if I'm wrong but I think you may have misunderstood Mick's suggestion that after an OPTION RESET [board] the firmware should automatically do an OPTION LIST


No problem - I can just print the options before the reset
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 09:12am 20 Mar 2024
Copy link to clipboard 
Print this post

Just the list would be fine, Peter. And please don't let Tom talk you out of OPTION COLOURCODE ON. I always set it too. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3859
Posted: 09:50am 20 Mar 2024
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Seems to work, although OPTION COLOURCODE ON is also present.


I always set that - do you really want me to remove it?


No, it was just an observation. I don't have it myself since I rarely develop on the PicoMite itself, only if I encounter a bug that needs investigating.

  matherp said  
  Quote  If (once you've pushed to GitHub) I hack handling the asterisk in "Game*Mite" as a special case will you accept that into the mainline ?


I can do it if you want - simple hack in tokenize


Thanks, appearances to the contrary I don't try to create work for you. I personally wouldn't hack tokenize as that has more potential for undesirable side-effects. I was going to handle the * token as a special case in cmd_option() closer to the crime.

Best wishes,

Tom
Edited 2024-03-20 19:50 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8601
Posted: 06:34pm 23 Mar 2024
Copy link to clipboard 
Print this post

Mick

Can you point me at the details of the board you call "VGA BASIC"
Are the designs on Geoff's site in the VGA construction pack defunct?
In the PicoGame 4 you seem to be using SPI2 pins for the SDcard but in the wrong order - is this correct?

Thanks
Edited 2024-03-24 05:19 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 08:20pm 23 Mar 2024
Copy link to clipboard 
Print this post

The basic is in this thread. Link is to the Version 2 info.
https://www.thebackshed.com/forum/ViewTopic.php?TID=16390&P=2#214293
It was originally a specific design to run Petscii Robots, requested by Volhout to send out as a demo board. It's a nice little board though IMHO.

I don't think my design on Geoff's site is up to date.

The PicoGAME 4 SD card connections are an accident. :)  I suppose I *could* sort them out and get them correct, but that wasn't the original intention. :)

-----------------------------

EDIT:
Yes, I can tidy the SD card up on SPI2. It's now on
OPTION SDCARD GP27, GP14, GP15, GP28
on version 1.02 of the board.
I tend to just put the SD card on any convenient pins. That's how it ended up where it did.
Edited 2024-03-24 07:15 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5760
Posted: 09:50am 24 Mar 2024
Copy link to clipboard 
Print this post

Please can I add one more, Peter?

Sweetie-Pi-coMite VGA

It's a 50mm x 50mm board with WII connector, no USB.
https://www.thebackshed.com/forum/ViewTopic.php?TID=16614&P=1#215911

OPTION RESET SweetiePi

OPTION PLATFORM "SWEETIEPI"
OPTION CPUSPEED 252000
OPTION PICO OFF
OPTION SYSTEM I2C GP0, GP1
OPTION SDCARD GP29, GP3, GP4, GP2
OPTION AUDIO SPI GP5, GP6, GP7
OPTION VGA PINS GP14, GP10

Thanks. :)
.
Edited 2024-03-24 19:55 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8601
Posted: 10:32am 24 Mar 2024
Copy link to clipboard 
Print this post

Mick

Please see the new release thread and provide photos of the various boards so I can configure them in the firmware and attach the pictures
 
     Page 2 of 3    
Print this page
© JAQ Software 2024