Page 1 of 1

Updating the X16 Firmware to R48

Posted: Thu Dec 19, 2024 12:39 am
by Gerry
Good evening to All:

Since I have some time off work at the end of the year, I've been catching up on my X16 projects. I'm presently working on updating the X16 firmware to R48. I found the x16emu files in the Board Index -> Downloads -> Official Software -> Commander X16 Kernal Emulator R48. I've downloaded R48 Cadmium and unzipped the files for my M1 Mac and win64 PC. The entry has a date of September 6th, 2024 and I am assuming that the latest and correct files will be dated around the beginning of September 2024.

Next, I looked for any reference in the Official Software to identify the R48 firmware files for the ROM, VERA and SMC updates like those listed in the Commander X16 Kernal Emulator and ROM R47 entry but it's not there. I won't bore you with everywhere I looked but I haven't found the official R48 update files. I'm also looking for the application I need to run and the procedure I need to follow to perform this update, but, so far, I haven't found anything obvious. I have performed a complete backup of my SD_Card if I have to undo this upgrade.

If I'm missing something obvious, please let me know where I went wrong to better understand how these forums are organized. If I need to go somewhere else to gather this information, please let me know.

The reason I'm writing this is that I work in a part of the broadcasting industry that uses very critical and expensive equipment. I've been trained to make sure I have everything I need (usually from the OEM) to perform a firmware update on any equipment. I won't go into all the specifics, but that usually includes the update files, the application to install the update or the location of where the new firmware needs to be placed and a written procedure to follow (called a MOP) that includes a back-out procedure is something unexpected happens as well as the window of time to start and complete the procedure (usually 0-dark:30). This is a part of project management.

Of course, this detailed a procedure is not needed with the X16 but to minimize the possibility of bricking my X16, I want to make sure I have all the latest information to not-guess but know how to upgrade the X16 to R48 (and yes, that includes reading through the procedure before executing it and asking questions until I thoroughly understood what I was going to be doing. I also wrote many of my own MOPs). I'm being most careful here because I asked about this upgrade a few months ago when R48 was announced and I saw several people write about how disorganized the upgrade information was and that needed improvement. Also this confusion caused others to make errors in doing the firmware upgrade and had to figure out how to back out of it.

I'm still trying to find the upgrade procedures but I'm not having any luck. I hope the answers are simple and I will perform the upgrade and move on.

Thank you,
Gerry

Re: Updating the X16 Firmware to R48

Posted: Thu Dec 19, 2024 1:18 am
by kelli217
ROM: https://github.com/X16Community/x16-rom ... .Image.zip
SMC: https://github.com/X16Community/x16-smc ... 47.2.3.zip
VERA: https://github.com/X16Community/vera-mo ... ag/v47.0.2

Yes, those are the latest versions of the SMC and VERA. The changes to R48 weren't a result of SMC or VERA changes and don't require anything beyond the releases linked above. If you already have those, then you're fine to just update the ROM to R48.

Github is where all the releases are kept.

Documentation of where to find things like this is a known issue; there are people working on it.

Re: Updating the X16 Firmware to R48

Posted: Sat Dec 21, 2024 8:44 pm
by Xiphod
Gerry, were you able to find answers on this? Are you on the X16 Discord yet?

There is some evolving work in this area. Stefan has been evolving a new tool based on some lessons learned over the past few months. Available info new as of today is here:
https://github.com/stefan-b-jakobsson/x16-upgrade

On the right side of that link, you'll see Releases and Tags. It is a pre-release, so understandable if you want more testing done before using it yourself. Most of the System Developers are accessible for questions on the Discord.


Keep in mind during ROM updates, you need access to the board to adjust pins (basically as gates to give permission to do the update, so that rogue software can't just update the ROM without your knowing). One mistake I've done is not adjusting the VERA jumper back - which makes for a concerning feeling that you've messed up or bricked the system. So do double check that first if the system isn't starting back up.



I think the unfortunate issue early on wasn't a fault on the update software tools per se, but that some of the installed SMC chips differed across systems and there was no immediate way to tell (when the systems were put together). Long story short, the "monolithic update everything at once" update tool had issues when encountering those. Since then, the experts have found that issue and now know how to detect it and work around it. Hence the "new" update tool.


Prior to the "update everything at once" tools, there were the original independent updaters. These were for the original 100x DEV boards, but these tools do still work on the PR systems today. They were supposed to be deprecated, which is why they aren't often mentioned. On the "official" SD cards with the system, they are located in :

EXPLORE\SYSTEM\ROMFLASH-OLD
FLASH-CX16-SMC.PRG update the SMC (I think using SMC.BIN, I never actually used this one, didn't need to)
FLASHVERA.PRG VERA update (using content of VERA.BIN)
FLASH-CX16.PRG (update System ROM using content in ROM.BIN)
[ I'm not sure what SMCUPDATE.PRG itself is; FLASH-SMC.PRG might delegate to it for the actual update ]


I don't think any SMC update since launch (43.0.0) is critical/require, but there are some nice enhancements with the newer one. One main feature is speeding up the keyboard repeat rate will actually work. Another improvement is some mouse-polling is cleaned up, so mouse-movement in KG3D actually works. A few other improvements, but nothing critical to making the system function or that the other ROMs depend on. But to ensure a consistent experience with new software, it probably is worth doing an SMC update at this point.


You can update VERA and the SystemROM independently without the risk of dealing with whatever SMC you have. Hence why the ROM updates in the EXPLORE ROMFLASH-OLD may still be useful and less risky to use.


For System ROM, you'd go here:
https://github.com/X16Community/x16-rom
Look for Releases on the right side of the page.
Then on the next page after that (after clicking on Release), you look for "Assets"

On some setups it can be hard to find/see this "Asset" section, or the Asset dropdown might not be expanded. But it should be a list of files.

The asset most will want is Release.R48.ROM.Image.zip (or whatever is the current)

The only file in there most people are interested is the ROM.BIN that the above updaters would use. The updaters tend to be hand-coded and won't have a lot of luxury features like asking for filenames and such - so you have to use the host file system to archive existing ROM.BIN and drop in the new one.

There are a lot of files in that Release_xxxImage.zip, that some developers would be interested in - symbol tables and such to know where certain aspects of the ROM have (possibly) been relocated to. Some advanced software depends on tightly hooking into the system (system ISRs and such). Most of the KERNAL API stuff won't change (as extra care is made to ensure they don't change, since a lot of existing software is dependent on that API). But for example, the list of supported BASIC keywords might shift from one ROM release to another (and some software might look for that table and identify the token codes), and other such useful-but-not-documented System "stuff" (generally in the 0x0300 region). That other code could just reference these symbol files or headers - and just need a recompile but no actual code change.




For VERA ROM, you'd go here:

https://github.com/X16Community/vera-module

And same/similar as the above:
- look for Release on the right side, click that
- look for Assets. Expand the drop down.

It looks like a FLASHVERA.PRG and archived along with the releases. I'm not sure if it's changed since the original release in that EXPLORE/SYSTEMROM-OLD folder. But you'll probably need to copy/rename the given VERA_47.0.2.BIN over to VERA.BIN for the VERA updater to work (I still use the one in the EXPLORE folder, so that's what it requires for me).

Re: Updating the X16 Firmware to R48

Posted: Thu Dec 26, 2024 12:10 am
by Gerry
Thank you Voidstar for all that information. Now that I have some background on the update procedure, I can ask more intelligent questions and make better suggestions. I'm presently at work so, as a quiet day, I can respond.

To answer your question, I do have an active Discord account which I read periodically but a lot of the questions are programming based and I don't understand programming in general even though I've studied Basic and C. Thank you for the background information about past firmware upgrade issues goes with my wanting to suggest an 'all-in-one' firmware upgrade path but you guys are already on it with the X16-Upgrade software. My X16 SBC is just under number 1000 and I got it last May with version R47 already installed. After reading everything, it appears that the only upgrade I need to do is the ROM firmware.

One area I'm confused is which application do I use to upgrade the system ROM on my X16. You explain about the ROMFLASH-OLD being outdated and it turns out the EXPLORE directory doesn't exist in my copies of the SD-CARD and SYSTEM is in the root directory. What do I use now to update the system ROM? The X16-Upgrade application is perfect but identified as highly experimental so in it's present 'beta' state, I don't want to turn my X16 into a brick.

So I'm going to wait until there is a clear, secure path to perform firmware upgrades. Given the turbulent state of software/firmware and hardware development, and the lack of documentation (I got my ESP32 card up and talking to bulletin boards with ROMTerm, but there's no documentation, that I've seen, on how to use it.) I'm going to mothball this computer for the next 6 months to a year as I expect that you and the others will quickly mature this project. I have spent a lot of time and money working on the X16 but have gotten very little pleasure from it. I was very disappointed with the 'no response' I got from Lazer3D when I emailed them about the I/O card slots being blocked when a card is installed in their case with a riser. I wasted a lot of money on this oversight in the ATX mini-case design. It's obvious to me, in this case, how unprofessional the leaders of this project are, especially the 8-bit Guy as his face is the front of this project. There's too much happening all at once for proper supervision of the project and when your clients get burned financially due to short-sighted planning and design, that makes me mad. That is made worse by volunteers with no skin in the game.

I have other retro-computer projects (like the EBTKS HP-85A project that's really exciting, rebuilding and upgrading my Apple IIGSes with accelerator and HDMI cards as well as repairing and upgrading my Mac SE/30). So thank you for your time and efforts on my behalf. I also hope that someone will develop a clear path for beginners to learn how to use this SBC and add programming as more software comes on line.

Thank you,
Gerry

Re: Updating the X16 Firmware to R48

Posted: Mon Jan 06, 2025 6:08 pm
by Eirik Stople
Hi! I did an attempt to collect everything needed to get your machine up to date on this page:

https://github.com/X16Community/x16-doc ... 20Guide.md

Since your machine is just below PR 1000, would you mind telling the exact versions it was delivered with? Use the command "HELP". Is it correct that it is delivered with R47 (not prerelease), SMC 47.0.0 and VERA 47.0.2?

Since you do have SMC version 47.0.0, I find it very likely that you have the "good" SMC bootloader V2. All machines prior to ~PR900 was delivered with 45.1.0 and a "bad" version of V2 bootloader. Based on the history of these versions, we find it most likely that machines delivered with SMC 47.0.0 have the good V2 bootloader, but we have not got this confirmed. So, when you do the SMC update, check if the machine hangs after programming or not. I think it will power off, which is good. If it hangs and does not power off, you have the "bad" v2 bootloader which requires a jump wire to temporarily pull SMC pin #10 to GND (ref the page I linked to). Please have this wire ready, but, I guess that you will not need it. Once done, let me know the outcome. Once you have SMC 47.2.3 or SMC 48.0.0 installed, please check your exact bootloader version to confirm that its checksum is $15C7 (ref this page https://github.com/X16Community/x16-smc ... r-tools.md ). So that we volunteers can get more knowledge about the exact versions delivered with the machines, to be able to give good update recommendations. And by the way, I will likely see your reply faster on Discord if you get stuck somewhere.

Re: Updating the X16 Firmware to R48

Posted: Mon Jan 06, 2025 6:34 pm
by Eirik Stople
And for the record: Latest released SMC version is 48.0.0, I have a PR to update the documentation. There is also a newer pre-release available for VERA if you want to try that.

Re: Updating the X16 Firmware to R48

Posted: Mon Jan 06, 2025 11:18 pm
by DragWx
Eirik Stople wrote: Mon Jan 06, 2025 6:34 pm There is also a newer pre-release available for VERA if you want to try that.
I don't like that the updated source code for this is unavailable.

EDIT: Found it, it's buried in an unmerged pull request.

EDIT 2: The updated VERA source code is merged now, thank you for that, because it's been bothering me. :P

Re: Updating the X16 Firmware to R48

Posted: Thu Jan 09, 2025 4:48 pm
by Eirik Stople
There are no CD-ROM add-on support in R48, nor any plan to implement it, as far as I know. But nobody is stopping you from implementing it yourself :mrgreen: