Hi Martin That's exactly how my little routine worked. It just checked for activity on the video lines and then matched against the ASCII codes. If the ASCII codes were within the range of printable text, it just dumped the content to the user port. It was written in 6502 assembler which made it nice and fast. That's the problem with most Windows and, it has to be said, some Apple Mac OS X applications today. They all use interpreters and, in the case of Microsoft Windows, external libraries in order to generate their functions. That's why they are always slower than software written in assembler would be. The advantage, of course, being that you could talk to the hardware directly and by doing so you get access at a much lower level.
Windows is the worst operating system in the world for this because virtually everything that programmers do involves accessing external libraries. In many cases, even printing text uses draw library functions which mean that it's slow. It's for that reason that faster processors, large amounts of RAM and hard drive storage are required. If, as it was in the old days, you could just manipulate the hardware directly, then you would have faster, smaller and, therefore, less resource-hungry applications. The little routine I wrote to generate the output to the user port was very small, just a few lines of code. From memory, it was only about 6 lines of instructions. The main bit was concerned with opening and closing the port. Because of the hardware architecture, it was necessary to open and close the port with each segment of data dumped to it. That's what we now call "Handshaking". The same kind of thing happens with erial communications. There is a DTR and DSR interrupt which you have to change the status of with each packet of data that is transmitted. The TSR line, (Data Set Ready) lines tell the computer that the receiving device is ready to accept more data. Anyway I'm babbling, but that's basically how it worked on the C64's user port. Gordon On 29 May 2012, at 16:55, Martin McCormick <[email protected]> wrote: I figured at the time that a person could write an interrupt service routine or an extra patch of code just as you described. The Apple II had an interrupt but nothing on board used it, not even the keyboard. I had a Mountain Hardware clock/calendar board plugged in to the mother board which actually did supply an interrupt once per second and I did play with it a bit, but you had to butcher up the clock board to get any more frequent interrupts than once per second and I just didn't see the value in that at the time. As for the access interface, I started out with a routine that fit in to low RAM which hooked the address for the screen buffer and converted all the data that could be converted in to Morse Code. That was sure a start since I already knew Morse, but the TSI speech board and the Votrax were each a big step up from the other. While we are on the topic, the sound generator in the C64 was spectacular compared with anything else at the time. The Apple II had a D-type flip-flop for both the loud speaker and for the cassette tape interface. To make sounds, you addressed which ever one of those devices you wanted and that would cause the strobe to pulse which stepped the flip-flop from the state it was in to the next state so, for example, to make a 1000 HZ tone, you wrote a counter routine to hit that address 2000 times a second which cycled it on then off, then on again for as many times as your counter was set to loop. The IBM P.C. systems had a slightly more versatile noise maker in that there was a programmable counter on a dedicated chip which you could set to a 16-bit number which determined the pitch of your tone. The counter/timer chip received a roughly 1-MHZ clock signal and your tones were whatever frequency you got by setting the counter to any number from 1 to 65535 with that value giving you a buzz around 25 or 30 HZ. The C64, on the other hand could have generated speech as it had a 3-voice chip as you mention below. Had my life gone a little differently, I probably would have been really proficient in the C64 as it was quite the machine in its day. You say, > As for the C64, I wrote a very rudimentary screen-reader which sat in RAM > at location 679 and dumped everything textually sent to the video port to > the C64's user port. In those days I had a little adapter which allowed > me to interface a "Braid System" speech synthesizer to the C64 using its > parallel input. The voice was dreadful, but not as bad as some of the > more modern software speech implementation, such as that horrible DecTalk > 32 that ships with Window-Eyes, and the DecTalk Express and DecTalk PC > which used to be quite popular for some reason. DecTalk always reminded me of somebody who had had a few too many or who had suffered some trauma that one might be curious about but prudence would keep one from asking any probing questions. You said, > The sound on the C64 was innovative for its day and could probably still hold > a > candle to some more modern hardware of its type. It definitely could. What we have here is evolution. DSP chips of which the C64's sound generator is one are an example of dedicated hardware doing one thing extremely well and it probably wouldn't be worth a darn doing anything else. It sounds like we were playing with similar toys in the eighties. I ended up learning the Motorola 68HC11 which is a digital controller chip. It is a 6800 processor with some timers, interrupts and an A/D converter. It had a monitor ROM one could use to develop assembly-level programs so you could use it to control whatever your imagination desired. The 68HC11 was originally designed to be the engine control unit in 1980's-era cars. I had a lot of fun playing with the 68HC11 as it was a lot like the 6502 except you could sure do a lot more addressing modes and therefore more powerful programming. So long for now. Martin ======================================= The Techno-Chat E-Mail forum is guaranteed malware, spyware, Trojan, virus and worm-free To modify your subscription options, please visit for forum's dedicated web pages located at http://mail.tft-bbs.co.uk/mailman/listinfo/techno-chat You can find an archive of all messages posted to the Techno-Chat group at either of the following websites: http://mail.tft-bbs.co.uk/pipermail/techno-chat/index.html Or: <http://www.mail-archive.com/[email protected]> you may also subscribe to this list via RSS. The feed is at: <http://www.mail-archive.com/[email protected]/maillist.xml> --------------------------------------- ======================================= The Techno-Chat E-Mail forum is guaranteed malware, spyware, Trojan, virus and worm-free To modify your subscription options, please visit for forum's dedicated web pages located at http://mail.tft-bbs.co.uk/mailman/listinfo/techno-chat You can find an archive of all messages posted to the Techno-Chat group at either of the following websites: http://mail.tft-bbs.co.uk/pipermail/techno-chat/index.html Or: <http://www.mail-archive.com/[email protected]> you may also subscribe to this list via RSS. The feed is at: <http://www.mail-archive.com/[email protected]/maillist.xml> ---------------------------------------
