The Matrix Scanner.

avatar

For the Amiga 500.

Creating something new using something old.

A long time ago.

There was this marvelous computer, made by a company known as Commodore, its name: AMIGA. Which means 'girlfriend', translated from Spanish. Guess Geeks like me did not get the irony of having a computer for a 'girlfriend'. The one I had was an Amiga 500, with a memory extension of 512 KB {Kilo Byte}. And really, that aint a typo. Combined with the internal memory, there was a whoopin 1 MB {Mega Byte} to play with. At that time, 1987, that was considered quite a lot. And compared to my first computer ever (TIMEX1000 aka Sinclair ZX81) it was enormous. What really attracted me to the Amiga was its Operating System. A graphical interface 'Workbench' and the use of a mouse, it was quite different from MS-DOS. But the Amiga could do more that just show off with a sexy user interface. It was 32 bit, and most of all it could produce mind blowing audio and video.

One of the things on my wish list was a scanner. The one that could be operated manually, by moving it slowly over the paper, or photo, was quite expensive. Also I noticed during testing one of those in a store that I did not have the right steady hand movement. Nor did I have enough patience, I guess. All the factors combined I knew that this was not something I would be happy to use. Then one day I had the idea to build one myself, not a hand controlled one, but fully automated. Was I a qualified engineer? Nope, not at all. It was more that I allowed myself to dream, using my fantasy about future developments. The way I did this was by thinking about something as a finished existing object. Later I learned that this is known as lateral, or creative, thinking. (Edward de Bono has written quite some interesting books about it.)

A3 Matrix Printer became a Scanner.

At some point in time a good friend of mine had an A3 matrix printer to offer. Only one thing, it did not print anymore. He thought that I might be able to fix it. It was worth a try, although the sound of such a printer was just horrible. First I removed the print-head, to try and clean things up, sometimes that helps. And again I am not an expert at all, I 'just' do things and learn along the way, or not, it depends... Putting back things together, send a print, everything worked, except the printer-head. And I noticed a smell that did tell me something was wrong. This was beyond my technical understanding, except for the stench caused by a short-circuit. And while I removed the print-head I looked at the wagon and had an 'Eureka' experience. Because I just discovered the perfect foundation for my 'Matrix Scanner'! And the search for the hardware began. Instead of a printing element I would need to create a scanning element, would not even be as half as noisy.

To cut things short a bit... The scanner head I made from an optical transistor and a tiny low-voltage light. For the optical transistor I had to make a little cone, with a very small opening, dark on the inside. Basically the optical transistor would respond to the amount of light reflecting from the surface that was to be scanned. The more light it received the higher the voltage it would return. And darker spots it would return less to zero in value. That was the theory. And for this to work I would need to have the wagon move as slow as possible. And have the paper feed turn with a little step for every new scan-line. This would just mean I had to set the printer into a high resolution setting. That could be done manually, but I wanted it to be automated. And that was the point where the printer manual came in handy. As it turned out that I could send commands to the printer, setting it to high resolution. Nice, but how to get a scan inside my Amiga 500?

AMOS Basic rocks!

One of the most exciting pieces of software that I had ever bought for my Amiga was AMOS Basic. A programming language based on the BASIC language. It compiled projects into fast running software. Amos Basic had a lot of potential, as I could also easily access the AMIGA hardware with it. And I would be able to remotely control the matrix-printer, now becoming a matrix-scanner. Even though it only had one transistor, and not a whole matrix of them, just thought the name sounded cool... All I would have to program was an interface to control printer wagon, paper feed and the data coming in from the optical-transistor. It sure would be fast enough. So, I hard could it be. All the hardware construction I had done. And for the 'scanning' signal I just used a long print-line that I send to the matrix. The wagon moved slow, the paper-feed turned with tiny steps. All the software would have to do now was to 'read' the data coming in from the analogue-game-port and convert it to a 16 level gray scale and put it on screen. Then save the screen image to a disk, so it could be used with other software. And this might seem like I did this in within a couple of hours of my spare time, but it actually took me a bit longer than that. Trial and error, it became a hobby, well, a kind of.

First run, excited, a photo that I wanted to have scanned. (It got bend of course, but hey, that was a price I was willing to pay.) But what I got to see on the screen was disappointing, very much so. And my hand wanted to reach out for a hammer, to have this settled once and for all. Instead I decided to take a long walk though. As this was a time where I did not have an internet connection within reach, I had to get my knowledge from elsewhere. Computer magazines, manuals and so on and so forth. And during my walk I had an 'AHA' moment. Somewhere, I remembered, I had more information about the analogue to digital conversion proces. It was all about matching values. And it involved an Electric Condensor (ElCo) Capacitor, which can be thought of as a kind of a little battery. The one involved in the analogue to digital convertor of the AMIGA was a fast one. Meaning that it would get fully charged and decharged in a jiffy. Which would make it possible to compare the analogue input voltage level to the discharging Elco its value level. (Over simplifying this, I know, but I am not a technical engineer.) This would result in a matching value, or a zero. And AMOS Basic would help me to get the noise out and the right data in.

It's all in a Vertical Blank.

Basically what I had not taken care of was the right timing. And so what I got on screen was the charge and decharge levels of the analogue to digital converting proces. One thing I knew for sure, the Electric Condensor Capacitor was working as it should, hurrah! The noise in the pattern came from the actual matches it made during the scan. Luckily I found some written information about how the charge-decharge of the Elco was connected to the Vertical Blank of the screen. In Europe this was once every 1/50 of a second. Meaning the screen was (re)drawn 50 times per second. (Again, simplifying this, as to stay away from things like 'interlacing'.) All I would need to do was to keep it all in sync. The start of the scan, with the start of the Vertical Blank and then just read in the data, convert it to a gray scale and show it as pixels on screen. Luckily AMOS Basic did provide me with the right commands to be able to do so. Finally there it was the first scan of a photograph. Still quite non-sharp, but with a lot of trial and errors I also got that right. And with the right font-size it could even show text in a readable way. The resolution still was very low, only 320 times 256 pixels, in a 16 gray scale level.

After that I did some fine-tuning. Create a 32 level blue-grey color scale, to add a bit more detail, and also tried the 640x256 screen resolution. But at that time I already had gotten less interested in moving it further forward. What I dreamed of I had constructed and the whole proces was the most fun. Now that I had it working and had scanned what I wanted to, it was time to move onto other things. And the reason I remembered this was because recently I started to dive into programming again. This time with some ideas I have that I want to do with Blockchain technology. No clue yet if that what I have in my mind will be possible for me to create. My first steps into the realm of Python programming are not that promising. There in no love connection yet. So I moved back to PureBasic, a fast compiler, which reminds me of AMOS. (Unfortunately PureBasic itself is not Free and Open Source.) And to my surprise I noticed that a AMOS2 will become available, Free and Open Sourced! So besides the FriendOS project, François Lionet also has been working on a new version of AMOS Basic. And I am sure going to check that one out.

Will I succeed in creating the projects that I have in mind? Well, I cannot tell, so far it has not been very promising though. But who knows. When summer has ended, autumn and winter come, there might be some time to do some coding. Maybe even using AMOS2, now that would be awesome. And in the meantime I typed this text in gEdit so I can copy-paste it into an online Steem interface. While I had a nice trip back into memory lane. It sure was fun and I hope I will get triggered by that creative spark again.

Have a great one!


The good oal AMIGA 500.
https://ipfs.globalupload.io/QmetMi3eGFQWdcwccNiwbKgg2yt6wtB7qHZyV7YhCDYwsh
Photo license CC0, courtesy of Arem Bowski


Resources

NOTE: The AMOS2 Website seems to be quite slow with some heavy loading.

PS Yep, it is Francois alright, LOL:



0
0
0.000
5 comments
avatar

When I did see the keyboard I immediatly knew that it was an Amiga!
Brings back memories!
Thanks for that!

0
0
0.000
avatar

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 22 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 4 SBD worth and should receive 250 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

0
0
0.000