Commander X16

A nice Commodore 64 almost compatible with extensions. Better graphics modes with 128kB of video memory, 512kB of paged system memory, 40kB of main memory, a good emulator, 8 channel FM sound and an FPGA graphics solution.

Good 6502 development tools are available and the ROMs are open source. You can buy nice USB keyboards to help support the project. The 8-bit guy does many YouTube videos on classic microcomputer technology. He has good support of the retro community and if it were not for a design constraint of using as much off the shelf older parts then it would be a single chip thing. But part of it is the hands on experience, as the emulator on a Raspberry Pi would work.

The physical hardware is still under construction. As an 8-bit system without an accelerator it is suitable for new code or conversions of old. The main goal is to prevent scrap by the off shelf requirements and make an easier to code for machine than the Pi. One person can understand it all given time.

I’m doing a factor analysis of the hardware docs now to check how I’d use it. I think a scan limited 512 by 448 graphics 4 bits per pixel mode is one I could use for games and other software development. I’m sure a nice palate of colour can be made for the index and offset constraints of the graphics.

It has 16 hardware sprites and more of the system is becoming finalized. The sound was recently tested and works after sorting out some 8MHz timing issues. Some IO is still in design but it is looking good.

Here’s a community site.

As far as tools to look into Millfork, cc65 and the open repositories such as the VSCode plugin are on my list. It’s all looking quite nice. Getting the directory prepared and a suitable subdirectory for the development of a great library and demo template is going to be handy. It can be kind of a clone of the emulator binary directory as this is where the default loading and saving takes place for the emulator.

This will also keep the emulator relevant for the demo, and updates will be easier to not have to fix things without a schedule as could happen if the “latest” emulator was the default. This also manages postponement of “ROM changes” sufficient for not getting sucked into regression or editing other source and having to wait for pull requests to be merged.

The CTRL+SHIFT+P combination for the VSCode command palette gets access to build commands for millfork with the right configuration. This onlt has to be done for the project once, and a blank main.mfk makes a blank main.prg and so it kind of is setup for further progress. Putting all the right things in the git repo helps to keep the path statement unmodified. The settings are enough to get started.

Here is where I intend to put my development tools and first developments as they become what they become. The low memory and low speed of the system makes for some interesting challenge of design and implementation approximations that will be full of creative potential. Nice!

Happy coding.

UPDATE 2019-10-30: Going quite well. The Millfork works well, and after some errors (simple if you know what the compiler is trying to do), mainly obvious for people who have done assembly. It does indicate that context parsing is done after a dead code tree. The next up is likely a bit of colour in the font, and some file loading of a bitmap.

Flutter and Android Development

So after some install minor trouble in IntelliJ due to minor bugs in the Flutter Dart plugin, the system works quite nice. Hot reloads are the best. There are however some issues. Like the following.

  1. The produced files are multi-megabyte resource hogs. This may just be the debug version, but even with building production APK, not having JDK 8 options in pro-guard, a simple 1 page GUI hits 6 MB. (Be careful of libraries).
  2. There is little configure-ability in the default demo project. Things like default used SD card for install and other sensible options, mean trips into the Android base code and XML more often than should be necessary. (I can’t edit my MainActivity.java with source highlights and error locations).
  3. The state-container split is weird, especially as all the sub-containers are in the state. I do like the templating though in IntelliJ. (The documentation on preserving state is scarce).
  4. Generic functions are nice, and so is some of the library support. There are still a few inconsistencies, but these should iron out over time.
  5. I’m about to discover the GC of PaintRecorder panic on my graphical reserves. I assume this is making GL shaders in the background.
//looks different now, ... The package dart:ui has issues!!<br />//and a duplicate Image, Rect, ... classes
  void atlasUsing(SmartCanvas sc) {
    sc.drawRawAtlas(hi, _transforms,
        _getCharacterRect(),
        Int32List colors,
        BlendMode.srcOver,//should check for mixing foreground and background
        CanvasManager.unit,
        sc.normalPaint);
  }

A bit of work later, and the dart analyser does not crash as often. I think it really is important to not go too low level without some knowledge. The classes collide, and it is best to import dart:ui as an as (I picked ‘Hood’ for under the hood), so as to avoid many of the issues. This does mean that I will have to abstract many of the functions of the low level to be easy functions working with high level (non Hood) Paint, Rect and others. But it was a fun journey!

The channel interface to native is quite an interesting journey as well. It has all the memories of Java and switching back from dart, some things are missed. I’m using the Android platform to generate some sound in the current project. There is not too much in the way of basics to play sound files in the Flutter libraries. Custom AudioTrack stuff is a definite return to Java and a MethodChannel.

The next thing is some code to put the sound together, and some code to add in some convenience methods for putting animation on the CanvasWidget I’ve put together. The IntelliJ dart analyser keeps failing but is restartable after a bit of editing. The code is quite simple for many tasks. There is some complexity when dealing with Future<X>, which infects its way up the stack, needing some setState() for eventually filling in the data on the future resolution. You’d have thought that a return await would have resolved and made the async wait for a resolved future. Because, the documentation is unclear on many things.

It’s not a perfect language isn’t dart, but it is quite nice to use. Flutter is actually very good. I’d suggest ScopedModel and quite a few of the better packages to be included in most projects you’d make.

Kindle Fire (Pt. III)

A general complaint about Android devices is that when you’re low on power, and it always wants to switch on and waste it rather than wait until you press the on button. It’s part of the global always on spy network, designed for idiots with money and not for intelligent or off-grid people. Alexa likely wants to know your inside leg measurement. As I said this is general to all Android devices, so I suppose expecting more from Amazon was just too much.

I suppose it would be too much to edit things like the above equation on the device, but I will try to see if there is such an equation editing tool. Plenty of good calculators, but few typographical tools. I sometimes would like to do this. It’s not as though I need the mathematical assistance, more typographical layout, for including in documents.

It seems there is nothing which will do this offline. Maybe an app opportunity? Likely a long development. It depends on other tools such as MathML being hack-able into something else. Of course n=k in the above equation. A bit of maths in the “analytic closure of integration” to make it a deterministic process for a CAS (Computer Algebra System). It replaces integration (hard for computers to pattern match, and based on a large and incomplete knowledge base) with simultaneous equations and factorization.

There seem to be some downloaded episodes of some series happened this morning. Three free episodes (Number 1) of some random TV shows. I assume this is to get people into watching exciting stuff. I feel a bandwidth suck in the making. Ah, so it’s called “On Deck“, and although kind of interesting, it would be nice to make it only use certain WiFi networks. While on 4G hotspot proxy, it will make my bank account sad.

Amazon Kindle Fire 7″ (Minus Ads) + Raspbian PC

Well, they say it’s in the post. It should arrive before Christmas. This review will get longer as I test it out. I had to get the 8GB version as the lack of adverts was something that was essential. Maybe I’ll get better use of PDFs, and free up quite some space on my mobile by not needing all the document apps on it. I just wonder how much “junk” is installed by default, and how much can’t be disabled. Exciting! Alexa, swear like a sailor!

Quick side notes: I’m replacing my Debian by Raspbian Desktop for PC (Ooooooh). It’s going to be the standard OS of Linux in the company. Just updating the development with node, fpc and git. Along with httpd2, mariadb-server and php.

More gigs of android updates this morning. Why can’t android developers trim their code? The tools are available, but they seem not to be used, and the insistance of stuffing apps with excessive graphical resources continues. How many gig for a texting app?

So it was a little weird. First make sure you have plenty of data, as it will do a system update within a few hours. Get all the apps you can find off the AmazonStore (after you sign in) and be aware that not all the ones you want will be found. Then enable side loading of apps, and get the four needed .apk files for google store. Install these in the correct order, and open play store. Sign in. Get the play apps you want.

A note on compatibility. Microsoft Outlook will required Chrome to use gmail. The play store may try to download updates for some of your apps. This is OK, but some will give errors. This can be divided into 3 groups.

  1. Things like LinkedIn – Likely using a strange hack but it does work.
  2. Kindle app – Play store tries to update and fails, it needs setting to not automatic update in the play store (on the menu of the app listing in the store). This then seems to disappear after the firmware update.
  3. Things like Whatsapp – Just not compatible as there is no phone device.

Luckily the Fire does not try to auto-update apps which were sideloaded (or downloaded from play store). It tells you this in the library updates section, so don’t be tempted to enter update fight hell. This could be problematic. Some notes on the options I chose to ignore on the first setup.

  1. Ignore the Amazon, Facebook and Twitter integration. I mean you could try it, but I haven’t, as the play store apps work just fine.
  2. You must enable sideloading. This can be a problem later if you don’t understand the implication of downloading a .apk file. Remember the play store is the guest store, and so needs sideloading to work. But any random internet site could have a downloadable with bad intent.
  3. Alexa seems to want to work, but she hasn’t said anything yet. Maybe I’m just doing it wrong. This is the most likely option.

After a bit of connection to ADB, it looks like the Alexa service uses about 10% of the processor power just waiting for the word “Alexa”, which is a bit extreme for me. Gag ‘Lexa, oh yes!