home *** CD-ROM | disk | FTP | other *** search
- A2I.EXE - Converting Apple HGR screens to IBM EGA .PCX format
-
- Compiled with: Turbo C++ v1.00
-
- This converter was the result of a project that had me translating some
- existing Apple// graphics into IBM format. Granted, I could have performed
- the translation on my //gs first (into .GIF format), then ported to IBM,
- then translated .GIF to .PCX, I decided to try to unscramble the Apple
- video memory map on the PC. This was done for a couple of reasons:
-
- 1) I use Cross-Works (a 19200 baud null-modem Apple// <-> IBM link
- designed for porting) to move files between my PC and //gs development
- systems. Cross-Works allows me to flag a batch of files and port
- them all at once. Since the Apple// series (even the //gs) is so
- intrinsically slow, it made sense to do the major number crunching
- on the PC side, where I could batch the files easily.
-
- 2) The images I was given to work with were in the form of BSAVEs from
- the Apple HGR screen (basically, the equivalent of an IBM BSAVE in
- BASIC). Since Apple has no built-in method of reading pixel color
- *from* the HiRes screen, and I was too lazy to write one (I prefer
- PC's...really...besides, Borland has no development products for the
- Apple// series, so why bother?), again I wanted to get *off* the
- Apple and into the IBM as fast as possible.
-
- 3) The client wanted the resulting images in a form that could be read
- by Deluxe Paint II Enhanced. Since I already had PCX manipulation
- routines in my library, and dpIIe reads PCX format, my course was
- clear.
-
-
- A2I assumes that the input file is a "raw" Apple BSAVE file that has
- been ported (somehow) to the PC. It loads the file, unscrambling Apple's
- funky video memory mapping scheme, and then translates it onto the EGA
- screen in mode 13 (320x200x16), displaying the conversion as it goes. It
- then saves out the screen in ZSoft's PCX format. Finally, the screen is
- cleared and the just-created PCX file is loaded in as a check.
-
- To use A2I, just type:
-
- a2i <filename> [WAIT]
-
- where:
-
- <filename> - Name of raw Apple file. If no extension is given
- .RAW is assumed.
-
- [WAIT] - Optional parameter to beep and wait before clearing
- the screen and exiting on completion. Leave this
- off if you're running a2i via the RAW2PCX.BAT file
- (for multiple conversions).
-
- The coded is heavily commented, so it should be interesting reading. This
- little adventure serves several purposes:
-
- 1) It gives you a look at the Apple memory map, both from the unscrambling
- side and from the pixel color computation side (which is almost as
- confusing).
-
- 2) You get a look at several EGA manipulation routines. A neat start for
- people who want to mess around with PCX files on the EGA screen.
-
- 3) You get an example of tying an assembly module into a Turbo C++ project
- file.
-
- If you have any comments (please, nothing about the value of this program.
- If it's worthless to you, I'm sorry. I probably won't use it again myself
- . . . but then, you never know), drop me a line.
-
-
- Scott J. Walter
- GEnie: S.Walter4
-