YAE, Yet another Apple ][ Emulator
YAE, Yet another Apple ][ Emulator
The emulator and this page is under construction
Original version of YAE
I have been developing a fast Apple ][ Emulator for Unix systems with X
windows. It is tuned for speed on RISC based systems by employing
compiler technology and dirty but fast C coding.
The emulator is sort of working now. It emulates a 64K Apple ][+ plus
with a 65C02 (for ProDOS). I have done text, low resoultion graphics
and black and white high resolution graphics. It supports a single drive
with R/W. Audio emulation is available
on Sparc's and SGI's. Sun & MIPS (SGI & DECstations)
version of the emulator translates on-the-fly 65C02 machine code into
equivalent native code.
New features of the next version
After a break of more than a year, I want to pick up YAE again to make it
more prensentable. I am now working on a new version of YAE with
the following enhancements.
MIT-SHM based colour video emulation
I have re-written the video emulation of YAE to make use of the
MIT-SHM shared memory extention of X11 to produce better graphics.
The new video driver is optimized for a typical 32 bit workstation
with an 8-bit pseudo colour display.
This set-up (32-bit CPU, 8-bit display and MIT-SHM) is quite common
in the UNIX community. It also works for display with pixel
size 16 or 32 bits. However, the video emulation is the fastest
when dealing with 8-bit pixels. Note, if you happen to use an
Alpha or any 64-bit machine, the emulator may or may not work.
I have yet to test it on a 64-bit workstation.
The new video driver renders by simulating the behaviour of the NTSC video
generator of a real Apple. You can see the distictive colour blending
effect in the following screen captures.
YAE now supports 40 column text, low-res, hi-res,
80 column, double low-res and double hi-res. Normal, inverse and
flash, mand MouseText characters are available in both 40 and 80 column
To speed up video emualtion, MIT-SHM extension is used. If your server
does not support MIT-SHM or your are using a non-local X server, YAE
falls back to use plain XImage. Running YAE with a non-local X server
is not recommended.
A speed regulator has been added to the emulator to stablize the speed
at 1.023MHz. YAE will release the CPU to other processes if it can
run at that speed stably. The video driver also dynamically regulates the
frame rate for machine with not enough CPU speed or under load. When the
emulator is not fast enough, frame rate is reduced until 5 FPS which is
I have implemented the IOU,MMU functions of /e. I can now boot the
emulator in the /e mode with 128K RAM. The 80 column card firmware
works fine and YAE also passed the /e self-test with a "SYSTEM OK".
I have solved a memory banks swithing problem. Now YAE has two memory
access modes. These are the fast mode and the slow mode. The fast mode
requires updating a memory map. The map introduces considerable overhead if
memory banks are switched very frequently. This can happens when
moving data between the main memory and the auxilliary memory. YAE now
flushes the memory map and falls back to the slow memory acesss mode when
a bank switch occurs. The memory map will be re-built when banks switching
become less freqent. The slow memory access mode does a function call
in every access but it is still faster than updating memory map very
After a day of intensive programming and debugging, I have get
rid of a nasty bug I introduced earlier and solve the performance
problem of memory bank switching now YAE runs Airheart, Dazzle Draw
and Death Sword and some other 128K programmes without any problem.(7/8/97)
I have implemented a mouse emulator. I had made a silly mistake which
caused Dazzle Draw craching when I actived the mouse. That was fixed.
There are still some glitches and design issues to be solve but I hope
it would be better when v0.5 is out.(11/8/97)
- Rewrite the disk emulation code to handle more format and multiple disk.
- Use MIDI to emulate the mocking board. Yes, I have codes that emulate
a mocking board using the audio buffer but that sounds ugly on my indigo2.
I have a Linux box at home and I thing using MIDI to do mocking board
emulation is promising.
- Add Run-time code generation for processors other than SPARC & MIPS RISC.
My next target would be the RS6000 (and PowerPC 601) running AIX.
- Improve the compiler. Currently, the compile does condition
code dataflow analysis and exception analysis. A RISC code optimizer
would improve the quality of code generated.
The test version for my Apple II emulator is available now.
Click to get
This software is still under development and may be buggy. You are
encouraged to pick the most recent version here. However, I
upload it to
ftp.apple.asimov.net every now and then.
If you have tried my emulator, please send me a
(845) 255-7301 so that I know
my emulator runs on what kind of platforms.
Go to 250-857-4189
Last modified by Doug Kwan 7th August 97