Sunday, 22 November 2020

Multipaint 2020

I've tried to have a major Multipaint version out each year, at least as long as it makes some kind of sense. Now Multipaint 2020 is out, somewhat later than I hoped. 

The fix-list of every tiny thing is too numerous to put anywhere, the website details the more important ones (http://multipaint.kameli.net). I'll just open up a few points too large to fit there.

The largest step was to move over to Processing 3. This itself doesn't really change the program appearance in almost any way. Hopefully as a newer version it would be more stable and the prefs.txt problems becomes a thing in the past. 

Sadly the transition to P3 means the application is likely slower, something that shows itself on less powerful computers. I compared the Processing 2-based version on Raspberry Pi 3, and found that version to be useable, whereas the new executable made with Processing 3 is quite slow.

This could be due to the way the screen renderer works, but I didn't dare to meddle too much with a thing that worked well in the past.


Application window resizing

(Edit: The feature doesn't work in all Linux desktops. Hang on.)

Edit 2: It does work, too! (24.11.2020)

A major visible change is that I made the application window resizable. Although the program had been already written with a flexible interface in mind, and it could be set from the prefs, the app could not be resized while running. 

However, despite the old code there was still bring a bunch of boring upheavals to the interface drawing and scaling routines.

Dark theme, resized window, SET GRID and a 100% C64->ULAplus conversion caught at the same time.

There are various reasons for making this. One is that there may be low-resolution screens which didn't just about fit the display, so you have a chance to adjust the situation a bit. It's also easier to make larger if it's too tiny for your display, without fiddling with the ZOOM parameter in prefs. Also, if your screen size allows it, it may be nicer to have some more of that good old border visible.

Just to be clear the target platform resolutions are not alterable. I did some behind-the-scenes work to enable non-standard screen sizes, important for Amiga, but this will be a future feature.

I long wondered why Processing 3 does not allow the direct use of size() no longer, or the use of variables as parameters to it. Well, in P3 it's now simply surface.setSize() and works just as well or even better so no worries really.

If the chosen viewport doesn't fit the current scale, Multipaint will re-scale the interface. Also, if you make the application window substantially larger, the scale will follow. Scaling was a feature that was previously only accessible from the prefs.txt ZOOM variable.

The least I now want is to make Multipaint more complex. So, it should still work as before and you might not even notice the resizable window feature if you don't need it.

Resizable window is also a base for future developments, as more flexible target platform resolutions could be made to fit better in the application window.

A very large window will unfortunately slow down a computer, or make your computer choke and start the fans, even if you do nothing with Multipaint. This is something that relates to the way Processing updates the window and apparently can't be helped much.


So, it's somewhat ironic that if you have a huge 4K/8K resolution display specifically for graphic work, then Multipaint might not work ideally on it. Resolutions like 1920 x 1080/1200 should not be too huge. I'd recommend not working on lower display resolutions than 1024 x 768, but it shouldn't be impossible.

Still, the window resizing is less than complete. You can't yet change the actual viewport position, for example.


Dark theme and Set Grid

I added an option to switch between light and dark theme. This did not require much work, as the interface fonts and icons are based on custom routines anyway and not on real fonts or image files.

Set Grid dialogue is something I wanted to add. The already existing grid commands and presets should work as before. This is again a "funny" thing in that the facility for making arbitrary grids has been there for a while, but there was no dialogue to make it happen.

I can only note that when working with 8x8 attribute modes, if the grid does not align with the attribute grid it can be really confusing.

What with the new drawing routines and all, the grid color is again a bit silly. It's like a recurring nightmare. I added a brightness setting as a hasty fix, but as some have commented the grid might have been too dark in their monitors anyway so it is good to have it adjustable. But this is a topic I'll have to look at in the future, again.


Border analysis

When loading png/jpg images, Multipaint will make an attempt to deduce if the image has a border and takes the "real" image from the middle, if it has the correct resolution (or a duplicate/triplicate of the resolution).

For ZX Spectrum and C64 modes this might be helpful when using Multipaint with plain jpg/png files.  It also makes it a bit easier to load existing images from the internet.

I'd still recommend using the BIN file format for project work.

Multipaint loading a 3x PNG file saved from Fuse. (In this case, use SCR, really)

However, if Multipaint can't explicitly determine a border, it will simply load and scale the image, borders and all. For example you might have a small logo in the centre of the screen and a black background and border. In the future there might be a "crop anyway" dialogue.

One problem was whether to include this feature in modes that don't really have a border. But I felt that there might still be quite a lot of images with a "border" in them, such as Atari ST screenshots. So I enabled this for every mode.


Amstrad CPC Overscan 384 x 270 x 16

The original Multipaint interface was very fixed to the idea of having a 320 x 200 resolution at tops. This was also reflected in many, but fortunately not all, internal structural choices of the program.

But now it might be the time to expand these horizons a bit.

To cut a long explanation shorter, instead of resizing buffers I'm using the same room more efficiently to manage the 384 x 272 x 16 resolution.

Just as with all the Amstrad modes, the export template is taken from Marq's Pixel Polizei (thanks!), so you should be able to get the exported images up and running on a real Amstrad. I also followed the export code quite strictly.

The CPC overscan, I'm told, is not really a very standard graphics mode, so I'm now sort of opened the gate for software-enhanced modes(!)


Amstrad CPC mode 1 320 x 200 x 4

This was already in the later 2019 version I think. The mode was a fairly simple addition, but I don't expect many to use it. It is somewhat nostalgic to me as I used to see screenshots of Amstrad games in magazines and they often looked like Spectrum games except with one or two more colors and I wondered how this could be. 

There is an overscan variant but I have not implemented it yet.


C64 unlimited 320 x 200 mode, and other C64 goodies

I added the C64 hires unlimited mode that was previously experimental. It behaves like a C64 320 x 200 mode, with the fixed palette of 16 colors. Howver you can draw the colors freely without any color clash.

So you could basically draw a C64 hires image without Multipaint imposing anything on you, and then move over to the C64 hires mode, and have Multipaint "validate" your image.

The reason for this mode in the first place was I wanted to work on composite sprites, i.e. overlaying different-colored sprites to make hires sprites with many colors. (Or superimpose hires on multicolor sprites). However, it is your responsibility to convert the output png into valid sprite data.

Adding this mode is a bigger change in the Multipaint "philosophy" than might seem and I've felt a bit troubled about it every now and then. However, perhaps better simply make it available and face the outcome.

Why don't all the modes have this option? I haven't still quite decided if this should be a unique mode or rather a switch inside the modes proper.

The transition between different C64 modes is now smoother in that your chosen palette will be preserved and so is the border color. The image is still transferred via "bitmap conversion", but I have not seen any problems coming out of this.


Multipaint at kameli.net

Thursday, 19 November 2020

6€ Fleamarket bonanza

I found these three items, each cost 2€.


Virtual reality!

You'd think VR costs tens of thousands, but it actually costs 2€. If you already have the phone, that is. In the past I've been semi-impressed by how these plastic gimmicks could deliver a VR-type experience in a mobile phone.

I tried the Shinecon VR on an iPhone and it brings the usual split-eye head-achey effect and viewing angle for Youtube VR videos.

The eye horizontal and depth adjustment can be changed but overall this might be designed for a bit smaller head. My nose couldn't find a good location inside.


From the few videos I tried I could not really judge if the lens settings were correct or not. The head angle tracking in iPhone has been so far more impressive than the depth effect. Some videos were also kind of fake and not really stereoscopic.

I didn't try it on any games as they might need a separate controller so this side of things remains to be seen.


Karaoke microphones!

This was actually a quite nice find for 2€. These are Playstation 2 Singstar Karaoke mics. 

I stuck the USB adapter directly into my Linux system and picked the "serial" microphone input in Audacity. The other mic goes to Left channel and the other to Right. Seemed to work well enough on Performous, the free Singstar-like, and why not.


Obviously I could use the mics without the USB adapter, and the adapter without the mics. Maybe I'll follow up one day with my experiments.

The mic heads could be screwed out and the insides were a bit dusty and a christmas tree needle was stuck there.

I suspect it is a USB 1 interface but that should be enough.

Edit: The audio connectors are standard but have been made so that very few plugs fit them physically.


Mini Clothes Iron!

This Black&Decker Stowaway clothes iron doesn't have much to do with computers or electronics, and I added this to the pile mostly for the cute design.


Well, who knows I might want to heat something when building stuff and this would suit better than a full-size iron or a soldering iron.

The shape is very compact but the cable is still rather huge. Whether the handle lock doubles as a safety, I didn't yet check. There's a 110V/220V switch too.

Edit: After overwhelming popular demand, I will also show the iron in the compact mode. The cable can then wrap around the whole thing if needed.


I can also confirn that the handle lock does not double as a safety for the thermostat. So the iron can heat in this position too.


Bonus round:

A week later, I got this cable tester.


It works with a battery and blinks lights one at a time to show if the RJ45 or RJ11 cable connections work.

Monday, 9 November 2020

Rambo-thon

Finally, I got to watch all Rambo films.


First Blood 1982

We meet John Rambo, a Vietnam veteran whose best buddies died in the war and now he finds out the last one of them has died too.


While still dressed in that reunion garb, trying to get into a town he gets harassed by a local sheriff. He gets PTSD in the cell, kicks everyone's ass, leaves the station, steals a motorbike and drives to the hills and to the realms of legend.

I liked the detail when the sheriff's car turns over, Rambo actually seems concerned if something bad happened. As he sees the sheriff crawl out of the wreck, he leaves.

Rambo tries very hard not to kill anyone and even the sheriff has some sympathy towards him, it just turns out everyone else is a bit trigger-happy gun-nut. Things escalate and soon the sheriff has a small war in his hands. 

The general consensus is that this is a film with actual merit, and I've tended to agree. Well, I've always thought the Trautman character to be a bit silly.

Rambo lays traps in inhuman speed. All the sheriff's henchmen are clowns eager to join the fight despite having already seen what Rambo can do. Yes, some have worries about this but dutifylly they go on.


Rambo II 1985

Rambo has been in the prison labour camp for five years. Trautman makes a deal that if Rambo does this mission he can have his freedom.


As Rambo later explains to a POW, it is 1985. Taken very literally, the events in First Blood would take place at 1980.

Some have ridiculed the lightning fast relationship of Co Bao and Rambo. But what isn't obvious is that the mission takes several days (as it gets botched) so perhaps these warrior souls could relate to each others quickly. 

Of course after they reveal their feelings it doesn't take a minute until something bad happens. I recall MAD Magazine making a joke about that lucky charm pendant perhaps being not so lucky after all.

This film established "Rambo" as a shorthand for American jingoism, but this isn't fully deserved. The film does have critical tones towards the establishment and derives some tensions from the post-Watergate conspiracy and paranoia themes.

The computers at the base seem a bit old-fashioned for a high-end operation in 1985. The strange anti-technology vibe in the film is a bit inexplicable. But it must be remembered, a "computer" picked up Rambo as the person most likely to survive this mission, so Rambo has some resentment towards the bureaucratic "machine" overall and the technology that made him do it. 

Likely the computers were networked so all the data was safe, though!

The film is actually quite coherent and enjoyable, maybe inexplicably a better film than it should be, and a canonic part of 80s nostalgia.


Rambo III 1988

This is a really big money film. Rambo is in Thailand, participating in an (illegal?) martial arts scheme and helping some monks. Later we see him in Afghanistan in an attempt to rescue Trautman.


A lot of effort has been put into presenting and respecting local cultures but this tends to be a bit exoticist and orientalist. Also, the russians are characterized as brutal and inhuman.

One gets the idea this was to take Rambo more in the direction of Bond or Indiana Jones films, suggesting a series of films in the rambo format. And it kind of works, except the latter half of the film simply repeats the kind of action scenes already seen in Rambo II, only made bigger and even less credible.

Trautman's character is taken to strange extremes, suddenly he is quite a 'rambo' himself, despite having been tortured by the russians for a while.

The Spetsnatz seems a weirdly mismatched, rag-tag bunch.

Surely the 1990s should have had a Rambo film or two, but the times had changed drastically. Perhaps the Gulf war again made war a reality so a rambo-flick might have been a bit tasteless. Films like Hot Shots! Part Deux were already making fun of the genre.


Rambo IV 2008

At the time of the release of John Rambo, it felt surprising a Rambo made in 2000s could be as good. It didn't add that much to the Rambo mythos, though. Now that I've viewed it so quickly after the 1980s trilogy, it feels even less necessary.


I like the rawness of the images, and the return to somewhat more "primitive" film-making. The roughness of the environment and the brutal violence is a contrast compared to the more comic-book antics in Rambo III. 

It's a nice idea to start asking what Rambo is and how he could get his redemption, or come "full circle". It's just that this idea does not progress much here.

The bad-ass mercenaries are a nice touch, Rambo can concentrate on being quiet and the gang brings some added color to the film. Their internal dynamics is sometimes cleverly made apparent by visual storytelling, but they don't really have much of a story to tell.

Unfortunately, the poor treatment of women as some kind of story/shock element is a bit annoying and tends to bring this film down. Perhaps this is ultimately what makes this film less appealing to me than Rambo III.


Rambo V 2019

Rambo lives near Mexican border at the farm we saw at the end of the last film. Ten years have passed and Rambo has apparently both helped solve some problems there and found some peace for himself. Ok, so he does dig these weird vietcong-style tunnels under the farm, keeps an unnerving amount of Vietnam memorabilia, and takes meds.


Rambo's sort-of grand-daughter goes to Mexico to see his biological father, despite stern warnings from John. Turns out the dad doesn't truly give a shit. By way of deception the girl is captured by criminals specialising in human trafficking and prostitution.

As Rambo goes there somewhat unprepared, the gangsters are able to, well, gang up on him and beat him to pulp. As he recovers with the aid of a journalist, crucial time has been lost.

Rambo is a bit too old to be an action-hero, but when the violence really starts some thought has gone into figuring how he could still do it. This is done adequately, although I was hoping more of outdoor environments and perhaps even horseback fighting.

Trump's wall notwithstanding, criminals, drugs and guns move to-and-fro between the Mexican border. Again the henchmen are quite loyal. The fiery explosion that blows up a car should have given the gang a pause. Also, why are they so certain Rambo is alone on the farm in the first place?

I felt the film was tonally bit off at places. From Rambo II onwards John Rambo specialized in rescue missions and so it is here too. But, "Rambo goes to Mexico to rescue an innocent girl" is perhaps not the best premise. Why, after all of the shit Rambo had to bear, something nasty had to happen once more. Crucially, this time it is completely unrelated to his military life and perhaps this is what makes it feel a bit random to me.

When discussing Rambo IV, I suggested the nasty treatment of women worked as a poor shortcut to showing how "evil" bad guys are. As human trafficking is a very real thing I suppose it is more appropriate here and it is not dwelled on too much or in a wrong way.

Whether Rambo dies here is open to some interpretation. But either way I hoped he could achieve something more than disposing an arm of a Mexican gang.


Altogether

I'd thought there would be more to learn and say about Rambo after watching all the films in relatively short time. But after Rambo III we don't get to know much more about Rambo's past or his persona. Last Blood kind of shows what came of him, but other than that not much is added to his story.

John Rambo ascended towards the film three, each time facing a bigger war. Then the scale of action becomes again smaller in IV and the latest film looks at a skirmish comparable to the first film.

There are Rambo books too, in fact the character made his first appearance in David Morrell's book from 1972. I've only read that one years ago and I am unable to compare it to the film here.

There's also more Rambo material. Such as the animation series. And I've yet to see Syndicate Sadists with Tomas Milian from 1975, technically the first Rambo film. Perhaps some other time!