Documentation

8/16: The Journal of Apple II Programming Now Online

Mike Maginnis, the curator of the Apple II scans website has posted 7 of the 9 issues of  8/16: The Journal of Apple II Programming. The Journal was produced by Ross W. Lambert and became 8/16-Central in 1990 when the publication was sold to Tom Weishaar.

You can download the currently available scanned issues from the Apple II scans  website at:

http://apple2scans.net/2012/03/25/816-the-journal-of-apple-ii-programming/

GEOS for Apple ][ File Strucures Explained

Oliver Schmidt, long known for his work on several projects in the Apple][ community including Contiki and Applewin, has now delved into documenting the internals of  GEOS, the Berkeley Softworks  produced operating system for the Apple ][.

In his announcement in the comp.sys.apple2 newsgroup, Oliver says" Although the Apple GEOS filesystem is based on ProDOS 8 the Apple GEOS  files are not standard ProDOS 8 files. I’m not refering to file  content here but to the file structure – meaning that Apple GEOS files  aren’t seedling, sapling nor tree files.

I’ve done some reverse-engineering and have documented my findings here:

http://wiki.cc65.org/doku.php?id=cc65:apple2:geosfileformats

GEOS files are more than the usual byte stream with a few attributes. Therefore they need to be converted in order to represent them in other filesystems. This is just the same as with GEOS 64/128. And again just the same as with GEOS 64/128 it is desirable to have this conversion work “in place” instead of creating copies. To facilitate this a suitable “convert format” has to be specified. I defined one here:

http://wiki.cc65.org/doku.php?id=cc65:apple2:geosconvertformat

Who can make use of this “convert format”?

1. Convert tools running on Apple GEOS (like on GEOS 64/128) or on ProDOS 8. I’ve already written a ProDOS 8 convert – which however currently only supports the “deconversion”.

2. Apple disk image tools like CiderPress or AppleCommander. They could use the “convert format” to represent Apple GEOS files in the host filesystem – and do the (de-)convert on-the-fly when moving files from/to an Apple GEOS disk image.

What’s the benefit of all this?

1. In general it becomes possible to move Apple GEOS files around, transfer them with any filetransfer technicque and share them on the
net etc.

2. I’m working on porting the cc65 GEOSLib (http://www.cc65.org/ snapshot-doc/geos.html) from GEOS 64/128 to Apple GEOS. The cc65 linker creates a “convert format” file which is then tranfered to the Apple GEOS filesystem and finally deconverted there. That’s the reason why my ProDOS 8 convert tool only supports this direction.

3. Now that the basic Apple GEOS file structures are known one can apply the already present knowledge on GEOS file contents – as they are the same for Apple GEOS and GEOS 64/128. Thus it becomes i.e. possible to implement an Apple geoPaint file viewer (or editor):

ftp://ftp.zimmers.net/pub/cbm/geos/programming/documents/geoPaint%20format.txt

From the cc65 developers perspective it would of course be great if  CiderPress and/or AppleCommander would allow to place the output file of the cc65 linker directly in an Apple GEOS disk image as Apple GEOS file, thus superseding the additional convert step.

A.P.P.L.E. obtained permission to distribute the documentation for GEOS in 2003 and if you would like to check GEOS out or to run it on your own system, you can download the entire GEOS CD complete with all of the documentation from our December posting about the program at:

http://www.callapple.org/2011/12/10/geos-apple-cd-re-posted-to-download-section/

 

TV tuner and a DIY antenna

It’s going to take a while to get to the computer related material in this article. Please be patient.

Ever since I was a little kid I’ve been curious about the world around me. I was the type of kid who wanted to see what was on the next block or figure out how dolls were made (yes I took them apart and put them back together again). The only time I got into trouble for it was when a big kid thought he was doing the neighbourhood parents a favour and told us little kids not to go near the river because there was a big monster there. We wouldn’t have gone there anyhow but we really wanted to see that monster. We were so disappointed we told our parents. I didn’t see why they were so upset. We made sure not to go near the river. We stayed a whole six inches away from the water. ;-)

Later I wanted to figure out as much as I could about radio and TV. I used to lay awake for a couple of hours per night listening to short wave and AM just to see how far away the stations I could pick up were. As I recall, the name of the hobby was called DXing. I was able to get stations from South Africa and Moscow on short wave and as far south as the American gulf coast on AM. Now all I can get on short wave is Radio Cuba and American religious stations. TV was similar. When I wanted to see what was available over the air we only had three Canadian stations and one American station. With the switch to digital (many years later) I found we had six Canadian stations and (depending on location) one American station. Actually we have cable in the house and I am satisfied with it. It’s just that I’m still curious about what I can get locally.

I mentioned this to a friend at a local computer club and he suggested I connect my cheap LCD TV to an external antenna. I had previously connected it to our old VHF antenna and was pulling in five of the six Canadian channels. The American channel was a lost cause. He pointed me to the “coat hanger” antenna plans at Make magazine (it’s a DIY magazine like popular mechanics used to be). After reading the description I found it to be a UHF antenna. This was fine for me since four of the local stations were now on UHF (including the one I couldn’t get earlier). The other two Canadian stations and the American station were on VHF-High. I built the antenna and had some interesting observations. In the basement I was able to get two stations. That makes sense because UHF frequencies are basically line of sight. On the ground floor of a house covered in stucco (which filters out some signals) I was able to get all four UHF stations (including the one I couldn’t get before) and one of the VHF stations. The quality of the signal also improved since there were less “drop outs”. After a bit of research I found line of sight improves as the height of the antenna increases.

Not being satisfied I did a bit more research. First off, TVfool.com (a list of TV signals theoretically available in a given area) showed there were additional stations just beyond the horizon. On a good day before the digital conversion we used to be able to pick up two of them when the signals bounced off the troposphere. Apparently there are another three or four more in the area. Then there was video of one guy who lives slightly North of me being able to pick up Minnesota stations. This was a shock because North Dakota is directly to our South and much closer. It was about that time when I discovered plans for the Grey-Hoverman antenna (released under the GPL3). Apparently this antenna is so sensitive it puts the coat hanger antenna to shame.

While I was out shopping for material to build the new antenna I was talking with a sales person and a TV engineer I met at an auto supply place. They both decided to give it a try themselves earlier than I had. One of them was using a TV tuner card on their PC with the four inch antenna that came included in the box. The other guy had an expensive TV with a cheap commercial antenna (he was opposed to cable and satellite TV on principal). Their experiences were strange. Apparently neither were satisfied with expensive commercial antennas and found the cheap ones were just as good if not better for their needs. Both were able to pick up all the stations in town as well as the American channel. I told them what I was looking to do and I was looking to spend $10.00. They said for that price it was worth giving it a try.

At the moment the build for the Grey-Hoverman antenna is stalled due to a cold.

Here is the computer related part. Another computer club was looking for a presentation last month. I figured since I had the coat hanger antenna we could look at a TV tuner card. A member of the club has a friend who works at a local computer store and he asked me if he could help. I suggested he see if he could borrow a cheap $50.00 digital tuner card. The store loaned us the top of the line $250.00 card for the meeting (Thank you MyMacDealer for the free loan). On the day of the meeting I realised the building was of a cinder block and rebar type construction. It also had lots of steel heating ducts and such. Essentially this meant it was worse than my house for getting signals. Plus we were also meeting in a room smack dab in the center of the basement. The package didn’t come with the four inch antenna I anticipated. It didn’t come with any antenna at all. I had my doubts it would work. Without an antenna there was no signal at all. With the coat hanger antenna it brought in one strong and one weak signal. Much better than expected. I showed the plans for the coat hanger antenna to an engineer as well as a city technologist. They thought the design was very ingenious. A couple twists here and there introduced some noise cancellation features. According to what they said the coat hanger antenna performed much better than expected.

Once I build and test the Grey-Hoverman antenna I’ll approach the other group and see if they want to do a live demonstration of Myth-TV. This way they can test the two antennas side by side. They will be using a different tuner card. The one for the Mac had a single tuner and connected to the USB port. The one these guys use has two tuners and is an internal PC card. The cost of this particular card is about $150.00. Boiled down to the nitty gritty… The TV tuner cards work. If it doesn’t then return it and try a different model.

Some DIY stuff… The construction method I used with the coat hanger antenna was pretty shoddy. Further reading suggests it is really hard to go wrong with this one. Just make sure the wires are not touching when the connecting elements cross (insulated wire is a good choice here). The coat hangers should be scuffed so as to remove any paint and rust so they can come in contact with the connecting elements.

For the Grey-Hovermann antenna it is best to build a jig for bending the wires to the correct angle and cutting them to the correct length.

If anyone is looking for increased sensitivity and distance, connecting two identical antennas together will work. However anything more than a dual bay (two antennas) results in diminishing returns and isn’t worth the effort.

It is possible to angle both antennas in a dual bay differently. However if they are at a 90 degree angle the signals cancel out.

Reflectors can increase the sensitivity up to 30% but turn the antenna into a directional antenna.

Using wood as a mounting material means the antenna is designed for indoor purposes only. Outdoor antennas are typically mounted to PVC or insulated metal.

Outdoor antennas need to be grounded.

For the most part for a basic antenna, scrap material can be used for minimal cost. Using better quality materials and better construction methods will improve the output somewhat.

As a radio tech friend once told me. “All you need to get a signal is a long enough piece of wire. Anything else is just getting fancy.”

VirtualGS Book Now Available in iTunes Book Store

T. C. Lim has been working on a book about Pascal programming for the Apple II gs for the past several weeks, releasing preliminary versions along the way.  The book includes a number of programs his kids have developed for the Apple IIgs in Pascal, Orca Pascal, and GSoft BASIC.

The book was produced with iBooks Author and is the first Apple ][ series related book to be produced specifically for iBooks 2.0.  T.C. has announced the immediate availability of the VirtualGS book in the Apple iTunes Book Store.

VirtualGS for iBooks 2.0 is a free download.  To get your copy, go to:

http://itunes.apple.com/book/virtual-gs/id498416459?mt=11

FireFox tip

Those of us in Canada are aware how our government keeps “shooting itself in the foot”. Those outside the country may not be aware just how silly and petty our government can get. For example they have this thing about promoting Canadian culture in the media. Not too bad on the surface of things right? Rather than encourage Canadians to produce our own material they de-regulate the media so they can purchase more American programming. Some of the stuff from South of the border is OK so it can rise and fall with the local ratings. However they take it a step further. If a Canadian station schedules a TV show at the same time as it is scheduled on an American station the cable companies are supposed to replace the American station with the Canadian station. This way the Canadian station can count local commercials as “Canadian content”. Of course this adds five minutes to the amount of commercials… The nasty part comes when we get to on-line content.

When viewing on-line content the government censors what we can see. I’m not talking about stuff like kiddie porn. I’m talking about over the air content. If a show is broadcast in Canada on a Canadian station, but is supplied by an American outfit Canadians have to go through the Canadian web site to view it. Part of the problem is some sites view on-line content as a preview rather than an archive or time-shift. So often not all of a show is available. Some times it is even missing. Yet on the American site it is all there. In this situation we have a message stating “This content is not available in your area”. Very frustrating…

There is a plugin for FireFox which seems to work with a few sites. It is called “Modify Headers”. True to the name it changes the header of what is sent out by FireFox to indicate a different geographic area. Essentially it persuades the computer to lie for you. This is different than going through a proxy server. The proxy server may actually be located in the same geographic area so essentially your computer wouldn’t by lying.

The directions for using this plugin are not inherently obvious. After some reading on the net I found out what to do.

  1. Surf to the site which has the blocked video.
  2. Under the tools menu access the Modify Headers plugin.
  3. In the first box enter “X-Forwarded-For” (it should auto-complete).
  4. Enter a numeric IP for the area in question (12.13.14.15 is suggested for the States,  no suggestion for Europe is given).
  5. Refresh the page.

At that point things should run properly. Apparently this doesn’t work on all sites. The reason I waited to post this was to see if I could find a site through every day surfing which wouldn’t work. So far I haven’t found one.

Followup: I tried this on a Mac running Snow Leopard. It didn’t work. Worst case… It should work in an emulator.

The Complete Apple ][ French Developers Documentation Online

The entire collection of the French version of the Apple ][ Developers, a documentation package for Apple developers is now available online.  The entire package is from about 1985 and has been made available in digital format on the Brutal Deluxe website.

Here is the table of contents:

  • Sommaire (PDF, 25 KB)
  • Les outils souris texte de l’Apple II (Apple II mousetext tools) (PDF, 4.1 MB)
  • Les règles de l’interface souris (mouse interface rules) (PDF, 5.7MB)
  • Utilitaires de programmation (programming utilities) (PDF, 3 MB)
  • Routines de saisie et d’affichage écran (screen display and input routines)
  • Driver d’écran Apple II (Apple II screen driver)
  • Unité Pascal de l’environnement multi-dossiers (multi-folders environment Pascal unit)
  • Notes techniques ProDOS (ProDOS technical notes) (PDF, 1.3 MB)
  • Notes techniques Pascal (Pascal technical notes) (PDF, 5.7 MB)
  • Notes techniques Apple IIe (Apple IIe technical notes) (PDF, 3.9 MB)
  • Notes techniques Apple IIc (Apple IIc technical notes) (PDF, 2.4 MB)
  • Notes techniques souris (mouse technical notes) (PDF, 618 KB)
  • The six double-sided disks are available as pictures and disk images.

This package is the same as  the complete documentation in English which was provided to developers at the time, Scanned to  PDF and OCRed.
You can download the documentation at:

http://www.brutaldeluxe.fr/documentation/forumdesdeveloppeurs.html

Free (legal) E-books from Project Gutenberg

I’ll admit this isn’t strictly a Mac oriented post. None the less it is still useful for the Apple//, Mac, and other communities.

When people see something like the title of the post the reaction is pretty much the same as when a politician says “Trust me”. In this case the people operating this organisation have been at it for years. I remember getting books from then in the 80′s or 90′s. They have since updated their technology to support newer formats which can be found on most mobile devices. At the same time they still support simple text files for those of us with cheap piece of @##$% MP3 players which can only read text files. I remember writing a program in Applesoft to read these books on my GS.

These people have been searching for books where the copyright has expired (there are variations of public domain literature which are acceptible as well). As they find them they add the books to their list to be scanned. From there they run the books through Optical Character Recognition (OCR) software. From there it is proof-read by volunteers. Then the books are made available to the public.

Last time I checked the titles I was quite impressed at what they had. For example, they were working on the entire Wizard of Oz series (I think they had five or six of the 40+ books). Their web site claims they have over 33,000 books with links to various organisations resulting in over 100,000 more. Obviously going through the entire list sequentially will take some time.

To check out their web site go to http://www.gutenberg.org/wiki/Main_Page.

BASH reference

As is one can tell from the dates on my posts, I spent a while tracking this one down. The original link is in a now inaccessible e-mail account so I went out and located it directly on the web. The date of the manual is in 2010 so it looks as though it is being kept relatively up to date.

For those interested in why I am posting this particular link, the reason is simple. BASH is the shell used by OS X and one of the shells used by Linux/BSD. It ties in with the shell programming articles I’ve written recently. This link is to the reference guide/manual for the shell. All those Apple// folks who ended up with Macs can now start programming again. ;-)

http://www.gnu.org/software/bash/manual/

Incidentally to view the manual on-line the second of the first group of links is the best place to start.

Free Programming e-book

Finding interesting stuff for the Mac is difficult given the relative numbers of users and programmers out there. I think I may have found something though.

In the *NIX world (including OS X) the Python language seems to be the up and coming thing for programming. Python is an interpreted object oriented language. Python comes free with OS X, Linux, and BSD. It has to be downloaded and installed if it is to run on a Windows machine. I have tried simple GUI programming under Linux and will try it for the Mac as I get to that point.

The book itself contains a number of exercises as well as instructions on how to write programs in Python. I have only reached the second set of exercises but have already found a number of useful items. Those starting out may want to take a look at my recent articles on shells and shell programming. Although it is possible to program exclusively in a GUI environment, it is still a very good idea to start out using the shell then transition to the GUI.

The title of the book is “Learning Python The Hard Way“. The link to the authors web site is http://sheddingbikes.com/posts/1285754959.html. Please read the information on the page before downloading the book.

Apple II Scans Adds Inside the Apple //c

The Apple II Scans website, managed by Mike Maginnis, has announced that they have added the follow on book to Gary B. Little’s Inside the Apple //e.  Inside the Apple //c was based on the initial Apple //c and covers the machine in its entirety.  Unfortunately, it is lacking in information about the second generation Apple //c as well as the Apple //c Plus which came out later.  Still the book is a wealth of information for the user who wants to learn what is really inside that little white Apple //c box.

The book is available for download from the Apple II Scans website at:

http://apple2scans.net/apple-ii/inside-the-apple-2c