Bootstrapping Android Development: A Survival Guide

Developing Android applications seems like it should be fairly straightforward if you believe the glossy marketing by Google and others. It’s certainly possible to just follow the well-trodden path, use existing templates and example code – or even use one of those WYSIWYG app generators – to create something passable that should work okay for a range of common applications. That’s a far cry from learning general Android development, of course.

The process has changed somewhat over the years, especially with the big move from the Eclipse-based IDE with the Android Development Tools (ADT) plugin, to today’s Jetbrains IntelliJ IDEA-based Android Studio. It’s fortunately still possible to download just the command-line tools to obtain the SDK components without needing the Google-blessed IDE. Using the CLI tools it’s not only possible to use your preferred code editor, but also integrate with IDEs that provide an alternate Android development path, such as Qt with its Qt Creator IDE.

Continue reading “Bootstrapping Android Development: A Survival Guide”

Microsoft BASIC For 6502 Is Now Open Source

An overriding memory for those who used 8-bit machines back in the day was of using BASIC to program them. Without a disk-based operating system as we would know it today, these systems invariably booted into a BASIC interpreter. In the 1970s the foremost supplier of BASIC interpreters was Microsoft, whose BASIC could be found in Commodore and Apple products among many others. Now we can all legally join in the fun, because the software giant has made version 1.1 of Microsoft BASIC for the 6502 open source under an MIT licence.

This version comes from mid-1978, and supports the Commodore PET as well as the KIM-1 and early Apple models. It won’t be the same as the extended versions found in later home computers such as the Commodore 64, but it still provides plenty of opportunities for retrocomputer enthusiasts to experiment. It’s also not entirely new to the community, because it’s a version that has been doing the rounds unofficially for a long time, but now with any licensing worries cleared up. A neat touch can be found in the GitHub repository, with the dates on the files being 48 years ago.

We look forward to seeing what the community does with this new opportunity, and given that the 50-year-old 6502 is very much still with us we expect some real-hardware projects. Meanwhile this isn’t the first time Microsoft has surprised us with an old product.


Header image: Michael Holley, Public domain.

CPU Utilization Not As Easy As It Sounds

If you ever develop an embedded system in a corporate environment, someone will probably tell you that you can only use 80% of the CPU or some other made-up number. The theory is that you will need some overhead for expansion. While that might have been a reasonable thing to do when CPUs and operating systems were very simple, those days are long gone. [Brendan Long] explains at least one problem with the idea in some recent tests he did related to server utilization.

[Brendan] recognizes that a modern CPU doesn’t actually scale like you would think. When lightly loaded, a modern CPU might run faster because it can keep other CPUs in the package slower and cooler. Increase the load, and more CPUs may get involved, but they will probably run slower. Beyond that, a newfangled processor often has fewer full CPUs than you expect. The test machine was a 24-core AMD processor. However, there are really 12 complete CPUs that can fast switch between two contexts. You have 24 threads that you can use, but only 12 at a time. So that skews the results, too.

Of course, our favorite problem is even more subtle. A modern OS will use whatever resources would otherwise go to waste. Even at 100% load, your program may work, but very slowly. So assume the boss wants you to do something every five seconds. You run the program. Suppose it is using 80% of the CPU and 90% of the memory. The program can execute its task every 4.6 seconds. So what? It may be that the OS is giving you that much because it would otherwise be idle. If you had 50% of the CPU and 70% of the memory, you might still be able to work in 4.7 seconds.

A better method is to have a low-priority task consume the resources you are not allowed to use, run the program, and verify that it still meets the required time. That solves a lot of [Brendan’s] observations, too. What you can’t do is scale the measurement linearly for all these reasons and probably others.

Not every project needs to worry about performance. But if you do, measuring and predicting it isn’t as straightforward as you might think. If you are interested in displaying your current stats, may we suggest analog? You have choices.

Scott and his Prompt 80

Restoring A Vintage Intel Prompt 80 8080 Microcomputer Trainer

Over on his blog our hacker [Scott Baker] restores a Prompt 80, which was a development system for the 8-bit Intel 8080 CPU.

[Scott] acquired this broken trainer on eBay and then set about restoring it. The trainer provides I/O for programming, probing, and debugging an attached CPU. The first problem discovered when opening the case is that the CPU board is missing. The original board was an 80/10 but [Scott] ended up installing a newer 80/10A board he scored for fifty bucks. Later he upgraded to an 80/10B which increased the RAM and added a multimodule slot.

[Scott] has some luck fixing the failed power supply by recapping some of the smaller electrolytic capacitors which were showing high ESR. Once he had the board installed and the power supply functional he was able to input his first assembly program: a Cylon LED program! Making artistic use of the LEDs attached to the parallel port. You can see the results in the video embedded below.

Continue reading “Restoring A Vintage Intel Prompt 80 8080 Microcomputer Trainer”

CP/M Gently

If you are interested in retrocomputers, you might be like us and old enough to remember the old systems and still have some of the books. But what if you aren’t? No one is born knowing how to copy a file with PIP, for example, so [Kraileth] has the answer: A Gentle Introduction to CP/M.

Of course, by modern standards, CP/M isn’t very hard. You had disks and they had a single level of files in them. No subdirectories. We did eventually get user areas, and the post covers that near the end. It was a common mod to treat user 0 as a global user, but by default, no.

Continue reading “CP/M Gently”

Over-Engineering An Egg Cracking Machine

Eggs are perhaps the most beloved staple of breakfast. However, they come with a flaw, they are incredibly messy to work with. Cracking in particular leaves egg on one’s hands and countertop, requiring frequent hand washing. This fundamental flaw of eggs inspired [Stuff Made Here] to fix it with an over-engineered egg cracking robot. 

Continue reading “Over-Engineering An Egg Cracking Machine”

One Camera Mule To Rule Them All

A mule isn’t just a four-legged hybrid created of a union betwixt Donkey and Horse; in our circles, it’s much more likely to mean a testbed device you hang various bits of hardware off in order to evaluate. [Jenny List]’s 7″ touchscreen camera enclosure is just such a mule.

In this case, the hardware to be evaluated is camera modules– she’s starting out with the official RPi HQ camera, but the modular nature of the construction means it’s easy to swap modules for evaluation. The camera modules live on 3D printed front plates held to the similarly-printed body with self-tapping screws.

Any Pi will do, though depending on the camera module you may need one of the newer versions. [Jenny] has got Pi4 inside, which ought to handle anything. For control and preview, [Jenny] is using an old first-gen 7″ touchscreen from the Raspberry Pi foundation. Those were nice little screens back in the day, and they still serve well now.

There’s no provision for a battery because [Jenny] doesn’t need one– this isn’t a working camera, after all, it’s just a test mule for the sensors. Having it tethered to a wall wart or power bank is no problem in this application. All files are on GitHub under a CC4.0 license– not just STLs, either, proper CAD files that you can actually make your own. (SCAD files in this case, but who doesn’t love OpenSCAD?) That means if you love the look of this thing and want to squeeze in a battery or add a tripod mount, you can! It’s no shock that our own [Jenny List] would follow best-practice for open source hardware, but it’s so few people do that it’s worth calling out when we see it.

Thanks to [Jenny] for the tip, and don’t forget that the tip line is open to everyone, and everyone is equally welcome to toot their own horn.