Author Archives: Allen Huffman

About Allen Huffman

Co-founder of Sub-Etha Software.

Blog stats for January 2025

I am trying something new, when I remember to do it. Unfortunately, copying and pasting from the stats dashboard seems to make links that have no URL attached to them. Annoying. So for now, just the titles.

Top Posts & Pages:

  1. Using the DJI MIC 2 or Mic Mini with the iPhone native camera app
  2. DJI Neo error downloading videos to phone
  3. Splitting a 16-bit value to two 8-bit values in C
  4. Insta360 X3 and X4 file transfer comparisons
  5. Nested ternary operators in C
  6. Wire up your own RS-232 WiFi modem for under $10 using ESP8266 and Zimodem firmware.
  7. Wokwi online Arduino/ESP32 simulator
  8. C warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  9. Insta360 ONE X2 photo and video modes and filenames

I guess I need to post more CoCo articles and see if I can get those back in the Top 9.

Top Referrers:

  1. Reddit – mostly from posts in the Insta360 camera group, I believe.
  2. Facebook
  3. WordPress Android App
  4. ecosia.org – “The Greenest Search Engine on the Planet”
  5. vogons.org – a Hitchhiker’s Guide reference! Mostly about my WiFi modem experiments with the ZiModem firmware.
  6. youtube.com
  7. Hacker News
  8. ccsinfo.com – they sell the PIC24 compiler I use at work. I have this blog in my signature.
  9. cse2.chickenkiller.com

I was curious about #9:

chickenkiller.com is being shared via Free DNS, a dynamic DNS domain sharing project where members can setup, and administrate their dns entries on their own remote internet connected systems in real time.

– chickenkiller.com

Top Countries:

  1. United States
  2. Canada
  3. United Kingdom
  4. India
  5. Australia
  6. Germany
  7. New Zealand
  8. France
  9. China
  10. Russia

Old C dog, new C tricks part 1: NULL != ptr

See Also: part 1, part 2, part 3, part 4 and part 5.

Updates:

  • 2025-02-19 – “new information has come to light!”

As someone who learned C back in the late 1980s, I am constantly surprised by all the “new” things I learn about this language. Back then, it was a K&R-era compiler, so there were no prototypes, and functions looked like this:

main(argc,argv)
int argc;          /* argc = # of arguments on command line */
char *argv[];      /* argv[1-?] = argurments */
{
    ...stuf...
} 

…and this…

MallocError(wpath)
int wpath;
{
   ShutDown(wpath);
   fputs("\nFATAL ERROR:  Towel was unable to allocate necessary memory to process\n",stderr);
   fputs(  "              this directory.\n",stderr);
   sleep(0);
   exit(0);
}

Today’s article is not about how old I am, but about something I just started doing, and wish I had done long ago.

Yoda would be happy…

When I learned to program BASIC, I learned how to compare a variable:

IF A=42 THEN PRINT "DON'T PANIC!"

When I learned C, the thing I had to get used to was double equals “==” for compare and single equal “=” for assignment:

int a = 42;

if (a == 42)
{
    printf ("Don't Panic!\n");
}

This, of course, leads to a common mistake that I have stumbled on many, many times over the past decades: Sometimes a programmer misses one of those equals:

if (a = 42)
{
    printf ("Don't Panic!\n");
}

This will cause the code to always enter that section and run it, regardless of what you think “a” is set to. Why? Because it is basically saying “if a can be set to 42, then…”


Or does it?

Normally, I wait for a follow up to discuss corrections and additional details I learn from the comments, but this one deserves an immediate revision. Aidan Hall left this tidbit:

It’s even worse than what you suggest! Assignment expressions evaluate to the value that was assigned (on the RHS), so this if block wouldn’t run:

if (a = 0) {
puts(“zeroed”);
}

– Aidan Hall

I had mistakenly thought it was testing the result of “can a be assigned” and assuming this would always be true. I did not realize it was the value of the assignment that was used. Wowza. Thanks, Aidan! And now back to the original content…


By leaving out that second equal, it now becomes an assignment. It might as well be saying:

if (1)
{
    a = 42;
    printf ("Don't Panic!\n");
}

I have caught this type of thing in code I have worked on at several jobs. And, I’ve caught it in code I wrote as well. Even recently…

But Yoda would be proud. Smarter programmers already figured out that you can write those comparisons backwards, like this:

if (42 == a)
{
    printf ("Don't Panic!\n");
}

The first time I ever saw that was at a former job, and it was code from a team over in India. I thought this was very odd, and wondered if it was some odd convention in that country, similar to how in America we would write “$5” for five dollars, but in Europe it might be “5 €” for five Euros.

Honestly, as backwards as that looks to me, phonetically it makes more sense when you read it ;-)

And don’t get me started on America’s Month/Day/Year and how confusing OS-9’s “backwards” time of Year/Month/Day was… but I quickly adopted that, since you can sort dates that way, but not in the “normal” way.

But I digress…

By reversing these comparisons, you now eliminate the possibility of forgetting an equal. This won’t give an error (but a good compiler might give a warning):

if (a = 42)

…but this cannot be compiled:

if (42 = a)

When I started working on some new code this past weekend, I just decided to start doing things that way. It quickly becomes second nature:

if (NULL != ptr)
{
}

if (false == status)
{
}

But it still looks weird.

Now to fire up that old 1980s compiler and see if that was even possible back then…

Until next time…

MAZE.BAS for the CoCo

While looking for something completely unrelated, I ended up going through some of my old BBS disks. In addition to my *ALLRAM* tape-based BBS, I worked on several other BBSes that were never completed.

One one of those disks was something called MAZE.BAS. But why would a maze game be on a BBS disk?

Running it showed me this…

The player “P” can move around the maze while the enemy “*” tries to get to you. It uses “A-S” for left and right, and “W-Z” for up and down.

Ah, now I remember. I had learned about VIDTEXT/VIDEOTEXT/whatever having control codes to move the cursor around the screen, so I was going to write a maze game to run online in the BBS. If you had a compatible terminal program, you could play an actual “action” game rather than just some text adventure or simulation.

The numbers at the bottom were diagnostics messages. X/Y and movement direction for Up/Down and Left/Right.

Interesting.

Here is the listing…

0 'PALETTE12,63:PALETTE13,0
9 CLS
10 PRINT" #####
11 PRINT" ########## ##########
12 PRINT" # # #
13 PRINT" ### ###### ####### ###### ###
14 PRINT" # # # #
15 PRINT" # ### ################# ### #
16 PRINT" # # # #
17 PRINT" ####### #### #### #######
18 PRINT" # #
19 PRINT" # ###### # # ###### #
20 PRINT" # # ### # #
21 PRINT" # #### #### #
22 PRINT" ### ####### ###
23 PRINT" #### ####
24 PRINT" ###########
25 MX=15:MY=1:PX=15:PY=13
30 POKE1024+(PY*32+PX),80:POKE1024+(MY*32+MX),96
31 PRINT@512-32,PX;PY;XP;YP,MX;MY;X;Y;
35 X=SGN(PX-MX):Y=SGN(PY-MY):Z=(1024+(MY*32+MX))
36 IFPEEK(Z+(Y*32))=96 THENMY=MY+Y ELSEIFPEEK(Z+Y*32+X)=96 THENMX=MX+X:GOTO39
37 IFPEEK(Z+X)=96 THENMX=MX+X:GOTO39
39 POKE1024+(MY*32+MX),42
40 A$=INKEY$:IFA$=""THEN55
45 IFA$="W"THENYP=-1:XP=0 ELSEIFA$="Z"THENYP=+1:XP=0
50 IFA$="A"THENXP=-1:YP=0 ELSEIFA$="S"THENXP=+1:YP=0
55 IFPEEK(1024+(PY*32+PX)+(32*YP)+XP)=96 THENPOKE(1024+PY*32+PX),96:PX=PX+XP:PY=PY+YP
60 GOTO30
999 GOTO999

Using what I know about BASIC today, I would tackle this in quite a different manner.

Maybe I will, as a benchmark exercise.

Until then…

Our magazine ads, before they were typeset…

While going through some random disk images, I found some text files that seem to be the Sub-Etha Software ads, before we took them to the printshop to have them typeset by a professional.

First, this looks like the first ad we planned to run in Rainbow magazine, before we got a deal to do a quarter page inside. Note the company name was going to be Forty-Two Technology and the phone # listed was before I had a dedicated line.

Multi-Basic-- Ever wonder why, with 128K or 512K, you cannot use even 32K under RS-Dos?  Well now there's MultiBasic, making possible, without adding ANY commands, the use of ALL of your CoCo3's memory by basic.  Have several programs loaded in memory at once, able to call subroutines from each other, move between each other, even load other programs from disk, all without variable loss or interruption of program flow.

Shadow BBS-- Finally, a CoCo3 RS-Dos BBS with power, speed, and flair. Uses RS232 Pak or serial port. Features include full ANSI, X/Y Modem, 28 line 40/80 column support, 240 byte onscreen status window, software clock, up to 255 independently numbered message areas, borderlines, one-liner discussions, surveys, auto-messages, doors to external programs, user profiles, full sysop utilities, much, much more! See for yourself, call ShadowBBS HQ at (409)63-REALM. Order thru BBS or thru: Forty-Two Technology, PO Box 4242, Lufkin, TX 75901. (409)637-7604.

Next up is the prototype for the ad we did run, featuring MultiBASIC and SHADOW BBS by Terry Todd. We didn’t have a dedicated phone number yet, so the 632-4200 was just a made up one for the mockup.

 _____________________________________________________________
| |
| |
| |
| |
| |
| |
| MULTIBASIC - Use all 128K/512K of your CoCo 3 without |
| learning ANY new commands! Have several programs loaded |
| at once sharing subroutines and variables! Load programs |
| without losing variables, and more! INTRO. PRICE: $24.95 |
| |
| SHADOW BBS - An RS-Dos BBS with Power, Speed, and Flair! |
| ANSI, X/Y Modem, Clock, Surveys, AutoMessage, Up to 255 |
| Msg Areas, User Profiles, Doors, Borderlines, Full SysOp |
| Utilities, and Much, Much More! Runs on 128K CoCo 3 with |
| Disk Drive(s), Serial Port OR RS232 pak! Call and see |
| for yourself! (409) 63-REALM INTRO. PRICE: $34.95 |
| |
| Sub-Etha Software Call or write for information! |
| P.O. Box 152442 Add $2.00 S&H and $3.00 C.O.D. |
| Lufkin, TX 75901 Texas residents add 8.25% tax. |
| (409) 632-4200 "Don't Panic!" |
|___________________________________________________________|

Next, another prototype… Much closer to what ended up being typeset and published – and even has the real phone number. These blank spots at the top where were the logo was going to go. I did these ASCII ones to show them exactly what we wanted.

 _____________________________________________________________
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Ever wonder why, with a 128K or 512K CoCo 3 you cannot |
| even use 32K under RS-Dos? Well, now there's MultiBasic, |
| making possible without adding ANY commands the use of |
| your CoCo 3's "hidden" memory by Basic. Have several |
| programs loaded in memory at once able to call |
| subroutines from each other. Move between programs and |
| load other programs from disk without variable loss or |
| interruption of program flow. A "must-have" utility for |
| Basic programmers! |
| |
| INTRODUCTORY PRICE ............................... $24.95 |
| |
| |
| /) Shadow BBS (\ |
| Complete RS-Dos BBS with Low Hardware Requirements! |
| |
| Finally, an RS-Dos CoCo 3 BBS with power, speed, and |
| flair! Uses RS232 Pak OR serial port! Features include |
| ANSI, X/Y Modem file transfers, 28 line 40/80 column |
| support, 240 byte on-screen status window, software |
| clock, up to 255 independently numbered message areas, |
| borderlines, one-liner discussions, surveys, automessage, |
| doors to external programs, user profiles, full SysOp |
| utilities, and much, much more! And unlike most BBSs |
| you've seen, no hard drive, RS232 Pak, or memory upgrade |
| is required! Shadow BBS will run on a 128K CoCo 3 with |
| one disk drive and a modem, yet it is capable of taking |
| advantage of all the hardware your system includes. A |
| full appreciation of Shadow BBS comes not, however, from |
| it's many features or it's low hardware requirements, but |
| from the flair and smoothness of the program itself. We |
| want you to see what this incredible BBS can do. Call |
| The Shadow's Realm, the official Shadow BBS HQ system, at |
| (409) 63-REALM (300/1200 Baud, 24 Hrs.) and see for |
| yourself! |
| |
| INTRODUCTORY PRICE ............................... $34.95 |
| |
| |
| Sub-Etha Software Call or Write for Information! |
| P.O. Box 142442 Add $2.00 S&H and $2.50 C.O.D. |
| Lufkin, Texas 75915 Texas residents add 8.25% tax. |
| (409) 639-ETHA [3842] "Don't Panic!" |
|___________________________________________________________|

And this one, AD4.txt, is another variation:

_____________________________________________________________
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|___________________________________________________________|
|| ||
|| *: MultiBasic :* ||
|| More Memory for Basic without Learning New Commands! ||
|| ||
|| Ever wonder why, with a 128K or 512K CoCo 3 you cannot ||
|| even use 32K under RS-Dos? Well, now there's ||
|| MultiBasic, making possible without adding ANY commands ||
|| the use of your CoCo 3's "hidden" memory by Basic. ||
|| Have several programs loaded in memory at once able to ||
|| call subroutines from each other. Move between ||
|| programs and load other programs from disk without ||
|| variable loss or interruption of program flow. A ||
|| "must-have" utility for Basic programmers! ||
|| ||
|| INTRODUCTORY PRICE ............................. $24.95 ||
|| ||
|| ||
|| *: Shadow BBS :* ||
|| Complete RS-Dos BBS with Low Hardware Requirements! ||
|| ||
|| Finally, an RS-Dos CoCo 3 BBS with power, speed, and ||
|| flair! Uses RS232 Pak OR serial port! Features include ||
|| ANSI, X/Y Modem file transfers, 28 line 40/80 column ||
|| support, 240 byte on-screen status window, software ||
|| clock, up to 255 independently numbered message areas, ||
|| borderlines (quotes), one-liner discussions, surveys, ||
|| automessage, doors to external programs, user profiles, ||
|| full SysOp utilities, and much, much more! And unlike ||
|| most BBSs you've seen, no hard drive, RS232 Pak, or ||
|| memory upgrade is required! Shadow BBS will run on a ||
|| 128K CoCo 3 with one disk drive and a modem, yet it is ||
|| capable of taking advantage of all the hardware your ||
|| system includes. A full appreciation of Shadow BBS ||
|| comes not, however, from it's many features or it's low ||
|| hardware requirements, but from the flair and ||
|| smoothness of the program itself. We want you to see ||
|| what this incredible BBS can do. Call The Shadow's ||
|| Realm, the official Shadow BBS HQ system, at (409) ||
|| 63-REALM (300/1200 Baud, 24 Hrs.) and see for yourself! ||
|| ||
|| INTRODUCTORY PRICE ............................. $34.95 ||
||_________________________________________________________||
| |
| Sub-Etha Software Call or Write for Information! |
| P.O. Box 152442 Add $2.50 S&H and $3.50 C.O.D. |
| Lufkin, Texas 75915 Texas residents add 8.25% tax. |
| (409) 639-ETHA [3842] "Don't Panic -- We Ship Fast!" |
|___________________________________________________________|

I guess by this next one we trusted the typesetting person, since it was just the raw text:

Happy Holidays From...

SUB-ETHA SOFTWARE

"In Support of the CoCo"

Thanks to those who stopped by our booth at the CoCo Fest!

*: MiniBanners :*
Multiple Line Banners on ANY Printer!

NEW! Create single or multiple line banners with adjustable heights and
widths. Up to 16 lines of text with independently sized characters. Even
works with daisy wheel and non-graphic printers! Includes over 30 fonts!

INTRODUCTORY PRICE ................................................ $14.95

*: MultiBasic :*
More Memory for Basic without Learning New Commands!

PRETTY NEW! Tired of being limited to 22K for Basic? We were too, so we
created MultiBasic, a utility which allows you to use the "hidden" memory of
your CoCo 3 without learning ANY new commands. Load multiple programs, disk
chain, share subroutines and variables, all without interrupting program flow.

HOLIDAY PRICE ..................................................... $24.95

*: Shadow BBS :*
Complete RS-Dos BBS with Low Hardware Requirements!

ALSO PRETTY NEW! Finally, an RS-Dos BBS with power, speed, and flair. Uses
RS232 Pak OR serial port. Does not require a hard drive or memory upgrade!
Features: SysOp Utilities, Up to 255 Msg Areas, X/Y Modem, ANSI, Status
Window, Clock, AutoMessage, User Surveys and Profiles, and too much more to
mention here! A full appreciation of Shadow BBS comes not, however, from it's
many features or low hardware requirements, but from the flair and smoothness
of the program itself. We want you to see what this BBS can do. Call the
Shadow's Realm, the official Shadow BBS HQ, at (409) 63-REALM (300-2400 Baud,
24 Hrs.) and see for yourself!

HOLIDAY PRICE ..................................................... $34.95

I wonder what else I will find as I go through these things…

The Hitchhiker Phenomenon (my late 1980s book report)

In the late 1980s, I had a writing assignment and decided to write about The Hitchhiker’s Guide to the Galaxy by Douglas Adams. I recently found this document and decided to share it. It was written in Deskmate for the Radio Shack Color Computer.

Today we know far, far more about Douglas Adams and his life and writings, so I am curious to see what we “thought we knew” back then.

R.I.P., Douglas Adams. You are still missed.


The Hitchhiker Phenomenon

This is the story of Douglas Adams’ now famous “Hitchhiker Trilogy.” It is a story of amazing success, and it all began very simply. It began with a field.

In the early seventies, Douglas Adams was less than the successful writer he is today. A native of England, he was hitchhiking his way around Europe. One evening he found himself lying drunk in a field near Innsbruck. He had been carrying with him “The Hitchhiker’s Guide to Europe” by Ken Walsh, and as the world spun lightly around him, he thought someone should write a hitchhiker’s guide to the galaxy as well.

This idea stayed in the back of his mind for the next six years while he straightened himself up and got an education at Cambridge. After getting “educated,” he would soon find employment in such various fields as chicken shed cleaning, body guarding, and eventually a script writer for such BBC television programs as Monty Python and Dr. Who. His work on these shows displayed his ability for comedy and science fiction writing, which he would soon combine.

Adams was directing a Cambridge Footlights show when he met Geoffrey Perkins, who worked at BBC radio. The link between BBC and Adams now had been made. He had an idea, and he had an opportunity.

He originally wanted to do a series about “The Ends of the Earth” just to see how many ways of destruction he could devise. This would require a character to be there to explain what was going on. To explain why the character was there, Adams decided to make him a researcher for a book: The Hitchhiker’s Guide to the Galaxy. His idea had now evolved into something useful. Now all that had to be done was to get it approved by the BBC Radio Light Entertainment Department.

His idea was submitted, and approved. “…The script was commissioned in the first place not out of a burning desire to do a sci-fi comedy but because the Chief Producer at the time was rather taken with a sketch Douglas had written…about a Kamikaze pilot being briefed for his ninteenth mission.” (Scripts/P.32) Now all Adams had to do was make it.

Radio series at that time were still primitive. Adams knew exactly what he wanted from the start. He wanted Hitchhiker’s to sound like a rock ablum. “I wanted the voices and the effects and the music to be so seamlessly orchestrated as to create a coherent picture of a whole other world…” (Scripts/P.14) he recalls. Even the theme was planned. He wanted an electronic tune with a banjo in it, so the choice of the Eagles “Journey of the Sorcerer” seemed perfect

Sound effects produced for the series are still some of the greatest ever created. (The radio crew spent more time making sounds than other shows spent on their whole program!) Finally, after all of the sounds, music, and actors had been assembled, the story was ready to be told. On March 8, 1978 the first episode was aired.

The story followed the adventures of Arthur Dent. He is rescued by his friend Ford Prefect when the Earth is destroyed to make way for an interstellar bypass, and Arthur begins his cosmic journey. They meet up with Zaphod Beeblebrox, ex-president of the Galaxy, and his companian Trillian, a sexy space-cadet originally from Earth, as well as Marvin, a depressed robot.

This newly assembled crew sets out on a fantastic adventure which reveals the ultimate answer to life, the universe, and everything, which is fourty-two, and the ancient quest to discover what the actual question is. The question was to be calculated by a giant computer called the Earth, which was built and ran for mice.

Zaphod was also on a mission that he didn’t know about. He was going to find the man who rulled the Universe. Detours along the way take them to the legendary planet of Magrathea, The Restaurant at the End of the Universe, and the evil planet Frogstar.

This exciting adventure is hampered and assisted by amazing plot twists. Adams would decide to have his characters flushed out unprotected into space just to see what would happen. Many of his throw-away jokes, such as a robot with personality disorders, were so popular that he kept them. In fact, the whole story soon gained tremendous following in England, and the BBC had to fight to win back the rights for merchandising.

Suprisingly, many of the subjects written about were not as far-fetched as they might seem. “I…find things that…are self-defeating are funny,” (Zest/P.28) Adams recalls. For instance, a wasteland planet which is encountered in the series was a victim of an economic phenomen known as the Shoe Event Horizon. The whole economy mutated into nothing but shoe shops causing a total colapse. Adams claims to have gotten this concept from Oxford Street in London where he once spent three days trying to buy a pair of shoes. “You cannont hurl a brick…without hitting half a dozen shoe shops,” (Scripts/P.227) Adams claims. He says that “shop after shop, all virtually next to each other, carried exactly the same range, and were all out of stock of exactly the same styles and sizes.” (Scripts/P.227)

On this same planet, a delayed spaship in encountered. It is delayed by over nine-hundred years because it couldn’t take off until the supplies of lemon-soaked paper napkins were loaded. Again, this came from a real Adams experience. He was trying to make an important journey from London to Leeds, which he would have made by train if time were not important. Due to the bar not being loaded, the plane sat doing nothing for a half-hour, making the journey take more time than by train, and thus defeating the whole point of taking it. Adams reasons that in order for a plane to fly, it has to have “a pilot,…a couple of wings,…enough fuel,…coffee and biscuits.” (Zest/P.28)

The original radio series projected Adams into a spotlight. He was asked to write a book version. Adams never thought he “would have have the sheer tenacity or bloody-mindedness required to sit down and write a full length novel,” (Zest/P.22) but he did and the books all became instant best-sellers. A seven episode television show followed, and then a two-record album. The Hitchhiker Phenomenon was rolling.

Each form it took was slightly different. Some major events were drastically altered by Adams, but the basic story line manages to end up the same. This made Hitchhiker’s new to old fans each time they experienced a different telling. When the long rumored movie is produced, Adams plans to tell the story once again from a different perspective.

Recent updates to the Hitchhiker series include a fourth book, and the original radio series and TV shows are being broadcast on public radio and television stations all over America. A computer game has also been created, and another is planned. A fifth book has been publically denied by Adams, which means he’s working on one.

The Hitchhiker Phenomenon has been around for almost ten years and shows no sign of slowing. Fans all over the world appear at standing-room-only autograph sessions sporting their Hitchhiker towels and Don’t Panic buttons. The devoted fans are out there, and his following will continue to grow. Douglas Adams didn’t create a simple story – he created an incredible phenomenon.

winget – like apt-get for Linux and brew for Mac?

I was today years old when I learned that winget is a thing for windows.

I powered up my ancient Lenovo ideapad FLEX 4 (so old, it cannot run Windows 11) today, and looked to see what updates where waiting. There were plenty in the Microsoft Store plus some in Windows Update. I only use this machine for running my vinyl cutter and laser engraver, so there is not much on it.

Due to the tiny SSD hard drive, I do have WinDirStat installed. It is a nice tool that will show you what is using up all your hard drive space.

I went to the WinDirStat website to look for updates:

WinDirStat – Downloads

My version was quite behind, so I was abouty to download the installer then I noticed this:

You may also install it with:

  • 📦 winget install -e –id WinDirStat.WinDirStat (or use winget upgrade subsequently)
  • 📦 scoop install extras/windirstat (requires scoop bucket add extras)
WinDirStat – Downloads

I am pretty sure I have used winget before to install some developer thing, but was unaware that it was used by other apps.

Typing “winget upgrade” showed me that it recognized several things on my PC:

C:\Users\alspl>winget upgrade
Name Id Version Available Source
-----------------------------------------------------------------------------------------------------------------------
WinMerge 2.16.18.0 x64 WinMerge.WinMerge 2.16.18.0 2.16.44.0 winget
Windows PC Health Check Microsoft.WindowsPCHealthCheck 3.6.2204.08001 3.7.2204.15001 winget
Microsoft ODBC Driver 17 for SQL Server Microsoft.msodbcsql.17 17.7.2.1 17.10.6.1 winget
Microsoft Visual Studio Code Microsoft.VisualStudioCode 1.91.1 1.96.4 winget
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.4.1 17.12.3 winget
Dropbox Dropbox.Dropbox 216.4.4420 217.3.4243 winget
Google Chrome Google.Chrome.EXE 131.0.6778.267 132.0.6834.111 winget
Microsoft Visual C++ 2015-2022 Redistributa… Microsoft.VCRedist.2015+.x86 14.31.31103.0 14.42.34433.0 winget
Microsoft Visual C++ 2015-2022 Redistributa… Microsoft.VCRedist.2015+.x64 14.40.33810.0 14.42.34433.0 winget
Slack SlackTechnologies.Slack 4.39.93 4.42.115 winget
Lenovo Service Bridge Lenovo.ServiceBridge 5.0.2.9 5.0.2.17 winget
App Installer Microsoft.AppInstaller 1.23.1911.0 1.24.25200.0 winget
Dev Home Microsoft.DevHome 0.1900.687.0 0.1901.687.0 winget
13 upgrades available.

I tried “winget upgrade WinMerge.WinMerge” and saw it kick off and download the installer, then launch it. Very cool! It even has a spinning cursor while downloading :)

There is a “winget upgrade – all” option that should do all of them. The installers may pop up an authorization box you have to click on, so they are not fully automated, but still neat.

Did I do something on this computer years ago to install winget, or is it on any Windows 10/11 system just waiting to be used? Give “winget upgrade” a try on your PC and let me know if it works…

I have some upgrading to do.

Until next time…

Early 1980s BBSes and spinning cursors.

There is a whole generation that has no idea how much cool stuff folks did with text and backspace.

One of my favorites was the “spinning cursor.” Thanks to slow speeds of 300 baud modems, you could get some interesting effects by printing a letter, then printing a character like a slash (“/”), then a backspace, then a dash (“-“), then a backspace, then a backslash (“\”), then a backspace, then a vertical bar (“|”) or exclamation mark (“!”) if your system did not have the vertical bar. Then a backspace and the next letter of the message.

Apparently I got nostalgic about this effect some time ago. I just found this “Spinning Cursor” C project I wrote on the Online GDB compiler:

https://onlinegdb.com/56zozL_gRp

Go there and you can RUN the project and see it in all its glory…

Copy files to/from Insta360 app on iPhone/iPad

Updates:

  • 2025-05-06 – Files must be in a folder called “IMPORT” then you drag that in. BUT, this is no longer documented in the X5 manual, and in testing today, it does not appear to work with the current V2 App and X5. Instead, you can create “DCIM\X5” and put files there, then drag that in (it will erase all current files on the X5). I then had to disconnect from the computer and restart the app to see them. I tested this with 10 photos today and it worked, so I will be updating this article with the new steps as soon as get a moment.

Today, I asked Microsoft Copilot if it knew how to get Insta360 files into the phone app. TO my surprise, it referenced the official Insta360 support page, and this blog post.

I decided to take a look at what I wrote, and found an issue to correct. This is the fixed version.


This topic seems to come up often, which is maybe it shouldn’t since Insta360 even documents these steps. Here is the background…

If you have an Insta360 360 camera such as the ONE X, ONE X2, X3, X4 or X5, you can run the Insta360 App and download photos/videos from the camera for editing on your phone or tablet. You can then export them out and share them as normal photos, reframed videos or even 360 photos/videos.

If you want to backup the original files your phone/tablet downloaded, you can do that too by plugging the phone/tablet up to your computer via the USB sync cable.

On macOS, when you plug in the device and allow it to connect, it will show up under the Finder. You can select it and get a series of “tabs” in the Finder on what you want to look at. By selecting Files you have access to the file system of the device:

Look for the “Insta360” app and expand it:

If you want to copy .insv/.insp files TO the phone app, you must first copy them into a folder named IMPORT. Once there, you can drag that IMPORT folder into the Insta360 app.

They will be copied via USB and placed into the location where the app will recognize them and you can edit them on your device. You will see a new status line in the bottom of the iPhone file browser:

If you want to copy files OUT of the phone, you cannot pick and choose, but you can drag the entire DCIM folder out from this window to wherever you want it copied and all the raw .insv/.insp/etc. files that have been imported into the Insta360 app will be copied there, likely much faster over USB than they would over WiFi from the camera in the first place. You will then be able to backup these files, or drag them into the desktop Insat360 app for editing.

It would be nice to have some kinda of automated script to do this (perhaps one that monitors for the phone/tablet to be connected then runs, backing up all the DCIM files automatically). If there is interest, I can look into trying to create one.

And if you want to read these instructions direct from Insat360, they are found in the manual. Here is the entry from the online X3 manual:

https://onlinemanual.insta360.com/x3/en-us/camera/filetransfer

We could do better…

That said… What would really be nice would be for Insta360 just to support the built-in Files system on iOS/iPadOS. Most of the apps I use allow me to export a file to anything mounted in my Files app. If you have installed Dropbox, OneDrive, Google Drive, etc., they show up and apps can just save a file there. If it is a cloud service, they will automatically sync to the cloud via that app. There are also FTP clients that look like drives, so you can export to a location and have it FTP to your own server. Likewise, most apps I use allow me to open from the Files app, so I can import files I have saved on Dropbox or whatever.

This also allows access to external USB hard disks or memory cards attached to the Lightning or USB-C port of the device using the appropriate adapter.

Insta360 may not be doing this because they knew they were planning to bring out their own cloud service they charge for. If they had allowed support for the native Files system, you’d be able to do all of this “for free” with any cloud service you were already using and there would be very little reason to subscribe to their subscription cloud service

But who knows… Maybe if enough of us ask them for it, we might see it. You can contact Insta360 and ask them here:

https://www.insta360.com/support

Until next time…

C program build date and time.

This one is just for fun, though I suppose I might not be the only one on the planet that ever needed to do this…

At my day job, I have a board that had a realtime clock, but no battery backup to retain the time. During startup, the system sends the current PC date and time (actually, it sends it in GMT, I believe, so looking at logs captured in different parts of the world will be easier — GMT is GMT anywhere on the planet ;-)

On startup, the board wants to log some things, but does not yet know the time. It had been using a hard-coded default time (like 1/1/2000). I wondered if the C compiler build date and time could be used to at least set the time based on when the firmware-in-use was compiled.

A quick chat with Bing’s AI (ChatGPT) and some experiments to make what it gave me far less bulky provided me with this:

int main()
{
    // Initialize time to when this firmware was built.
    const char *c_months = "JanFebMarAprMayJunJulAugSepOctNovDec";
    char monthStr[4];
    int year = 0;
    int month = 0;
    int day = 0;
    int hour = 0;
    int minute = 0;
    int second = 0;

    // “Mmm dd yyyy”
    strncpy(monthStr, __DATE__, 3);
    monthStr[3] = '\0';
    month = (strstr(c_months, monthStr) - c_months) / 3 + 1;

    day = atoi (&__DATE__[4]);
    year = atoi (&__DATE__[7]);

    printf ("%04d-%02d-%02d\n", year, month, day);

    // “hh:mm:ss”
    hour = atoi (&__TIME__[0]);
    minute = atoi (&__TIME__[3]);
    second = atoi (&__TIME__[6]);

    printf ("%02d:%02d:%02d\n", hour, minute, second);

    return 0;
}

This works by taking the compiler-generated macros of “__DATE__” and “__TIME__” and parsing out the values we want so they can be passed to a realtime clock routine or whatever.

In my case, this is not the code I am using since our embedded compiler handled __DATE__ in a different format. (It uses “dd-Mmm-yy” for some reason, while the standard C formatting appears to be “Mmm dd yyyy”.) But, the concept is similar.

Of course, as soon as I tested this, I found another issue. My board would power up and set to the build date (which is central standard time) and then when the system is connected, a new date/time is sent in GMT, which is currently 5 (or is it 6?) hours different, setting the clock back in time.

This makes log entries a bit odd ;-) but that’s a problem for another day.

Until then…