mdbtxt1
mdbtxt2
Proceed to Safety

xapple2 - Apple II+ and //e Emulator for UN*X and Linux    

This page points to an alternate build of version 0.7.4 of the xapple2 emulator which was originally created by Alexander Jean-Claude Bottema and updated/maintained by Stephen Lee, Aaron Culliney, Michael Deutschmann, and Tom Lear.

Version 0.7.4 of xapple2 comes in a file called "apple2-emul-0.7.4.tar.gz". Search for this using Google or Bing. I have found it in multiple locations, but the older ones are gone. Here are some locations1 where I have found apple2-emul-0.7.4.tar.gz in the past:

apple.asimov.net

ocis.net (gone in 2011)

vim.org

Here is the patchfile to make my improved version.

This version of xapple2 was modified by Robert Munafo to produce sound through /dev/audio, which on most modern Linux systems is linked through a driver to the sound card.

It also includes a much more accurate set of colors. The Hires "orange" and "blue" were particularly bad in the official version. I calculated the exact RGB values of the Apple ][ colors using the NTSC coordinate transforms, as explained on my Apple II Colors page.

Advantages of /dev/audio output:

Disadvantages of /dev/audio output:

To get the /dev/audio version of xapple2:

Enjoy!


I am an Apple ][ programmer since the summer of 1980. I did most of my best work in assembly language, including a hires character generator (HRCG) with lots of cool features including 32 lines of text, use of half-pixel shift to improve character shapes, upper/lowercase and graphics characters, boldface, text and background color attributes. I did all my work on a 48K ][+ without the language card or lowercase modification or 80-column card or any of that other new stuff they added later.


HRCG in color
HRCG in color



the full character set in mono
the full character set in mono


I now have a //e, //c, and IIGS.

I have made these other pages of interest to the Apple ][ community:

My file extraction script, written in Perl. It reads a DOS 3.3 disk image (in a binhex-sort of format), locates individual files and de-tokenizes them. In order to do this it needs to know the 6+2 nybble conversion, sector interleaving, how to locate D5-AA-96 at the beginning of each sector, and token tables for both types of BASIC.

My Peeks, Pokes and Calls collection


Some Bug Reports and Questions

Q: I got the error: $ xapple2 Warning. Cannot open the .apple2 system defaults file. Make sure it's readable in your home directory.Press RETURN to continue...

A : .apple2 is a file that you would put in your home directory. It is a text file, similar to .login and .bashrc. You can use any text editor to create it. The more important question is what to put in it. Again, you'd have to find the xapple2 documentation.

xapple2 was developed by multiple people, and I did not work with it enough to understand all of the things that it does. Also, my use of xapple2 ended in 2002 as I was transitioning over to Mac OS X.

Q: I got the error: ioperm: Operation not permitted cannot get port access to PC speaker. sound will not be used.

A : "cannot get port access to PC speaker" is a common message, and the only way to avoid it is to either use the Sun audio sound driver, as I did, or to run xapple2 as root. xapple2 tries to produce sound the old fashioned way, by toggling a single-bit output port that is connected to a speaker on most compliant Intel-based PCs. This is similar to the speaker hardware on an actual Apple II. However the PC is so fast compared to the Apple II that the sound comes out wrong. My patch (which is only applicable to version 0.7.4 of xapple2) addresses it by measuring the number of cycles used by each 6502 instruction and writing a reconstructed waveform to the sound driver.

Q: I got the error: Sorry bud, xapple2 only supports 8bit PseudoColor displays. Maybe you can fix this!

A : 8bit pseudocolor has to do with how it communicates with the X window server. Pseudocolor means you can set specific pixel values to have specific colors. I modified the color table to accurately model the Apple II's output and how it is transformed by a compliant NTSC modulator and tuner. However the error you're getting is because you have your display set to 24-bit color or something like that. See if there is a way to set your display to 256 colors.


Footnotes

1 : I also found something at geocities.ws/how_chee. Go to the section titled "xapple2" near the bottom. I'm not sure if this is the same source code or whether my patchfile will work with it.


Robert Munafo's home pages on AWS    © 1996-2024 Robert P. Munafo.    about    contact
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Details here.

This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2019 Dec 14. s.27