New version of altairdsk available

381 views
Skip to first unread message

Paul Hatchman

unread,
Apr 12, 2025, 12:03:04 PMApr 12
to Altair-Duino
Hi All,

A few years ago, I released a command line utility to read, write and format Altair CP/M formatted floppy and hard disk images. It's similar to cpmtools except that it actually works with Altair floppy disks and their weird 137 byte sectors.

I've re-written this tool in the Zig programming language and as a bonus, a graphical user interface is now included. If you'd like to try it out the source code, build instructions etc are available under the "experimental" branch at https://github.com/phatchman/altair_tools. If you just want the binaries, you can grab those from https://github.com/phatchman/altair_tools/releases.

The release has binaries for most operating systems and architectures, but I can only provide GUI binaries for Windows and Linux x86_64 right now. The GUI should build for any architecture that supports SDL2. It should build fine for MacOS and I'd be interested if anyone gets it running on one. Please send me a screen-shot and let me know how it went.

The GUI needs a little more polishing, but I've been using it regularly without many issues. Just keep in mind, this is a "beta" release, so make sure you backup anything important before you use this. Happy to hear issues or suggestions either here or on github.

Cheers,

Paul.

adgui.png

John Galt

unread,
Apr 12, 2025, 12:24:46 PMApr 12
to Altair-Duino
awesome 

John Galt

unread,
Apr 12, 2025, 12:30:06 PMApr 12
to Altair-Duino
my anti-virus software keeps shutting it down.

Paul Hatchman

unread,
Apr 12, 2025, 9:26:34 PMApr 12
to Altair-Duino
Hi John,

That's no good. 

What sort of error do you see? Are you seeing something like "Windows protected your PC.... Microsoft Defender SmartScreen prevented an unrecognized app from starting...". Or something similar for whatever virus scanner you run?

If so, that message is shown whenever you are about to run an unsigned application that you downloaded from the internet, which is generally a bad thing to do. There are two solutions to this:
1) Click on the More Info and then click "Run Anyway" (If you are running Windows Defender, there is probably something similar for other virus scanners)
2) After you extract the adgui.exe, right click on the file. Select properties. Near the bottom of the properties window, you will see "Security" and a checkbox that says "Unblock". Check Unblock and click OK.

If you are seeing something else, let me know what it is and hopefully I can help. 

Cheers,

Paul.

John Galt

unread,
Apr 13, 2025, 12:23:36 AMApr 13
to Altair-Duino
Norton seems to shut it down no matter what i try. 
i tried running it in a sandbox the window would open for a nanosecond then it closes.  tried to run it from windows 10 to windows 7.
keeps getting shutdown.
the command line version works.

Paul Hatchman

unread,
Apr 13, 2025, 1:36:41 AMApr 13
to Altair-Duino
Hi John,

How frustrating! I've tested it under a Windows 11 sandbox and a Windows 10 VM, and both worked OK for me. The only think I can think of is that I attach a console to the gui process for debug purposes, which maybe Norton doesn't like? 

I've added a debug version with the console attaching code removed as adgui-debug.zip. This may give more information if it is actually crashing vs being killed. But with the console detached, it might not print anything. If you'd like to keep trying to get it working, please download that debug version and see if Norton likes that any better.

Also, please try launching adgui.exe from a command / powershell prompt if you haven't already tried that.

If all else fails, I can walk you through building it from source. I don't know if that would make any difference, but it is the only other thing I can think of right now.

Best of luck,

Paul.

villa...@gmail.com

unread,
Apr 13, 2025, 5:20:10 AMApr 13
to Altair-Duino
Many thanks for this Paul
I'm running windows 10 and your latest altairdsk works fine but I'm having trouble with the gui.

e.g Illegal instruction at address 0x7ff60c148d89
Unable to dump stack trace: debug info stripped

What is the syntax to use this ?
Tx Colin

Paul Hatchman

unread,
Apr 13, 2025, 5:48:57 AMApr 13
to Altair-Duino
Hi Colin,

I think I know the issue. I've built a new version and put it in the release. Download adgui.zip again to get the new version. This has debugging info included, so if it still happens with this build, I'll have more information on why.

Cheers,

Paul.

villa...@gmail.com

unread,
Apr 13, 2025, 6:14:06 AMApr 13
to Altair-Duino
Perfect!!!  Many thanks Paul, looks a great enhancement, will have a play with it now !
Colin

Paul Hatchman

unread,
Apr 13, 2025, 7:28:24 AMApr 13
to Altair-Duino
It should be fairly straight forward, but just in case, I've just created some usage instructions here:  altair_tools/docs/ADGUI.md at experimental · phatchman/altair_tools

Paul Hatchman

unread,
Apr 13, 2025, 7:54:30 AMApr 13
to Altair-Duino

Hi John,

You may have been having the same issue as Colin. I did not realise that the I'd built the exe to make use of some more modern CPU instructions. Zig is still very new to me. 
If you're willing to give it another try, please download the new adgui.zip file and let me know. I don't think it is worth running that debug file I asked you to run as it will have the same issue with using the newer CPU instructions.

John Galt

unread,
Apr 13, 2025, 8:15:56 PMApr 13
to Altair-Duino
downloaded the new version.

Interestingly, windows refuses to allow me to run it smartscreen comes up and refuses to be disabled even when i go into services.

i tried changing security settings and my desktop refuses to allow me to run the gui version.

I've never seen smartscreen act like this.

Tom Wilson

unread,
Apr 13, 2025, 10:27:18 PMApr 13
to John Galt, Altair-Duino
For me, it just opens a blank window and closes after a few seconds.

Is there maybe a runtime library or something that needs to be included?

Basic system info:

Windows 11 24H2 
Intel i7 12700K
96GB RAM
GeForce RTX 3080Ti




--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/altair-duino/b5f50fc8-ce4e-4dfc-ba05-d068d6ea1408n%40googlegroups.com.

Paul Hatchman

unread,
Apr 13, 2025, 10:53:13 PMApr 13
to Altair-Duino
Hi Tom,

Can you please try launching adgui.exe from a command prompt or powershell window? It should hopefully display some error information to the console window that will tell us why it is closing down. At minimum it should display a message about the display DPI on startup before it does anything else.

I've double-checked the dependencies and can confirm that it only depends on various windows system dlls (it looks like it needs Windows 10+). Everything else is statically linked. 

Tom Wilson

unread,
Apr 13, 2025, 11:30:00 PMApr 13
to Paul Hatchman, Altair-Duino
It doesn't print anything to the console. The new window opens, and it drops right back to the command prompt.




--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Paul Hatchman

unread,
Apr 14, 2025, 1:03:05 AMApr 14
to Altair-Duino
Hi Tom,
I've found a Windows 10 machine I can recreate this on. Hopefully have some news for you "soon".

Paul Hatchman

unread,
Apr 14, 2025, 2:48:17 AMApr 14
to Altair-Duino
Hi Tom,

I still don't really understand the issue, but I think I now have a version that works under a fresh Windows 10 install. But weirdly the Windows 10 version doesn't run correctly under Windows 11. I'll keep separate versions until I figure it out.

Please try the version in adgui_win10.zip and see if that works for you. 
Maybe this one will sneak through John's Smart Screen?

Regards,

Paul
Message has been deleted
Message has been deleted

Paul Hatchman

unread,
Apr 14, 2025, 10:39:03 PMApr 14
to Altair-Duino
Awesome! I'm glad you got it working and I appreciate your perseverance.

I just learned that Zig does have a Win 7 built target, so I've build a 32 bit and 64 bit win 7 versions and uploaded it to the release. Let me know if they work on your laptop.

On Tuesday, April 15, 2025 at 10:57:23 AM UTC+10 John Galt wrote:
ok "adgui_win10" works on my system

Norton antivirus through a fit. 
I had to force it to load.
the GUI is opened now 
I transferred a few files from an DSK image to my desktop.


On Monday, April 14, 2025 at 10:42:12 AM UTC-4 John Galt wrote:
i'll give this a try tonight.

i tried disabling smartscan and a few other safeties to try and get the program to run nothing worked. i've seen windows defender come down hard before, this the first time I've seen it this locked out from running a program at least on my system.

would this program run under windows 7? i have an old laptop where this might be better since its portable.


Tom Wilson

unread,
Apr 15, 2025, 3:47:11 AMApr 15
to Altair-Duino
The good news is that the GUI does come up with this version.

The bad news... both this and the command line version seem completely unable to handle the 330K disk images I've got. 

Paul Hatchman

unread,
Apr 15, 2025, 4:29:05 AMApr 15
to Altair-Duino
Hi Tom,

Some questions:
1) Did the old version support this format?
2) Did you get any error messages from the command line tool? Or is it just showing the wrong data?
3) What's the exact size of the image file in bytes?
4) Can share one of the disk images with me? That would be the quickest way for me to work out what is going on.

Thanks,

Paul.

Tom Lake

unread,
Apr 15, 2025, 8:56:53 AMApr 15
to Altair-Duino
It runs fine in Win 11 but I have to run it from the command line. How do you get the GUI to load?

On Saturday, April 12, 2025 at 12:03:04 PM UTC-4 phat...@gmail.com wrote:

Paul Hatchman

unread,
Apr 15, 2025, 9:56:16 AMApr 15
to Altair-Duino
Hi Tom,

Not sure if this is your issue, but just in case: 

There are two separate applications, the command line tool altairdsk.exe and the GUI which is adgui.exe.
On Windows 11, you should be fine to use the adgui.exe file from adgui.zip in the release page. Just extract that zip file to somewhere and run adgui.exe from the windows explorer as you would any other windows application. Or you can just run adgui.exe from a command prompt in the directory you extracted it to if you are having issues.

If you are having issue running the adgui.exe application itself, then try the one from adgui_win10.zip. People seem to have had more luck getting that one running.

Cheers,

Paul.
Message has been deleted
Message has been deleted

John Galt

unread,
Apr 15, 2025, 9:28:03 PMApr 15
to Altair-Duino
already came in handy i needed to drop a file on a 1024 HD image and worked perfectly.

On Tuesday, April 15, 2025 at 8:36:59 PM UTC-4 John Galt wrote:
i tested with a 330kb disk image, and i had no issues reading from the disk a file, coping the file from the disk to my desktop, and placing a file from my desktop to the disk image.


On Tuesday, April 15, 2025 at 10:59:14 AM UTC-4 John Galt wrote:
will report back on the windows 7 laptop i have to pull it out of mothballs.

I  didn't play around with 330kb images, i'll try that tonight on my win 10 desktop

Tom Wilson

unread,
Apr 16, 2025, 1:23:09 AMApr 16
to Altair-Duino
I figured it out: The files are 337,664 bytes long, which is not consistent with your detection routine. 

Your detection routine appears to use the file length and looks for 337,568 bytes. The problem with that is when you transfer a file with XMODEM, the file will always be a multiple of 128 bytes, or 337,664 in this case. 

Right now, your detection routine uses a simple switch statement to detect the files based on the file size. A method of handling files rounded up to 128-byte blocks is necessary. 

Looking at the C code, It looks like you're trying to handle that in the disk_detect_type routine, with the mits_alt_length variable, but if you re-wrote this in another language, is it possible that the math is rounding incorrectly? I'd explictly define mits_alt_length  as a constant and forget trying to be fancy and round to multiples of 128. It's not like the 8 inch image format is going to change, after 50 years. =)
Message has been deleted

Tom Wilson

unread,
Apr 16, 2025, 11:42:33 AMApr 16
to John Galt, Altair-Duino
It looks like the Zig code does not have the special case. I am not familiar with Zig, but it looks like the Zig code uses an iterate and test pattern to check the file size against the specs, rather than the switch statement the c code uses. 

While this is more elegant and maintainable, the special case for the 8 inch floppy got lost. Since that’s one special, well known case, either create a second case for the 337,664 size or fudge the file_size variable down to 337,568 in the test routine. 


On Wed, Apr 16, 2025 at 7:25 AM John Galt <furba...@gmail.com> wrote:
should there be detection for both, you have the 330kb files with 337,568 and you have the xmodem transferred images of 337,664. both are correct just one has the extra bytes attached.
--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Paul Hatchman

unread,
Apr 17, 2025, 6:47:35 AMApr 17
to Altair-Duino
Hi Tom,

It does have the check in isCorrectFormat() in disk_types.zig. But I had the divide and multiply for the rounding reversed. I agree it would have been easier just to put the size in there, but the generic code is a 1 liner, so it's a bit of a wash.

I've pushed the change to github. I'll push the new gui versions once I've had a chance to get the multi-architecture build process in better shape.

If you are feeling adventurous, take a look at the build instructions README.md on the experimental branch. It really is as simple as downloading zig, cloing the repo and then doing zig build. All of the dependencies are automatically fetched and built. It's a really nice feature of Zig compared to the cmake / autoconf nightmare that is required for cross-platform C applications these days.

Cheers,
Paul

Walt Perko

unread,
Apr 22, 2025, 3:20:28 PMApr 22
to Altair-Duino
Hi, 

Although the program is handy for those editing tasks ... 

I'm wondering if the program could open up and had a "SELECT ALL & COPY" button so we can paste the list of names into another document or spreadsheet etc.  

The program doesn't seem to let me open any of my Altair 8800 .DSK files ???  Help - About doesn't provide a version number yet.  This is the "latest" as of today's downloads.  

Doesn't Open Altair 8800 DSKs.jpg


.

Tom Wilson

unread,
Apr 22, 2025, 3:22:24 PMApr 22
to Walt Perko, Altair-Duino
Read the entire email chain.  It’s a known bug. 

Also, consider using the command line version for getting a printable listing. You can redirect that to a file. 



Paul Hatchman

unread,
Apr 23, 2025, 4:08:47 AMApr 23
to Altair-Duino
Hi Walt,

Yes, currently it's on the "experimental" branch/release because it still needs some more testing and polishing. I'm not able to work on it at the moment, but I will look into adding the copy/paste for the filenames, and of course, fixing any remaining issues.

If you do find any other issues, or have other suggestions, please let me know. I'll make an announcement here once the "1.0" release is out.

Best,

Paul.

Paul Hatchman

unread,
Jun 5, 2025, 9:00:45 AMJun 5
to Altair-Duino
Hi All,

It's been a little while, but a new version is now available. This has fixes for all the bugs I know about, hopefully better compatibility across different types of windows operating systems and ctrl-c copy for filenames. Oh! And not to forget a working "About" box ;)


If you'd prefer to build from source, then use the experimental branch from github. Build from source is relatively trivial. It literally is just:
1) Install Zig from ziglang.org
2) Clone the git repo
3) zig build

If no one finds any issues with this in the next week or so, I'll ship it as 1.0.

Next on the agenda is to look into supporting CDOS and Altair Basic disks. (no promises....)
If there are any other Altair 8800 compatible image formats people would like supported, let me know and happy to look into it.

Cheers,

Paul.


adgui.png

John Galt

unread,
Jun 5, 2025, 10:05:08 AMJun 5
to Altair-Duino
awesome, will take a look.

Walt Perko

unread,
Jun 5, 2025, 11:58:02 AMJun 5
to Altair-Duino
Hi, 

I downloaded the altair_tools_0_9_5.zip file ... ran the adgui.exe and expanded the view hoping to shrink some of the columns so I could see all the columns in the display.  I cannot grab 

20250605-Can't Shrink Columns2.jpg

Still no COPY button to grab all the data to post to an .XLS or .TXT file ... 


.

Paul Hatchman

unread,
Jun 5, 2025, 8:11:44 PMJun 5
to Altair-Duino
Hi Walt,

The GUI toolkit I'm using doesn't have an actual grid widget, so the whole scrollable grid is hand-crafted. I'd have to code all of that logic for resizing columns etc and for the filename lengths and sizes that we typically deal with on CPM, I don't think it is going to be worth the effort to do it. Also, the file sizes shown on the windows grid are currently limited to < 10MB, just like on the Altair side. So, even expanding the width of the columns won't make it show the actual size. This is one of those features where I didn't think it was worth implementing as there's no disk format that can accommodate files of that size, so they may as well be "inifinity" in size from the Altair's point of view.

But if there is some use case I'm missing where you think this would be useful, let me know. 

For copy, that can only be accessed via ctrl-c. There is no button for it. It should pop up a dialog to let you know the copy worked.

Best,

Paul

Walt Perko

unread,
Jun 9, 2025, 11:25:46 PMJun 9
to Altair-Duino
Hi, 

I wanted to make some columns narrower so that the far right columns looked like they were at full width.  Right now they look cut-off on the right side of the display, even when I goto full screen size in Windows.  


.

Walt Perko

unread,
Jun 9, 2025, 11:27:07 PMJun 9
to Altair-Duino
Hi, 

I forgot to mention, I'm still looking for a button to copy the whole list of files so I can paste them into a text file or even better they'd be comma separated so I could past them into an Excel spreadsheet.  


.

On Thursday, June 5, 2025 at 5:11:44 PM UTC-7 phat...@gmail.com wrote:

Paul Hatchman

unread,
Jun 15, 2025, 6:35:47 AMJun 15
to Altair-Duino
What doesn't work for you? Did you also want the other details about the file? 

I couldn't work out what was best.
1) Just filenames
2) All the details tab-delimited so can be pasted into excel etc.
3) Provide a full text directory listing, similar to what the command-line version would provide.

copy_paste.png

There's multiple files because there's multiple users. Though I did find a min bug, that it doesn't filter based the the current user you are viewing.

Screenshot 2025-06-15 203238.png


Paul Hatchman

unread,
Jun 15, 2025, 6:37:02 AMJun 15
to Altair-Duino
Should have mentioned that is with Ctrl-C. 

I'll put in better Mac bindings in the next version so it will be cmd-c on Mac in future.

Walt Perko

unread,
Jun 15, 2025, 9:34:20 AMJun 15
to Altair-Duino
Hi, 

I think getting the file name, the file extension and the file size would be the most useful.  IF the list can be dumped into an Excel file then this makes it easy to find a .DSK when looking for a specific program.  



.

Paul Hatchman

unread,
Jun 15, 2025, 9:38:15 AMJun 15
to Altair-Duino
OK I'll include that in the next update. I can add it to the "File" menu as well.

Walt Perko

unread,
Jun 15, 2025, 9:40:23 AMJun 15
to Altair-Duino
Hi, 

IF each column can be comma or tab separated that would be even more useful.    Name ... Extension ... Size  



.

Reply all
Reply to author
Forward
0 new messages