Posts tagged ‘apple ii’

Macrosoft at KansasFest 2010

I presented a tutorial introduction at KansasFest 2010 on the Mindcraft Macrosoft programming language, a macro assembler package that allows the programmer to achieve machine language speed with a high-level Applesoft BASIC-like syntax.  Macrosoft and its companion Assembler run on you favorite 8-bit Apple II.  The presentation was well received, and several people left motivated to try Macrosoft for themselves. Don’t miss the history of Macrosoft from the author, Alan Floeter, that’s part of the presentation slides (page 11).

Ken Gagne has kindly shared a recording of my presentation and posted the slides.  Watch the presentation, buy a copy of the Mindcraft Assembler & Macrosoft, and write the next blockbuster Apple II software.

USE MACROSOFT.3.1
UEN
MUL
BEGIN
PRINT "Macrosoft Rocks."
CLEANUP
END

There’s a working Macrosoft example in the presentation slides.  Also, check out my “hello world” program in Macrosoft and with the Assembler.  Finally, don’t forget my winning KansasFest 2009 HackFest entry written with Macrosoft.

KansasFest 2010 HackFest

My KansasFest 2010 HackFest entry with source code is now available for your enjoyment.  This entry took second place behind Martin’s Wizardy crack.  I used Complete Pascal 2.0 with Pegasoft Draw Tools 3.1, both of which are freely available, to create my first 16-bit Apple II program.  The program displays pictures from KansasFest and asks related trivia questions.

The photographs are used with permission from Henry Courbis of Reactive Micro.  I converted the original JPEG images to GIF files on a modern Macbook then used Super Convert on a IIgs to produce packed SHR image files.

I hope some budding programmer will find the software to be a useful starting place for the next brilliant Apple II software!

Hackfest Day 2

There are just so many fabulous things to see and do at KansasFest that Hackfest has not gotten much attention!  Where else do you get to see the worst Apple product and a disk operating system almost twice as fast as ProDOS?

I want to include full-screen bitmapped images in my entry, and I’m figuring out how to load and display images.  The toolbox does not offer a convenient “load image from file” call so I must provide code to load, parse, and decompress the image file.  I found a CSA2 post with sample code and the Pegasoft Draw Tools package.  Draw Tools provides numerous handy drawing tools, including fades, wipes, animation, and image loading.  So, I’ve installed Draw Tools and have the sample code working.  The TML Pascal samples work well with Complete Pascal since Complete Pascal is really version 2 of TML Pascal.  Work continues …

Hackfest Day 1

The annual KansasFest HackFest is on!  I’ve heard rumors of Wizardy cracking and a Rockhurst text adventure.  I’m learning Complete Pascal, learning IIGS toolbox programming, and, just in case I run out of things to do, using those skills to write a graphical Apple II/KFest trivia adventure.  I have Complete Pascal running and am ready to crank out a bit of code.  Stay tuned for more …

Saying “Hello” with Macrosoft

Following the model of Eric Shepherd’s “Some Assembly Required: Hello World” article on A2Central and my last post on the Mindcraft Assembler, I’d like to present the traditional “Hello World” program for 8-bit Apple II using Macrosoft.

Macrosoft allows the programmer to achieve machine language speed with a familiar BASIC-like syntax.  Technically, Macrosoft is a macro library for the Mindcraft Assembler.

First, follow the directions included with Macrosoft to create a working disk with The Assembler and Macrosoft.  Next, just like last week’s tutorial, slide the disk into your drive and run the BOOT.SYSTEM program.  Press “E” to enter the editor.  Press “enter” once to get a “!” insert mode prompt.  Type in the following program.  Case does matter, so watch the capitalization.  Also, make sure to begin each line with a space; otherwise, the assembler will interpret your entry as a label.  Notice that, except for a few extra “boilerplate” lines, the program appears similar to BASIC.

USE MACROSOFT.3.1
UEN
MUL
BEGIN $2000
PRINT "Hello world."
CLEANUP
END

Press the “Escape” key and enter “Hello” for the “Save Pathname.”  Press “A” to assemble to program.  If you get errors, return to the editor and correct them.

Finally, press “!” to exit back to BASIC.  Change to the directory containing the HELLO program and type “BRUN HELLO”.

Saying “Hello” with the Mindcraft Assembler

Following the model of Eric Shepherd’s “Some Assembly Required: Hello World” article on A2Central, I’d like to present the traditional “Hello World” program for 8-bit Apple II using the Mindcraft Assembler.

Slide the Assembler disk into your drive or run the BOOT.SYSTEM program.  Press “E” to enter the editor.  Press “enter” once to get a “!” insert mode prompt.  Type in the following program.  Case does matter, so watch the capitalization.

            ORG       $2000
COUT        EQU       $FDED         ;Apple II character out func.

            LDX       #0            ;Offset to first character
loop        LDA       msg,X         ;Get the next character
            BEQ       done          ;->Yes!
            JSR       COUT          ;Print it out
            INX                     ;Move on to the next character
            JMP       loop          ;And continue printing
done        RTS                     ;All finished!

msg         ASC       "Hello world."
            DSC       $8D
            DSC       $00

Press the “Escape” key and enter “Hello” for the “Save Pathname.”  Press “A” to assemble to program.  If you get errors, return to the editor and correct them.

Finally, press “!” to exit back to BASIC.  Change to the directory containing the HELLO program and type “BRUN HELLO”.

Apple IIgs development with MPW – Setup

The Apple IIgs is a great platform for software development.  Compared to 8-bit Apple II machines, the IIgs offers a faster processor, more memory, higher resolution video, and a more modern desktop graphical user interface (GUI).  The operating system, GS/OS, offers features found in modern desktop operating systems, such as a relocating system loader, dynamic memory management, networking, modular file systems, and event-driven user interfaces.

The platform has a number of excellent software development packages.  Whether you favor C, Pascal, Logo, Modula-2, Forth, BASIC, or assembly, you’re covered.

But, compared to software development on newer computers, the IIgs screen resolution and processor speed are unavoidable limitations.  A large screen allows you to see more of your code.  A fast processor cuts compile time and debugging.  Apple felt the pain of developing large programs on the IIgs and created add-ons for the Macintosh Programmer’s Workshop (MPW) that allow IIgs software development from the relatively advanced Macintosh platform.  Apple used these MPW-based development tools for some of its most complicated IIgs software projects, including GS/OS itself and Hypercard.

Let’s get MPW setup and running.

Get a Mac that runs classic MacOS or a Mac emulator

I choose the Basilisk II emulator.  Follow the directions at E-Maculation to install and setup Basilisk II with Mac OS System 7.5.5.

MPW and the IIgs add-ons run under classic MacOS, so you’ll need a suitable machine with either a PowerPC or 680×0 processor.  Your fancy new Intel-based Mac won’t work.  OSX won’t work either.  I’m not very knowledgeable about classic Macs, so I’m not sure of the “best” machine, processor, and OS version.

Given that these IIgs tools were written for a 680×0 based Mac, I figure such a Mac is the best place to start.  I don’t have the desk room or the inclination to start a classic Mac hobby, so I turn to emulation.  The E-Maculation site does a great job of identifying the options for Mac emulation.  Mini vMac and Basilisk II look to be my best options.  I choose Basilisk II because, compared to Mini vMac, Basilisk II offers higher resolution color display and networking, which I believe will be valuable for software development.

Install MPW and DiskCopy

Download MPW and Disk Copy from Apple.  Use the HFVExplorer tool included with Basilisk II to transfer to software to your emulated Mac.  You will also want StuffIt Expander, which is useful for de-compressing certain software.

Disk Copy is a self-extracting archive, so double-click the downloaded file on your emulated Mac to open the file.  Then, copy the program to a convenient location on your emulated hard drive.  Then, use Disk Copy to open the MPW image.  Copy the entire MPW folder to your emulated hard drive.  I find the Software Downloads article from Apple helpful in understanding the various Mac file formats.

Install the MPW IIgs software

Purchase the MPW IIgs Tools and MPW IIgs Assembler from Syndicomm.  Optionally, also purchase MPW IIgs Pascal, MPW IIgs C, or MPW IIgs Orca/C from Syndicomm.  Jump through a few overly complex hoops to get the software transferred to the emulated Mac.  Follow the directions in the MPW IIgs manuals (included with your purchase from Syndicomm) to install the software.

While Apple freely distributes the old MPW tools, the MPW IIgs add-ons are not free.  Syndicomm is the only authorized retailer and sells the pieces both individually and part of a package.  The APDA Software Library seems to be a good deal if you’re interested in some of the other included software.  If you only care about MPW, the MPW IIgs Collection is the best deal.

For reasons I don’t understand, the Disk Copy disk images from Syndicomm are difficult to use with Basilisk II.  The emulator does not support mounting these disk images as emulated disks.  I tried, and Mac OS offered to format the unrecognized volumes.  Next, I tried transferring the images into another disk image with HFVExplorer.  Disk Copy 6, unfortunately, fails to mount the images complaining that the images are corrupt.  Third, I tried creating a new image on my OSX laptop and copying the contents of the MPW images to the new image, but OSX 10.6 does not support writing to HFS disk images so this approach didn’t get very far.  OSX 10.6 does mount the MPW add-on images read-only, so I know the images are usable.  Finally, I used Sweet16 to create a Disk Copy 6 image, mounted the image in Sweet16, booted GS/OS, formatted the image with HFS, mounted the MPW images in Sweet16, and copied the MPW IIgs software to the new disk image.  Then, I transferred the new disk image containing all of the MPW IIgs collection to the emulated Mac filesystem with HFVExplorer.  Disk Copy 6 on the emulated Mac finally opened the image.

Sweet16 Create Image dialog

The manuals for the MPW IIgs software describe the installation steps.  I did have a minor problem with the install script for the MPW IIgs Tools.  The script contains a reference to a directory named “SR.71″, and I had to edit the script to remove that reference.

Use MPW to develop IIgs software

There are plenty of documentation and samples.  I’m still learning.

MPW with the IIgs add-ons running in Basilisk II

MPW and the MPW IIgs software include excellent documentation.  There are a few example programs included with MPW IIgs, but they’re generally outdated and probably not very good models.  The IIgs Source Code Sampler package, available from Syndicomm and elsewhere on the Internet, is more up to date and provides several good assembly language examples.

What’s Next

I’m left with a few questions that I’m still exploring:

  1. Is Basilisk II stable enough?  I’ve had a few emulator crashes, but, so far, Basilisk II seems sufficiently stable.
  2. How will I transfer compiled/assembled software to the IIgs?  There are several options, including networking, but I haven’t experimented to find the best option yet.
  3. I’m using an emulated classic Mac to develop software for the Apple IIgs.  Does this make any sense?  Will I be happier developing directly on the IIgs?  A2Central just started a series on selecting a IIgs assembler.

Overall, I’m pleased with using MPW to develop software for the IIgs.  I still have a lot to learn, and I’m not yet certain I’ll stick with using MPW.  My next post will be a tutorial “writing your first IIgs program with MPW.”

Mark Simonsen of Beagle Bros to keynote KansasFest 2010

From KansasFest:

KANSAS CITY, MO — December 22, 2009 — Mark Simonsen, employee number three and later owner of Beagle Bros, will be the keynote speaker at KansasFest 2010. At Beagle Bros, whose popular software products for the Apple II hobbyist demonstrated the publisher’s quirky sense of humor, Mark developed software including Flex Type, Beagle BASIC, Beagle Graphics, Triple-Dump, and Double-Take. In the early 1980s, Mark decided that he “wanted to work with the Apple for the rest of [his] life,” a statement that captures the enthusiasm and spirit of Mark, Beagle Bros, and many Apple II users.

Beagle Bros started in 1980 under the direction of Bert Kersey to provide software to casual users of the Apple II. A year and a half after graduating with a degree in computer science from Brigham Young University, Mark “fell in love with the Apple.” Mark published Flex Type through Beagle Bros in 1982, joined the company as a programmer in 1983, and bought it in 1987 at the age of 29.

Besides software like Shape Mechanic, GPLE, and DOS Boss for budding programmers, Beagle Bros produced books, posters, and even advertisements full of clever and useful tidbits demonstrating the capabilities of the Apple II. Later, the company produced highly regarded productivity software like Platinum Paint, BeagleWrite GS, and the TimeOut line of AppleWorks add-ons. Beagle Bros earned many loyal followers thanks to the combination of quality products, enthusiasm, and humor.

Mark sold the company’s product line in 1991 and 1992 to Quality Computers. Today, Mark helps save memories as the CEO of iPreserve, a company specializing in photo, film, video, and document preservation.

KansasFest 2010, the 21st annual Apple II conference, is set for July 20th through July 25th at Rockhurst University in Kansas City, Missouri. KansasFest was originally hosted by Resource Central and has been brought to you by the KFest Committee since 1995. Any and all Apple II and Macintosh users, fans, and friends are invited to attend this year’s “summer camp for geeks.” Registration details will be announced on the KansasFest Web site in early 2010. Please heed the warning from Beagle Bros and refrain from feeding your disks to alligators. For photos, schedules, and presentations from past year’s events, please visit the event’s official Web site at http://www.kansasfest.org/

CONTACT:
KansasFest 2010
http://www.kansasfest.org/
http://twitter.com/kansasfest/

If you’d like to read more about Beagle Bros and Mark Simonsen, I suggest checking out the following:

And, here are a few slightly less relevant but still relevant references:

Low-Res Life for the Apple II

Conway’s Game of Life is mathematical exploration into artificial life.  The game consists of a grid of cells, and each cell is either alive or dead.  A simple set of rules relate the cells alive or dead in the current generation to the previous generation.  The interesting thing about the Game of Life is that a simple set of rules creates surprisingly complex patterns and behaviors.  Wikipedia gives more details, including examples, a more formal definition of the game, and history.

I have implemented the game of life for the Apple II computer using the low-resolution (40×40) video mode and the Macrosoft macro language.  Macrosoft is a library of assembler macros that produce assembly language code.  I chose this language because I wanted to learn this unique language for years and to improve performance of the implementation.

Download the program with source.

Look for an article in Juiced.GS (Volume 14, Issue 3).

Screenshot