
Documentation for PEd, the Bitmap Editor for TI-92, the Calculator.


PEd or PicEd or what ever..(Mainly it is named as PEd because it is short
enough for folder name)

I got an idea for writing  PEd from the fact that TI:s built-in graphics editing
capabilities are somewhat limited. I hope PEd improves also the quality of
other people's programs to come. 

 - Censorship strikes back -

I have tried to make PEd as small as possible,(Yet it takes about 25kB(max)
memory when running) so I have cut some corners in certain areas. Most of them
are mentioned in this document but some of them you'll definitely find out
by yourself.. ;)

PEd is executed by simply entering PEd:s home folder 'ped', typing ped() and
pressing enter.
(PEd's folder doesn't have to be named exactly 'PED' Just keep all files in one
place, otherwise PEd is "folder independent")

PEd saves current graphs and window variables to a certain GDB-file since it 
uses "real" coordinates. Original settings are restored when you quit PEd.
All normal settings are stored also.

Graph screen should appear? (If not so, RTFM or email me. I test PEd every time 
I release it but there is always
a slight possibility for errors)


Menus (In original order):

	*Line (F1)

		First asks a starting point and whenever you move 
		pointer&press enter, new line will be drawn.
		If you press Enter twice, you will go back to the main menu.

	*Drawmode (F2)

		You have three options by pressing F2: Black, white and inverse.
		 Drawmode takes place on all actions. Try it out, works quite
		logically.

	*Paste (F3)

		Asks if brush is pasted or replaced to current pic-page.
		Pasting is repeated until you press enter twice on same 
		position.
	*Cut (F4)

		Again, asks if brush is cutted or copied from current 
		pic-page. No repeat ;)

	*ZooM (F5)

		This option is for bit-twiddling. Now zoom-routine a bit 
		improved. It scans zoom-area continuously, so you do not have 
		to wait until zoomcorner is updated before you can move or
		change pixels state. Activated by pressing F2. You must now 
		specify a point which you'd like to zoom by moving pointer
		with (2nd)arrow keys and selecting it by pressing enter. 
		Zoom window appears. Now you can edit & view the area with 
		following keys:

		  (2nd)arrow keys for moving around
		  F1 for turning current pixel on/off
		  Hand&arrow keys for "Free hand" drawing.(Works with pxlchg)
		  Esc or enter to quit back to main toolbar

		There is no visible pointer(I haven't needed it ;) so you'll
		have to manage it without it. Easy way to find out current 
		coordinates is to press F1 twice 

	*Tools (F6)

		Box
			You can choose from Box or Bar. Drawmode works here. 
			First enter top-left corner, then lower-right.
		Circle
			Options are: Sigle circle or multiple circles.
			Single draws (logically?) just one circle, multi
			draws circles as long as you give new coordinates.
			Double-enter exits.
		Floodfill
			Fills a _closed_ area. Kinda slow.. ;) Works both ways:
			 If you start filling from white place, it floods with
			 black and vice versa.
			Floodfill operation is quite limited. It works like:
			  1. Fill to the right until border is found
			  2. Same for the left side
			  3. One line down if possible
			  4. Jump to step one
			When bottom is reached it tries to fill up from point
			selected. So, not too complicated areas can be filled
			by running fill once (or with no special planning).

		HuimaFill
			Created by Esa Mankki, soon to be Ti-92 convert. ;)
			This filler starts to scan to the right from
			selected point and then starts to follow object
			surface. Has no control for screen limits, (for
			more speed) so use only with some kind of closed area

		Duplicate area to..
			Copies a rectangular area to tempscreen specified.
			useful for short greyscale animations.

		Text
			Quite easy to figure out. Enter text, choose if text
			is to be inverted and choose a place. 
			Do experimenting.

		LineTool
			Only one option available yet. Radial line lets 
			you draw multiple lines starting from one point.
			As usual, double-enter exits.

	*Temp-screen (F7)

		You can switch to next temp-screen by pressing F7. A bit better
		than previous version where you had to select Tempscreen from
		a list. Now current temp-screen number is memorized and screen
		is stored when quitting PEd

	*File (F8)

		Recall Brush
			Choose a brush from list. Simple as hell. Entries 
			marked as "-empty-" are really empty.

		Store Brush
			Type a brief description to upper box, name (maybe with
			folder) to lower. Name should be as unique as possible
			to prevent accidental overwriting of pics.
			From last selector you may choose if you are storing 
			brush as a new picture or overwriting a existing one. 
			I suggest you should write over "-empty-" entries.

		Undo
			Works now (or should now work) with every function in 
			PEd. Try it.
		Recall pic
			Simply recalls a pic with the name you specify.
			Options are Placement (You may choose if pic is placed
			to upper left corner or freely chosen position)  Clear
			screen (Obvious?)  Method (Rplc Replaces anything under
		 	the picture, Rcl just recalls the pic over the current
			pic, And makes and-operation with current and 
			to-be-recalled picture and Xor does exclusive or
			with current and to-be recalled pic)

		Store pic
			Stores current pic with name you specify. Whole pic or
>			only a part of it can be stored. As in all box or
>			options needing selecting a rectangular area, you must
>			first select upper left corner and then lower right.

		Clear Brush
			Clears brush selected and renames selected entry as
			"-empty-". Amount of entries will not be decreased,
			so if it's possible use overwriting if you want to
			delete a brush.
		Clear Tempscreen
			With this option you may select screen to be deleted.
		Clear Screen
			Clears current screen. Verifies the action.
		Setup
			You may specify which temp-file you want to clear when
			exiting PEd. Just for saving memory. Speed of 2nd-arw
			in zoom specifies the step with 2nd:ed arrow keys in
			zoom-mode. More options will be added (Added a 
			possibility to kill current brush also)
		Quit			
			Better to use this than just breaking the program with
			on-key. Quit frees used temp-variables restores Graph
			and Window-parameters as they were before executing ped.



You may easily customize your PEd by rearranging Titles and items in main
toolbar-part of PEd. Needs a bit programming skills but luckily, just a 
bit ;)
Also stabbing PEd to use less memory (for example by cutting logos etc. off)
is also permitted. But please, do not spread those versions..

Also adding new features is easy. Just add them to toolbar. But. Please do not
distribute your version of PEd. Send your ideas or programs to me and I'll
include them(and your name) to PEd. A fast and not-so-limited floodfill
function is wanted from now on. ;)

If you bother to check PEd's code out, you'll notice that it's somewhat
messy. Since also TI:s program editor sucks, I have shortened the "scrollable
length" of PEd by joining one function (when completed) to one huge continuous
line. Looks like shit but had to do it. It hurts when I have to de-bug or add
something


To Do:

	-That huge amount of local variables must be reduced. (Partially done)
	-universal box-selector (Done, works like shit but prevents errors)
	-a really cool huima-filler (Follows objects surface) (Done but then
	 deleted by TI hang up (!) ) (Available again..)
	-decent brush library (Mainly electric symbols and symbols needed in
	 normal notepad-work) (Done & Included)

Contact the ultimate(!) author:

Address:
	Ilkka Sorsa
	Vuorenrinne 15 f 46
	48350 Kotka
	Finland

	If you're not unabomber, anything you send will be accepted.

E-mail:
	y95silso@kotakk.fi

	Please eemail me. It won't hurt me! Bugreports accepted. I use PEd
	like it should be, but I haven't even tried to make it a bombproof 
	package so please report me if there is bugs in really idiotic places.
	(Bugs or "features" will be fixed if it doesn't take too much space up)

Homepage:
	http://www.kotakk.fi/~y95silso

	Mainly in Finnish, so learn the language, blow your mind, be a  Finn!

Official PEd-page:
	http://www.kotakk.fi/~y95silso/tii/

	All my decent creations will be here. PEd and soon-to-be-released
	connect four-game. (With solo-play capabilities. Deep Blue on TI-92.. 
	:]  Connect-4 routine by Keith Pomakis ) Only brains of the game is
	missing.

	
