Revised Initial Checkin

This commit is contained in:
Kevin Kralian 2018-07-21 15:39:32 -04:00
commit fecf997d01
18 changed files with 15006 additions and 0 deletions

21
LICENSE.txt Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 1994 Kevin Kralian
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

14
README.md Normal file
View File

@ -0,0 +1,14 @@
# Apple 2000 v1.3 Source Code
"Apple 2000" is a high performance Apple II computer system emulator that was made for the Amiga computer and released in the 1990's. The sourcecode is now being publicly released and open sourced for historical archival purposes. Enjoy!
Apple 2000 was written entirely in 68020 assembly language, and compiled with the DevPac 3 assembler. All the source files were included together (via main.s) and assembled as a single unit. There is also a runtime dependency on "ReqTools" by Nico Francois.
### License
Apple 2000 has been open-sourced under the MIT license.
### Contact
This program marks the beginning of my professional career as a videogame developer - one that continues to this day 20+ years later. You can reach the author, Kevin Kralian, at kevin.kralian AT gmail

832
docs+icons/Apple2000.doc Normal file
View File

@ -0,0 +1,832 @@
APPLE 2000 v1.3
The premier Apple ][ emulator for the Amiga
Copyright <20> 1994 by Kevin Kralian
All Rights Reserved
Does anybody still use this text file instead of the AmigaGuide doc??
If so, LET ME KNOW! Otherwise, I'm going to remove this duplicate info!
--------------------------------------------------------------------------
This program is freely distributable, as long as this instruction file is
kept with the program, and no modifications are made to my program or
instructions. I grant people the right to use this program privately,
however, it may not be included as part of any commercial package.
This program is FREEWARE (well, more accurately, Tech-Ware). I do not
expect a monetary payment, however, donating me useful, enabling technical
material will result in me creating other emulations...
NOTICE: Although this program is distributed as Freeware, copyright laws
& protection still apply. As such, *any* infringement upon this code,
especially as applied towards other 6502 or Apple II emulations will be
rigorously pursued via legal channels.
Standard Disclaimer: This program is AS IS; use it at your own risk! I
assume no responsibility if this program or its use should cause something
disastrous to happen (like your computer exploding or you getting killed.)
I may be contacted at <deprecated>
This program uses "ReqTools.library", Copyright <20> by Nico Fran<61>ois.
"Disk2File" program Copyright <20> by Ron Menelli.
--------------------------------------------------------------------------
REQUIREMENTS:
o Amiga computer with Kickstart 2.0 or newer
o A 68020+ CPU. Emulation WILL NOT WORK on a 68000 system at this time.
o About 900k free RAM (preferably most of it FAST RAM)
o ReqTools.library by Nico Fran<61>ois
o Apple ][ ROM image (called _APPLE.ROM)
Recommended:
o A two-button joystick (to emulate the Apple's two-button joystick)
o A 68020 at ~25MHz (for full speed 1 MHz emulation)
DESCRIPTION:
"Apple 2000" is the premier Apple ][ emulator for the Amiga computer. At
its current level it accurately emulates a 64K Apple ][+, including:
o 6502 CPU
o ALL video modes (Text, LoRes, HiRes, Mixed modes, etc)
o 16k RAM card (64k computer)
o 5<>" disk drive (1 or 2, via disk images)
o Two button joystick / Koala-Pad / Paddles
o Controllable Speed Regulation
o Keyboard
o Sound
The emulation also runs in a completely system friendly manner,
multitasking properly with other programs. The two main goals were speed
and accuracy. This was accomplished by hand coding the emulator in 100%
machine language, optimization via instruction cycle analysis, and
painstaking attention to Apple hardware details.
I feel confident that this is the fastest, most complete Apple ][ emulator
available for the Amiga computer (commercial, public domain, or
otherwise). Some of the highlights of my emulation:
o Apple 2000 video emulation is the most accurate around:
- There is no "dithering" of the 16 Lo-Res colors.
- The text supports inverse and flashing characters.
- Two consecutive color pixels are drawn as white (as the Apple does).
- There are no missing, skipped, or fat vertical lines on Hi-Res gfx.
- Identical text character set.
o Disk drive emulation supports loading of "disk images" from any amiga
device (no custom archives or conversions required), including:
- Dalton Disk Disintegrator (DDD) 2.1 format (like DMS on amiga)
- 143,360 byte "Generic Disk Image", found on the Net & used by other
Apple ][ emulators on other platforms (Unix, Mac, & PC based)
o Apple 2000 disk drive emulation saves disk images in the standard
"Generic Disk Image".
o Apple 2000 is able to instantly load and run Apple executable files
from any Amiga device (better than a real Apple; no disk booting rqrd!).
WHY AN APPLE ][ EMULATOR?
Why the Apple ][? Sentimental reasons. It's the computer I grew up with
and learned to program on. Since I have a fundamental understanding of
the Apple and because there aren't any other useable Apple emulators out
there (I've seen 5 or 6), the task called to me. I wanted to be able to
play all of my favorite games that I grew up with. Yes, they certainly
are not cutting edge as far as the graphics and sound goes, but they
certainly are playable! And I can overlook the cosmetics for some good
gameplay (i.e, just like people appreciate classic cars or oldies music).
Plus I wanted all of my friends to be able to play all of those great
forgotten games...the classics! The original CASTLE WOLFENSTEIN,
CHOPLIFTER, KARATEKA and CARMEN SANDIEGO. How many other multitasking
versions of JUNGLE HUNT or ROBOTRON 2084 can you play while downloading a
program? By writing this one emulator, the entire Amiga community is
suddenly presented with over 10,000 (now multitasking) Apple ][ programs
we wouldn't have otherwise been able to use (or play).
After letting the idea stew in my head for 6 months, and much apparent
rambling to my friends (who so nicely encouraged me by saying, "What? YOU
write an emulator? And in C? UGH!"), I began coding. One month later, I
brought my first creation over to a friends house to see how it worked on
his system. After starting it up, we sat there. 30 seconds later we were
still sitting there, looking at a white screen. Eventually, we watched as
each little white character s-l-o-w-l-y was replaced by a black space.
Two minutes later, after getting bored of waiting for it to finish
clearing the screen, we gave up and played 2-player LEMMINGS. I knew the
only way I was going to be able to make this program 'practical' was to do
it in assembly.
I finally bought DevPac 3. After writing a program to bounce 65,535
colored pixels around a screen, I felt ready and experienced. I began
converting my routines for my emulator into assembly code. Almost two
years later (and after rewriting most of my emulation 10 times) my
emulator has finally matured enough to go out into the cold and brutal
world. Here it is, ready to be challenged by thousands of Apple programs
I have never even heard of, and ready to do its damndest to run them all!
RUNNING THE EMULATION
Make sure "ReqTools.library" is in your libs: directory and place
"Apple2000" and "_APPLE.ROM" in the same directory. Then from the
CLI/Shell, CD to its directory and type "Apple2000" (or use it's icon).
If you want to run the emulation with two emulated disk drives, type
"Apple2000 -2" (or modify the startup script used by the icon).
Now, assuming a little common sense (press the "OK" button on the
window!), you will see a black screen with the words "Apple ][ at the top.
Congratulations, you are now using an Apple ][ computer. The Apple is
trying to boot a disk.
I will assume you have a little knowledge on using an Apple ][. Here are
some of the pertinant keys:
KEY Function
------------ ------------------------------------------------------
DEL Apple "Reset" key.
ctrl-DEL Similar to "Ctrl-Open Apple-Reset" on ][e, ][c, ][gs.
Forces reboot, even if reset vectors have been changed.
RAmiga-Q Quit the emulator (after verification).
RAmiga-L Load Apple disk image or executable into the emulator.
RAmiga-S Save Apple disk image.
L-ALT (Like Open-Apple on ][e) Represents Apple Paddle
Button #0
R-ALT (Like Closed-Apple on ][e) Represents Apple Paddle
Button #1
(Alt keys do not affect other keystrokes to emulator)
F9 Sequence through Joystick/Paddle control devices.
HELP Sequence through simple help-messages.
Speed Governing:
F1 50% Apple Speed (0.5 Mhz)
F2 100% Apple Speed (1.0 Mhz)
F3 150% Apple Speed (1.5 Mhz)
F4 200% Apple Speed (2.0 Mhz)
F5 Unlimited (as fast as your system can go!)
^
| Arrow keys patched to be like Apple ][e, ][c, ][gs.
<--+--> (Note: Apple ][+ had no Up/Down arrows, and most
| older programs won't handle them as expected.)
v
NumPad only:
8 Trim Apple joystick center position in respective
4 5 6 directions.
2 "5" will reset it to default (of 127,127).
LOADING DISKS/FILES
Once the Apple is running, you'll probably want to load an Apple disk or
executable. Here's how: at ANY time during emulation, feel free to press
Right-Amiga-L to bring up the Load File requester. From this requester
you may load Apple 5<>" disk images or executable files. Simply navigate
to wherever the files are kept and load the file/disk image you want.
Apple 2000 recognizes several types of load files:
o Filenames with a <xxx> suffix are Dalton Disk Disintegrator archives
(DDD was a common disk compression util for the Apple, similar to DMS
for the Amiga) and the emulator will automatically decompress them!
o 143,360 byte files are assumed to be "Generic Disk Images", such as
the many available on the net.
o Files with the proper internal Dos/ProDos header are executable files;
these are single files that were runnable from Apple DOS 3.3/ProDos
and did not require any disk access thereafter. These files now do
not even require booting any Apple disk and are simply loaded into the
appropriate Apple memory areas and started instantly (quicker and
easier than a real Apple!).
If you started Apple 2000 with the 2 disk drive option (via -2 option),
you will be asked which drive you want to load the image into. After
loading a disk image into drive #1, the emulator will ask you if you want
to 'boot' the disk. If you choose not to, you have effectively just 'put
the disk in the drive' (useful when you need to insert 'Disk 2'). On the
other hand, loading an executable Apple file does not give you any choices
and immediately runs it. This has all been designed to keep the emulator
as clean and simple as possible in terms of starting and running Apple
programs for the non Apple-literate user.
Keep in mind, loading a disk image is the same thing as inserting the disk
into the Apple drive. It will STAY there until you replace it with
another disk (or some program erases that disk). Even after you load and
run several executable Apple programs, hitting Ctrl-DEL (rebooting the
Apple) will boot up the last DISK IMAGE you loaded (if any). This can be
confusing if you don't know whats going on (i.e, after finishing playing
MS. PACMAN and reseting the Apple, why is MUSIC CONSTRUCTION SET loading?
Because the disk is still in the drive from before).
SAVING DISK IMAGES
Pressing Right-Amiga-S will bring up a requester to save a disk image.
Disk images are saved in either the 143,360 byte "Generic" format, or in a
semi-compressed DDD format! The determination is made by the filename. To
compress a file in the DDD format, the filename must end with a '>' char.
Otherwise, it will be saved in the 143,360 byte format. If you do save the
image that way, it is suggested you append a ".disk" onto the filename to
maintain naming conventions (and so the requester will show the file).
Keep in mind, DDD compression is not as tight as external compression
programs (LHA, etc). Also, loading/saving DDD files takes a couple extra
seconds to perform the (de)compression.
TRANSFERRING APPLE FILES
To get an executable binary file from a real Apple to the Amiga is quite
simple. Use a terminal program and and then transfer it via null-modem
(or however you want) to the Amiga. It's recommended you attach a .PROG to
the end of the filename for consistent naming conventions.
TRANSFERRING APPLE DISKS
Only UNPROTECTED standard 16 sector Apple disks are currently useable.
This eliminates copy protected software. Simply run Dalton Disk
Disintegrator (do not use version 2.0! It has a bug! Use version 2.1)
and use it to compress the disk into a file. Then, transfer it to an
Amiga (as described in "Transferring Apple Files" above). Once on the
Amiga, ensure the filename ends in <xxx> so the emulator recognizes it as
a DDD file.
TRANSFERRING APPLE ROMS
The Apple emulator, being true to form, requires the actual Apple ROM data
in order for the Apple to do anything. The standard Apple ROMs in use
were the 'AppleSoft ROMs that contained AppleSoft BASIC, the assembly
language monitor, and autobooting code. So I suggest that you obtain the
same ROM if you would like the same compatibility. The ROM image can be
obtained by booting an Apple ][ or ][+ with DOS 3.3, then typing:
BSAVE BASICROM,A$D000,L$2FFF
to save it to disk. Also, the disk controller Rom (not required) can be
saved by typing:
BSAVE DISKROM,A$C600,L$00FF
Incidentally, the main ROM image is on Apple's "DOS 3.3 System Master"
disk, called FPBASIC (which may be used instead). After saving these
images to disk, use your favorite terminal software and a null modem cable
(or real modems or whatever you like) to transfer these files to the
Amiga. Once transferred to the Amiga, give these files the proper names
and place them in the same directory as the Apple2000 executable.
Theoretically, you can use the ROMs obtained from an Apple ][ clone (i.e,
Franklin Ace, PineApple, etc.), but keep in mind that these ROMs were not
100% compatible (but were quite close). This would effectively make my
emulation a "Franklin Ace Emulator". :-) However, you CANNOT use the ROM
images from an Apple ][e, ][c, or ][gs (maybe eventually...we'll see)!
Once on the Amiga, the main Rom MUST be named "_APPLE.ROM" and the disk
rom (if you have it) must be called _DISK.ROM.
** NOTE **
Starting with version 1.1, due to the difficulties people had trying to
obtain it, the _DISK.ROM is no longer required! If that file is not
present, Apple2000 will automatically use a custom-disk rom instead.
However, obtaining the true rom image is still recommended for 100%
compatibility with all software.
These ROM files can also be found in several other Apple emulator archives
available on the net and on several CD-Rom compilations (including the PC
Apple ][ emulator called "Apple2Em.zip").
PADDLE/JOYSTICK EMULATION
The Apple ][ commonly uses either two paddles, a joystick, or a graphics
tablet (like a free-floating joystick). My emulation covers all bases.
Apple 2000 supports using these control devices:
o Amiga Joystick (preferably 2 button, to emulate apple joystick)
o Amiga Mouse (to emulate free-floating joystick / paddles / Koala-pad)
o Analog PC Joystick (via FighterDuel dongle, to emulate apple joystick)
o Atari Paddles (to emulate apple paddles)
The F9 key toggles through the choices and displays your selection at the
bottom of the screen.
Amiga Joystick:
---------------
The emulator can utilize the standard amiga/atari/sega joystick
(preferably, a true 2-button joystick), and will assign the 8 switch
positions (up, up-right, right, etc) to the extreme values that an analog
stick would return (0 & 255). The "center" position defaults to the
optimum values (127 x 127), however, some games expect different center
values. This center value can be trimmed with the 2, 4, 6, & 8 keys on
the -numeric keypad- ONLY (see "Running Emulation"). For example, if you
start CHOPLIFTER and your character drifts towards the left, press the "6"
key to center the joystick more towards the right until your character no
longer drifts! (This is the emulated 'joystick trim' function).
If you do not have a two button joystick, you have two choices. Spend $8
and buy one, or else just use the Right-ALT key in lieu of the second
button (by the way, the two ALT keys work great for pinball games like
RASTER BLASTER). Note that the Sega Genesis Game controllers work well
with the amiga, and have two buttons!
Amiga Mouse:
------------
The emulator can utilize the absolute mouse coordinates, and this works
well for simulating a Koala-Pad graphics tablet, free-floating joystick,
or paddles (left/right control paddle #0, up/down control paddle #1).
Programs designed for graphics tablets (KOALA PAD) or un-centered
joysticks work great in this mode, i.e, FANTAVISION, MISSILE COMMAND,
MUSIC CONSTRUCTION SET, and most other free floating cursor control
programs work ideally. The mouse works just like you would expect here.
Analog PC Joystick:
-------------------
The emulation also supports true analog joysticks via joystick-dongles
(such as the adapter used for Fighter-Duel). The joystick will work just
like a real analog stick.
*** Note: Apple 2000 uses "dynamic range setting & calibration" for analog
joysticks. This means that when you choose the "Analog Joystick" option,
the first thing you must do when starting to play your game is to move the
joystick over its full range of motion (extreme left, right, up, & down).
Once that is done, you need not worry about it anymore (unless you turn
off "Analog Joystick" and select it again). Joystick trimming is to be
done with the joystick's own trim pots. This 1 second of work from the
user ensures that Apple 2000 will work with a wide variety of joysticks.
Atari Paddles:
--------------
The emulator also now supports using actual Atari Paddles (the kind used
in the old Atari VCS/2600). They plug right into the amiga game port, and
work just like real apple paddles. NOTE: Like the analog joystick, the
paddles need to be moved over their complete range of motion when you
start to use them.
Other game controller notes:
----------------------------
Some of the older Apple games were designed to be used with paddles, not
joysticks. This is noticable in games (APPLE GALAXIAN, SNEAKERS) as in
when you release the joystick, your ship automatically moves back towards
the center point on the screen. This is exactly what would happen on a
real Apple with a joystick. You need to use some type of paddle emulation
here, either via the "Amiga Mouse" or "Atari Paddles" options.
*** WARNING! While it is a bad habit many people have of (un)plugging game
controllers while the computer is on, be aware of this potential disaster:
Some of the Analog-Joystick Adapters have a metal jacket around the front
plug. This metal sheath has the potential to short out pins on the amiga
game port while trying to plug it in, which can damage your amiga! The
solution is simple: turn off your computer while changing controllers.
"An ounce of prevention..."
SPEED REGULATION
"IT'S TOO FAST!" :-)
By popular request, Apple 2000 now offers selectable speed regulation so
people with fast systems can slow down games to humanly playable speeds.
Speed regulation is controlled via 5 function keys (F1 -> F5), which are
in order from slowest to fastest.
F1 50% Apple Speed (0.5 Mhz)
F2 100% Apple Speed (1.0 Mhz)
F3 150% Apple Speed (1.5 Mhz)
F4 200% Apple Speed (2.0 Mhz)
F5 Unlimited (as fast as your system can go!)
F2 selects "100% Apple Speed", which limits emulation speed to that of a
real Apple ][ (1.024 Mhz). F1 selects 50% (slow down games to half
speed), and F5 selects "unlimited speed" (which runs as fast as your
system can).
Use of these keys during gameplay can be used as an aid- For example,
switching to 50% speed during a difficult part in an arcade game. Also,
some games on the apple might be a little sluggish compared to today's
standards and skills. 150% speed usually takes care of those. :)
Understand that Speed Regulation works like a "Speed Limit". If your
system can't run the emulation quickly in the first place, choosing 150%
or 200% regulation won't have any noticeable effects (Like taking a '74
Pinto out on the Autobahn. Who cares if there's no speed limit- You won't
go very fast. :)
Keep in mind that Apple sound is made via speaker clicks and timing loops.
Faster/slower emulation will cause higher/lower pitched sound.
"IT'S TOO SLOW!" :-(
Okay. For the remaining 93% of the Amiga owners who don't have '040s,
there are a few things that can be done to speed up the emulation.
Press F5 to turn off speed regulation- This completely turns off the
overhead of the speed-regulation code.
If you have an MMU (and an additional 512K free fast-ram), turn on the
"FastRom" option. (Type "CPU FASTROM" from the shell).
If you are running ENFORCER, turn it off! On my system, graphics intensive
games slow down 20% while enforcer is running.
Start "Apple 2000" in a relatively clean system with large blocks of
fast-ram available. (IE: Instead of trying to run the emulator while
you've been working on your system for 8 hours and have DirOpus, AMAX IV,
and ADPro all running, just reboot the system first).
Of course, you can always add an accellerator to your system. ;-)
THE STATUS BAR
By popular request, the "Title Bar" at the top of the screen has been
removed, and has now been replaced with a new "Status Bar". The bar
appears at the bottom of the screen momentarily to notify the user of any
significant events, and then goes away. And it's black and white so the
grey scale users can read it.
This bar displays significant messages, including feedback on Speed
Regulation Selections, Paddle/Joystick Controls, Apple Crashes, Help, and
disk drive access (including drive & track #'s). Most the time the status
bar will be invisible.
TECH NOTES
Some Apple programs use "unimplemented" 6502 instructions. These are
instructions that are not official, but partially decode into doing a
particular function (as discovered by many unorthodox programmers). My
emulation does not support ANY unimplemented instructions, and will simply
break upon hitting any of those instructions (with Apple ][ software, I
have seen very few programs that use them). Those few programs will also
fail on the Apple ][gs.
The ONLY graphics glitch is that the Hi-Res graphics screens do not fill
in the entire display width. That is, they leave a half-inch black border
on each side of the display. Why? Because the Apple Hi-Res screen has a
horizontal resolution of 280 pixels, and the Amiga's display has a minimum
resolution of 320. Trying to stretch this display by leaving an empty
pixel after every 7 pixels or drawing every 7th pixel twice, results in a
highly distorted and uneven image. The Text modes and LoRes modes still
use the entire screen width (to maintain aspect ratio). This slightly
narrow display is only noticeable in the 'mixed Graphics/Text' mode, where
text will be a little wider than the graphics above it.
Also regarding Text and Graphics (but not a glitch, it's an improvement)
is the fact that mixed Graphics and Text on the old Apple ]['s originally
caused the text to be fringed with green and purple instead of being solid
white. This fringing has absolutely no purpose, but is a mere artifact of
the Apple video circuity. My emulation cleans it up with crisp & clean
text output at all times (does anybody have any complaints?). Apple
finally cleaned this up with the Apple ][gs and its RGB output (but
introduced a couple other graphic glitches), so I believe my clean Text
display is desirable.
WHAT ABOUT EMPLANT?
My emulator, "Apple 2000" was (p)reviewed in Amiga Computing (Issue 71,
March 94), inside a larger review for the Emplant card (there's even a
screenshot where you can read my title bar, Apple 2000!). For all intents
and purposes, the review makes it APPEAR as if this program was written
by, owned by, and coming soon from Utilities Unlimited, makers of the
Emplant card (A macintosh emulator). Regardless, the reviewer loved it,
noting that this was the fastest 6502 emulation he has seen.
At several World Of Commodore shows, Jim Drew showed my early versions of
"Apple 2000" to crowds of people during his presentations of his Mac
emulator. A friend even has a video-tape of Jim loading up and showing my
emulator to a crowd when I asked, "What other emulators are you doing?"
(before he knew who I was) at WOC in Pasadena, 1993.
To set the record straight, I did send Utilities Unlimited several early
exclusive 'evaluation' versions of my emulator to see if they were
interested in purchasing it (for their Emplant package), but no agreements
were ever reached. Utilities Unlimited was in no way involved with the
development of, and has no connection to, this program (Apple 2000).
This program is NOT part of the Emplant package, as many people have been
led to believe. The positive side of this is that you may use Apple 2000
without having to spend >$300!
ABOUT THE AUTHOR
"Apple 2000" was written by Kevin Kralian over the course of two years.
After serving in the US Marine Corps Infantry (!), he then earned a
college degree in Fire Technology, and continued in school towards his
Computer Science degree. He is also a volunteer FireFighter/EMT and a
freelance programmer.
He has over 10 years of programming experience, including ADA, BASIC, C,
Pascal, 6502 and 680x0 assembly. Programming interests focus on
performance programming, including games and emulation. Career goals
include firefighter and game programmer.
He has recently been hired as a full time game programmer, and is now
working on the Sega "Saturn". Good things do happen to good people. :-)
He may be contacted at <deprecated>
"PAYMENT" FOR THIS PROGRAM
This program is being distributed as freeware, I do not expect monetary
payment. My original intentions were simply to have my program be 'used'
by the Amiga community, and I still feel the same way. I've worked long
and hard on this program and the most rewarding thing to me know would be
to simply know people are enjoying it!
However, what I WOULD appreciate would be any technical references for any
computer/hardware/platform. Let me explain...
Many improvements in the Apple emulator are dependant upon me finding
Apple technical reference material (i.e, unimplemented instructions,
serial/parallel support, ProDOS harddrive support, etc). If you would
like to see these features implemented, the biggest thing you can do is
send me any tech material that could be helpful.
Also, some ideas for my next emulator include: Atari VCS (2600), GameBoy,
Nintendo, Atari 400/800 and Commodore 64/128. Though there are a few C-64
emulators out there, many people have urged me to do one "the right way".
I tend to want to do the old Atari VCS or Gameboy emulation. HOWEVER, in
order to do this, I need tech information that I cannot publically obtain.
Do YOU want these game machines to be emulated (I do)? If you are one of
those priviledged people who might have been involved in developing
software for any of these machines or somehow have any tech info on these
machines, please send me any and all tech information. *** I WILL ***
make an emulator of these machines when I have enough tech information to
do so. But I need your help.
I am open to any suggestions, comments, or feedback. Let me know how the
emulator works for you. Please let me know of anything that does not work
(that works on a real Apple ][), and I will do my best to correct the
problem. I am also interested in obtaining any Apple ][ programs people
may have to test under my emulation.
Anybody interested please contact me at <deprecated>
Particular things I'm looking for:
o Whats Where in the Apple ][: An Atlas to the Apple computer
o Apple Super Serial Card / Parallel card manuals
o AmigaDOS Programmers Reference
o Any 2.0+ Amiga AutoDocs (AmigaGuide format would be cool!)
o ANY kind of tech info on Gameboy, Nintendo, or the old Atari VCS
(there once was an Apple ][ card to program the Atari. Anybody
have it?)
o Any and all Apple ][ programs.
o Any responses, reactions, suggestions, etc. on my emulation.
o etc...
CREDITS
I owe lots of thanks to lots of people.
Thank you my dearest JoAnnaBear for being so supportive of me and this
project over the last two years, and for not going crazy over my many
hours of "techno-babble", but just patiently smiling back as if you
understood me. :-)
Thank you Robbie for all your inspiration and encouragement. And thanks
for your brainstorm sessions and hundreds of hours worth of second-hand
smoke (cough cough). Thank you for the book "Amiga Machine Language
Programming Guide" - the very first 680x0 assembly book I've seen
(blech!). By the way, this book was due back at the library in 1989!
How are your games "To Sir With Love" and "The Piano" coming along? Oh
yeah... and thanks for cleaning up and converting my docs to AmigaGuide
format for me :-)
Thanks to Ronald J. Menelli, for his contribution of the "Disk2File"
conversion utility. ("Disk2File" is Copyright <20> by Ronald J. Menelli).
Thank you Brian J. Bernstein, for his beautiful new Apple 2000 icon.
And thanks to the many others who sent icons. Apparently people did not
consider the little face representative of Apple2000? ;-)
Thank you so much to Rand, another Firefighter, for recognizing a good
thing when he sees it. (Whats with all these firefighter/programmers?)
Of course, Thanks to Jason Compton (Amiga Report columnist), the man who
did the first [authorized] review of Apple2000, and informed the public of
this great program. How could I have forgotten you for so long?
Thanks Ed Brown, your support and encouragement has been exceptional! You
better be happy with the new "Analog Joystick Support" after telling me
about the advantages over the "digital" sticks! ;-)
Thanks to "Nine Inch Nails" and "Frankie Goes to Hollywood" for their
soothing sounds to which much of Apple2000 was created.
Thanks to the authors of other Apple ][ emulators on other platforms, for
their open discussions, comparisons, and sharing of emulation techniques
and technology. Their willingness to disclose results in improved software
for all computer users.
Thank you to the many people who have contacted me with letters of
support, feedback, contributions, suggestions, programs, etc.
Thanks to those incredible guys at Computer Cafe. I appreciate how you let
me use your various machines for debugging and testing during the
development of my emulation. Without your help, I would have never been
able to work out the '040 bugs, nor have seen my emulation running on a
28" monitor with cool 24 bit backgrounds.
Thanks to Carmen Rizzolo, the computer artist extraordinaire! Your
original artwork for my previous programs are utterly amazing. Without
people like Carmen, where would we get cool 3D Star Trek and telephone
objects?
Thanks to Will, the only intelligent Mac owner I know. It was great to
share ideas on high performance 6502 emulation with the 680x0. Have you
finished your Mac version of your Apple ][ emulator yet? Thanks for that
'half' of the "Inside the Apple //e" manual. Did you ever find pages
1-110?
Thank you Nico Fran<61>ois, for your contribution to the Amiga community.
ReqTools is a very polished piece of work, and I know that your work has
saved me (and many others) hours of work trying to "recreate the wheel".
(Reqtools.library is Copyright <20> by Nico Fran<61>ois).
Thanks to the many helpful people on the Internet, for helping me through
many obscure programming and debugging challenges.
Thanks to Steve Wozniak for creating the original Apple ][. And congrats
to Apple Computer for knowing how to market computers and becoming a
large, successful company. Maybe Commodore can learn a few things from
you before they drive themselves out of business? [May '94- too late]
Thanks to 'Dalton', for his "Dalton's Disk Disintegrator" (DDD) program on
the Apple ][. My (de)compression routines were based on his routines and
attempt to compress data in an identical, compatible way.
Thank you Bill, for taking your family and moving far, far away.
Thanks to an unnamed individual, for teaching me a very important lesson-
That I can never trust anybody, and that people like you will lie, cheat,
and steal to try and build the credibility of yourself/your company. Just
another page in your book of lies, eh?
And finally, thanks to the many people I do not have space to mention, and
to all of the Amiga users who have made the Amiga scene as wonderful as it
is.
HISTORY
08/21/94 ***** Version 1.3 *****
o Controllable Speed Regulation (50%, 100%, 150%, 200%, Unlimited)
o Overhauled entire video subsystem
- No more hardware hitting or copperlists
- Works happily with AGA/Mode promotions
- No more "Screen Jitter" for the few who had it
- Screens can be pulled down in front without disturbances
- All Apple screens can now be "Grabbed"
o Added optional 2 disk drive support (via -2 command)
o Overhauled File Loading/Saving related functions
- With 2 drives, loading/saving will prompt for drive #
- Saving: The proper "loaded" disk name will appear (for each drive)
- Saving: DDD vs 143,360 byte formats chosen via filename.
- Added "Warning: Disk Data Changed" notice during loads & quit.
o Replaced TitleBar at top of screen with "Status Bar" at bottom
- Only shown during significant events
- Black and white (so greyscale users can read it)
o Added support for Analog Joystick w/ 2 buttons
o Added support for Atari Paddles
o Video page-flipping handled properly
- ShortCircuit, BileStoad, & OutPost run much better!
o A couple bug fixes (and duplicated a 6502 bug thats required)
- Canyon Climber, Drol animation, Frogger, Lode Runner, MoonPatrol,
Pinball Construction Set, Randamn, Sargon, & Tetris II All work!
o Added Lower Case Text display (Apple ][e charset)
o Optimized disk loading/decompression routines (twice as fast)
o Added a cheesy "Turn Off Monitor" effect when exited ;-)
o And of course, its a little bit faster!
(Version 1.2 skipped due to misnamed archives already out)
05/18/94 ***** Version 1.1 *****
o Wrote custom disk Rom that is used if _DISK.ROM file is not present!
(_DISK.ROM is no longer required! But still recommended...)
o Check for 68020+ CPU (instead of crashing)
o Support for 143,360 byte generic "disk images" (Loading/Saving)
(as used by many other emulators & available on the net)
o Disk images saved in "generic" format instead of DDD
(DDD format still recognized & loaded, though)
o Dos 3.3/ProDos headers recognized and handled in both disk images
and executable files (instead of just ProDos like version 1.0)
o Dos 3.3/ProDos/Raw ROM images all recognized and acceptable.
o Inclusion of "Disk2File" utility, which reads a 5<>" Apple disk via
the C= 1020 Drive, and saves it as a file
o Included "Version" string
o Numerous optimizations (-slightly- faster)
04/10/94 ***** FIRST PUBLIC RELEASE v1.0 *****
FINDING YOURSELF SOME SOFTWARE
Finding apple disk images is like a treasure hunt. If you can't transfer
files yourself, there are lots of apple files out on the Net and BBS's.
I'm told you can find lot's of disk images on anon ftp:
wilbur.stanford.edu:/pub/apple2/disk_images and /pub/apple2/incoming
ftp.uni-kl.de:/pub/apple2/disk_images
cassandra.ucr.edu:/pub/apple2/incoming
FSP site, at: 134.184.15.12 2424
At (unknown) site at: minnie.sc.adfa.oz.au
Expect difficulties! Some of the images have Mac headers on them that
need to be removed (Leave it to the mac to screw up a simple data file).
Some are compressed with Mac, Apple, or Unix protocols. Some have
out-of-order sectoring and need to be re-mapped (via AFID utility). Some
files are "text" files that try to install themselves via "executing" from
the apple. And many archives are simply corrupt and won't even work on
real Apples!
The best way to avoid the headache of sifting through so much garbage is
to trade with other people who have known, tested, and working programs.
I've even been informed of several huge archives or commercial games for
Apple 2000 floating around many BBS's.
That brings out another issue. Most these games are/were copyrighted,
commercial programs. But now what? Most the companies have since
dissolved, none of the apple programs are sold or produced anymore, and
who retains the copyright is hard to determine. This very issue has been
controversial for quite some time, and there is no easy answer.
What is known is that many of the classic apple programs have been placed
in public domain by their authors (and many agree to it just by asking).
Some other companies have even placed all their old Apple titles into
public domain (as written in the late issues of A+ or InCider). The
sample programs I include with my archive, to the best of my knowledge,
are now in the public domain (according to statements in magazines or
what's sold by PD distributors).
COMPATIBILITY
Every effort was made to provide the highest degree of compatibility with
all Apple ][ software. This is a small sampling of the more than 600
programs that I have successfully ran under Apple2000.
AIR_CARS, ALIEN_AMBUSH, ALIEN_TYPHOON, ALPHAPLOT, APPLE_PANIC, APPLE_ZAP,
APPLECIDER, APPLEIIeINTRO, ASTEROID_FIELD, AUTOBAHN, BAG_OF_TRICKS,
BEAGLE_BAG, BEER_RUN, BEYOND_CASTLE_WOLFENSTEIN, BIG_MAC_ASM, BLISTERBALL,
BLITZKREIG, BOLO, BOULDER_DASH, BUG_ATTACK, BUG_BATTLE, BUZZARD_BAIT,
CANNONBALL.BLITZ, CENTIPEDE, CHAMPIONSHIP LODE RUNNER, CHIVALRY,
CHOPLIFTER, COMPUTER_FOOSBALL, CONAN, COPY_II+_7.4, COUNTY_CARNIVAL,
CROSSFIRE, CUBIT, CYCLOD, D-CODE, DEFENDER, DIG_DUG, DINO_EGGS, DOGFIGHT,
DOS_3.3_SYSTEM_MASTER, DRAGONFIRE, DRAW_POKER, DREADNOUGHTS, DUNG_BEETLES,
ELIMINATOR, F-15_STRIKE_EAGLE, FALCONS, FANTAVISION, FIGHT_NIGHT,
FIREBIRD, FISHIES, FLIGHT_SIM_II, FRAMEUP, FRAZZLE, FRENZY, GALAXIAN,
GOLD.RUSH, GRAPHICS_MAGICIAN, GREAT_CROSS_COUNRY_ROAD_RACE, GUARDIAN,
GULF_STRIKE, HACKER, HACKER_II, HA`RD_HAT_MACK, HARDBALL, HUNGRY_BOY,
INTERLUDE_II, INTERNATIONAL_GRAN_PRIX, JAWBREAKER, JPORT, JUMPJET,
JUNGLE_HUNT, KARATEKA, LABYRINTH, LEATHER_GODDESS_OF_PHOBOS, LEMMINGS,
MARAUDER, MARIO_BROS, MASQUERADE, MICRO_ILLUSTRATOR, MILLIONWAIRE,
MINE_SWEEP, MINER_2049ER, MR.DO, MS_PACMAN, MURDER_ON_THE_ZINDERNEUF,
MUSIC_MAKER, MUSIC_CONSTRUCTION_SET, NEPTUNE, NIGHT_MISSION_PINBALL,
NIGHTMARE.GALLERY, NORAD, PACMAN, PINBALL_CONSTRUCTION_SET, POOYAN,
POPPLES_XMAS_ADVENTURE, PRODOS_MASTER, RASTER_BLASTER, RED.ALERT, REPTON,
RESCUE_RAIDERS, ROADWAR_2000, ROBOTRON, ROCKET.COMMAND, SAMMY_LIGHTFOOT,
SEA_DRAGON, SERPENTINE, SHORT_CIRCUIT, SKYFOX, SNEAKERS, SPACE_RAIDERS,
SPACE_QUARKS, SPACE_WARRIOR, SPY.HUNTER, SPYS_DEMISE, SQUADRON_617,
STAR.THIEF, STAR_WARS_II, STARGATE, STARMAZE, STICKYBEAR_MATH#1,
STICKYBEAR_MATH#2, SUCCESSION, SUICIDE, SUMMER_GAMES, SUMMER_GAMES_II,
SUPER.PUCKMAN, SUPERMAP, SWASHBUCKLER, TAKE1, TAXMAN, TERRAPIN_LOGO,
THIEF, TIME_IS_MONEY, TRANQUILITY_BASE, TRIVIA_FEVER, TWERPS,
UBOAT_COMMAND, XEVIOUS, ZAXXON
:-) ...have fun! -Kevin Kralian

Binary file not shown.

941
docs+icons/Apple2000.guide Normal file
View File

@ -0,0 +1,941 @@
@database "Apple2000.guide"
@node Main "Apple 2000"
APPLE 2000 v1.3
The premier Apple ][ emulator for the Amiga
Copyright <20> 1994, by @{" Kevin Kralian " link ABOUT}
All Rights Reserved
@{" " link INTRODUCTION} Introduction @{" " link ABOUT} ABOUT THE AUTHOR
@{" " link REQUIREMENTS} Requirements @{" " link CREDITS} CREDITS
@{" " link DESCRIPTION} Description @{" " link HISTORY} HISTORY
@{" " link WHY} Why An Apple ][ Emulator? @{" " link COMPATIBILITY} COMPATIBILITY
@{" " link RUNNING} Running the Emulation @{" " link FINDING} FINDING SOFTWARE
@{" " link LOADING} Loading/Saving Disks/Files
@{" " link TRANSFERRING} Transferring Apple Files/Disks/ROMs
@{" " link PADDLE} Paddle/Joystick Emulation
@{" " link SPEED} Speed Regulation
@{" " link STATUS} Status Bar
@{" " link TECH} Tech Notes
@{" " link PAYMENT} Payment
@{" " link EMPLANT} What About EMPLANT?
@endnode
@node INTRODUCTION "Introduction"
This program is freely distributable, as long as this instruction file is
kept with the program, and no modifications are made to my program or
instructions. I grant people the right to use this program privately,
however, it may not be included as part of any commercial package.
This program is FREEWARE (well, more accurately, Tech-Ware). I do not
expect a monetary payment, however, donating me useful, enabling technical
material will result in me creating other emulations...
click here for more info @{" " link PAYMENT}
NOTICE: Although this program is distributed as Freeware, copyright laws
& protection still apply. As such, *any* infringement upon this code,
especially as applied towards other 6502 or Apple II emulations will be
rigorously pursued via legal channels.
Standard Disclaimer: This program is AS IS; use it at your own risk! I
assume no responsibility if this program or its use should cause something
disastrous to happen (like your computer exploding or you getting killed.)
I may be contacted at <deprecated>
This program uses "ReqTools.library", Copyright <20> by Nico Fran<61>ois.
"Disk2File" program Copyright <20> by Ron Menelli.
@endnode
@node REQUIREMENTS "Requirements"
REQUIREMENTS:
o Amiga computer with Kickstart 2.0 or newer
o A 68020+ CPU. Emulation WILL NOT WORK on a 68000 system at this time.
o About 900k free RAM (preferably most of it FAST RAM)
o ReqTools.library by Nico Fran<61>ois
o Apple ][ ROM image (called _APPLE.ROM)
Recommended:
o A two-button joystick (to emulate the Apple's two-button joystick)
o A 68020 at ~25MHz (for full speed 1 MHz emulation)
@endnode
@node DESCRIPTION "Description"
DESCRIPTION:
"Apple 2000" is the premier Apple ][ emulator for the Amiga computer. At
its current level it accurately emulates a 64K Apple ][+, including:
o 6502 CPU
o ALL video modes (Text, LoRes, HiRes, Mixed modes, etc)
o 16k RAM card (64k computer)
o 5<>" disk drive (1 or 2, via disk images)
o Two button joystick / Koala-Pad / Paddles
o Controllable Speed Regulation
o Keyboard
o Sound
The emulation also runs in a completely system friendly manner,
multitasking properly with other programs. The two main goals were speed
and accuracy. This was accomplished by hand coding the emulator in 100%
machine language, optimization via instruction cycle analysis, and
painstaking attention to Apple hardware details.
I feel confident that this is the fastest, most complete Apple ][ emulator
available for the Amiga computer (commercial, public domain, or
otherwise). Some of the highlights of my emulation:
o Apple 2000 video emulation is the most accurate around:
- There is no "dithering" of the 16 Lo-Res colors.
- The text supports inverse and flashing characters.
- Two consecutive color pixels are drawn as white (as the Apple does).
- There are no missing, skipped, or fat vertical lines on Hi-Res gfx.
- Identical text character set.
o Disk drive emulation supports loading of "disk images" from any amiga
device (no custom archives or conversions required), including:
- Dalton Disk Disintegrator (DDD) 2.1 format (like DMS on amiga)
- 143,360 byte "Generic Disk Image", found on the Net & used by other
Apple ][ emulators on other platforms (Unix, Mac, & PC based)
o Apple 2000 disk drive emulation saves disk images in the standard
"Generic Disk Image".
o Apple 2000 is able to instantly load and run Apple executable files
from any Amiga device (better than real Apple; no disk booting rqrd!).
@endnode
@node WHY "Why An Apple ][ Emulator?"
WHY AN APPLE ][ EMULATOR?
Why the Apple ][? Sentimental reasons. It's the computer I grew up with
and learned to program on. Since I have a fundamental understanding of
the Apple and because there aren't any other useable Apple emulators out
there (I've seen 5 or 6), the task called to me. I wanted to be able to
play all of my favorite games that I grew up with. Yes, they certainly
are not cutting edge as far as the graphics and sound goes, but they
certainly are playable! And I can overlook the cosmetics for some good
gameplay (i.e, just like people appreciate classic cars or oldies music).
Plus I wanted all of my friends to be able to play all of those great
forgotten games...the classics! The original CASTLE WOLFENSTEIN,
CHOPLIFTER, KARATEKA and CARMEN SANDIEGO. How many other multitasking
versions of JUNGLE HUNT or ROBOTRON 2084 can you play while downloading a
program? By writing this one emulator, the entire Amiga community is
suddenly presented with over 10,000 (now multitasking) Apple ][ programs
we wouldn't have otherwise been able to use (or play).
After letting the idea stew in my head for 6 months, and much apparent
rambling to my friends (who so nicely encouraged me by saying, "What? YOU
write an emulator? And in C? UGH!"), I began coding. One month later, I
brought my first creation over to a friends house to see how it worked on
his system. After starting it up, we sat there. 30 seconds later we were
still sitting there, looking at a white screen. Eventually, we watched as
each little white character s-l-o-w-l-y was replaced by a black space.
Two minutes later, after getting bored of waiting for it to finish
clearing the screen, we gave up and played 2-player LEMMINGS. I knew the
only way I was going to be able to make this program 'practical' was to do
it in assembly.
I finally bought DevPac 3. After writing a program to bounce 65,535
colored pixels around a screen, I felt ready and experienced. I began
converting my routines for my emulator into assembly code. Almost two
years later (and after rewriting most of my emulation 10 times) my
emulator has finally matured enough to go out into the cold and brutal
world. Here it is, ready to be challenged by thousands of Apple programs
I have never even heard of, and ready to do its damndest to run them all!
@endnode
@node RUNNING "Running the Emulation"
RUNNING THE EMULATION
Make sure "ReqTools.library" is in your libs: directory and place
"Apple2000" and "_APPLE.ROM" in the same directory. Then from the
CLI/Shell, CD to its directory and type "Apple2000" (or use it's icon).
If you want to run the emulation with two emulated disk drives, type
"Apple2000 -2" (or modify the startup script used by the icon).
Now, assuming a little common sense (press the "OK" button on the
window!), you will see a black screen with words "Apple ][" at the top.
Congratulations, you are now using an Apple ][ computer. The Apple is
trying to boot a disk.
I will assume you have a little knowledge on using an Apple ][. Here are
some of the pertinant keys:
KEY Function
------------ ------------------------------------------------------
DEL Apple "Reset" key.
ctrl-DEL Similar to "Ctrl-Open Apple-Reset" on ][e, ][c, ][gs.
Forces reboot, even if reset vectors have been changed.
RAmiga-Q Quit the emulator (after verification).
RAmiga-L Load Apple disk image or executable into the emulator.
RAmiga-S Save Apple disk image.
L-ALT (Like Open-Apple on ][e) Represents Apple Paddle
Button #0
R-ALT (Like Closed-Apple on ][e) Represents Apple Paddle
Button #1
(Alt keys do not affect other keystrokes to emulator)
F9 Toggle between Mouse / Joystick control.
HELP Sequence through simple help-messages.
Speed Regulation:
F1 50% Apple Speed (0.5 Mhz)
F2 100% Apple Speed (1.0 Mhz)
F3 150% Apple Speed (1.5 Mhz)
F4 200% Apple Speed (2.0 Mhz)
F5 Unlimited (as fast as your system can go!)
^
| Arrow keys patched to be like Apple ][e, ][c, ][gs.
<--+--> (Note: Apple ][+ had no Up/Down arrows, and most
| older programs won't handle them as expected.)
v
NumPad only:
8 Trim Apple joystick center position in respective
4 5 6 directions.
2 "5" will reset it to default (of 127,127).
@endnode
@node LOADING "Loading/Saving Disks/Files"
LOADING DISKS/FILES
Once the Apple is running, you'll probably want to load an Apple disk or
executable. Here's how: at ANY time during emulation, feel free to press
Right-Amiga-L to bring up the Load File requester. From this requester
you may load Apple 5<>" disk images or executable files. Simply navigate
to wherever the files are kept and load the file/disk image you want.
Apple 2000 recognizes several types of load files:
o Filenames with a <xxx> suffix are Dalton Disk Disintegrator archives
(DDD was a common disk compression util for the Apple, similar to DMS
for the Amiga) and the emulator will automatically decompress them!
o 143,360 byte files are assumed to be "Generic Disk Images", such as
the many available on the net.
o Files with the proper internal Dos/ProDos header are executable files;
these are single files that were runnable from Apple DOS 3.3/ProDos
and did not require any disk access thereafter. These files now do
not even require booting any Apple disk and are simply loaded into the
appropriate Apple memory areas and started instantly (quicker and
easier than a real Apple!).
If you started Apple 2000 with the 2 disk drive option (via -2 option),
you will be asked which drive you want to load the image into. After
loading a disk image into drive #1, the emulator will ask you if you want
to 'boot' the disk. If you choose not to, you have effectively just 'put
the disk in the drive' (useful when you need to insert 'Disk 2'). On the
other hand, loading an executable Apple file does not give you any choices
and immediately runs it. This has all been designed to keep the emulator
as clean and simple as possible in terms of starting and running Apple
programs for the non Apple-literate user.
Keep in mind, loading a disk image is the same thing as inserting the disk
into the Apple drive. It will STAY there until you replace it with
another disk (or some program erases that disk). Even after you load and
run several executable Apple programs, hitting Ctrl-DEL (rebooting the
Apple) will boot up the last DISK IMAGE you loaded (if any). This can be
confusing if you don't know whats going on (i.e, after finishing playing
MS. PACMAN and reseting the Apple, why is MUSIC CONSTRUCTION SET loading?
Because the disk is still in the drive from before).
SAVING DISK IMAGES
Pressing Right-Amiga-S will bring up a requester to save a disk image.
Disk images are saved in either the 143,360 byte "Generic" format, or in a
semi-compressed DDD format! The determination is made by the filename. To
compress a file in the DDD format, the filename must end with a '>' char.
Otherwise, it will be saved in the 143,360 byte format. If you do save the
image that way, it is suggested you append a ".disk" onto the filename to
maintain naming conventions (and so the requester will show the file).
Keep in mind, DDD compression is not as tight as external compression
programs (LHA, etc). Also, loading/saving DDD files takes a couple extra
seconds to perform the (de)compression.
@endnode
@node TRANSFERRING "Transferring Apple Files/Disks/ROMs"
TRANSFERRING APPLE FILES
To get an executable binary file from a real Apple to the Amiga is quite
simple. Use a terminal program and and then transfer it via null-modem
(or however you want) to the Amiga. It's recommended you attach a .PROG to
the end of the filename for consistent naming conventions.
TRANSFERRING APPLE DISKS
Only UNPROTECTED standard 16 sector Apple disks are currently useable.
This eliminates copy protected software. Simply run Dalton Disk
Disintegrator (do not use version 2.0! It has a bug! Use version 2.1)
and use it to compress the disk into a file. Then, transfer it to an
Amiga (as described in "Transferring Apple Files" above). Once on the
Amiga, ensure the filename ends in <xxx> so the emulator recognizes it as
a DDD file.
TRANSFERRING APPLE ROMS
The Apple emulator, being true to form, requires the actual Apple ROM data
in order for the Apple to do anything. The standard Apple ROMs in use
were the 'AppleSoft ROMs that contained AppleSoft BASIC, the assembly
language monitor, and autobooting code. So I suggest that you obtain the
same ROM if you would like the same compatibility. The ROM image can be
obtained by booting an Apple ][ or ][+ with DOS 3.3, then typing:
BSAVE BASICROM,A$D000,L$2FFF
to save it to disk. Also, the disk controller Rom (not required) can be
saved by typing:
BSAVE DISKROM,A$C600,L$00FF
Incidentally, the main ROM image is on Apple's "DOS 3.3 System Master"
disk, called FPBASIC (which may be used instead). After saving these
images to disk, use your favorite terminal software and a null modem cable
(or real modems or whatever you like) to transfer these files to the
Amiga. Once transferred to the Amiga, give these files the proper names
and place them in the same directory as the Apple2000 executable.
Theoretically, you can use the ROMs obtained from an Apple ][ clone (i.e,
Franklin Ace, PineApple, etc.), but keep in mind that these ROMs were not
100% compatible (but were quite close). This would effectively make my
emulation a "Franklin Ace Emulator". :-) However, you CANNOT use the ROM
images from an Apple ][e, ][c, or ][gs (maybe eventually...we'll see)!
Once on the Amiga, the main Rom MUST be named "_APPLE.ROM" and the disk
rom (if you have it) must be called _DISK.ROM.
** NOTE **
Starting with version 1.1, due to the difficulties people had trying to
obtain it, the _DISK.ROM is no longer required! If that file is not
present, Apple2000 will automatically use a custom-disk rom instead.
However, obtaining the true rom image is still recommended for 100%
compatibility with all software.
These ROM files can also be found in several other Apple emulator archives
available on the net and on several CD-Rom compilations (including the PC
Apple ][ emulator called "Apple2Em.zip").
@endnode
@node PADDLE "Paddle/Joystick Emulation"
PADDLE/JOYSTICK EMULATION
The Apple ][ commonly uses either two paddles, an analog joystick, or a
graphics tablet (like a free-floating joystick). My emulation covers all
bases. Apple 2000 supports using these control devices:
o Amiga Joystick (preferably 2 button, to emulate apple joystick)
o Amiga Mouse (to emulate free-floating joystick / paddles / Koala-pad)
o Analog PC Joystick (via FighterDuel dongle, to emulate apple joystick)
o Atari Paddles (to emulate apple paddles)
The F9 key toggles through the choices and displays your selection at the
bottom of the screen.
Amiga Joystick:
---------------
The emulator can utilize the standard amiga/atari/sega joystick
(preferably, a true 2-button joystick), and will assign the 8 switch
positions (up, up-right, right, etc) to the extreme values that an analog
stick would return (0 & 255). The "center" position defaults to the
optimum values (127 x 127), however, some games expect different center
values. This center value can be trimmed with the 2, 4, 6, & 8 keys on
the -numeric keypad- ONLY (see "Running Emulation"). For example, if you
start CHOPLIFTER and your character drifts towards the left, press the "6"
key to center the joystick more towards the right until your character no
longer drifts! (This is the emulated 'joystick trim' function).
If you do not have a two button joystick, you have two choices. Spend $8
and buy one, or else just use the Right-ALT key in lieu of the second
button (by the way, the two ALT keys work great for pinball games like
RASTER BLASTER). Note that the Sega Genesis Game controllers work well
with the amiga, and have two buttons!
Amiga Mouse:
------------
The emulator can utilize the absolute mouse coordinates, and this works
well for simulating a Koala-Pad graphics tablet, free-floating joystick,
or paddles (left/right control paddle #0, up/down control paddle #1).
Programs designed for graphics tablets (KOALA PAD) or un-centered
joysticks work great in this mode, i.e, FANTAVISION, MISSILE COMMAND,
MUSIC CONSTRUCTION SET, and most other free floating cursor control
programs work ideally. The mouse works just like you would expect here.
Analog PC Joystick:
-------------------
The emulation also supports true analog joysticks via joystick-dongles
(such as the adapter used for Fighter-Duel). The joystick will work just
like a real analog stick.
*** Note: Apple 2000 uses "dynamic range setting & calibration" for analog
joysticks. This means that when you choose the "Analog Joystick" option,
the first thing you must do when starting to play your game is to move the
joystick over its full range of motion (extreme left, right, up, & down).
Once that is done, you need not worry about it anymore (unless you turn
off "Analog Joystick" and select it again). Joystick trimming is to be
done with the joystick's own trim pots. This 1 second of work from the
user ensures that Apple 2000 will work with a wide variety of joysticks.
Atari Paddles:
--------------
The emulator also now supports using actual Atari Paddles (the kind used
in the old Atari VCS/2600). They plug right into the amiga game port, and
work just like real apple paddles. NOTE: Like the analog joystick, the
paddles need to be moved over their complete range of motion when you
start to use them.
Other game controller notes:
----------------------------
Some of the older Apple games were designed to be used with paddles, not
joysticks. This is noticable in games (APPLE GALAXIAN, SNEAKERS) as in
when you release the joystick, your ship automatically moves back towards
the center point on the screen. This is exactly what would happen on a
real Apple with a joystick. You need to use some type of paddle emulation
here, either via the "Amiga Mouse" or "Atari Paddles" options.
*** WARNING! While it is a bad habit many people have of (un)plugging game
controllers while the computer is on, be aware of this potential disaster:
Some of the Analog-Joystick Adapters have a metal jacket around the front
plug. This metal sheath has the potential to short out pins on the amiga
game port while trying to plug it in, which can damage your amiga! The
solution is simple: turn off your computer while changing controllers.
"An ounce of prevention..."
@endnode
@node SPEED "Speed Regulation"
SPEED REGULATION
"IT'S TOO FAST!" :-)
By popular request, Apple 2000 now offers selectable speed regulation so
people with fast systems can slow down games to humanly playable speeds.
Speed regulation is controlled via 5 function keys (F1 -> F5), which are
in order from slowest to fastest.
F1 50% Apple Speed (0.5 Mhz)
F2 100% Apple Speed (1.0 Mhz)
F3 150% Apple Speed (1.5 Mhz)
F4 200% Apple Speed (2.0 Mhz)
F5 Unlimited (as fast as your system can go!)
F2 selects "100% Apple Speed", which limits emulation speed to that of a
real Apple ][ (1.024 Mhz). F1 selects 50% (slow down games to half
speed), and F5 selects "unlimited speed" (which runs as fast as your
system can).
Use of these keys during gameplay can be used as an aid- For example,
switching to 50% speed during a difficult part in an arcade game. Also,
some games on the apple might be a little sluggish compared to today's
standards and skills. 150% speed usually takes care of those. :)
Understand that Speed Regulation works like a "Speed Limit". If your
system can't run the emulation quickly in the first place, choosing 150%
or 200% regulation won't have any noticeable effects (Like taking a '74
Pinto out on the Autobahn. Who cares if there's no speed limit- You won't
go very fast. :)
Keep in mind that Apple sound is made via speaker clicks and timing loops.
Faster/slower emulation will cause higher/lower pitched sound.
"IT'S TOO SLOW!" :-(
Okay. For the remaining 93% of the Amiga owners who don't have '040s,
there are a few things that can be done to speed up the emulation.
Press F5 to turn off speed regulation- This completely turns off the
overhead of the speed-regulation code.
If you have an MMU (and an additional 512K free fast-ram), turn on the
"FastRom" option. (Type "CPU FASTROM" from the shell).
If you are running ENFORCER, turn it off! On my system, graphics intensive
games slow down 20% while enforcer is running.
Start "Apple 2000" in a relatively clean system with large blocks of
fast-ram available. (IE: Instead of trying to run the emulator while
you've been working on your system for 8 hours and have DirOpus, AMAX IV,
and ADPro all running, just reboot the system first).
Of course, you can always add an accellerator to your system. ;-)
@endnode
@node STATUS "The Status Bar"
THE STATUS BAR
By popular request, the "Title Bar" at the top of the screen has been
removed, and has now been replaced with a new "Status Bar". The bar
appears at the bottom of the screen momentarily to notify the user of any
significant events, and then goes away. And it's black and white so the
grey scale users can read it.
This bar displays significant messages, including feedback on Speed
Regulation Selections, Paddle/Joystick Controls, Apple Crashes, Help, and
disk drive access (including drive & track #'s). Most the time the status
bar will be invisible.
@endnode
@node TECH "Tech Notes"
TECH NOTES
Some Apple programs use "unimplemented" 6502 instructions. These are
instructions that are not official, but partially decode into doing a
particular function (as discovered by many unorthodox programmers). My
emulation does not support ANY unimplemented instructions, and will simply
break upon hitting any of those instructions (with Apple ][ software, I
have seen very few programs that use them). Those few programs will also
fail on the Apple ][gs.
The ONLY graphics glitch is that the Hi-Res graphics screens do not fill
in the entire display width. That is, they leave a half-inch black border
on each side of the display. Why? Because the Apple Hi-Res screen has a
horizontal resolution of 280 pixels, and the Amiga's display has a minimum
resolution of 320. Trying to stretch this display by leaving an empty
pixel after every 7 pixels or drawing every 7th pixel twice, results in a
highly distorted and uneven image. The Text modes and LoRes modes still
use the entire screen width (to maintain aspect ratio). This slightly
narrow display is only noticeable in the 'mixed Graphics/Text' mode, where
text will be a little wider than the graphics above it.
Also regarding Text and Graphics (but not a glitch, it's an improvement)
is the fact that mixed Graphics and Text on the old Apple ]['s originally
caused the text to be fringed with green and purple instead of being solid
white. This fringing has absolutely no purpose, but is a mere artifact of
the Apple video circuity. My emulation cleans it up with crisp & clean
text output at all times (does anybody have any complaints?). Apple
finally cleaned this up with the Apple ][gs and its RGB output (but
introduced a couple other graphic glitches), so I believe my clean Text
display is desirable.
@endnode
@node PLANNED "Planned Improvements"
PLANNED IMPROVEMENTS
Currently, emulation speed is pretty much as fast as possible under the
current 'interpreted' method. A speedup of about 3X is possible if I do
'pre-interpretation' which essentially converts 6502 code to native 680x0
code ahead of time, then running it at full speed. However, this comes at
a cost of excessive memory usage (I estimate using about 2 megs for the
64k Apple emulation). This could be considered if enough people are
interested (this would be the final speed boost required for the A1200
owners if they have enough memory!), but is of low priority for now.
A 68000 version is easily possible, but emulation is so slow at that point
(games are frustratingly unplayable), that I haven't bothered to do one.
I plan to add Apple printer & serial emulation (and redirection). This
way you could redirect Apple printer output to an Amiga file or to an
Epson emulator (to print Epson output to any Amiga Prefs printer). Or
emulate the Apple serial card with an Amiga Modem, etc.
I plan to (eventually) upgrade the entire emulation to Apple ][e / ][c
status. This includes Apple "Double-Hi-Res" graphics, 128k RAM, and
80-column text.
I have thought about writing a ProDOS driver allowing the Apple to access
Amiga devices as an Apple hard drive (is anybody using the emulator this
seriously?).
I might tackle using a real 5<>" disk drive if enough people want it.
@endnode
@node EMPLANT "What About EMPLANT?"
WHAT ABOUT EMPLANT?
My emulator, "Apple 2000" was (p)reviewed in Amiga Computing (Issue 71,
March 94), inside a larger review for the Emplant card (there's even a
screenshot where you can read my title bar, Apple 2000!). For all intents
and purposes, the review makes it APPEAR as if this program was written
by, owned by, and coming soon from Utilities Unlimited, makers of the
Emplant card (A macintosh emulator). Regardless, the reviewer loved it,
noting that this was the fastest 6502 emulation he has seen.
At several World Of Commodore shows, Jim Drew showed my early versions of
"Apple 2000" to crowds of people during his presentations of his Mac
emulator. A friend even has a video-tape of Jim loading up and showing my
emulator to a crowd when I asked, "What other emulators are you doing?"
(before he knew who I was) at WOC in Pasadena, 1993.
To set the record straight, I did send Utilities Unlimited several early
exclusive 'evaluation' versions of my emulator to see if they were
interested in purchasing it (for their Emplant package), but no agreements
were ever reached. Utilities Unlimited was in no way involved with the
development of, and has no connection to, this program (Apple 2000).
This program is NOT part of the Emplant package, as many people have been
led to believe. The positive side of this is that you may use Apple 2000
without having to spend >$300!
@endnode
@node ABOUT "About the Author"
ABOUT THE AUTHOR
"Apple 2000" was written by Kevin Kralian over the course of two years.
After serving in the US Marine Corps Infantry (!), he then earned a
college degree in Fire Technology, and continued in school towards his
Computer Science degree. He is also a volunteer FireFighter/EMT and a
freelance programmer.
He has over 10 years of programming experience, including ADA, BASIC, C,
Pascal, 6502 and 680x0 assembly. Programming interests focus on
performance programming, including games and emulation. Career goals
include firefighter and game programmer.
He has recently been hired as a full time game programmer, and is now
working on the Sega "Saturn". Good things do happen to good people. :-)
He may be contacted at <deprecated>
@endnode
# # #### # # # # #
# # # # # # # #
##### ### # # # #
# # # #
# # #### # # # #
yuyuyuyuyatytytyt... This is Kevin at the keys... Congratulations! You
have found the "hidden part" of my doc file! I'm attempting to write some
senseless dribble like the Europeans do... It's another hot, sweltering
day (106<30> F)... I'm adding the final few touches to Apple 2000 v1.3, and
I'm running out of things to do to it... Good thing, I'm getting sick of
working on it!... Are their any LlamaTron fans out there? By far my
favorite game on the amiga, I've probably logged 500 hours into that game.
After killing that spinning thing on level 99, does anybody else have the
problem where the screen gets stuck "exploding" forever??? Ahhhhhh......
I think I'll go out to the pool and vomit out all this beer I've ingested
while in my coding frenzy... (Just kidding! I'm trying to act european,
give me a break!) :-) Enjoy the program, folks! -Kevin Kralian 08/03/94
@node PAYMENT "Payment"
"PAYMENT" FOR THIS PROGRAM
This program is being distributed as Freeware, I do not expect monetary
payment. My original intentions were simply to have my program be 'used'
by the Amiga community, and I still feel the same way. I've worked long
and hard on this program and the most rewarding thing to me know would be
to simply know people are enjoying it!
However, what I WOULD appreciate would be any technical references for any
computer/hardware/platform. Let me explain...
Many improvements in the Apple emulator are dependant upon me finding
Apple technical reference material (i.e, unimplemented instructions,
serial/parallel support, ProDOS harddrive support, etc). If you would
like to see these features implemented, the biggest thing you can do is
send me any tech material that could be helpful.
Also, some ideas for my next emulator include: Atari VCS (2600), GameBoy,
Nintendo, Atari 400/800 and Commodore 64/128. Though there are a few C-64
emulators out there, many people have urged me to do one "the right way".
I tend to want to do the old Atari VCS or Gameboy emulation. HOWEVER, in
order to do this, I need tech information that I cannot publically obtain.
Do YOU want these game machines to be emulated (I do)? If you are one of
those priviledged people who might have been involved in developing
software for any of these machines or somehow have any tech info on these
machines, please send me any and all tech information. *** I WILL ***
make an emulator of these machines when I have enough tech information to
do so. But I need your help.
I am open to any suggestions, comments, or feedback. Let me know how the
emulator works for you. Please let me know of anything that does not work
(that works on a real Apple ][), and I will do my best to correct the
problem. I am also interested in obtaining any Apple ][ programs people
may have to test under my emulation.
Anybody interested please contact me at <deprecated>
Particular things I'm looking for:
o Whats Where in the Apple ][: An Atlas to the Apple computer
o Apple Super Serial Card / Parallel card manuals
o AmigaDOS Programmers Reference
o Any 2.0+ Amiga AutoDocs (AmigaGuide format would be cool!)
o ANY kind of tech info on Gameboy, Nintendo, or the old Atari VCS
(there once was an Apple ][ card to program the Atari. Anybody
have it?)
o Any and all Apple ][ programs.
o Any responses, reactions, suggestions, etc. on my emulation
o etc...
@endnode
@node CREDITS "Credits"
CREDITS
I owe lots of thanks to lots of people.
Thank you my dearest JoAnnaBear for being so supportive of me and this
project over the last two years, and for not going crazy over my many
hours of "techno-babble", but just patiently smiling back as if you
understood me. :-)
Thank you Robbie for all your inspiration and encouragement. And thanks
for your brainstorm sessions and hundreds of hours worth of second-hand
smoke (cough cough). Thank you for the book "Amiga Machine Language
Programming Guide" - the very first 680x0 assembly book I've seen
(blech!). By the way, this book was due back at the library in 1989! How
are your games "To Sir With Love" and "The Piano" coming along? Oh
yeah... and thanks for cleaning up and converting my docs to AmigaGuide
format for me :-)
Thanks to Ronald J. Menelli, for his contribution of the "Disk2File"
conversion utility. ("Disk2File" is Copyright <20> by Ronald J. Menelli).
Thank you Brian J. Bernstein, for his beautiful new Apple 2000 icon.
And thanks to the many others who sent icons. Apparently people did not
consider the little face representative of Apple2000? ;-)
Thank you so much to Rand, another Firefighter, for recognizing a good
thing when he sees it. (Whats with all these firefighter/programmers?)
Of course, Thanks to Jason Compton (Amiga Report columnist), the man who
did the first [authorized] review of Apple2000, and informed the public of
this great program. How could I have forgotten you for so long?
Thanks Ed Brown, your support and encouragement has been exceptional! You
better be happy with the new "Analog Joystick Support" after telling me
about the advantages over the "digital" sticks! ;-)
Thanks to "Nine Inch Nails" and "Frankie Goes to Hollywood" for their
soothing sounds to which much of Apple2000 was created.
Thanks to the authors of other Apple ][ emulators on other platforms, for
their open discussions, comparisons, and sharing of emulation techniques
and technology. Their willingness to disclose results in improved software
for all computer users.
Thank you to the many people who have contacted me about the initial
release of "Apple 2000". All of your letters of support, feedback,
contributions, suggestions, etc. are enthusiastically welcomed!
Thanks to those incredible guys at Computer Cafe. I appreciate how you let
me use your various machines for debugging and testing during the
development of my emulation. Without your help, I would have never been
able to work out the '040 bugs, nor have seen my emulation running on a
28" monitor with cool 24 bit backgrounds.
Thanks to Carmen Rizzolo, the computer artist extraordinaire! Your
original artwork for my previous programs are utterly amazing. Without
people like Carmen, where would we get cool 3D Star Trek and telephone
objects?
Thanks to Will, the only intelligent Mac owner I know. It was great to
share ideas on high performance 6502 emulation with the 680x0. Have you
finished your Mac version of your Apple ][ emulator yet? Thanks for that
'half' of the "Inside the Apple //e" manual. Did you ever find pages
1-110?
Thank you Nico Fran<61>ois, for your contributions to the Amiga community.
ReqTools is a very polished piece of work, and I know that your work has
saved me (and many others) hours of work trying to "recreate the wheel".
(Reqtools.library is Copyright <20> by Nico Fran<61>ois).
Thanks to the many helpful people on the Internet, for helping me through
many obscure programming and debugging challenges.
Thanks to Steve Wozniak for creating the original Apple ][. And congrats
to Apple Computer for knowing how to market computers and becoming a
large, successful company. Maybe Commodore can learn a few things from
you before they drive themselves out of business? [May '94- too late]
Thanks to 'Dalton', for his "Dalton's Disk Disintegrator" (DDD) program on
the Apple ][. My (de)compression routines were based on his routines and
attempt to compress data in an identical, compatible way.
Thank you Bill, for taking your family and moving far,far away.
Thanks to an unnamed individual, for teaching me a very important lesson-
That I can never trust anybody, and that people like you will lie, cheat,
and steal to try and build the credibility of yourself/your company. Just
another page in your book of lies, eh?
And finally, thanks to the many people I do not have space to mention, and
to all of the Amiga users who have made the Amiga scene as wonderful as it
is.
@endnode
@node HISTORY "History"
HISTORY
08/21/94 ***** Version 1.3 *****
o Controllable Speed Regulation (50%, 100%, 150%, 200%, Unlimited)
o Overhauled entire video subsystem
- No more hardware hitting or copperlists
- Works happily with AGA/Mode promotions
- No more "Screen Jitter" for the few who had it
- Screens can be pulled down in front without disturbances
- All Apple screens can now be "Grabbed"
o Added optional 2 disk drive support (via -2 command)
o Overhauled File Loading/Saving related functions
- With 2 drives, loading/saving will prompt for drive #
- Saving: The proper "loaded" disk name will appear (for each drive)
- Saving: DDD vs 143,360 byte formats chosen via filename.
- Added "Warning: Disk Data Changed" notice during loads & quit.
o Replaced TitleBar at top of screen with "Status Bar" at bottom
- Only shown during significant events
- Black and white (so greyscale users can read it)
o Added support for Analog Joystick w/ 2 buttons
o Added support for Atari Paddles
o Video page-flipping handled properly
- ShortCircuit, BileStoad, & OutPost run much better!
o A couple bug fixes (and duplicated a 6502 bug thats required)
- Canyon Climber, Drol animation, Frogger, Lode Runner, MoonPatrol,
Pinball Construction Set, Randamn, Sargon, & Tetris II All work!
o Added Lower Case Text display (Apple ][e charset)
o Optimized disk loading/decompression routines (twice as fast)
o Added a cheesy "Turn Off Monitor" effect when exited ;-)
o And of course, its a little bit faster!
(Version 1.2 skipped due to misnamed archives already out)
05/18/94 ***** Version 1.1 *****
o Wrote custom disk Rom that is used if _DISK.ROM file is not present!
(_DISK.ROM is no longer required! But still recommended...)
o Check for 68020+ CPU (instead of crashing)
o Support for 143,360 byte generic "disk images" (Loading/Saving)
(as used by many other emulators & available on the net)
o Disk images saved in "generic" format instead of DDD
(DDD format still recognized & loaded, though)
o Dos 3.3/ProDos headers recognized and handled in both disk images
and executable files (instead of just ProDos like version 1.0)
o Dos 3.3/ProDos/Raw ROM images all recognized and acceptable.
o Inclusion of "Disk2File" utility, which reads a 5<>" Apple disk via
the C= 1020 Drive, and saves it as a file
o Included "Version" string
o Numerous optimizations (-slightly- faster)
04/10/94 ***** FIRST PUBLIC RELEASE v1.0 *****
@endnode
@node FINDING "Finding Software"
FINDING YOURSELF SOME SOFTWARE
Finding apple disk images is like a treasure hunt. If you can't transfer
files yourself, there are lots of apple files out on the Net and BBS's.
I'm told you can find lot's of disk images on anon ftp:
wilbur.stanford.edu:/pub/apple2/disk_images and /pub/apple2/incoming
ftp.uni-kl.de:/pub/apple2/disk_images
cassandra.ucr.edu:/pub/apple2/incoming
FSP site, at: 134.184.15.12 2424
At (unknown) site at: minnie.sc.adfa.oz.au
Expect difficulties! Some of the images have Mac headers on them that
need to be removed (Leave it to the mac to screw up a simple data file).
Some are compressed with Mac, Apple, or Unix protocols. Some have
out-of-order sectoring and need to be re-mapped (via AFID utility). Some
files are "text" files that try to install themselves via "executing" from
the apple. And many archives are simply corrupt and won't even work on
real Apples!
The best way to avoid the headache of sifting through so much garbage is
to trade with other people who have known, tested, and working programs.
I've even been informed of several huge archives or commercial games for
Apple 2000 floating around many BBS's.
That brings out another issue. Most these games are/were copyrighted,
commercial programs. But now what? Most the companies have since
dissolved, none of the apple programs are sold or produced anymore, and
who retains the copyright is hard to determine. This very issue has been
controversial for quite some time, and there is no easy answer.
What is known is that many of the classic apple programs have been placed
in public domain by their authors (and many agree to it just by asking).
Some other companies have even placed all their old Apple titles into
public domain (as written in the late issues of A+ or InCider). The
sample programs I include with my archive, to the best of my knowledge,
are now in the public domain (according to statements in magazines or
what's sold by PD distributors).
@endnode
@node COMPATIBILITY "Compatibility"
COMPATIBILITY
Every effort was made to provide the highest degree of compatibility with
all Apple ][ software. This is a small sampling of the more than 600
programs that I have successfully ran under Apple2000.
AIR_CARS, ALIEN_AMBUSH, ALIEN_TYPHOON, ALPHAPLOT, APPLE_PANIC, APPLE_ZAP,
APPLECIDER, APPLEIIeINTRO, ASTEROID_FIELD, AUTOBAHN, BAG_OF_TRICKS,
BEAGLE_BAG, BEER_RUN, BEYOND_CASTLE_WOLFENSTEIN, BIG_MAC_ASM, BLISTERBALL,
BLITZKREIG, BOLO, BOULDER_DASH, BUG_ATTACK, BUG_BATTLE, BUZZARD_BAIT,
CANNONBALL.BLITZ, CENTIPEDE, CHAMPIONSHIP LODE RUNNER, CHIVALRY,
CHOPLIFTER, COMPUTER_FOOSBALL, CONAN, COPY_II+_7.4, COUNTY_CARNIVAL,
CROSSFIRE, CUBIT, CYCLOD, D-CODE, DEFENDER, DIG_DUG, DINO_EGGS, DOGFIGHT,
DOS_3.3_SYSTEM_MASTER, DRAGONFIRE, DRAW_POKER, DREADNOUGHTS, DUNG_BEETLES,
ELIMINATOR, F-15_STRIKE_EAGLE, FALCONS, FANTAVISION, FIGHT_NIGHT,
FIREBIRD, FISHIES, FLIGHT_SIM_II, FRAMEUP, FRAZZLE, FRENZY, GALAXIAN,
GOLD.RUSH, GRAPHICS_MAGICIAN, GREAT_CROSS_COUNRY_ROAD_RACE, GUARDIAN,
GULF_STRIKE, HACKER, HACKER_II, HARD_HAT_MACK, HARDBALL, HUNGRY_BOY,
INTERLUDE_II, INTERNATIONAL_GRAN_PRIX, JAWBREAKER, JPORT, JUMPJET,
JUNGLE_HUNT, KARATEKA, LABYRINTH, LEATHER_GODDESS_OF_PHOBOS, LEMMINGS,
MARAUDER, MARIO_BROS, MASQUERADE, MICRO_ILLUSTRATOR, MILLIONWAIRE,
MINE_SWEEP, MINER_2049ER, MR.DO, MS_PACMAN, MURDER_ON_THE_ZINDERNEUF,
MUSIC_MAKER, MUSIC_CONSTRUCTION_SET, NEPTUNE, NIGHT_MISSION_PINBALL,
NIGHTMARE.GALLERY, NORAD, PACMAN, PINBALL_CONSTRUCTION_SET, POOYAN,
POPPLES_XMAS_ADVENTURE, PRODOS_MASTER, RASTER_BLASTER, RED.ALERT, REPTON,
RESCUE_RAIDERS, ROADWAR_2000, ROBOTRON, ROCKET.COMMAND, SAMMY_LIGHTFOOT,
SEA_DRAGON, SERPENTINE, SHORT_CIRCUIT, SKYFOX, SNEAKERS, SPACE_RAIDERS,
SPACE_QUARKS, SPACE_WARRIOR, SPY.HUNTER, SPYS_DEMISE, SQUADRON_617,
STAR.THIEF, STAR_WARS_II, STARGATE, STARMAZE, STICKYBEAR_MATH#1,
STICKYBEAR_MATH#2, SUCCESSION, SUICIDE, SUMMER_GAMES, SUMMER_GAMES_II,
SUPER.PUCKMAN, SUPERMAP, SWASHBUCKLER, TAKE1, TAXMAN, TERRAPIN_LOGO,
THIEF, TIME_IS_MONEY, TRANQUILITY_BASE, TRIVIA_FEVER, TWERPS,
UBOAT_COMMAND, XEVIOUS, ZAXXON
@endnode

Binary file not shown.

BIN
docs+icons/Apple_2000.info Normal file

Binary file not shown.

7146
src/AppleII.s Normal file

File diff suppressed because it is too large Load Diff

922
src/CharSets.s Normal file
View File

@ -0,0 +1,922 @@
*** This file contains charset data, for both the Apple text display and also
*** for the "Status bar" display at the bottom of the screen.
SECTION TABLES,DATA
CNOP 0,4
IIeCharSet:
dc.b $c7,$bb,$ab,$a3,$a7,$bf,$c3,$ff ;@ INVERSE
dc.b $ef,$d7,$bb,$bb,$83,$bb,$bb,$ff ;A
dc.b $87,$bb,$bb,$87,$bb,$bb,$87,$ff ;B
dc.b $c7,$bb,$bf,$bf,$bf,$bb,$c7,$ff ;C
dc.b $87,$bb,$bb,$bb,$bb,$bb,$87,$ff ;D
dc.b $83,$bf,$bf,$87,$bf,$bf,$83,$ff ;E
dc.b $83,$bf,$bf,$87,$bf,$bf,$bf,$ff ;F
dc.b $c3,$bf,$bf,$bf,$b3,$bb,$c3,$ff ;G
dc.b $bb,$bb,$bb,$83,$bb,$bb,$bb,$ff ;H
dc.b $c7,$ef,$ef,$ef,$ef,$ef,$c7,$ff ;I
dc.b $fb,$fb,$fb,$fb,$fb,$bb,$c7,$ff ;J
dc.b $bb,$b7,$af,$9f,$af,$b7,$bb,$ff ;K
dc.b $bf,$bf,$bf,$bf,$bf,$bf,$83,$ff ;L
dc.b $bb,$93,$ab,$ab,$bb,$bb,$bb,$ff ;M
dc.b $bb,$bb,$9b,$ab,$b3,$bb,$bb,$ff ;N
dc.b $c7,$bb,$bb,$bb,$bb,$bb,$c7,$ff ;O
dc.b $87,$bb,$bb,$87,$bf,$bf,$bf,$ff ;P
dc.b $c7,$bb,$bb,$bb,$ab,$b7,$cb,$ff ;Q
dc.b $87,$bb,$bb,$87,$af,$b7,$bb,$ff ;R
dc.b $c7,$bb,$bf,$c7,$fb,$bb,$c7,$ff ;S
dc.b $83,$ef,$ef,$ef,$ef,$ef,$ef,$ff ;T
dc.b $bb,$bb,$bb,$bb,$bb,$bb,$c7,$ff ;U
dc.b $bb,$bb,$bb,$bb,$bb,$d7,$ef,$ff ;V
dc.b $bb,$bb,$bb,$ab,$ab,$93,$bb,$ff ;W
dc.b $bb,$bb,$d7,$ef,$d7,$bb,$bb,$ff ;X
dc.b $bb,$bb,$d7,$ef,$ef,$ef,$ef,$ff ;Y
dc.b $83,$fb,$f7,$ef,$df,$bf,$83,$ff ;Z
dc.b $83,$9f,$9f,$9f,$9f,$9f,$83,$ff ;[
dc.b $ff,$bf,$df,$ef,$f7,$fb,$fd,$ff ;\
dc.b $83,$f3,$f3,$f3,$f3,$f3,$83,$ff ;]
dc.b $ff,$ff,$ef,$d7,$bb,$ff,$ff,$ff ;^
dc.b $ff,$ff,$ff,$ff,$ff,$ff,$ff,$01 ;_
dc.b $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff ; (space)
dc.b $ef,$ef,$ef,$ef,$ef,$ff,$ef,$ff ;!
dc.b $d7,$d7,$d7,$ff,$ff,$ff,$ff,$ff ;"
dc.b $d7,$d7,$83,$d7,$83,$d7,$d7,$ff ;#
dc.b $ef,$c3,$af,$c7,$eb,$87,$ef,$ff ;$
dc.b $9f,$9b,$f7,$ef,$df,$b3,$f3,$ff ;%
dc.b $df,$af,$af,$df,$ab,$b7,$cb,$ff ;&
dc.b $ef,$ef,$ef,$ff,$ff,$ff,$ff,$ff ;'
dc.b $ef,$df,$bf,$bf,$bf,$df,$ef,$ff ;(
dc.b $ef,$f7,$fb,$fb,$fb,$f7,$ef,$ff ;)
dc.b $ef,$ab,$c7,$ef,$c7,$ab,$ef,$ff ;*
dc.b $ff,$ef,$ef,$83,$ef,$ef,$ff,$ff ;+
dc.b $ff,$ff,$ff,$ff,$ef,$ef,$df,$ff ;,
dc.b $ff,$ff,$ff,$83,$ff,$ff,$ff,$ff ;-
dc.b $ff,$ff,$ff,$ff,$ff,$ff,$ef,$ff ;.
dc.b $ff,$fb,$f7,$ef,$df,$bf,$ff,$ff ;/
dc.b $c7,$bb,$b3,$ab,$9b,$bb,$c7,$ff ;0
dc.b $ef,$cf,$ef,$ef,$ef,$ef,$c7,$ff ;1
dc.b $c7,$bb,$fb,$e7,$df,$bf,$83,$ff ;2
dc.b $83,$fb,$f7,$e7,$fb,$bb,$c7,$ff ;3
dc.b $f7,$e7,$d7,$b7,$83,$f7,$f7,$ff ;4
dc.b $83,$bf,$87,$fb,$fb,$bb,$c7,$ff ;5
dc.b $e3,$df,$bf,$87,$bb,$bb,$c7,$ff ;6
dc.b $83,$fb,$f7,$ef,$df,$df,$df,$ff ;7
dc.b $c7,$bb,$bb,$c7,$bb,$bb,$c7,$ff ;8
dc.b $c7,$bb,$bb,$c3,$fb,$f7,$cf,$ff ;9
dc.b $ff,$ff,$ef,$ff,$ef,$ff,$ff,$ff ;:
dc.b $ff,$ff,$ef,$ff,$ef,$ef,$df,$ff ;;
dc.b $f7,$ef,$df,$bf,$df,$ef,$f7,$ff ;<
dc.b $ff,$ff,$83,$ff,$83,$ff,$ff,$ff ;=
dc.b $df,$ef,$f7,$fb,$f7,$ef,$df,$ff ;>
dc.b $c7,$bb,$f7,$ef,$ef,$ff,$ef,$ff ;?
dc.b $38,$44,$54,$5c,$58,$40,$3c,$00 ;@ FLASHING!!!
dc.b $10,$28,$44,$44,$7c,$44,$44,$00 ;A
dc.b $78,$44,$44,$78,$44,$44,$78,$00 ;B
dc.b $38,$44,$40,$40,$40,$44,$38,$00 ;C
dc.b $78,$44,$44,$44,$44,$44,$78,$00 ;D
dc.b $7c,$40,$40,$78,$40,$40,$7c,$00 ;E
dc.b $7c,$40,$40,$78,$40,$40,$40,$00 ;F
dc.b $3c,$40,$40,$40,$4c,$44,$3c,$00 ;G
dc.b $44,$44,$44,$7c,$44,$44,$44,$00 ;H
dc.b $38,$10,$10,$10,$10,$10,$38,$00 ;I
dc.b $04,$04,$04,$04,$04,$44,$38,$00 ;J
dc.b $44,$48,$50,$60,$50,$48,$44,$00 ;K
dc.b $40,$40,$40,$40,$40,$40,$7c,$00 ;L
dc.b $44,$6c,$54,$54,$44,$44,$44,$00 ;M
dc.b $44,$44,$64,$54,$4c,$44,$44,$00 ;N
dc.b $38,$44,$44,$44,$44,$44,$38,$00 ;O
dc.b $78,$44,$44,$78,$40,$40,$40,$00 ;P
dc.b $38,$44,$44,$44,$54,$48,$34,$00 ;Q
dc.b $78,$44,$44,$78,$50,$48,$44,$00 ;R
dc.b $38,$44,$40,$38,$04,$44,$38,$00 ;S
dc.b $7c,$10,$10,$10,$10,$10,$10,$00 ;T
dc.b $44,$44,$44,$44,$44,$44,$38,$00 ;U
dc.b $44,$44,$44,$44,$44,$28,$10,$00 ;V
dc.b $44,$44,$44,$54,$54,$6c,$44,$00 ;W
dc.b $44,$44,$28,$10,$28,$44,$44,$00 ;X
dc.b $44,$44,$28,$10,$10,$10,$10,$00 ;Y
dc.b $7c,$04,$08,$10,$20,$40,$7c,$00 ;Z
dc.b $7c,$60,$60,$60,$60,$60,$7c,$00 ;[
dc.b %00,$40,$20,$10,$08,$04,$02,$00 ;\
dc.b $7c,$0c,$0c,$0c,$0c,$0c,$7c,$00 ;]
dc.b $00,$00,$10,$28,$44,$00,$00,$00 ;^
dc.b $00,$00,$00,$00,$00,$00,$00,$fe ;_
dc.b $00,$00,$00,$00,$00,$00,$00,$00 ; (space)
dc.b $10,$10,$10,$10,$10,$00,$10,$00 ;!
dc.b $28,$28,$28,$00,$00,$00,$00,$00 ;"
dc.b $28,$28,$7c,$28,$7c,$28,$28,$00 ;#
dc.b $10,$3c,$50,$38,$14,$78,$10,$00 ;$
dc.b $60,$64,$08,$10,$20,$4c,$0c,$00 ;%
dc.b $20,$50,$50,$20,$54,$48,$34,$00 ;&
dc.b $10,$10,$10,$00,$00,$00,$00,$00 ;'
dc.b $10,$20,$40,$40,$40,$20,$10,$00 ;(
dc.b $10,$08,$04,$04,$04,$08,$10,$00 ;)
dc.b $10,$54,$38,$10,$38,$54,$10,$00 ;*
dc.b $00,$10,$10,$7c,$10,$10,$00,$00 ;+
dc.b $00,$00,$00,$00,$10,$10,$20,$00 ;,
dc.b $00,$00,$00,$7c,$00,$00,$00,$00 ;-
dc.b $00,$00,$00,$00,$00,$00,$10,$00 ;.
dc.b $00,$04,$08,$10,$20,$40,$00,$00 ;/
dc.b $38,$44,$4c,$54,$64,$44,$38,$00 ;0
dc.b $10,$30,$10,$10,$10,$10,$38,$00 ;1
dc.b $38,$44,$04,$18,$20,$40,$7c,$00 ;2
dc.b $7c,$04,$08,$18,$04,$44,$38,$00 ;3
dc.b $08,$18,$28,$48,$7c,$08,$08,$00 ;4
dc.b $7c,$40,$78,$04,$04,$44,$38,$00 ;5
dc.b $1c,$20,$40,$78,$44,$44,$38,$00 ;6
dc.b $7c,$04,$08,$10,$20,$20,$20,$00 ;7
dc.b $38,$44,$44,$38,$44,$44,$38,$00 ;8
dc.b $38,$44,$44,$3c,$04,$08,$30,$00 ;9
dc.b $00,$00,$10,$00,$10,$00,$00,$00 ;:
dc.b $00,$00,$10,$00,$10,$10,$20,$00 ;;
dc.b $08,$10,$20,$40,$20,$10,$08,$00 ;<
dc.b $00,$00,$7c,$00,$7c,$00,$00,$00 ;=
dc.b $20,$10,$08,$04,$08,$10,$20,$00 ;>
dc.b $38,$44,$08,$10,$10,$00,$10,$00 ;?
dc.b $38,$44,$54,$5c,$58,$40,$3c,$00 ;@ NORMAL(lower?)
dc.b $10,$28,$44,$44,$7c,$44,$44,$00 ;A
dc.b $78,$44,$44,$78,$44,$44,$78,$00 ;B
dc.b $38,$44,$40,$40,$40,$44,$38,$00 ;C
dc.b $78,$44,$44,$44,$44,$44,$78,$00 ;D
dc.b $7c,$40,$40,$78,$40,$40,$7c,$00 ;E
dc.b $7c,$40,$40,$78,$40,$40,$40,$00 ;F
dc.b $3c,$40,$40,$40,$4c,$44,$3c,$00 ;G
dc.b $44,$44,$44,$7c,$44,$44,$44,$00 ;H
dc.b $38,$10,$10,$10,$10,$10,$38,$00 ;I
dc.b $04,$04,$04,$04,$04,$44,$38,$00 ;J
dc.b $44,$48,$50,$60,$50,$48,$44,$00 ;K
dc.b $40,$40,$40,$40,$40,$40,$7c,$00 ;L
dc.b $44,$6c,$54,$54,$44,$44,$44,$00 ;M
dc.b $44,$44,$64,$54,$4c,$44,$44,$00 ;N
dc.b $38,$44,$44,$44,$44,$44,$38,$00 ;O
dc.b $78,$44,$44,$78,$40,$40,$40,$00 ;P
dc.b $38,$44,$44,$44,$54,$48,$34,$00 ;Q
dc.b $78,$44,$44,$78,$50,$48,$44,$00 ;R
dc.b $38,$44,$40,$38,$04,$44,$38,$00 ;S
dc.b $7c,$10,$10,$10,$10,$10,$10,$00 ;T
dc.b $44,$44,$44,$44,$44,$44,$38,$00 ;U
dc.b $44,$44,$44,$44,$44,$28,$10,$00 ;V
dc.b $44,$44,$44,$54,$54,$6c,$44,$00 ;W
dc.b $44,$44,$28,$10,$28,$44,$44,$00 ;X
dc.b $44,$44,$28,$10,$10,$10,$10,$00 ;Y
dc.b $7c,$04,$08,$10,$20,$40,$7c,$00 ;Z
dc.b $7c,$60,$60,$60,$60,$60,$7c,$00 ;[
dc.b %00,$40,$20,$10,$08,$04,$02,$00 ;\
dc.b $7c,$0c,$0c,$0c,$0c,$0c,$7c,$00 ;]
dc.b $00,$00,$10,$28,$44,$00,$00,$00 ;^
dc.b $00,$00,$00,$00,$00,$00,$00,$fe ;_
dc.b $00,$00,$00,$00,$00,$00,$00,$00 ; (space)
dc.b $10,$10,$10,$10,$10,$00,$10,$00 ;!
dc.b $28,$28,$28,$00,$00,$00,$00,$00 ;"
dc.b $28,$28,$7c,$28,$7c,$28,$28,$00 ;#
dc.b $10,$3c,$50,$38,$14,$78,$10,$00 ;$
dc.b $60,$64,$08,$10,$20,$4c,$0c,$00 ;%
dc.b $20,$50,$50,$20,$54,$48,$34,$00 ;&
dc.b $10,$10,$10,$00,$00,$00,$00,$00 ;'
dc.b $10,$20,$40,$40,$40,$20,$10,$00 ;(
dc.b $10,$08,$04,$04,$04,$08,$10,$00 ;)
dc.b $10,$54,$38,$10,$38,$54,$10,$00 ;*
dc.b $00,$10,$10,$7c,$10,$10,$00,$00 ;+
dc.b $00,$00,$00,$00,$10,$10,$20,$00 ;,
dc.b $00,$00,$00,$7c,$00,$00,$00,$00 ;-
dc.b $00,$00,$00,$00,$00,$00,$10,$00 ;.
dc.b $00,$04,$08,$10,$20,$40,$00,$00 ;/
dc.b $38,$44,$4c,$54,$64,$44,$38,$00 ;0
dc.b $10,$30,$10,$10,$10,$10,$38,$00 ;1
dc.b $38,$44,$04,$18,$20,$40,$7c,$00 ;2
dc.b $7c,$04,$08,$18,$04,$44,$38,$00 ;3
dc.b $08,$18,$28,$48,$7c,$08,$08,$00 ;4
dc.b $7c,$40,$78,$04,$04,$44,$38,$00 ;5
dc.b $1c,$20,$40,$78,$44,$44,$38,$00 ;6
dc.b $7c,$04,$08,$10,$20,$20,$20,$00 ;7
dc.b $38,$44,$44,$38,$44,$44,$38,$00 ;8
dc.b $38,$44,$44,$3c,$04,$08,$30,$00 ;9
dc.b $00,$00,$10,$00,$10,$00,$00,$00 ;:
dc.b $00,$00,$10,$00,$10,$10,$20,$00 ;;
dc.b $08,$10,$20,$40,$20,$10,$08,$00 ;<
dc.b $00,$00,$7c,$00,$7c,$00,$00,$00 ;=
dc.b $20,$10,$08,$04,$08,$10,$20,$00 ;>
dc.b $38,$44,$08,$10,$10,$00,$10,$00 ;?
dc.b $38,$44,$54,$5c,$58,$40,$3c,$00 ;@ NORMAL
dc.b $10,$28,$44,$44,$7c,$44,$44,$00 ;A
dc.b $78,$44,$44,$78,$44,$44,$78,$00 ;B
dc.b $38,$44,$40,$40,$40,$44,$38,$00 ;C
dc.b $78,$44,$44,$44,$44,$44,$78,$00 ;D
dc.b $7c,$40,$40,$78,$40,$40,$7c,$00 ;E
dc.b $7c,$40,$40,$78,$40,$40,$40,$00 ;F
dc.b $3c,$40,$40,$40,$4c,$44,$3c,$00 ;G
dc.b $44,$44,$44,$7c,$44,$44,$44,$00 ;H
dc.b $38,$10,$10,$10,$10,$10,$38,$00 ;I
dc.b $04,$04,$04,$04,$04,$44,$38,$00 ;J
dc.b $44,$48,$50,$60,$50,$48,$44,$00 ;K
dc.b $40,$40,$40,$40,$40,$40,$7c,$00 ;L
dc.b $44,$6c,$54,$54,$44,$44,$44,$00 ;M
dc.b $44,$44,$64,$54,$4c,$44,$44,$00 ;N
dc.b $38,$44,$44,$44,$44,$44,$38,$00 ;O
dc.b $78,$44,$44,$78,$40,$40,$40,$00 ;P
dc.b $38,$44,$44,$44,$54,$48,$34,$00 ;Q
dc.b $78,$44,$44,$78,$50,$48,$44,$00 ;R
dc.b $38,$44,$40,$38,$04,$44,$38,$00 ;S
dc.b $7c,$10,$10,$10,$10,$10,$10,$00 ;T
dc.b $44,$44,$44,$44,$44,$44,$38,$00 ;U
dc.b $44,$44,$44,$44,$44,$28,$10,$00 ;V
dc.b $44,$44,$44,$54,$54,$6c,$44,$00 ;W
dc.b $44,$44,$28,$10,$28,$44,$44,$00 ;X
dc.b $44,$44,$28,$10,$10,$10,$10,$00 ;Y
dc.b $7c,$04,$08,$10,$20,$40,$7c,$00 ;Z
dc.b $7c,$60,$60,$60,$60,$60,$7c,$00 ;[
dc.b %00,$40,$20,$10,$08,$04,$02,$00 ;\
dc.b $7c,$0c,$0c,$0c,$0c,$0c,$7c,$00 ;]
dc.b $00,$00,$10,$28,$44,$00,$00,$00 ;^
dc.b $00,$00,$00,$00,$00,$00,$00,$fe ;_
dc.b $10,$08,$04,$00,$00,$00,$00,$00 ;` ($e0) //e lowercase charset...
dc.b $00,$00,$38,$04,$3c,$44,$3c,$00 ;a
; dc.b %00000000 ;b
dc.b %01000000
dc.b %01000000
dc.b %01111000
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %01111000
dc.b %00000000
dc.b %00000000 ;c
dc.b %00000000
dc.b %00111100
dc.b %01000000
dc.b %01000000
dc.b %01000000
dc.b %00111100
dc.b %00000000
; dc.b %00000000 ;d
dc.b %00000100
dc.b %00000100
dc.b %00111100
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %00111100
dc.b %00000000
dc.b %00000000 ;e
dc.b %00000000
dc.b %00111000
dc.b %01000100
dc.b %01111100
dc.b %01000000
dc.b %00111100
dc.b %00000000
; dc.b %00000000 ;f
dc.b %00011000
dc.b %00100100
dc.b %00100000
dc.b %01111000
dc.b %00100000
dc.b %00100000
dc.b %00100000
dc.b %00000000
dc.b %00000000 ;g
dc.b %00000000
dc.b %00111000
dc.b %01000100
dc.b %01000100
dc.b %00111100
dc.b %00000100
dc.b %00111000
; dc.b %00000000 ;h
dc.b %01000000
dc.b %01000000
dc.b %01111000
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %00000000
; dc.b %00000000 ;i
dc.b %00010000
dc.b %00000000
dc.b %00110000
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00111000
dc.b %00000000
dc.b %00001000 ;j
dc.b %00000000
dc.b %00011000
dc.b %00001000
dc.b %00001000
dc.b %00001000
dc.b %01001000
dc.b %00110000
; dc.b %00000000 ;k
dc.b %01000000
dc.b %01000000
dc.b %01000100
dc.b %01001000
dc.b %01110000
dc.b %01001000
dc.b %01000100
dc.b %00000000
; dc.b %00000000 ;l
dc.b %00110000
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00111000
dc.b %00000000
dc.b %00000000 ;m
dc.b %00000000
dc.b %01101100
dc.b %01010100
dc.b %01010100
dc.b %01010100
dc.b %01000100
dc.b %00000000
dc.b %00000000 ;n
dc.b %00000000
dc.b %01111000
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %00000000
dc.b %00000000 ;o
dc.b %00000000
dc.b %00111000
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %00111000
dc.b %00000000
dc.b %00000000 ;p
dc.b %00000000
dc.b %01111000
dc.b %01000100
dc.b %01000100
dc.b %01111000
dc.b %01000000
dc.b %01000000
dc.b %00000000 ;q
dc.b %00000000
dc.b %00111100
dc.b %01000100
dc.b %01000100
dc.b %00111100
dc.b %00000100
dc.b %00000100
dc.b %00000000 ;r
dc.b %00000000
dc.b %01011100
dc.b %01100000
dc.b %01000000
dc.b %01000000
dc.b %01000000
dc.b %00000000
dc.b %00000000 ;s
dc.b %00000000
dc.b %00111100
dc.b %01000000
dc.b %00111000
dc.b %00000100
dc.b %01111000
dc.b %00000000
dc.b %00100000 ;t
dc.b %00100000
dc.b %01111000
dc.b %00100000
dc.b %00100000
dc.b %00100100
dc.b %00011000
dc.b %00000000
dc.b %00000000 ;u
dc.b %00000000
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %01001100
dc.b %00110100
dc.b %00000000
dc.b %00000000 ;v
dc.b %00000000
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %00101000
dc.b %00010000
dc.b %00000000
dc.b %00000000 ;w
dc.b %00000000
dc.b %01000100
dc.b %01000100
dc.b %01010100
dc.b %01010100
dc.b %00101000
dc.b %00000000
dc.b %00000000 ;x
dc.b %00000000
dc.b %01000100
dc.b %00101000
dc.b %00010000
dc.b %00101000
dc.b %01000100
dc.b %00000000
dc.b %00000000 ;y
dc.b %00000000
dc.b %01000100
dc.b %01000100
dc.b %01000100
dc.b %00111100
dc.b %00000100
dc.b %00111000
dc.b %00000000 ;z
dc.b %00000000
dc.b %01111100
dc.b %00001000
dc.b %00010000
dc.b %00100000
dc.b %01111100
dc.b %00000000
dc.b %00011100 ;{
dc.b %00110000
dc.b %00110000
dc.b %01100000
dc.b %00110000
dc.b %00110000
dc.b %00011100
dc.b %00000000
dc.b %00010000 ;|
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00010000
dc.b %00000000
dc.b %01110000 ;}
dc.b %00011000
dc.b %00011000
dc.b %00001100
dc.b %00011000
dc.b %00011000
dc.b %01110000
dc.b %00000000
dc.b %00110100 ;~
dc.b %01011000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000
dc.b %00000000 ;block
dc.b %01010100
dc.b %00101000
dc.b %01010100
dc.b %00101000
dc.b %01010100
dc.b %00000000
dc.b %00000000
CNOP 0,4
IIeCharSet2: ;for text BitPlane2. Only flashing has $ff for that char!
dcb.b 64,0
dcb.b 64,$ff
dcb.b 128,0
**************************************************************************
*** The following character set is used for the "Status Bar" at the bottom
*** of the screen.
CNOP 0,4
StatusCharSet8X5:
dc.b ~%00000000 ;space $20 #32
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00001000 ;! $21 #33
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00000000
dc.b ~%00001000
dc.b ~%00010100 ;"
dc.b ~%00010100
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00010100 ;#
dc.b ~%00111110
dc.b ~%00010100
dc.b ~%00111110
dc.b ~%00010100
dc.b ~%00111100 ;$
dc.b ~%01010000
dc.b ~%00111000
dc.b ~%00010100
dc.b ~%01111000
dc.b ~%00100010 ;%
dc.b ~%00000100
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00100010
dc.b ~%00001000 ;&
dc.b ~%00010100
dc.b ~%00001000
dc.b ~%00010100
dc.b ~%00001010
dc.b ~%00001000 ;'
dc.b ~%00001000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00001000 ;(
dc.b ~%00010000
dc.b ~%00010000
dc.b ~%00010000
dc.b ~%00001000
dc.b ~%00010000 ;)
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00101010 ;*
dc.b ~%00011100
dc.b ~%00111110
dc.b ~%00011100
dc.b ~%00101010
dc.b ~%00001000 ;+
dc.b ~%00001000
dc.b ~%00111110
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00000000 ;,
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00000000 ;-
dc.b ~%00000000
dc.b ~%00111100
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000 ;.
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00001000
dc.b ~%00000010 ;/
dc.b ~%00000100
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00100000
dc.b ~%00011000 ;0
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00001000 ;1
dc.b ~%00011000
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00011100
dc.b ~%00011000 ;2
dc.b ~%00000100
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00011100
dc.b ~%00111000 ;3
dc.b ~%00000100
dc.b ~%00011000
dc.b ~%00000100
dc.b ~%00111000
dc.b ~%00100100 ;4
dc.b ~%00100100
dc.b ~%00111100
dc.b ~%00000100
dc.b ~%00000100
dc.b ~%00111100 ;5
dc.b ~%00100000
dc.b ~%00111000
dc.b ~%00000100
dc.b ~%00111000
dc.b ~%00011100 ;6
dc.b ~%00100000
dc.b ~%00111000
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00011100 ;7
dc.b ~%00000100
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00011000 ;8
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00011000 ;9
dc.b ~%00100100
dc.b ~%00011100
dc.b ~%00000100
dc.b ~%00011000
dc.b ~%00000000 ;:
dc.b ~%00001000
dc.b ~%00000000
dc.b ~%00001000
dc.b ~%00000000
dc.b ~%00000000 ;:
dc.b ~%00001000
dc.b ~%00000000
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00000100 ;<
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00001000
dc.b ~%00000100
dc.b ~%00000000 ;=
dc.b ~%00111100
dc.b ~%00000000
dc.b ~%00111100
dc.b ~%00000000
dc.b ~%00010000 ;>
dc.b ~%00001000
dc.b ~%00000100
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00011000 ;?
dc.b ~%00000100
dc.b ~%00001000
dc.b ~%00000000
dc.b ~%00001000
dc.b ~%00001111 ;@ as Rt-Amiga...
dc.b ~%00011011
dc.b ~%00111111
dc.b ~%01100011
dc.b ~%11110111
dc.b ~%00011000 ;A
dc.b ~%00100100
dc.b ~%00111100
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00111000 ;B
dc.b ~%00100100
dc.b ~%00111000
dc.b ~%00100100
dc.b ~%00111000
dc.b ~%00011100
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00011100
dc.b ~%00111000
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00111000
dc.b ~%00111100
dc.b ~%00100000
dc.b ~%00111000
dc.b ~%00100000
dc.b ~%00111100
dc.b ~%00111100
dc.b ~%00100000
dc.b ~%00111000
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00011000
dc.b ~%00100000
dc.b ~%00101100
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00111100
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00111000
dc.b ~%00010000
dc.b ~%00010000
dc.b ~%00010000
dc.b ~%00111000
dc.b ~%00000100
dc.b ~%00000100
dc.b ~%00000100
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00100100
dc.b ~%00101000
dc.b ~%00110000
dc.b ~%00101000
dc.b ~%00100100
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00111100
dc.b ~%00100010
dc.b ~%00110110
dc.b ~%00101010
dc.b ~%00100010
dc.b ~%00100010
dc.b ~%00100010
dc.b ~%00110010
dc.b ~%00101010
dc.b ~%00100110
dc.b ~%00100010
dc.b ~%00011000
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00111000
dc.b ~%00100100
dc.b ~%00111000
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00011000
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00101000
dc.b ~%00010100
dc.b ~%00111000
dc.b ~%00100100
dc.b ~%00111000
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00011100
dc.b ~%00100000
dc.b ~%00011000
dc.b ~%00000100
dc.b ~%00111000
dc.b ~%00111110
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00100100
dc.b ~%00011000
dc.b ~%00100010
dc.b ~%00100010
dc.b ~%00010100
dc.b ~%00010100
dc.b ~%00001000
dc.b ~%00100010
dc.b ~%00100010
dc.b ~%00101010
dc.b ~%00110110
dc.b ~%00100010
dc.b ~%00100010
dc.b ~%00010100
dc.b ~%00001000
dc.b ~%00010100
dc.b ~%00100010
dc.b ~%00100010
dc.b ~%00010100
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00001000
dc.b ~%00111100
dc.b ~%00000100
dc.b ~%00001000
dc.b ~%00010000
dc.b ~%00111100
dc.b ~%00111100 ;[
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00100000
dc.b ~%00111100
dc.b ~%00100000 ;\
dc.b ~%00010000
dc.b ~%00001000
dc.b ~%00000100
dc.b ~%00000010
dc.b ~%00111100 ;]
dc.b ~%00000100
dc.b ~%00000100
dc.b ~%00000100
dc.b ~%00111100
dc.b ~%00001000 ;^
dc.b ~%00010100
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000 ;_
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00111110
dc.b ~%00001000 ;`
dc.b ~%00000100
dc.b ~%00000000
dc.b ~%00000000
dc.b ~%00000000

581
src/Compress.s Normal file
View File

@ -0,0 +1,581 @@
SECTION APPLEII,CODE
EVEN
** NOTE ** Disk image is extraced from "Src_Disk_Buffer" (either buffer1 or buffer2)!!!
**************************************
*
* CompressDisk:
* This function does an entire Decoding & Compression of a disk image,
* using the "Dalton Disk Disintegrator 2.0" algorithm. (see DDD, $1b41-$1b86, $1bc6...)
*
* Inputs: Floppy Image in disk_Buffer memory
* A0 -> Destination Buffer (at least 145,000 bytes to be safe)
*
* Output: Compressed Disk Image (DDD) in Destination Buffer w/ simple ProDos header
* D0 = FileSize; Total length of compressedData (including header) (0 if failed)
*
CompressDisk:
movem.l a2-a6/d2-d5,-(sp)
move.l a0,a5 ;A5-> Base of Dest Buffer!
moveq.l #0,d5 ;D5 = Dest buffer bit offset!
lea ReverseByteTbl,a6 ;a6-> Reverse byte lookup tbl
move.l #$00000000,(a5) ;Make blank 4 byte Dos3.3 header
add.l #32,d5
move.l #0,.TrackNum
.loop move.l .TrackNum,d0 ;trk num <----- main loop
lea .TrackData,a0 ;dest buffer
jsr ReadTrack
tst d0
beq .Error
lea .TrackData,a0 ;track data
lea .FreqTable,a1 ;dest for Frequency Count Tbl
jsr FrequencyCount
tst.l .TrackNum
bne .Not0
.Trk0 moveq.b #0,d0 ;val Encode DDD header (Three 0 bits)
moveq.w #3,d1 ;# of bits
bsr .WriteNBits
moveq.l #0,d0
move.b SecVolumeNumB,d0 ;Encode Volume # of disk
move.b (a6,d0.w),d0 ;ReverseByte & add 8 bits at once...
bfins d0,(a5){d5:8}
addq.l #8,d5
.Not0
lea .FreqTable,a0 ;freq count table
lea .Top20List,a1 ;top 20 values list destination
bsr Top20Search
lea .Top20List,a2
move.w #19,d2 ;Encode the 20 top values...
moveq.l #0,d0
.Encd20 move.b (a2)+,d0
move.b (a6,d0.w),d0 ;ReverseByte & add 8 bits at once...
bfins d0,(a5){d5:8}
addq.l #8,d5
dbf d2,.Encd20
;-------------------
.CompressTrackData ;The real compression algorithm, using top 20 values
lea .TrackData,a2 ;A2 -> TrackData (4096 bytes)
moveq.w #0,d2 ;D2 = main index into track data
.CompLp move.b (a2,d2.w),d0 ;read 1st val
move.w d2,d3 ;d3 = local index. How many times does D0 repeat?
.Count cmp.b (a2,d3.w),d0 ;1st check against self to maintain bounds check & get >=1
bne.b 5$
addq.w #1,d3
cmp.w #4095,d3 ;still in range?
bls.b .Count
5$ sub.w d2,d3 ;d3 = # of times byte D0 is there (at least 1)!
cmp.w #4,d3
blo.b .Single
.Multiple ;------- value D0 repeats D3 times... (D3 >= #4)
cmp.w #$100,d3
bls.b 10$
move.w #$100,d3 ;limit of $100 repeat values (written as #$00)
10$ move.b d0,d1 ;save value temporarily...
move.w #$97,d0 ;Encode code for "Repeat"
move.b (a6,d0.w),d0 ;ReverseByte & add 8 bits at once...
bfins d0,(a5){d5:8}
addq.l #8,d5
move.b d1,d0 ;Encode data value
move.b (a6,d0.w),d0 ;ReverseByte & add 8 bits at once...
bfins d0,(a5){d5:8}
addq.l #8,d5
move.b d3,d0 ;Encode # of times repeats
move.b (a6,d0.w),d0 ;ReverseByte & add 8 bits at once...
bfins d0,(a5){d5:8}
addq.l #8,d5
add.w d3,d2 ;update main index into track data...
bra 100$
.Single ;------- single value D0...
move.w #19,d3 ;d3 = index to search Top20List with (19 -> 0)
lea .Top20List,a0 ;a0 -> Top20List, UBYTES[20]
20$ cmp.b (a0,d3.w),d0
beq.b .SingleTop20 ;is D0 a top 20 value?
dbf d3,20$
;Not top20, so encode this byte by itself...
move.b d0,-(sp)
move.b #0,d0
moveq.b #1,d1 ;Encode "SingleByte" code
bsr .WriteNBits
moveq.l #0,d0
move.b (sp)+,d0
move.b (a6,d0.w),d0 ;ReverseByte & add 8 bits at once...
bfins d0,(a5){d5:8}
addq.l #8,d5
bra 99$
.SingleTop20 ;-- single value is a Top 20 value! UBYTE[d3.w]
lea .Top20Codes,a0
move.b (a0,d3.w),d0
lea .Top20Lengths,a0
move.b (a0,d3.w),d1
bsr .WriteNBits
; bra 99$ (fall through!)
99$ addq.w #1,d2
100$ cmp.w #4095,d2
bls .CompLp ;Do all 4096 bytes of track data...
;---------------------
addq.l #1,.TrackNum
cmp.l #34,.TrackNum ;Do all 35 tracks!
bls .loop
;Disk image compressed, now report len in bytes
;D5 = Length in bits...
addq.l #7,d5 ;we want any partial bytes...
divu.l #8,d5 ;d5 = Length in bytes!
move.l d5,d0 ;lenth of compression!
movem.l (sp)+,a2-a6/d2-d5
rts
.Error movem.l (sp)+,a2-a6/d2-d5
moveq.l #0,d0
rts
.WriteNBits: ;Enter: d0 = Data to write (low order bits), d1 = # of bits to write
; a5 -> Base of destination memory, d5 = Offset in BITS...
;Output: Memory written, updated Offset (d5)
; (see DDD $1d28 - $1d54)
subq.b #1,d1
and.w #$000f,d1
.lp bfins d0,(a5){d5:1} ;place low order bit in memory
lsr.l d0
addq.l #1,d5 ;1 at a time until done...
dbf d1,.lp
rts
CNOP 0,4
.Top20Codes dc.b $03,$09,$1f,$0f,$07,$1b,$0b,$0d,$15,$37 ;(see DDD $1d55-$1d7c)
dc.b $3d,$25,$05,$b1,$11,$21,$01,$57,$5d,$1d
.Top20Lengths dc.b $04,$04,$05,$05,$05,$05,$05,$05,$05,$06
dc.b $06,$06,$06,$06,$06,$06,$06,$07,$07,$07
.TrackNum ds.l 1
.TrackData ds.b 4096
.FreqTable ds.w 256
.Top20List ds.b 20
even
**************************************
*
* PlainDiskImage_Save:
* This function takes a disk image in ram, and saved it to disk in the "plain image"
* format, which is the normalilzed track/sector data (143,360 bytes) in order.
*
* Inputs: Floppy Image in disk_Buffer memory
* A0 -> Destination Buffer (at least 143,360 bytes to be safe)
*
* Output: Plain Image Data in Destination Buffer w/ no headers/trailor/checksums
* D0 = FileSize; Total length of data (should be 143,360) (0 if failed)
*
PlainDiskImage_Save:
movem.l a2-a5/d2-d5,-(sp)
move.l a0,a5 ;A5-> Base of Dest Buffer!
moveq.l #0,d5 ;D5 = Dest buffer bit offset!
move.l #0,.TrackNum
.loop move.l .TrackNum,d0 ;trk num <----- main loop
move.l d0,d1
mulu.w #4096,d1
lea (a5,d1.l),a0 ;A0 = dest buffer...
jsr ReadTrack ;fix dest buffer
tst d0
beq .Error
addq.l #1,.TrackNum
cmp.l #34,.TrackNum ;Do all 35 tracks!
bls .loop
;Disk image compressed, now report len in bytes
move.l #143360,d0 ;d0 = lenth of disk data
movem.l (sp)+,a2-a5/d2-d5
rts
.Error movem.l (sp)+,a2-a5/d2-d5
moveq.l #0,d0
rts
CNOP 0,4
.TrackNum ds.l 1
.TrackData ds.b 4096
.FreqTable ds.w 256
.Top20List ds.b 20
EVEN
*****************************************
*
* ReadTrack:
* This function will extract 1 track of normalized data from a disk image,
* using Apple Dos's normal decoding algorithms. (uses ReadSector)
*
* Inputs: Floppy Image in disk_Buffer memory (normal)
* D0 = Track number to extract from
* A0 -> Destination for data (4096 bytes!)
*
* Output: 4096 bytes of sector data in dest. buffer
* D0 = True (1) for Successful extraction
* False (0) for ERROR
*
ReadTrack:
movem.l a2/d2-d3,-(sp)
cmp.w #34,d0
bhi.b .Error ;track out of range...
move.l d0,d2 ;d2 = Track #
moveq.l #0,d3 ;d3 = Sector #
move.l a0,a2 ;a2 -> Ptr to destination buffer
.loop move.l d2,d0 ;track num
move.l d3,d1 ;sector num
move.l a2,a0 ;dest buffer
jsr ReadSector
tst d0 ;did it work?
beq.b .Error
add.l #$100,a2 ;set dest to next page of mem
addq.l #1,d3 ;inc sector
cmp.b #15,d3
bls.b .loop ;read all 16 sectors!
moveq.l #1,d0
movem.l (sp)+,a2/d2-d3
rts
.Error moveq.l #0,d0
movem.l (sp)+,a2/d2-d3
rts
;----------------------------------------------------------------------------------------
*****************************************
*
* ReadSector:
* This function will extract 1 sector of normalized data from a disk image,
* using Apple Dos's normal decoding algorithms.
*
* Inputs: Floppy Image in disk_Buffer memory (normal)
* D0 = Track number (0 - 34)
* D1 = Sector number (0 - 15)
* A0 -> Destination for data (256 bytes)
*
* Output: 256 bytes of sector data in dest. buffer
* D0 = True (1) for Successful extraction
* False (0) for ERROR
*
ReadSector:
movem.l a2-a5/d2-d4,-(sp)
mulu.w #disk_TrackLen,d0
add.l Src_Disk_Buffer,d0
move.l d0,a2 ;a2 -> Start of raw track data
move.l a2,a3 ;a3 -> CURRENT ptr to raw track data (a2 <= a3 <= a4)
lea disk_TrackLen-1(a2),a4 ;a4 -> Last byte of raw track data
move.l d1,d4 ;d4 = Sector # we want...
move.l #disk_TrackLen+500,d3 ;d3 = Max "GetNext" searches allowed!
bra.b .addr
.NxtSec
lea 345(a3),a3
cmp.l a4,a3 ;make sure addr still in range
bls.b .addr
sub.l #disk_TrackLen,a3 ;if not, reset it
.addr jsr .GetNext
cmp.b #$D5,d0 ;Search for D5 AA 96 address header
bne .addr
jsr .GetNext
cmp.b #$AA,d0
bne .addr
jsr .GetNext
cmp.b #$96,d0
bne .addr
;***** Extract 4X4 address data *****
jsr .Get4X4 ;Volume Number
move.b d0,SecVolumeNumB
jsr .Get4X4 ;Track Number
jsr .Get4X4 ;HARD sector num...
cmp.b #$0f,d0
bhi.b .addr ;outside legal range? Keep searching...
move.b (.HardToSoft.l,d0.w),d0 ;d0 = SOFT sector num...
cmp.b d0,d4
bne .NxtSec ;doh! Not the right sector!
jsr .Get4X4 ;Checksum (ignore for now)
jsr .GetNext ;better get DE AA address epilog
cmp.b #$DE,d0
bne .addr
jsr .GetNext
cmp.b #$AA,d0
bne .addr
.data jsr .GetNext
cmp.b #$D5,d0 ;Wait for D5 AA AD data header
bne .data
jsr .GetNext
cmp.b #$AA,d0
bne .data
jsr .GetNext
cmp.b #$AD,d0
bne .data
moveq.w #$55,d1 ;d1 = cntr...
lea .NibbleHunk56+$56,a1 ;a1 -> destination
moveq.l #0,d4 ;d4 == ACC == running EOR checksum
lea .DecodeTable-$96,a5 ;a5 -> DecodeTable (-$96)
moveq.l #0,d0 ;See $b8ff -> $b911 in DOS 3.3
.loop jsr .GetNext ;LDY $c0ec
move.b (a5,d0.w),d0 ;eor $ba00,y
eor.b d0,d4 ; ...
move.b d4,-(a1) ;sta $bc00,y (y decrements)
dbf d1,.loop
move.w #$ff,d1 ;d1 = cntr
lea .NibbleHunk100,a1 ;a1 -> dest
.loop2 jsr .GetNext ;See $b915 -> $b923
move.b (a5,d0.w),d0 ;eor $ba00,y
eor.b d0,d4 ;
move.b d4,(a1)+ ;sta $bb00,y (y inc's)
dbf d1,.loop2
.cksum jsr .GetNext ;See $b925 (checksum)
cmp.b (a5,d0.w),d4 ;cmp $ba00,y
bne .Error
jsr .GetNext ;better get DE AA data epilog
cmp.b #$DE,d0
bne .Error
jsr .GetNext
cmp.b #$AA,d0
bne .Error
* DeNibble-ize: (see dos 3.3 code at $b800)
* Takes 342 bytes of "6 & 2" disk encoded crap as returns 256 bytes of normal data.
*
* Nib1: Nib2: Dest:
* $ff-+- o $ff-+- o
* | ^ $55-+- vvo | ^
* | ^ | vvv | ^
* | ^ | vvv | ^
* $00-+- o $00-+- ovv $00-+- o
*
* Inputs: a0 = destination for 256 bytes of data
* NibbleHunk100 & 56 = Contain nibble data
;at this point, all nibble data is read...!
;Now, DE-NIBBLIZE !!! (dos 3.3 $b8c2 - $b8db)
; d1 = YReg, d2 = XReg, d3 = ACC
lea .NibbleHunk100,a2 ;a2-> NibbleHunk1[$00] ($100)
lea .NibbleHunk56,a3 ;a3-> NibbleHunk2[$00] ($56)
move.l a0,a4 ;a4-> Dest buffer (256 bytes)
move.w #$00ff,d1 ;d1 = Byte Countdown
.DeNibl
.b8c4 move.w #$56,d2 ;LDX #$56
.b8c6 subq.b #1,d2 ;DEX
bmi.b .b8c4 ;BMI $b8c4
move.b (a2)+,d3 ;LDA $bb00,Y
move.b (a3,d2.w),d0
lsr.b d0 ;LSR $bc00,X
roxl.b d3 ;ROL
lsr.b d0 ;LSR $bc00,X
roxl.b d3 ;ROL
move.b d0,(a3,d2.w)
move.b d3,(a4)+ ;store another byte of normal data!
dbf d1,.b8c6
movem.l (sp)+,a2-a5/d2-d4
move.l #1,d0 ;success...
rts
.GetNext: ;a2 -> Start track data, a3 -> Current track data
;a4 -> Max track data ptr, d3=remaining tries
; Return: d0 = byte
move.b (a3)+,d0
cmp.l a4,a3 ;make sure addr still in range
bls.b .ok
move.l a2,a3 ;if not, reset it
.ok subq.l #1,d3
bmi .GNErr
rts
.GNErr move.l (sp)+,d0 ;Exceeded # of tries, POP STACK, and fall to error...
.Error moveq.l #0,d0 ;Failed (d0 = False)....
movem.l (sp)+,a2-a5/d2-d4
rts
.Get4X4
;a2 -> Start track data, a3 -> Current track data
;a4 -> Max track data ptr
;Return: d0 = byte
moveq.l #0,d0
move.b (a3)+,d0
cmp.l a4,a3 ;make sure addr still in range
bls.b .ok3
move.l a2,a3 ;if not, reset it
.ok3 lsl.b d0
or.b #$01,d0
and.b (a3)+,d0
cmp.l a4,a3 ;make sure addr still in range
bls.b .ok4
move.l a2,a3 ;if not, reset it
.ok4 rts
.HardToSoft dc.b $0,$7,$e,$6,$d,$5,$c,$4,$b,$3,$a,$2,$9,$1,$8,$f
;The lookup table used as $ba00,y ALWAYS had Y >= $96,
;so here is the pertinant portion of the table ($ba96-$baff)
;Make sure to subtract $96 when getting the address of it.
.DecodeTable:
dc.b $00,$01,$98,$99,$02,$03,$9C,$04,$05,$06,$A0,$A1,$A2,$A3,$A4
dc.b $A5,$07,$08,$A8,$A9,$AA,$09,$0A,$0B,$0C,$0D,$B0,$B1,$0E,$0F
dc.b $10,$11,$12,$13,$B8,$14,$15,$16,$17,$18,$19,$1A,$C0,$C1,$C2
dc.b $C3,$C4,$C5,$C6,$C7,$C8,$C9,$CA,$1B,$CC,$1C,$1D,$1E,$D0,$D1
dc.b $D2,$1F,$D4,$D5,$20,$21,$D8,$22,$23,$24,$25,$26,$27,$28,$E0
dc.b $E1,$E2,$E3,$E4,$29,$2A,$2B,$E8,$2C,$2D,$2E,$2F,$30,$31,$32
dc.b $F0,$F1,$33,$34,$35,$36,$37,$38,$F8,$39,$3A,$3B,$3C,$3D,$3E,$3F
.NibbleHunk100 ds.b $100 ;342 bytes of storage space...
.NibbleHunk56 ds.b $56
.NibblePad dc.b $ff,$ff,$ff,$ff
SecVolumeNumB ds.b 1
;---------------------------------------------------------------------------------------
EVEN
*****************************************
*
* FrequencyCount: (see DDD $1bc6 - $1c2b)
* This function will scan through 4096 bytes of data, counting occurances
* of each byte value and will create a list of UWORDS[256].
* As in DDD, any Repeating value of 4 or more will be skipped.
*
* Inputs: A0 -> 4096 bytes of data to analyze
* A1 -> Destination for UWORDS[256] result (512 bytes!)
*
* Output: list of UWORDS[256] frequency count in dest. buffer
*
FrequencyCount: ;---- Produce list of most popular bytes...
movem.l a2-a5/d2-d5,-(sp)
move.l a0,a2 ;a2 -> 4096 bytes of data
move.l a1,a3 ;a3 -> Destination table of UWORDS[256]
move.w #255,d0
.ClrLp move.w #0,(a1,d0.w*2) ;clear dest table
dbf d0,.ClrLp
move.w #0,d2 ;d2 = main index
moveq.l #0,d0
.MnLoop move.b (a2,d2.w),d0 ;read 1st val
move.w d2,d3 ;d3 = local index. How many times does D0 repeat?
.repeat cmp.b (a2,d3.w),d0
bne.b 5$
addq.w #1,d3
cmp.w #4095,d3
bls.b .repeat
5$ sub.w d2,d3 ;d3 = # of times byte D0 is there (at least 1)!
cmp.w #4,d3
bhs.b .NoCnt
.Cnt addq.w #1,(a3,d0.w*2)
move.w #1,d3 ;only inc 1 byte
.NoCnt add.w d3,d2
cmp.w #4095,d2
bls.b .MnLoop
movem.l (sp)+,a2-a5/d2-d5
rts
*****************************************
*
* Top20Search: (see DDD $1c2c - $1c75)
* This function will scan through the frequency list UWORDS[256], create a list
* of the top 20 values in UBYTE[20]. During each search, this function will examine
* each entry, and if >= current high number, replace the current high number with it.
*
* Inputs: A0 -> Source of frequency count UWORDS[256]
* A1 -> Destination for top 20 values UBYTES[20] (20 bytes!)
* Output: list of most popular values UBYTES[20] in dest. buffer
*
Top20Search: ;---- Produce list of most popular bytes...
movem.l a2-a5/d2-d5,-(sp)
move.w #0,d1 ;D1 = value index # (0 -> 19) we are looking for
.loop20 moveq.l #0,d0 ;D0 = max frequency number found so far...
move.w #0,d2 ;D2 = search index (0 - 255)
.search cmp.w (a0,d2.w*2),d0
bhi.b .nope
move.w (a0,d2.w*2),d0 ;new max frequency number
move.b d2,(a1,d1.w) ;temporarily (?) keep the number in the table...
.nope addq.b #1,d2 ;search/compare all 256 values...
bne.b .search
move.b (a1,d1.w),d2 ;get that popular value...
move.w #0,(a0,d2.w*2) ;and blank its entry out in the freq table...
addq.b #1,d1 ;get 20 values total...
cmp.b #19,d1
bls.b .loop20
movem.l (sp)+,a2-a5/d2-d5
rts

78
src/Debug.s Normal file
View File

@ -0,0 +1,78 @@
** DEBUGGING Routines... Print Strings, hex numbers, dec numbers, etc...
** to MYCHANNEL... (opened prior)
SECTION APPLEII,CODE
EVEN
rts
DB_String: ** A0 -> Null Terminated String to Print
movem.l a1-a6/d0-d4,-(sp)
move.l a0,.ds ;move str ptr into data stream...
lea .fs,a0 ;format string ptr
lea .ds,a1 ;data stream ptr
lea DB_PutChProc,a2
move.l #0,a3 ;indx to buffer
lea DB_Buffer,a4
CALLEXEC RawDoFmt
movem.l (sp)+,a1-a6/d0-d4
rts
.ds ds.l 1
.fs dc.b '%s',0
even
DB_HexB movem.l a0-a6/d0-d4,-(sp) ** D0 = a word value to print
move.w d0,.ds ;move # into data stream
lea .fs,a0 ;format string ptr
lea .ds,a1 ;data stream ptr
lea DB_PutChProc,a2
move.l #0,a3
lea DB_Buffer,a4
CALLEXEC RawDoFmt
movem.l (sp)+,a0-a6/d0-d4
rts
.ds ds.w 1
.fs dc.b '$%02x ',0
even
DB_HexW movem.l a0-a6/d0-d4,-(sp) ** D0 = a word value to print
move.w d0,.ds ;move # into data stream
lea .fs,a0 ;format string ptr
lea .ds,a1 ;data stream ptr
lea DB_PutChProc,a2
move.l #0,a3
lea DB_Buffer,a4
CALLEXEC RawDoFmt
movem.l (sp)+,a0-a6/d0-d4
rts
.ds ds.w 1
.fs dc.b '$%04x',0
even
DB_HexL movem.l a0-a6/d0-d4,-(sp) ** D0 = A LONG value to print
move.l d0,.ds ;move # into data stream
lea .fs,a0 ;format string ptr
lea .ds,a1 ;data stream ptr
lea DB_PutChProc,a2
move.l #0,a3
lea DB_Buffer,a4
CALLEXEC RawDoFmt
movem.l (sp)+,a0-a6/d0-d4
rts
.ds ds.l 1
.fs dc.b '$%08lx',0
EVEN
DB_PutChProc:
move.b d0,(a4,a3.w) ;buffer + indx
beq DB_PrintBuffer
addq.w #1,a3
rts
even
DB_PrintBuffer: ** Called with a3= Length of Buffer (excludes NULL)
move.l MyChannel,d1
move.l #DB_Buffer,d2
move.l a3,d3 ;length
CALLDOS Write
rts
DataStream dc.w 9,8,7,6,5
DB_Buffer ds.b 85

531
src/Decompress.s Normal file
View File

@ -0,0 +1,531 @@
SECTION APPLEII,CODE
*** NOTE ***
* The Destination drive is chosen by putting the disk buffer address in the
* the global var Dest_Disk_Buffer !!!!!
**************************************
*
* DecompressDisk:
* This function does an entire decompression & encoding of a disk file
* compressed with "Dalton Disk Disintegrator 2.0" to the emulated 5 1/4" floppy.
*
* Inputs: D_FileSize = total length of compressedData (including header)
* CompressedData (with prodos header) at mem ptd by InstTbl_Var
*
* Output: Floppy Image in disk_Buffer memory...
*
even
DecompressDisk:
movem.l d2-d4/a2-a5,-(sp)
jsr Decomp_Init
move.l #3,d0 ;should be a 0...
bsr ReadNBitsOld
move.l #8,d0
bsr ReadNBitsOld
lea ReverseByteTbl,a0
and.l #$00ff,d0
move.b (a0,d0.w),d0 ;ReverseByte
move.l d0,D_VolumeNum
******************
move.l #0,d3 ;D3 = Track #
.lp35tk
lea .TrackBuffer,a0
bsr DecompressTrackData ;decompress track data...
move.l #15,d2 ;D2 = Sector #
.lp16 lea .TrackBuffer,a0
move.l d2,d0
mulu.w #$100,d0
lea (a0,d0.w),a0 ;get offset into track data...
bsr Nibbleize ;take page at A0 & prepare it for encoding (rtns A0)
move.l d3,d0
move.l d2,d1
bsr EncodeSector ;Encode Nibble Data into disk image...
dbf d2,.lp16 ;do all sectors on this track...
addq.b #1,d3 ;do all 35 tracks...
cmp.b #34,d3
bls.b .lp35tk
movem.l (sp)+,d2-d4/a2-a5
rts
.TrackBuffer ds.b $3000
EVEN
**************************************
* PlainDiskImage_Load:
* This function takes an plain disk image (standard Unix/PC disk file format)
* and builds a perfectly encoded 16 sector disk image in memory...
*
* Note: A "plain disk image" is exactly 143,360 bytes long, and consists of
* the normal data bytes in sequential order (tracks 0 - 34, sectors 0 - 15)
* with NO header/trailer/checksums.
*
* Inputs: Plain image in buffer pointed to by InstTbl_Var
*
* Output: Floppy Image in disk_Buffer memory...
*
EVEN
PlainDiskImage_Load:
movem.l d2-d4/a2-a5,-(sp)
jsr Decomp_Init
move.l InstTbl_Var,D_Source ;shouldn't be any headers in this file...
move.l #254,D_VolumeNum
******************
move.l #0,d3 ;d3 = Track #
.lp35tk
move.l #15,d2 ;d2 = Sector #
.lp16 move.l InstTbl_Var,a0
move.l d3,d0
mulu.w #$1000,d0 ;trk offset
lea (a0,d0.l),a0
move.l d2,d0 ;sect offset
mulu.w #$100,d0
lea (a0,d0.w),a0 ;get offset into track data...
bsr Nibbleize ;take page at A0 at prepare it for encoding
move.l d3,d0 ;trk
move.l d2,d1 ;sec
bsr EncodeSector ;Auto-Inc'ing write to floppy area...
dbf d2,.lp16 ;do all 16 sectors in each track....
addq.b #1,d3 ;do all 35 tracks...
cmp.b #34,d3
bls.b .lp35tk
movem.l (sp)+,d2-d4/a2-a5
rts
even
even
****************************************
* EncodeSector: (see dos 3.3 code at $b82a)
* Takes 342 bytes of "Nibble-ized" data and encodes data to
* disk drive. (+ sector header/trailers, etc).
*
* WARNING! This function writes sector data into a specific offset in a track,
* NOT 1st searching for an area to replace! Only use to write ALL 16 sectors of a track.
*
* Inputs: Floppy Image in disk_Buffer memory (normal)
* D_VolumeNum = disk Volume #
* A0 -> 342 bytes of Nibbilized data
* D0 = Track number (0 - 34)
* D1 = Sector number (0 - 15)
*
* Output: One sector of disk data encoded to "Dest_Buffer" !!! (either buffer 1 or 2)
* Note: Rewrite these damn routines to handle simple source/dest ptrs later!!!!!
EncodeSector:
;do any track/sector error checking here...!
movem.l d2-d4/a2-a5,-(sp)
move.l a0,a5 ;a5-> NibbleHunk Source
move.l d0,d3 ;d3 = track #
move.l d1,d4 ;d4 = sector #
move.l Dest_Disk_Buffer,a4 ;Compute Track offset
mulu.w #disk_TrackLen,d0
lea (a4,d0.l),a4
move.w (SectorReMapTbl.l,d4.w*2),d1 ;and sector offset
mulu.w #$18a,d1
lea (a4,d1.l),a4 ;a4 -> Hard sector offset in disk memory
move.w #22/2-1,d0 ;write 22 FF's (sync field) (MUST BE < 26!!)
.sync1 move.w #$ffff,(a4)+
dbf d0,.sync1
.head1 move.l #$ffd5aa96,(a4)+ ;FF + addr field header D5 AA 96 [26]
;*** 4X4 encode the following: ***
.Vol move.l D_VolumeNum,d0 ;Volume #
move.l d0,d2 ;chksum
bsr .Do4x4
.Trk move.l d3,d0 ;Track #
eor.l d0,d2
bsr.b .Do4x4
.Sec move.l d4,d0 ;Soft Sector num...
lea SectorReMapTbl,a0 ;remap soft to hard sector #
move.w (a0,d0.w*2),d0
eor.l d0,d2
bsr.b .Do4x4
.ChkSum move.l d2,d0
bsr.b .Do4x4 ;EOR'd checksum [34 bytes]
.trail1 move.l #$deaaebff,(a4)+ ;addr field trailer DE AA EB...
.sync2 move.l #$ffffffff,(a4)+ ;5 FF's (sync field, exactly 5!)
.head2 move.w #$d5aa,(a4)+ ;Data header D5 AA AD [45 bytes]
move.b #$ad,(a4)+
lea $100(a5),a2 ;a2 -> NibbleHunk2
lea EncodeLkUpTbl,a3 ;a3 -> LookUpTable (apple $ba29) (6 bit val -> disk num)
moveq.l #0,d2 ;d2 = Accumulator
moveq.l #$56,d3 ;d3 = YReg
bra.b .first ;Now go do 343 bytes of Data!!!
.lp1 move.b (a2,d3),d2 ;lda $bc00,y
.first move.b -1(a2,d3),d4 ;eor $bbff,y
eor.b d4,d2
move.b (a3,d2),(a4)+ ;tax, lda $ba29,x, write it
subq.b #1,d3 ;dey
bne.b .lp1
move.b (a2),d2 ;lda $bc00
move.l a5,a2 ;a2 -> NibbleHunk
.lp2 move.b (a2,d3),d4 ;eor $bb00,y
eor.b d4,d2
move.b (a3,d2),(a4)+ ;tax, lda $ba29,x, write it
move.b (a2,d3),d2 ;lda $bb00,y
addq.b #1,d3 ;iny
bne.b .lp2
move.b (a3,d2),(a4)+ ;tax, lda $ba29,x, write it (jsr $b8bb) last byte
.trail2 move.w #$deaa,(a4)+ ;data field trailer DE AA EB... [391 bytes]
move.b #$eb,(a4)+
move.w #$ffff,(a4)+ ;fill in the rest like dos 3.3 does... [394 bytes]
move.b #$eb,(a4)+
movem.l (sp)+,d2-d4/a2-a5
rts
.Do4x4 move.b d0,d1 ;do 4X4 encoding of byte in D0!!!
lsl.w #7,d0
move.b d1,d0
or.w #$aaaa,d0
move.w d0,(a4)+
rts
;.Do4x4 move.b d0,d1 ;OLD 4X4 encoding of byte in D0!!!
lsr.b #1,d0
or.b #$aa,d0
move.b d0,(a4)+
or.b #$aa,d1
move.b d1,(a4)+
rts
EncodeLkUpTbl: ;($ba29 - $ba68 in Dos 3.3)
dc.b $96,$97,$9A,$9B,$9D,$9E,$9F,$A6,$A7,$AB,$AC,$AD,$AE,$AF
dc.b $B2,$B3,$B4,$B5,$B6,$B7,$B9,$BA,$BB,$BC,$BD,$BE,$BF,$CB
dc.b $CD,$CE,$CF,$D3,$D6,$D7,$D9,$DA,$DB,$DC,$DD,$DE,$DF,$E5
dc.b $E6,$E7,$E9,$EA,$EB,$EC,$ED,$EE,$EF,$F2,$F3,$F4,$F5,$F6
dc.b $F7,$F9,$FA,$FB,$FC,$FD,$FE,$FF
SectorReMapTbl: ;(soft to hard remap, $bfb8-$bfc7 in Dos 3.3)
dc.w $00,$0d,$0b,$09,$07,$05,$03,$01,$0e,$0c,$0a,$08,$06,$04,$02,$0f
dc.w $00,$0d,$0b,$09,$07,$05,$03,$01,$0e,$0c,$0a,$08,$06,$04,$02,$0f
even
*****************************************
* Nibble-ize: (see dos 3.3 code at $b800)
* Takes a page (256 bytes) of memory & translates it into 342 bytes of "6 & 2" disk
* encoded crap as done by Apple 5 1/4" dos routines.
*
* SrcData: Nib1: Nib2: (note wrap around of sourcedata & redundant bits
* $ff-+- v (same) for first 2 entries into Nib2)
* | v
* | v $55-+- ^^o
* | ov | ^^^
* $00-+- vo $00-+- o^^
*
* Inputs: a0 = addr of page of memory
* Return: a0 = addr of 342 'nibble-ized' bytes (note: this is an internal static buffer)
Nibbleize:
movem.l d2-d4/a2-a4,-(sp)
lea .NibbleHunk,a1 ;a1-> NibbleHunk1[$00] ($100)
lea .NibbleHunk2,a2 ;a2-> NibbleHunk2[$00] ($56)
* ;*** Do 1st wrap-around case ***
moveq.l #0,d1 ;d1- shifted 2 bits from each of 3 #'s
move.b 1(a0),d0 ;First of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1 ;IGNORE these remaining 6 bits...
move.b $ab(a0),d0 ;2 of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1
move.b d0,$ab(a1) ;and keep remaining 6 bits...
move.b $55(a0),d0 ;3 of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1
move.b d0,$55(a1) ;and keep remaining 6 bits...
move.b d1,(a2)+ ;and keep those 6 packed bits...
* ;*** Do 2nd wrap-around case ***
moveq.l #0,d1 ;d1- shifted 2 bits from each of 3 #'s
move.b (a0),d0 ;First of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1 ;IGNORE remaining 6 bits...
move.b $aa(a0),d0 ;2 of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1
move.b d0,$aa(a1) ;and keep remaining 6 bits...
move.b $54(a0),d0 ;3 of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1
move.b d0,$54(a1) ;and keep remaining 6 bits...
move.b d1,(a2)+ ;and keep those 6 packed bits...
;*** And do rest of them! ***
lea .NibbleHunk+$100,a1 ;a1-> NibbleHunk1[$100]
;a2-> NibbleHunk2[$02] ($56)
lea $100(a0),a0 ;a0-> SourceByte[$100]
move.w #$54-1,d3 ;d3= countdown
.lp moveq.l #0,d1 ;d1- shifted 2 bits from each of 3 #'s
move.b -(a0),d0 ;First of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1
move.b d0,-(a1) ;and keep remaining 6 bits...
move.b -$56(a0),d0 ;2 of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1
move.b d0,-$56(a1) ;and keep remaining 6 bits...
move.b -$56*2(a0),d0 ;3 of 3
lsr.b #1,d0
roxl.b #1,d1
lsr.b #1,d0
roxl.b #1,d1
move.b d0,-$56*2(a1) ;and keep remaining 6 bits...
move.b d1,(a2)+ ;and keep those 6 packed bits...
dbf d3,.lp
lea .NibbleHunk,a0
movem.l (sp)+,d2-d4/a2-a4
rts
even
.NibbleHunk ds.b 256 ;342 bytes of storage space...
.NibbleHunk2 ds.b 86
.NibblePadding ds.b 8
even
******************************************
*
*read into D_TrackMem
*
* Inputs: A0 -> Track Data dest buffer... (AT LEAST large enough to hold track data!)
DecompressTrackData:
movem.l d2-d4/d6/a2-a6,-(sp)
;********** Function constants ***********
move.l a0,a5 ;A5-> Track Dest ptr (for entire function)
lea ReverseByteTbl,a4 ;A4-> Reverse Byte Lookup table... (bytes[])
lea .Top_Values,a2 ;A2-> Values[] (for entire function)
move.l #16*256-1,d3 ;d4 = Num of bytes to read (incld. 0)
move.l D_Source,a6 ;A6-> DataSource (entire function)
move.l D_SourceBit,d6 ;D6 = Bit offset (entire function)
move.l #19,d2 ;*** Read 20 most frequent bytes for track ***
.vals bfextu (a6){d6:8},d0 ;Read 8 Bits from stream...
addq.l #8,d6
move.b (a4,d0.w),(a2,d2.w) ;ReverseByte & add to list...
dbf d2,.vals
.StartNextDecode
bfextu (a6){d6:1},d0 ;read first bit from stream...
addq.l #1,d6
tst.l d0
bne.b .ReadCode ;if bit=0 then read unique byte, else code...
.ReadUniqueByte
bfextu (a6){d6:8},d0 ;*** bit=0; read 8 bits as a unique byte ***
addq.l #8,d6
move.b (a4,d0.w),(a5)+ ;ReverseByte & AddByte
subq.l #1,d3 ;More to read?
bpl.b .StartNextDecode
bra.b .done
.ReadCode:
lea .CmpList,a3 ;a3 = addr of CmpList (rdCode section only)
move.l #19,d4 ;d4 = Index (of Values[]) (rdCode section only)
moveq.l #0,d0
.CodeLp move.b (a3)+,d1 ;cmpList
bpl.b .CdVal
.Cd1Bit lsl.b #1,d0 ;cmpTbl=-1 *** Read another bit into code ***
move.b d0,-(sp)
bfextu (a6){d6:1},d0 ;Read 1 Bit from stream...
addq.l #1,d6
or.b (sp)+,d0
bra.b .CodeLp ;and repeat
.CdVal cmp.b d1,d0 ;it the code so far = the val in table?
beq.b .match
subq.l #1,d4
bpl.b .CodeLp ;go again if still possible table match...
bfextu (a6){d6:1},d0 ;else read 1 last bit from stream (discarded)
addq.l #1,d6
.repeat ;*** REPEATing byte case ***
bfextu (a6){d6:8},d0 ;Read 8 Bits from stream...
addq.l #8,d6
move.b (a4,d0.w),d2 ;ReverseByte, d2 = RepeatValue
bfextu (a6){d6:8},d4 ;Read 8 Bits from stream... (into d4)
addq.l #8,d6
move.b (a4,d4.w),d4 ;ReverseByte, d4 = Count (0=255)
subq.b #1,d4 ;Prepare it for DBF countdown (to -1)
.rptLp move.b d2,(a5)+ ;AddByte
subq.l #1,d3
dbmi d4,.rptLp ;Do 'x' times or until max bytes read!
tst.l d3 ;More to read?
bpl.b .StartNextDecode
bra.b .done
.match move.b (a2,d4),(a5)+ ;else cmpList[]==code; use Values[d4] & AddByte
subq.l #1,d3 ;More to read?
bpl.b .StartNextDecode
; bra.b .done
.done
move.l d6,D_SourceBit ;D6 = Bit offset (entire function)
movem.l (sp)+,d2-d4/d6/a2-a6
rts
.Top_Values ds.b 20
.CmpList dc.b -1,-1,-1,4,1,-1,15,14,12,11,10,6,5,-1
dc.b 27,15,9,8,3,2,1,0,-1,53,29,28,-1,-2 ;-1 & -2 no longer needed...
CNOP 0,4
************************************
* Inputs: d0 = # of bits to read (normally 8, 3, 2, or 1)
* Return: d0 = bits read (low order)
ReadNBitsOld:
move.l D_Source,a0
move.l D_SourceBit,d1
add.l d0,D_SourceBit ;inc bit cntr by bits read...
bfextu (a0){d1:d0},d0
rts
ReverseByteTbl: *** This is a lookup table of bytes with bit order reversed ***
dc.b $00,$80,$40,$c0,$20,$a0,$60,$e0,$10,$90,$50,$d0,$30,$b0,$70,$f0
dc.b $08,$88,$48,$c8,$28,$a8,$68,$e8,$18,$98,$58,$d8,$38,$b8,$78,$f8
dc.b $04,$84,$44,$c4,$24,$a4,$64,$e4,$14,$94,$54,$d4,$34,$b4,$74,$f4
dc.b $0c,$8c,$4c,$cc,$2c,$ac,$6c,$ec,$1c,$9c,$5c,$dc,$3c,$bc,$7c,$fc
dc.b $02,$82,$42,$c2,$22,$a2,$62,$e2,$12,$92,$52,$d2,$32,$b2,$72,$f2
dc.b $0a,$8a,$4a,$ca,$2a,$aa,$6a,$ea,$1a,$9a,$5a,$da,$3a,$ba,$7a,$fa
dc.b $06,$86,$46,$c6,$26,$a6,$66,$e6,$16,$96,$56,$d6,$36,$b6,$76,$f6
dc.b $0e,$8e,$4e,$ce,$2e,$ae,$6e,$ee,$1e,$9e,$5e,$de,$3e,$be,$7e,$fe
dc.b $01,$81,$41,$c1,$21,$a1,$61,$e1,$11,$91,$51,$d1,$31,$b1,$71,$f1
dc.b $09,$89,$49,$c9,$29,$a9,$69,$e9,$19,$99,$59,$d9,$39,$b9,$79,$f9
dc.b $05,$85,$45,$c5,$25,$a5,$65,$e5,$15,$95,$55,$d5,$35,$b5,$75,$f5
dc.b $0d,$8d,$4d,$cd,$2d,$ad,$6d,$ed,$1d,$9d,$5d,$dd,$3d,$bd,$7d,$fd
dc.b $03,$83,$43,$c3,$23,$a3,$63,$e3,$13,$93,$53,$d3,$33,$b3,$73,$f3
dc.b $0b,$8b,$4b,$cb,$2b,$ab,$6b,$eb,$1b,$9b,$5b,$db,$3b,$bb,$7b,$fb
dc.b $07,$87,$47,$c7,$27,$a7,$67,$e7,$17,$97,$57,$d7,$37,$b7,$77,$f7
dc.b $0f,$8f,$4f,$cf,$2f,$af,$6f,$ef,$1f,$9f,$5f,$df,$3f,$bf,$7f,$ff
even
*************************************
* Inputs: "D_FileSize"
*
* Output: Sets up "D_Source" "D_SourceBit" "D_SourceBitEnd"
Decomp_Init:
move.l InstTbl_Var,D_Source
.Header move.l InstTbl_Var,a0
cmp.w #$0a47,(a0) ;first 2 bytes in ProDos header...
bne .Dos3_3
cmp.b #$4c,2(a0) ;Third byte in ProDos header...
bne .Dos3_3
.ProDos add.l #$7c,D_Source ;ProDos header; add $80 bytes...
.Dos3_3 add.l #$04,D_Source ;Dos 3.3; 4 byte header...
move.l #0,D_SourceBit
move.l D_FileSize,d0 ;do we ever set this??? FIX LATER!!!
sub.l #$80,d0
mulu.l #8,d0
move.l d0,D_SourceBitEnd
rts
* Globals for these functions... *
************************************
D_Source ds.l 1 ;Source addr of decompression data...
D_SourceBit ds.l 1 ;Source bit offset of data...
D_SourceBitEnd ds.l 1 ;Highest bit offset allowable...
D_FileSize ds.l 1 ;Size in Bytes of file read...
D_VolumeNum ds.l 1 ;Volume # of disk...
;D_TrackNum ds.l 1
;D_SectorNum ds.l 1
*************************************
even

627
src/HiResMap.s Normal file
View File

@ -0,0 +1,627 @@
* Needs to be included in file with "WinRastPort" set and FPutByte available.
* enter with: a0=address to write ($2000-$3fff for PBHgr1), and d1=data.
* MAJOR OPT: At entry to PBHgrx, checks to see if mem is already same as data, if so, return!
SECTION HiResAPPLEII,CODE
CNOP 0,4
PBHgr1 cmp.b (Mem_Ptr,a0.l),d1
beq.b .NoShow
move.b d1,(Mem_Ptr,a0.l) ;FPUTBYTE
move.l -2(Mem_Ptr,a0.l),d0 ;2 pre-data bytes & 1 post-data byte!!!!!
;bits we want: (H= HighBit, #=PixelData)
;xxxx xxxx H654 3210 H654 3210 H654 3210 (14 sig bits)
; --- --------- - --
swap d0 [04]
lsr.b #5,d0 [04] ;now got:
swap d0 [04] ;xxxx xxxx oooo oH65 H654 3210 Hxxx xx10
; --- ---- ---- - --
lsl.l #1,d0 [04] ;xxxx xxxo oooo H65H 6543 210H xxxx x10x
lsl.b #5,d0 [04] ;xxxx xxxo oooo H65H 6543 210H 10xo oooo
lsr.l #6,d0 [04] ;xxxx xxxx xxxx xooo ooH6 5H65 4321 0H10
; -- ---- ---- ----
; total = [ 24 ] !
;d0 = clean word of all video data (index w/ it later)
move.l d0,a6
move.l a0,d0
lea HgrHorByteLookup,a1
and.w #$7f,d0 [06] ;(later make list 256 words & remove this line?)
move.w (a1,d0.w*2),d0 ;D0 has horizontal byte offset! (0->39 *7+20 for BFINS) CLEAN!
beq.b .NoShow ;its a video hole... no draw....
bmi .Hgr1Edge
.AfterEdge:
move.l a0,d1
lsr.w #3,d1 ;/8 for list optimization... (from 8192 bytes to 1024)
and.w #$3ff,d1 ;mask off above #1023... (we didnt -$2000 from addr)
lea HgrLineLookup,a1
move.w (a1,d1.w*2),d1 ;D1 Has vertical Line # !!!! (0-191) * 40 (BytesPerRow)
;d1 = Y*40(bytesPerRow)
move.l Hgr1_Planes,a0
add.l d1,a0 ; a0 = Planet1 Line StartLoc
btst.l #0,d0
bne.b .Odd
.Even ;a0 = Plane1 Line StartLoc
;d0 = BitField Offset (for solid grfx & centered)
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*2*40.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1
bfins d1,(a0){d0:9} ;plane 1
swap d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
.NoShow
rts
CNOP 0,4
.Odd ;a0 = Plane1 StartLoc
;d0 = Bitfield offset
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
swap d1
bfins d1,(a0){d0:9} ;plane 1
rts
.Hgr1Edge: ;determine which edge & mask off...
move.l a6,d1
btst.l #14,d0
beq.b .RtEdge
.LtEdge and.l #$07ff,d1 ;dont want data from previous line
move.l d1,a6
and.w #$0fff,d0 ;and remove this Edge Identifying bits...
bra .AfterEdge
.RtEdge and.l #$fff8,d1 ;dont want data from next line
move.l d1,a6
and.w #$0fff,d0
bra .AfterEdge
CNOP 0,4
.addr ds.l 1
dc.b 'K'+1,'E'+2,'V'+3,'I'+4,'N'+5,'K'+6,'R'+7,'A'+8,'L'+9,'I'+10,'A'+11,'N'+12
************************************************8
CNOP 0,4
PBHgr2 cmp.b (Mem_Ptr,a0.l),d1
beq.b .NoShow
move.b d1,(Mem_Ptr,a0.l) ;FPUTBYTE
move.l -2(Mem_Ptr,a0.l),d0 ;2 pre-data bytes & 1 post-data byte!!!!!
;bits we want: (H= HighBit, #=PixelData)
;xxxx xxxx H654 3210 H654 3210 H654 3210 (14 sig bits)
; --- --------- - --
swap d0 [04]
lsr.b #5,d0 [04] ;now got:
swap d0 [04] ;xxxx xxxx xxxx xH65 H654 3210 Hxxx xx10
; --- ---- ---- - --
lsl.l #1,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H xxxx x10x
lsl.b #5,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H 10xx xxxx
lsr.l #6,d0 [04] ;xxxx xxxx xxxx xxxx xxH6 5H65 4321 0H10
; -- ---- ---- ----
; total = [ 24 ] !
move.l d0,a6
move.l a0,d0
lea HgrHorByteLookup,a1
and.w #$7f,d0 [06] ;(later make list 256 words & remove this line?)
move.w (a1,d0.w*2),d0 ;D0 has horizontal byte offset! (0->39 *7+20 for BFINS) CLEAN!
beq.b .NoShow ;its a video hole... no draw....
bmi.b .Hgr2Edge
.AfterEdge:
move.l a0,d1
lsr.w #3,d1 ;/8 for list optimization... (from 8192 bytes to 1024)
and.w #$3ff,d1 ;mask off above #1023... (we didnt -$4000 from addr)
lea HgrLineLookup,a1
move.w (a1,d1.w*2),d1 ;D1 Has vertical Line # !!!! (0-191) * 40 (bytesPerRow)
move.l Hgr2_Planes,a0
add.l d1,a0 ; a0 = Planet1 Line StartLoc
btst.l #0,d0
bne.b .Odd
.Even ;a0 = Plane1 Line StartLoc
;d0 = BitField Offset (for solid grfx & centered)
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1 ;+1 for OddOffset...
bfins d1,(a0){d0:9} ;plane 1
swap d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
.NoShow
rts
CNOP 0,4
.Odd ;a0 = Plane1 StartLoc
;d0 = Bitfield offset
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
swap d1
bfins d1,(a0){d0:9} ;plane 1
rts
.Hgr2Edge: ;determine which edge & mask off...
move.l a6,d1
btst.l #14,d0
beq.b .RtEdge
.LtEdge and.l #$07ff,d1 ;dont want data from previous line
move.l d1,a6
and.w #$0fff,d0 ;and remove this Edge Identifying bits...
bra .AfterEdge
.RtEdge and.l #$fff8,d1 ;dont want data from next line
move.l d1,a6
and.w #$0fff,d0
bra .AfterEdge
************************************************8
CNOP 0,4
PBHgr1Top:
cmp.b (Mem_Ptr,a0.l),d1
beq.b .NoShow
move.b d1,(Mem_Ptr,a0.l) ;FPUTBYTE
move.l -2(Mem_Ptr,a0.l),d0 ;2 pre-data bytes & 1 post-data byte!!!!!
;bits we want: (H= HighBit, #=PixelData)
;xxxx xxxx H654 3210 H654 3210 H654 3210 (14 sig bits)
; --- --------- - --
swap d0 [04]
lsr.b #5,d0 [04] ;now got:
swap d0 [04] ;xxxx xxxx oooo oH65 H654 3210 Hxxx xx10
; --- ---- ---- - --
lsl.l #1,d0 [04] ;xxxx xxxo oooo H65H 6543 210H xxxx x10x
lsl.b #5,d0 [04] ;xxxx xxxo oooo H65H 6543 210H 10xo oooo
lsr.l #6,d0 [04] ;xxxx xxxx xxxx xooo ooH6 5H65 4321 0H10
; -- ---- ---- ----
; total = [ 24 ] !
;d0 = clean word of all video data (index w/ it later)
move.l d0,a6
move.l a0,d0
lea HgrHorByteLookup,a1
and.w #$7f,d0 [06] ;(later make list 256 words & remove this line?)
move.w (a1,d0.w*2),d0 ;D0 has horizontal byte offset! (0->39 *7+20 for BFINS) CLEAN!
beq.b .NoShow ;its a video hole... no draw....
bmi .Hgr1Edge
.AfterEdge:
move.l a0,d1
lsr.w #3,d1 ;/8 for list optimization... (from 8192 bytes to 1024)
and.w #$3ff,d1 ;mask off above #1023... (we didnt -$2000 from addr)
lea HgrLineLookup,a1
move.w (a1,d1.w*2),d1 ;D1 Has vertical Line # !!!! (0-191) * 40 (BytesPerRow)
;d1 = Y*40(bytesPerRow)
cmp.w #40*160,d1
bhs.b .NoShow
move.l Hgr1_Planes,a0
add.l d1,a0 ; a0 = Planet1 Line StartLoc
btst.l #0,d0
bne.b .Odd
.Even ;a0 = Plane1 Line StartLoc
;d0 = BitField Offset (for solid grfx & centered)
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*2*40.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1
bfins d1,(a0){d0:9} ;plane 1
swap d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
.NoShow
rts
CNOP 0,4
.Odd ;a0 = Plane1 StartLoc
;d0 = Bitfield offset
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
swap d1
bfins d1,(a0){d0:9} ;plane 1
rts
.Hgr1Edge: ;determine which edge & mask off...
move.l a6,d1
btst.l #14,d0
beq.b .RtEdge
.LtEdge and.l #$07ff,d1 ;dont want data from previous line
move.l d1,a6
and.w #$0fff,d0 ;and remove this Edge Identifying bits...
bra .AfterEdge
.RtEdge and.l #$fff8,d1 ;dont want data from next line
move.l d1,a6
and.w #$0fff,d0
bra .AfterEdge
CNOP 0,4
.addr ds.l 1
dc.b 'K'+1,'E'+2,'V'+3,'I'+4,'N'+5,'K'+6,'R'+7,'A'+8,'L'+9,'I'+10,'A'+11,'N'+12
************************************************8
CNOP 0,4
PBHgr2Top:
cmp.b (Mem_Ptr,a0.l),d1
beq.b .NoShow
move.b d1,(Mem_Ptr,a0.l) ;FPUTBYTE
move.l -2(Mem_Ptr,a0.l),d0 ;2 pre-data bytes & 1 post-data byte!!!!!
;bits we want: (H= HighBit, #=PixelData)
;xxxx xxxx H654 3210 H654 3210 H654 3210 (14 sig bits)
; --- --------- - --
swap d0 [04]
lsr.b #5,d0 [04] ;now got:
swap d0 [04] ;xxxx xxxx xxxx xH65 H654 3210 Hxxx xx10
; --- ---- ---- - --
lsl.l #1,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H xxxx x10x
lsl.b #5,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H 10xx xxxx
lsr.l #6,d0 [04] ;xxxx xxxx xxxx xxxx xxH6 5H65 4321 0H10
; -- ---- ---- ----
; total = [ 24 ] !
move.l d0,a6
move.l a0,d0
lea HgrHorByteLookup,a1
and.w #$7f,d0 [06] ;(later make list 256 words & remove this line?)
move.w (a1,d0.w*2),d0 ;D0 has horizontal byte offset! (0->39 *7+20 for BFINS) CLEAN!
beq.b .NoShow ;its a video hole... no draw....
bmi.b .Hgr2Edge
.AfterEdge:
move.l a0,d1
lsr.w #3,d1 ;/8 for list optimization... (from 8192 bytes to 1024)
and.w #$3ff,d1 ;mask off above #1023... (we didnt -$4000 from addr)
lea HgrLineLookup,a1
move.w (a1,d1.w*2),d1 ;D1 Has vertical Line # !!!! (0-191) * 40 (bytesPerRow)
cmp.w #40*160,d1
bhs.b .NoShow
move.l Hgr2_Planes,a0
add.l d1,a0 ; a0 = Planet1 Line StartLoc
btst.l #0,d0
bne.b .Odd
.Even ;a0 = Plane1 Line StartLoc
;d0 = BitField Offset (for solid grfx & centered)
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1 ;+1 for OddOffset...
bfins d1,(a0){d0:9} ;plane 1
swap d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
.NoShow
rts
CNOP 0,4
.Odd ;a0 = Plane1 StartLoc
;d0 = Bitfield offset
move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a0){d0:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d0
move.l (a1,a6.w*4),d1
bfins d1,(LINES*40.w,a0){d0:9} ;plane 2
swap d1
bfins d1,(a0){d0:9} ;plane 1
rts
.Hgr2Edge: ;determine which edge & mask off...
move.l a6,d1
btst.l #14,d0
beq.b .RtEdge
.LtEdge and.l #$07ff,d1 ;dont want data from previous line
move.l d1,a6
and.w #$0fff,d0 ;and remove this Edge Identifying bits...
bra .AfterEdge
.RtEdge and.l #$fff8,d1 ;dont want data from next line
move.l d1,a6
and.w #$0fff,d0
bra .AfterEdge
CNOP 0,4
************************************************8
* enter with: a0=address to write ($2000-$3fff for PBHgr1), and d1=data.
*
Hgr1Refresh:
movem.l a2-a5/d2-d7,-(sp)
move.l Mem_PtrVar,Mem_Ptr ;a4 (USED!)
move.l HiResDrawTbl,a1 ;a1 -> HiRes Draw Table (Preserve!)
* Step through all the HGR line addresses...
move.l #$2000,a3 ;a3 = main base counter...
move.l a3,a2 ;a2 -> Base of HGR line we are doing (preserve!)
move.l Hgr1_Planes,a5 ;a5 -> Base of BitPlane memory (top line to start)
.loop
move.l a2,a0
;PBHgr1-EntireLine!
move.w #$0,d5 ;byte counter for full line...
move.w #20-7,d4 ;always start with leftmost byte...!
.NextByte
move.l -2(Mem_Ptr,a0.l),d0 ;2 pre-data bytes & 1 post-data byte!!!!!
;bits we want: (H= HighBit, #=PixelData)
;xxxx xxxx H654 3210 H654 3210 H654 3210 (14 sig bits)
; --- --------- - --
swap d0 [04]
lsr.b #5,d0 [04] ;now got:
swap d0 [04] ;xxxx xxxx xxxx xH65 H654 3210 Hxxx xx10
; --- ---- ---- - --
lsl.l #1,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H xxxx x10x
lsl.b #5,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H 10xx xxxx
lsr.l #6,d0 [04] ;xxxx xxxx xxxx xxxx xxH6 5H65 4321 0H10
; -- ---- ---- ----
; total = [ 24 ] !
move.l d0,a6
;d0 = clean word of all video data (index w/ it later)
addq.w #7,d4 ;next byte Horizontal Offset
btst.l #0,d4 ;is this an even or odd byte?
bne.b .Odd
.Even ;a0 = Plane1 Line StartLoc
;d0 = BitField Offset (for solid grfx & centered)
; move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a5){d4:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d4
move.l (a1,a6.w*4),d1
bfins d1,(a5){d4:9} ;plane 1
swap d1
bfins d1,(LINES*40.w,a5){d4:9} ;plane 2
addq.l #1,d4
.again
move.l -1(Mem_Ptr,a0.l),d0 ;2 pre-data bytes & 1 post-data byte!!!!!
;bits we want: (H= HighBit, #=PixelData)
;xxxx xxxx H654 3210 H654 3210 H654 3210 (14 sig bits)
; --- --------- - --
swap d0 [04]
lsr.b #5,d0 [04] ;now got:
swap d0 [04] ;xxxx xxxx xxxx xH65 H654 3210 Hxxx xx10
; --- ---- ---- - --
lsl.l #1,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H xxxx x10x
lsl.b #5,d0 [04] ;xxxx xxxx xxxx H65H 6543 210H 10xx xxxx
lsr.l #6,d0 [04] ;xxxx xxxx xxxx xxxx xxH6 5H65 4321 0H10
; -- ---- ---- ----
; total = [ 24 ] !
move.l d0,a6
;d0 = clean word of all video data (index w/ it later)
addq.w #7,d4 ;next byte Horizontal Offset
.Odd ;a0 = Plane1 StartLoc
;d0 = Bitfield offset
; move.l HiResDrawTbl,a1
move.l a6,d1 ;swap nibbles on %H765 4321 to 1234 567o
btst.l #10,d1
sne.b d1
bfins d1,(LINES*40*2.w,a5){d4:7} ;if data hi bit set, make $ff, else $00
subq.l #1,d4
move.l (a1,a6.w*4),d1
bfins d1,(LINES*40.w,a5){d4:9} ;plane 2
swap d1
bfins d1,(a5){d4:9} ;plane 1
addq.l #1,d4
bra .done
.done
addq.w #2,d5
lea (a2,d5.w),a0 ;set next byte addr...
cmp.w #40,d5
blo .NextByte
add.l #40,a5 ;inc BitPlane ptr to next line...
add.w #$400,a2 ;$2000 -> $2400 -> ... -> $3800 (each line in grp of 8)
cmp.w #$4000,a2
blo .loop
sub.w #$2000-$80,a2
cmp.w #$2400,a2 ;$2000 -> $2080 -> $2100 -> $2180 -> ... -> $2380
blo .loop
add.w #$28,a3 ;from $2000 -> $2028 -> $2050
move.w a3,a2
cmp.w #$2050,a3
bls .loop
movem.l (sp)+,a2-a5/d2-d7
rts
**************************************************
** HorizByte is 127-Word lookup table. Using the low-end mask of the txt / hgr address,
** This returns the HORizontal BYTE offset...!!! (0-39! (+ special))
** (00 -> 39, *7 for BFINS offset field (7 pixels per byte), + 20 to center on screen)
** 0 = Video Hole (no visible effect)
** - = Its an edge byte (left or right extreme) (numeric offset in lower 9 bits, 0 -> 293)
** bit 14 = boolean LEFT side (1=left side, 0=right side)
** so, left edge bytes add +$C000, right edge bytes add +$8000
SECTION TABLES,DATA
CNOP 0,4
HgrHorByteLookup
dc.w 00*7+20+$c000,01*7+20,02*7+20,03*7+20,04*7+20,05*7+20,06*7+20,07*7+20,08*7+20,09*7+20
dc.w 10*7+20,11*7+20,12*7+20,13*7+20,14*7+20,15*7+20,16*7+20,17*7+20,18*7+20,19*7+20
dc.w 20*7+20,21*7+20,22*7+20,23*7+20,24*7+20,25*7+20,26*7+20,27*7+20,28*7+20,29*7+20
dc.w 30*7+20,31*7+20,32*7+20,33*7+20,34*7+20,35*7+20,36*7+20,37*7+20,38*7+20,39*7+20+$8000
dc.w 00*7+20+$c000,01*7+20,02*7+20,03*7+20,04*7+20,05*7+20,06*7+20,07*7+20,08*7+20,09*7+20
dc.w 10*7+20,11*7+20,12*7+20,13*7+20,14*7+20,15*7+20,16*7+20,17*7+20,18*7+20,19*7+20
dc.w 20*7+20,21*7+20,22*7+20,23*7+20,24*7+20,25*7+20,26*7+20,27*7+20,28*7+20,29*7+20
dc.w 30*7+20,31*7+20,32*7+20,33*7+20,34*7+20,35*7+20,36*7+20,37*7+20,38*7+20,39*7+20+$8000
dc.w 00*7+20+$c000,01*7+20,02*7+20,03*7+20,04*7+20,05*7+20,06*7+20,07*7+20,08*7+20,09*7+20
dc.w 10*7+20,11*7+20,12*7+20,13*7+20,14*7+20,15*7+20,16*7+20,17*7+20,18*7+20,19*7+20
dc.w 20*7+20,21*7+20,22*7+20,23*7+20,24*7+20,25*7+20,26*7+20,27*7+20,28*7+20,29*7+20
dc.w 30*7+20,31*7+20,32*7+20,33*7+20,34*7+20,35*7+20,36*7+20,37*7+20,38*7+20,39*7+20+$8000
dc.w 0,0,0,0,0,0,0,0
* Test for "Quick & Dirty" video display. List of byte offsets from left of screen...
QuickHgrHorByteLookup
dc.w 00,01,02,03,04,05,06,07,08,09
dc.w 10,11,12,13,14,15,16,17,18,19
dc.w 20,21,22,23,24,25,26,27,28,29
dc.w 30,31,32,33,34,35,36,37,38,39
dc.w 00,01,02,03,04,05,06,07,08,09
dc.w 10,11,12,13,14,15,16,17,18,19
dc.w 20,21,22,23,24,25,26,27,28,29
dc.w 30,31,32,33,34,35,36,37,38,39
dc.w 00,01,02,03,04,05,06,07,08,09
dc.w 10,11,12,13,14,15,16,17,18,19
dc.w 20,21,22,23,24,25,26,27,28,29
dc.w 30,31,32,33,34,35,36,37,38,39
dc.w -1,-1,-1,-1,-1,-1,-1,-1
** 1024 Entries. Take HGR address, offset to $0000, /8 (to eliminate repetition)
** Video "Holes" are listed as 0, for safety. Catch by checking horizontal byte offset.
** Line # * 40 (bytes per line) as optimization...
HgrLineLookup:
dc.w 0*40,0*40,0*40,0*40,0*40,64*40,64*40,64*40,64*40,64*40,128*40,128*40,128*40,128*40,128*40,0
dc.w 8*40,8*40,8*40,8*40,8*40,72*40,72*40,72*40,72*40,72*40,136*40,136*40,136*40,136*40,136*40,0
dc.w 16*40,16*40,16*40,16*40,16*40,80*40,80*40,80*40,80*40,80*40,144*40,144*40,144*40,144*40,144*40,0
dc.w 24*40,24*40,24*40,24*40,24*40,88*40,88*40,88*40,88*40,88*40,152*40,152*40,152*40,152*40,152*40,0
dc.w 32*40,32*40,32*40,32*40,32*40,96*40,96*40,96*40,96*40,96*40,160*40,160*40,160*40,160*40,160*40,0
dc.w 40*40,40*40,40*40,40*40,40*40,104*40,104*40,104*40,104*40,104*40,168*40,168*40,168*40,168*40,168*40,0
dc.w 48*40,48*40,48*40,48*40,48*40,112*40,112*40,112*40,112*40,112*40,176*40,176*40,176*40,176*40,176*40,0
dc.w 56*40,56*40,56*40,56*40,56*40,120*40,120*40,120*40,120*40,120*40,184*40,184*40,184*40,184*40,184*40,0
dc.w 1*40,1*40,1*40,1*40,1*40,65*40,65*40,65*40,65*40,65*40,129*40,129*40,129*40,129*40,129*40,0
dc.w 9*40,9*40,9*40,9*40,9*40,73*40,73*40,73*40,73*40,73*40,137*40,137*40,137*40,137*40,137*40,0
dc.w 17*40,17*40,17*40,17*40,17*40,81*40,81*40,81*40,81*40,81*40,145*40,145*40,145*40,145*40,145*40,0
dc.w 25*40,25*40,25*40,25*40,25*40,89*40,89*40,89*40,89*40,89*40,153*40,153*40,153*40,153*40,153*40,0
dc.w 33*40,33*40,33*40,33*40,33*40,97*40,97*40,97*40,97*40,97*40,161*40,161*40,161*40,161*40,161*40,0
dc.w 41*40,41*40,41*40,41*40,41*40,105*40,105*40,105*40,105*40,105*40,169*40,169*40,169*40,169*40,169*40,0
dc.w 49*40,49*40,49*40,49*40,49*40,113*40,113*40,113*40,113*40,113*40,177*40,177*40,177*40,177*40,177*40,0
dc.w 57*40,57*40,57*40,57*40,57*40,121*40,121*40,121*40,121*40,121*40,185*40,185*40,185*40,185*40,185*40,0
dc.w 2*40,2*40,2*40,2*40,2*40,66*40,66*40,66*40,66*40,66*40,130*40,130*40,130*40,130*40,130*40,0
dc.w 10*40,10*40,10*40,10*40,10*40,74*40,74*40,74*40,74*40,74*40,138*40,138*40,138*40,138*40,138*40,0
dc.w 18*40,18*40,18*40,18*40,18*40,82*40,82*40,82*40,82*40,82*40,146*40,146*40,146*40,146*40,146*40,0
dc.w 26*40,26*40,26*40,26*40,26*40,90*40,90*40,90*40,90*40,90*40,154*40,154*40,154*40,154*40,154*40,0
dc.w 34*40,34*40,34*40,34*40,34*40,98*40,98*40,98*40,98*40,98*40,162*40,162*40,162*40,162*40,162*40,0
dc.w 42*40,42*40,42*40,42*40,42*40,106*40,106*40,106*40,106*40,106*40,170*40,170*40,170*40,170*40,170*40,0
dc.w 50*40,50*40,50*40,50*40,50*40,114*40,114*40,114*40,114*40,114*40,178*40,178*40,178*40,178*40,178*40,0
dc.w 58*40,58*40,58*40,58*40,58*40,122*40,122*40,122*40,122*40,122*40,186*40,186*40,186*40,186*40,186*40,0
dc.w 3*40,3*40,3*40,3*40,3*40,67*40,67*40,67*40,67*40,67*40,131*40,131*40,131*40,131*40,131*40,0
dc.w 11*40,11*40,11*40,11*40,11*40,75*40,75*40,75*40,75*40,75*40,139*40,139*40,139*40,139*40,139*40,0
dc.w 19*40,19*40,19*40,19*40,19*40,83*40,83*40,83*40,83*40,83*40,147*40,147*40,147*40,147*40,147*40,0
dc.w 27*40,27*40,27*40,27*40,27*40,91*40,91*40,91*40,91*40,91*40,155*40,155*40,155*40,155*40,155*40,0
dc.w 35*40,35*40,35*40,35*40,35*40,99*40,99*40,99*40,99*40,99*40,163*40,163*40,163*40,163*40,163*40,0
dc.w 43*40,43*40,43*40,43*40,43*40,107*40,107*40,107*40,107*40,107*40,171*40,171*40,171*40,171*40,171*40,0
dc.w 51*40,51*40,51*40,51*40,51*40,115*40,115*40,115*40,115*40,115*40,179*40,179*40,179*40,179*40,179*40,0
dc.w 59*40,59*40,59*40,59*40,59*40,123*40,123*40,123*40,123*40,123*40,187*40,187*40,187*40,187*40,187*40,0
dc.w 4*40,4*40,4*40,4*40,4*40,68*40,68*40,68*40,68*40,68*40,132*40,132*40,132*40,132*40,132*40,0
dc.w 12*40,12*40,12*40,12*40,12*40,76*40,76*40,76*40,76*40,76*40,140*40,140*40,140*40,140*40,140*40,0
dc.w 20*40,20*40,20*40,20*40,20*40,84*40,84*40,84*40,84*40,84*40,148*40,148*40,148*40,148*40,148*40,0
dc.w 28*40,28*40,28*40,28*40,28*40,92*40,92*40,92*40,92*40,92*40,156*40,156*40,156*40,156*40,156*40,0
dc.w 36*40,36*40,36*40,36*40,36*40,100*40,100*40,100*40,100*40,100*40,164*40,164*40,164*40,164*40,164*40,0
dc.w 44*40,44*40,44*40,44*40,44*40,108*40,108*40,108*40,108*40,108*40,172*40,172*40,172*40,172*40,172*40,0
dc.w 52*40,52*40,52*40,52*40,52*40,116*40,116*40,116*40,116*40,116*40,180*40,180*40,180*40,180*40,180*40,0
dc.w 60*40,60*40,60*40,60*40,60*40,124*40,124*40,124*40,124*40,124*40,188*40,188*40,188*40,188*40,188*40,0
dc.w 5*40,5*40,5*40,5*40,5*40,69*40,69*40,69*40,69*40,69*40,133*40,133*40,133*40,133*40,133*40,0
dc.w 13*40,13*40,13*40,13*40,13*40,77*40,77*40,77*40,77*40,77*40,141*40,141*40,141*40,141*40,141*40,0
dc.w 21*40,21*40,21*40,21*40,21*40,85*40,85*40,85*40,85*40,85*40,149*40,149*40,149*40,149*40,149*40,0
dc.w 29*40,29*40,29*40,29*40,29*40,93*40,93*40,93*40,93*40,93*40,157*40,157*40,157*40,157*40,157*40,0
dc.w 37*40,37*40,37*40,37*40,37*40,101*40,101*40,101*40,101*40,101*40,165*40,165*40,165*40,165*40,165*40,0
dc.w 45*40,45*40,45*40,45*40,45*40,109*40,109*40,109*40,109*40,109*40,173*40,173*40,173*40,173*40,173*40,0
dc.w 53*40,53*40,53*40,53*40,53*40,117*40,117*40,117*40,117*40,117*40,181*40,181*40,181*40,181*40,181*40,0
dc.w 61*40,61*40,61*40,61*40,61*40,125*40,125*40,125*40,125*40,125*40,189*40,189*40,189*40,189*40,189*40,0
dc.w 6*40,6*40,6*40,6*40,6*40,70*40,70*40,70*40,70*40,70*40,134*40,134*40,134*40,134*40,134*40,0
dc.w 14*40,14*40,14*40,14*40,14*40,78*40,78*40,78*40,78*40,78*40,142*40,142*40,142*40,142*40,142*40,0
dc.w 22*40,22*40,22*40,22*40,22*40,86*40,86*40,86*40,86*40,86*40,150*40,150*40,150*40,150*40,150*40,0
dc.w 30*40,30*40,30*40,30*40,30*40,94*40,94*40,94*40,94*40,94*40,158*40,158*40,158*40,158*40,158*40,0
dc.w 38*40,38*40,38*40,38*40,38*40,102*40,102*40,102*40,102*40,102*40,166*40,166*40,166*40,166*40,166*40,0
dc.w 46*40,46*40,46*40,46*40,46*40,110*40,110*40,110*40,110*40,110*40,174*40,174*40,174*40,174*40,174*40,0
dc.w 54*40,54*40,54*40,54*40,54*40,118*40,118*40,118*40,118*40,118*40,182*40,182*40,182*40,182*40,182*40,0
dc.w 62*40,62*40,62*40,62*40,62*40,126*40,126*40,126*40,126*40,126*40,190*40,190*40,190*40,190*40,190*40,0
dc.w 7*40,7*40,7*40,7*40,7*40,71*40,71*40,71*40,71*40,71*40,135*40,135*40,135*40,135*40,135*40,0
dc.w 15*40,15*40,15*40,15*40,15*40,79*40,79*40,79*40,79*40,79*40,143*40,143*40,143*40,143*40,143*40,0
dc.w 23*40,23*40,23*40,23*40,23*40,87*40,87*40,87*40,87*40,87*40,151*40,151*40,151*40,151*40,151*40,0
dc.w 31*40,31*40,31*40,31*40,31*40,95*40,95*40,95*40,95*40,95*40,159*40,159*40,159*40,159*40,159*40,0
dc.w 39*40,39*40,39*40,39*40,39*40,103*40,103*40,103*40,103*40,103*40,167*40,167*40,167*40,167*40,167*40,0
dc.w 47*40,47*40,47*40,47*40,47*40,111*40,111*40,111*40,111*40,111*40,175*40,175*40,175*40,175*40,175*40,0
dc.w 55*40,55*40,55*40,55*40,55*40,119*40,119*40,119*40,119*40,119*40,183*40,183*40,183*40,183*40,183*40,0
dc.w 63*40,63*40,63*40,63*40,63*40,127*40,127*40,127*40,127*40,127*40,191*40,191*40,191*40,191*40,191*40,0

1343
src/Main.s Normal file

File diff suppressed because it is too large Load Diff

8
src/NoDebug.s Normal file
View File

@ -0,0 +1,8 @@
** DEBUGGING Routines... Print Strings, hex numbers, dec numbers, etc...
** to MYCHANNEL... (opened prior)
EVEN
rts
DB_String: ** A0 -> Null Terminated String to Print
DB_HexB
DB_HexW
DB_HexL rts

1493
src/OpenClose.s Normal file

File diff suppressed because it is too large Load Diff

459
src/TextMap.s Normal file
View File

@ -0,0 +1,459 @@
* Needs to be included in file with "WinRastPort" set and FPutByte available.
* enter with: a0=address to write ($400-$7ff for PBTxt1), and d1=data.
SECTION APPLEII,CODE
EVEN
CNOP 0,4
PBTxt1 cmp.b (Mem_Ptr,a0.l),d1 ;1st check if mem is different!
beq.b .rts ;mem is same so video is same; don't change anything
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$800,a1
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b .rts
move.l #IIeCharSet,a1 [03]
lea (a1,a6.w*8),a1 ;a1 -> CharSet for letter!!! [08]
.Do_txt move.l Gr1_Planes,a0 ;a0 -> GR1 Plane1 ... (new test)
add.w d1,a0 ;a0 -> Plane1StartLoc
move.b (a1)+,(a0) ;line 1
move.b (a1)+,40(a0) ;line 2
move.b (a1)+,80(a0) ;line 3
move.b (a1)+,120(a0) ;line 4
move.b (a1)+,160(a0) ;line 5
move.b (a1)+,200(a0) ;line 6
move.b (a1)+,240(a0) ;line 7
move.b (a1)+,280(a0) ;line 8
move.l #IIeCharSet2,a1
move.b (a1,a6.w),d0 ;a6 still present from above...!
move.b d0,0+LINES*40(a0)
move.b d0,40+LINES*40(a0) ;line 2
move.b d0,80+LINES*40(a0) ;line 3
move.b d0,120+LINES*40(a0) ;line 4
move.b d0,160+LINES*40(a0) ;line 5
move.b d0,200+LINES*40(a0) ;line 6
move.b d0,240+LINES*40(a0) ;line 7
move.b d0,280+LINES*40(a0) ;line 8
.rts
AnRts rts
****************************************************
CNOP 0,4
PBGr1 cmp.b (Mem_Ptr,a0.l),d1 ;1st check if mem is different!
beq.b AnRts ;mem is same so video is same; don't change anything
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$800,a1
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b AnRts
.dogr move.l Gr1_Planes,a0 ;a0 -> GR1 Plane1
GRFX add.w d1,a0 ;a0 -> GrPlane1 Start Loc (d1 still there???)
move.w a6,d1
****** Top 4 pixel lines of byte data.... *****
*** (Done top 4 then bottom 4 in order to check bit data with LSR's)
*** BitPlane 1 **** Opt later by LSR'ing a Dn instead of Btsts on Mem...
lsr.b #1,d1 *** Opt later by only drawing 1 line for each color via Copper magic!
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,(a0) ;line 1
move.b d0,40(a0) ;line 2
move.b d0,80(a0) ;line 3
move.b d0,120(a0) ;line 4
**** BitPlane 2
lsr.b #1,d1
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,LINES*40(a0) ;line 1
move.b d0,40+LINES*40(a0) ;line 2
move.b d0,80+LINES*40(a0) ;line 3
move.b d0,120+LINES*40(a0) ;line 4
**** BitPlane 3
lsr.b #1,d1
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,LINES*40*2(a0) ;line 1
move.b d0,40+LINES*40*2(a0) ;line 2
move.b d0,80+LINES*40*2(a0) ;line 3
move.b d0,120+LINES*40*2(a0) ;line 4
**** BitPlane 4
lsr.b #1,d1
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,0+LINES*40*3(a0) ;line 1
move.b d0,40+LINES*40*3(a0) ;line 2
move.b d0,80+LINES*40*3(a0) ;line 3
move.b d0,120+LINES*40*3(a0) ;line 4
******* Bottom 4 lines based on byte data,,,
*** BitPlane 1
lsr.b #1,d1
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,160(a0) ;line 5
move.b d0,200(a0) ;line 6
move.b d0,240(a0) ;line 7
move.b d0,280(a0) ;line 8
**** BitPlane 2
lsr.b #1,d1
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,160+LINES*40(a0) ;line 5
move.b d0,200+LINES*40(a0) ;line 6
move.b d0,240+LINES*40(a0) ;line 7
move.b d0,280+LINES*40(a0) ;line 8
**** BitPlane 3
lsr.b #1,d1
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,160+LINES*40*2(a0) ;line 5
move.b d0,200+LINES*40*2(a0) ;line 6
move.b d0,240+LINES*40*2(a0) ;line 7
move.b d0,280+LINES*40*2(a0) ;line 8
**** BitPlane 4
lsr.b #1,d1
scs.b d0 ;bit set? Put a $ff in d0. Else, put $00 in d0!
move.b d0,160+LINES*40*3(a0) ;line 5
move.b d0,200+LINES*40*3(a0) ;line 6
move.b d0,240+LINES*40*3(a0) ;line 7
move.b d0,280+LINES*40*3(a0) ;line 8
rts
***********************************************
CNOP 0,4
PBGrTxt1:
cmp.b (Mem_Ptr,a0.l),d1 ;1st check if mem is different!
beq.b .rts ;mem is same so video is same; don't change anything
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$800,a1
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b .rts
move.l Gr1_Planes,a0
.choose cmp.w #20*320+00,d1 ;cmp to 1st txt line addr...
bhs.b .txt
.do_gr bra GRFX ;Go draw grfx block (a0/d1 set)
.rts rts
.txt move.l #IIeCharSet,a1 [03]
lea (a1,a6.w*8),a1 ;a1 -> CharSet for letter!!! [08]
add.w d1,a0 ;a0 -> Plane1StartLoc
move.b (a1)+,(a0) ;line 1
move.b (a1)+,40(a0) ;line 2
move.b (a1)+,80(a0) ;line 3
move.b (a1)+,120(a0) ;line 4
move.b (a1)+,160(a0) ;line 5
move.b (a1)+,200(a0) ;line 6
move.b (a1)+,240(a0) ;line 7
move.b (a1)+,280(a0) ;line 8
move.l #IIeCharSet2,a1
move.b (a1,a6.w),d0 ;a6 still present from above...!
move.b d0,0+LINES*40(a0)
move.b d0,40+LINES*40(a0) ;line 2
move.b d0,80+LINES*40(a0) ;line 3
move.b d0,120+LINES*40(a0) ;line 4
move.b d0,160+LINES*40(a0) ;line 5
move.b d0,200+LINES*40(a0) ;line 6
move.b d0,240+LINES*40(a0) ;line 7
move.b d0,280+LINES*40(a0) ;line 8
rts
**************************************
CNOP 0,4
;This routine ONLY draws the bottom 4 lines of text into HiRes BPlanes...
PBHgrTxt1:
cmp.b (Mem_Ptr,a0.l),d1 ;1st check if mem is different!
beq.b .rts ;mem is same so video is same; don't change anything
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$800,a1
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b .rts
move.l Hgr1_Planes,a0
.choose cmp.w #20*320+00,d1 ;cmp to 1st txt line addr...
bhs.b .txt
.rts rts
.txt move.l #IIeCharSet,a1 [03]
lea (a1,a6.w*8),a1 ;a1 -> CharSet for letter!!! [08]
add.w d1,a0 ;a0 -> Plane1StartLoc
move.b (a1)+,(a0) ;line 1
move.b (a1)+,40(a0) ;line 2
move.b (a1)+,80(a0) ;line 3
move.b (a1)+,120(a0) ;line 4
move.b (a1)+,160(a0) ;line 5
move.b (a1)+,200(a0) ;line 6
move.b (a1)+,240(a0) ;line 7
move.b (a1)+,280(a0) ;line 8
move.l #IIeCharSet2,a1
move.b (a1,a6.w),d0 ;a6 still present from above...!
move.b d0,0+LINES*40(a0)
move.b d0,40+LINES*40(a0) ;line 2
move.b d0,80+LINES*40(a0) ;line 3
move.b d0,120+LINES*40(a0) ;line 4
move.b d0,160+LINES*40(a0) ;line 5
move.b d0,200+LINES*40(a0) ;line 6
move.b d0,240+LINES*40(a0) ;line 7
move.b d0,280+LINES*40(a0) ;line 8
rts
***********************************************************************
* enter with: a0=address to write ($800-$bff for PBTxt2), and d1=data.
***********************************************************************
CNOP 0,4
PBTxt2 cmp.b (Mem_Ptr,a0.l),d1
beq.b .rts
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$1000,a1 ;- $800 * 2
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b .rts
move.l #IIeCharSet,a1 [03]
lea (a1,a6.w*8),a1 ;a1 -> CharSet for letter!!! [08]
.do_txt move.l Gr2_Planes,a0 ;a0 -> BitPlane1
add.w d1,a0 ;a0 -> Plane1StartLoc
move.b (a1)+,(a0) ;line 1
move.b (a1)+,40(a0) ;line 2
move.b (a1)+,80(a0) ;line 3
move.b (a1)+,120(a0) ;line 4
move.b (a1)+,160(a0) ;line 5
move.b (a1)+,200(a0) ;line 6
move.b (a1)+,240(a0) ;line 7
move.b (a1)+,280(a0) ;line 8
move.l #IIeCharSet2,a1
move.b (a1,a6.w),d0 ;a6 still present from above...!
move.b d0,0+LINES*40(a0)
move.b d0,40+LINES*40(a0) ;line 2
move.b d0,80+LINES*40(a0) ;line 3
move.b d0,120+LINES*40(a0) ;line 4
move.b d0,160+LINES*40(a0) ;line 5
move.b d0,200+LINES*40(a0) ;line 6
move.b d0,240+LINES*40(a0) ;line 7
move.b d0,280+LINES*40(a0) ;line 8
.rts rts
*****************************
CNOP 0,4
PBGr2 cmp.b (Mem_Ptr,a0.l),d1
beq.b .rts
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$1000,a1 ;- $800 * 2
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b .rts
.do_gr move.l Gr2_Planes,a0
bra GRFX
.rts rts
***************************
CNOP 0,4
PBGrTxt2:
cmp.b (Mem_Ptr,a0.l),d1
beq.b .rts
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$1000,a1 ;- $800 * 2
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b .rts
move.l Gr2_Planes,a0
.choose cmp.w #20*320+00,d1 ;cmp to 1st txt line addr...
bhs.b .txt
.do_gr bra GRFX ;Go draw grfx block (a0/d1 set)
.rts rts
.txt move.l #IIeCharSet,a1 [03]
lea (a1,a6.w*8),a1 ;a1 -> CharSet for letter!!! [08]
add.w d1,a0 ;a0 -> Plane1StartLoc
move.b (a1)+,(a0) ;line 1
move.b (a1)+,40(a0) ;line 2
move.b (a1)+,80(a0) ;line 3
move.b (a1)+,120(a0) ;line 4
move.b (a1)+,160(a0) ;line 5
move.b (a1)+,200(a0) ;line 6
move.b (a1)+,240(a0) ;line 7
move.b (a1)+,280(a0) ;line 8
move.l #IIeCharSet2,a1
move.b (a1,a6.w),d0 ;a6 still present from above...!
move.b d0,0+LINES*40(a0)
move.b d0,40+LINES*40(a0) ;line 2
move.b d0,80+LINES*40(a0) ;line 3
move.b d0,120+LINES*40(a0) ;line 4
move.b d0,160+LINES*40(a0) ;line 5
move.b d0,200+LINES*40(a0) ;line 6
move.b d0,240+LINES*40(a0) ;line 7
move.b d0,280+LINES*40(a0) ;line 8
rts
***************************
CNOP 0,4
PBHgrTxt2:
cmp.b (Mem_Ptr,a0.l),d1
beq.b .rts
move.b d1,(Mem_Ptr,a0.l) ;FPUBYTE, write data to mem...
and.w #$ff,d1
move.w d1,a6
move.l #TxtLookUp-$1000,a1 ;- $800 * 2
move.w (a1,a0.w*2),d1 ;d1 = BPlane Ptr Offset for particular address
bmi.b .rts
move.l Hgr2_Planes,a0
.choose cmp.w #20*320+00,d1 ;cmp to 1st txt line addr...
bhs.b .txt
.rts rts
.txt move.l #IIeCharSet,a1 [03]
lea (a1,a6.w*8),a1 ;a1 -> CharSet for letter!!! [08]
add.w d1,a0 ;a0 -> Plane1StartLoc
move.b (a1)+,(a0) ;line 1
move.b (a1)+,40(a0) ;line 2
move.b (a1)+,80(a0) ;line 3
move.b (a1)+,120(a0) ;line 4
move.b (a1)+,160(a0) ;line 5
move.b (a1)+,200(a0) ;line 6
move.b (a1)+,240(a0) ;line 7
move.b (a1)+,280(a0) ;line 8
move.l #IIeCharSet2,a1
move.b (a1,a6.w),d0 ;a6 still present from above...!
move.b d0,0+LINES*40(a0)
move.b d0,40+LINES*40(a0) ;line 2
move.b d0,80+LINES*40(a0) ;line 3
move.b d0,120+LINES*40(a0) ;line 4
move.b d0,160+LINES*40(a0) ;line 5
move.b d0,200+LINES*40(a0) ;line 6
move.b d0,240+LINES*40(a0) ;line 7
move.b d0,280+LINES*40(a0) ;line 8
rts
SECTION TABLES,DATA
** TxtLookUp is an entire BitMap Offset to draw a character onto based upon an absolute addr.
** For a number ($400-$7ff) it returns a word offset, or -1 if in a video "hole".
** Offset = Line # * 8 (Lines Per Character) * 40 (BytesPerLine) + Horizontal Byte Offset.
CNOP 0,4
TxtLookUp:
dc.w 00*320+00,00*320+01,00*320+02,00*320+03,00*320+04,00*320+05,00*320+06,00*320+07,00*320+08,00*320+09,00*320+10,00*320+11,00*320+12,00*320+13,00*320+14,00*320+15,00*320+16,00*320+17,00*320+18,00*320+19
dc.w 00*320+20,00*320+21,00*320+22,00*320+23,00*320+24,00*320+25,00*320+26,00*320+27,00*320+28,00*320+29,00*320+30,00*320+31,00*320+32,00*320+33,00*320+34,00*320+35,00*320+36,00*320+37,00*320+38,00*320+39 ;$400 -> $427
dc.w 08*320+00,08*320+01,08*320+02,08*320+03,08*320+04,08*320+05,08*320+06,08*320+07,08*320+08,08*320+09,08*320+10,08*320+11,08*320+12,08*320+13,08*320+14,08*320+15,08*320+16,08*320+17,08*320+18,08*320+19
dc.w 08*320+20,08*320+21,08*320+22,08*320+23,08*320+24,08*320+25,08*320+26,08*320+27,08*320+28,08*320+29,08*320+30,08*320+31,08*320+32,08*320+33,08*320+34,08*320+35,08*320+36,08*320+37,08*320+38,08*320+39 ;$428...
dc.w 16*320+00,16*320+01,16*320+02,16*320+03,16*320+04,16*320+05,16*320+06,16*320+07,16*320+08,16*320+09,16*320+10,16*320+11,16*320+12,16*320+13,16*320+14,16*320+15,16*320+16,16*320+17,16*320+18,16*320+19
dc.w 16*320+20,16*320+21,16*320+22,16*320+23,16*320+24,16*320+25,16*320+26,16*320+27,16*320+28,16*320+29,16*320+30,16*320+31,16*320+32,16*320+33,16*320+34,16*320+35,16*320+36,16*320+37,16*320+38,16*320+39 ;$450...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$478 -> $47f
dc.w 01*320+00,01*320+01,01*320+02,01*320+03,01*320+04,01*320+05,01*320+06,01*320+07,01*320+08,01*320+09,01*320+10,01*320+11,01*320+12,01*320+13,01*320+14,01*320+15,01*320+16,01*320+17,01*320+18,01*320+19
dc.w 01*320+20,01*320+21,01*320+22,01*320+23,01*320+24,01*320+25,01*320+26,01*320+27,01*320+28,01*320+29,01*320+30,01*320+31,01*320+32,01*320+33,01*320+34,01*320+35,01*320+36,01*320+37,01*320+38,01*320+39 ;$480...
dc.w 09*320+00,09*320+01,09*320+02,09*320+03,09*320+04,09*320+05,09*320+06,09*320+07,09*320+08,09*320+09,09*320+10,09*320+11,09*320+12,09*320+13,09*320+14,09*320+15,09*320+16,09*320+17,09*320+18,09*320+19
dc.w 09*320+20,09*320+21,09*320+22,09*320+23,09*320+24,09*320+25,09*320+26,09*320+27,09*320+28,09*320+29,09*320+30,09*320+31,09*320+32,09*320+33,09*320+34,09*320+35,09*320+36,09*320+37,09*320+38,09*320+39 ;$4a8...
dc.w 17*320+00,17*320+01,17*320+02,17*320+03,17*320+04,17*320+05,17*320+06,17*320+07,17*320+08,17*320+09,17*320+10,17*320+11,17*320+12,17*320+13,17*320+14,17*320+15,17*320+16,17*320+17,17*320+18,17*320+19
dc.w 17*320+20,17*320+21,17*320+22,17*320+23,17*320+24,17*320+25,17*320+26,17*320+27,17*320+28,17*320+29,17*320+30,17*320+31,17*320+32,17*320+33,17*320+34,17*320+35,17*320+36,17*320+37,17*320+38,17*320+39 ;$4d0...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$4f8 -> $4ff
dc.w 02*320+00,02*320+01,02*320+02,02*320+03,02*320+04,02*320+05,02*320+06,02*320+07,02*320+08,02*320+09,02*320+10,02*320+11,02*320+12,02*320+13,02*320+14,02*320+15,02*320+16,02*320+17,02*320+18,02*320+19
dc.w 02*320+20,02*320+21,02*320+22,02*320+23,02*320+24,02*320+25,02*320+26,02*320+27,02*320+28,02*320+29,02*320+30,02*320+31,02*320+32,02*320+33,02*320+34,02*320+35,02*320+36,02*320+37,02*320+38,02*320+39 ;$500...
dc.w 10*320+00,10*320+01,10*320+02,10*320+03,10*320+04,10*320+05,10*320+06,10*320+07,10*320+08,10*320+09,10*320+10,10*320+11,10*320+12,10*320+13,10*320+14,10*320+15,10*320+16,10*320+17,10*320+18,10*320+19
dc.w 10*320+20,10*320+21,10*320+22,10*320+23,10*320+24,10*320+25,10*320+26,10*320+27,10*320+28,10*320+29,10*320+30,10*320+31,10*320+32,10*320+33,10*320+34,10*320+35,10*320+36,10*320+37,10*320+38,10*320+39 ;$528...
dc.w 18*320+00,18*320+01,18*320+02,18*320+03,18*320+04,18*320+05,18*320+06,18*320+07,18*320+08,18*320+09,18*320+10,18*320+11,18*320+12,18*320+13,18*320+14,18*320+15,18*320+16,18*320+17,18*320+18,18*320+19
dc.w 18*320+20,18*320+21,18*320+22,18*320+23,18*320+24,18*320+25,18*320+26,18*320+27,18*320+28,18*320+29,18*320+30,18*320+31,18*320+32,18*320+33,18*320+34,18*320+35,18*320+36,18*320+37,18*320+38,18*320+39 ;$550...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$578 -> $57f
dc.w 03*320+00,03*320+01,03*320+02,03*320+03,03*320+04,03*320+05,03*320+06,03*320+07,03*320+08,03*320+09,03*320+10,03*320+11,03*320+12,03*320+13,03*320+14,03*320+15,03*320+16,03*320+17,03*320+18,03*320+19
dc.w 03*320+20,03*320+21,03*320+22,03*320+23,03*320+24,03*320+25,03*320+26,03*320+27,03*320+28,03*320+29,03*320+30,03*320+31,03*320+32,03*320+33,03*320+34,03*320+35,03*320+36,03*320+37,03*320+38,03*320+39 ;$580...
dc.w 11*320+00,11*320+01,11*320+02,11*320+03,11*320+04,11*320+05,11*320+06,11*320+07,11*320+08,11*320+09,11*320+10,11*320+11,11*320+12,11*320+13,11*320+14,11*320+15,11*320+16,11*320+17,11*320+18,11*320+19
dc.w 11*320+20,11*320+21,11*320+22,11*320+23,11*320+24,11*320+25,11*320+26,11*320+27,11*320+28,11*320+29,11*320+30,11*320+31,11*320+32,11*320+33,11*320+34,11*320+35,11*320+36,11*320+37,11*320+38,11*320+39 ;$5a8...
dc.w 19*320+00,19*320+01,19*320+02,19*320+03,19*320+04,19*320+05,19*320+06,19*320+07,19*320+08,19*320+09,19*320+10,19*320+11,19*320+12,19*320+13,19*320+14,19*320+15,19*320+16,19*320+17,19*320+18,19*320+19
dc.w 19*320+20,19*320+21,19*320+22,19*320+23,19*320+24,19*320+25,19*320+26,19*320+27,19*320+28,19*320+29,19*320+30,19*320+31,19*320+32,19*320+33,19*320+34,19*320+35,19*320+36,19*320+37,19*320+38,19*320+39 ;$5d0...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$5f8 -> $5ff
dc.w 04*320+00,04*320+01,04*320+02,04*320+03,04*320+04,04*320+05,04*320+06,04*320+07,04*320+08,04*320+09,04*320+10,04*320+11,04*320+12,04*320+13,04*320+14,04*320+15,04*320+16,04*320+17,04*320+18,04*320+19
dc.w 04*320+20,04*320+21,04*320+22,04*320+23,04*320+24,04*320+25,04*320+26,04*320+27,04*320+28,04*320+29,04*320+30,04*320+31,04*320+32,04*320+33,04*320+34,04*320+35,04*320+36,04*320+37,04*320+38,04*320+39 ;$600...
dc.w 12*320+00,12*320+01,12*320+02,12*320+03,12*320+04,12*320+05,12*320+06,12*320+07,12*320+08,12*320+09,12*320+10,12*320+11,12*320+12,12*320+13,12*320+14,12*320+15,12*320+16,12*320+17,12*320+18,12*320+19
dc.w 12*320+20,12*320+21,12*320+22,12*320+23,12*320+24,12*320+25,12*320+26,12*320+27,12*320+28,12*320+29,12*320+30,12*320+31,12*320+32,12*320+33,12*320+34,12*320+35,12*320+36,12*320+37,12*320+38,12*320+39 ;$628...
dc.w 20*320+00,20*320+01,20*320+02,20*320+03,20*320+04,20*320+05,20*320+06,20*320+07,20*320+08,20*320+09,20*320+10,20*320+11,20*320+12,20*320+13,20*320+14,20*320+15,20*320+16,20*320+17,20*320+18,20*320+19
dc.w 20*320+20,20*320+21,20*320+22,20*320+23,20*320+24,20*320+25,20*320+26,20*320+27,20*320+28,20*320+29,20*320+30,20*320+31,20*320+32,20*320+33,20*320+34,20*320+35,20*320+36,20*320+37,20*320+38,20*320+39 ;$650...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$678 -> $67f
dc.w 05*320+00,05*320+01,05*320+02,05*320+03,05*320+04,05*320+05,05*320+06,05*320+07,05*320+08,05*320+09,05*320+10,05*320+11,05*320+12,05*320+13,05*320+14,05*320+15,05*320+16,05*320+17,05*320+18,05*320+19
dc.w 05*320+20,05*320+21,05*320+22,05*320+23,05*320+24,05*320+25,05*320+26,05*320+27,05*320+28,05*320+29,05*320+30,05*320+31,05*320+32,05*320+33,05*320+34,05*320+35,05*320+36,05*320+37,05*320+38,05*320+39 ;$680...
dc.w 13*320+00,13*320+01,13*320+02,13*320+03,13*320+04,13*320+05,13*320+06,13*320+07,13*320+08,13*320+09,13*320+10,13*320+11,13*320+12,13*320+13,13*320+14,13*320+15,13*320+16,13*320+17,13*320+18,13*320+19
dc.w 13*320+20,13*320+21,13*320+22,13*320+23,13*320+24,13*320+25,13*320+26,13*320+27,13*320+28,13*320+29,13*320+30,13*320+31,13*320+32,13*320+33,13*320+34,13*320+35,13*320+36,13*320+37,13*320+38,13*320+39 ;$6a8...
dc.w 21*320+00,21*320+01,21*320+02,21*320+03,21*320+04,21*320+05,21*320+06,21*320+07,21*320+08,21*320+09,21*320+10,21*320+11,21*320+12,21*320+13,21*320+14,21*320+15,21*320+16,21*320+17,21*320+18,21*320+19
dc.w 21*320+20,21*320+21,21*320+22,21*320+23,21*320+24,21*320+25,21*320+26,21*320+27,21*320+28,21*320+29,21*320+30,21*320+31,21*320+32,21*320+33,21*320+34,21*320+35,21*320+36,21*320+37,21*320+38,21*320+39 ;$6d0...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$6f8 -> $6ff
dc.w 06*320+00,06*320+01,06*320+02,06*320+03,06*320+04,06*320+05,06*320+06,06*320+07,06*320+08,06*320+09,06*320+10,06*320+11,06*320+12,06*320+13,06*320+14,06*320+15,06*320+16,06*320+17,06*320+18,06*320+19
dc.w 06*320+20,06*320+21,06*320+22,06*320+23,06*320+24,06*320+25,06*320+26,06*320+27,06*320+28,06*320+29,06*320+30,06*320+31,06*320+32,06*320+33,06*320+34,06*320+35,06*320+36,06*320+37,06*320+38,06*320+39 ;$700...
dc.w 14*320+00,14*320+01,14*320+02,14*320+03,14*320+04,14*320+05,14*320+06,14*320+07,14*320+08,14*320+09,14*320+10,14*320+11,14*320+12,14*320+13,14*320+14,14*320+15,14*320+16,14*320+17,14*320+18,14*320+19
dc.w 14*320+20,14*320+21,14*320+22,14*320+23,14*320+24,14*320+25,14*320+26,14*320+27,14*320+28,14*320+29,14*320+30,14*320+31,14*320+32,14*320+33,14*320+34,14*320+35,14*320+36,14*320+37,14*320+38,14*320+39 ;$728...
dc.w 22*320+00,22*320+01,22*320+02,22*320+03,22*320+04,22*320+05,22*320+06,22*320+07,22*320+08,22*320+09,22*320+10,22*320+11,22*320+12,22*320+13,22*320+14,22*320+15,22*320+16,22*320+17,22*320+18,22*320+19
dc.w 22*320+20,22*320+21,22*320+22,22*320+23,22*320+24,22*320+25,22*320+26,22*320+27,22*320+28,22*320+29,22*320+30,22*320+31,22*320+32,22*320+33,22*320+34,22*320+35,22*320+36,22*320+37,22*320+38,22*320+39 ;$750...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$778 -> $77f
dc.w 07*320+00,07*320+01,07*320+02,07*320+03,07*320+04,07*320+05,07*320+06,07*320+07,07*320+08,07*320+09,07*320+10,07*320+11,07*320+12,07*320+13,07*320+14,07*320+15,07*320+16,07*320+17,07*320+18,07*320+19
dc.w 07*320+20,07*320+21,07*320+22,07*320+23,07*320+24,07*320+25,07*320+26,07*320+27,07*320+28,07*320+29,07*320+30,07*320+31,07*320+32,07*320+33,07*320+34,07*320+35,07*320+36,07*320+37,07*320+38,07*320+39 ;$780...
dc.w 15*320+00,15*320+01,15*320+02,15*320+03,15*320+04,15*320+05,15*320+06,15*320+07,15*320+08,15*320+09,15*320+10,15*320+11,15*320+12,15*320+13,15*320+14,15*320+15,15*320+16,15*320+17,15*320+18,15*320+19
dc.w 15*320+20,15*320+21,15*320+22,15*320+23,15*320+24,15*320+25,15*320+26,15*320+27,15*320+28,15*320+29,15*320+30,15*320+31,15*320+32,15*320+33,15*320+34,15*320+35,15*320+36,15*320+37,15*320+38,15*320+39 ;$7a8...
dc.w 23*320+00,23*320+01,23*320+02,23*320+03,23*320+04,23*320+05,23*320+06,23*320+07,23*320+08,23*320+09,23*320+10,23*320+11,23*320+12,23*320+13,23*320+14,23*320+15,23*320+16,23*320+17,23*320+18,23*320+19
dc.w 23*320+20,23*320+21,23*320+22,23*320+23,23*320+24,23*320+25,23*320+26,23*320+27,23*320+28,23*320+29,23*320+30,23*320+31,23*320+32,23*320+33,23*320+34,23*320+35,23*320+36,23*320+37,23*320+38,23*320+39 ;$7d0...
dc.w -1,-1,-1,-1,-1,-1,-1,-1 ;$7f8 -> $7ff

10
src/Version.s Normal file
View File

@ -0,0 +1,10 @@
** Useless Header which simply contains Version string (does not get compressed **
nop
moveq.l #0,d0
nop
rts
dc.b "$VER: Apple2000_v1.3 (68020+, non-MMU version)",0
even
rts