                      EMU83 : TI-83 Emulator Version 0.2
                     ------------------------------------
                             By Florent Dhordain

Summary:
 . What's it is
 . History/Change list
 . Features
 . Startup instructions
 . Keyboard layout                  [SOME CHANGES]
 . Linking port information
 . Loading a file without the calc  [NEW - READ THIS]
 . Config File
 . Commandstate                     [SOME CHANGES]
 . Debugger                         [SOME CHANGES - NOW REALLY USEFULL]
 . Backup file format
 . Credits
 . TODO list
 . Feedback


+--------------+
! What's it is !
+--------------+
  The name says all : it's a TI83 emulator, running under DOS or
Windows ( even if it's greater under DOS )


+---------------------+
! History/Change list !
+---------------------+
 Thursday Januar 1st 98 14h30 :
  For the first time, IT WORKS. But still a lot to improve

 Tuesday March 24th, 1998 : First release version 0.1

 Sunday April 25th, 1998 : Release version 0.2
  - Better debugger, stops on each instruction
  - Load about any .83?/.82? file, even groups
  - Serial Link
  - Some changes in the commandstate, key [F8]

+----------+
! Features !
+----------+
 o Fast TI83 emulation ( core in assembly )
 o Can be slowered, in order to play games
 o Real-time interrupts ( don't depend from core speed )
 o Perfect LCD emulation, with Hardware scrolling ( Penguins ) and :
	. COOL greyscale support ( hey, this really works.. a bit flicky however )
	or
	. Contrast emulation

 o Config file support, to load options you often use
 o CommandState support ( change options while the emulator is running )
 o Good Debugger
 o Cool menues
 o Ability to load about every TI83/TI82 files, even groups (except Y-vars and stuff like
	Window, TableSet : who cares ? If you do, then please mail me)
 o Background picture
 o Parallel or serial link


+----------------------+
! Startup instructions !
+----------------------+
 o Get a ROM dump of your TI83, and name it TI83ROM.BIN
	Howto ? :
	- Get RomDump v2.0 on Ti-Philes ( htp://tiphiles.home.ml.org ), in
	archives/documents and utils ;

	- if you use the Parallel link, get dumpxp at the same place ;

	THERE'S NO DUMP RECEIVER FOR THE $4 SERIAL LINK

	- upload rom83.83p program to your calc ;

	- connect your calc, and run the receive prog on the PC
	  ( dumpxp for the parallel $5, romdump for the GraphLink )

	- Wait ( 5 to 10 minutes, depending on your computer speed )

	- When it sais "Done!" - you now have a ROM dump off your calc
	  named ti83.rom

	- rename it TI83ROM.BIN

 o Edit the ti83.cfg and add what you want

 o Now, run EMU83.EXE, and enjoy !

 - The GIF background should be 320*200, and use only the 128 first colors
 - This runs under Windows, but works best under DOS


+-----------------+
! Keyboard layout !
+-----------------+
Note :
  IF YOU WANT AZERTY KEYBOARD : add -azerty in the emu83.cfg config file

Note:
  Many TI-83 keys have alphabetic and symbolic equivalents. I have not listed
  those here.


F8          CommandState
F9          Debugger
F10			Menu
F11         Quit with saving the image
F12         Quit without saving

TI-83 key               PC key
---------               ------
* ON                      \ (on french kbd : !)
* 2nd                     Left Shift
* ALPHA                   Left Ctrl

* MODE                    Tab or Escape
* DEL                     Pad Insert or Pad Delete
* x-VAR                   ' (%)

* STAT			           \ on the right of x-VAR (*)
* VARS                    \ on the left of Z  (<>)

* Y=                      F1
* WINDOW                  F2
* ZOOM                    F3
* TRACE                   F4
* GRAPH                   F5

* CLEAR                   Backspace
* Cursor keys             Cursor keys (not pad4,6,8,2!)

* A - Z                   A - Z
* 0 - 9                   0 - 9 or Pad 0 - 9
* +                       Pad +
* -                       Pad -
* *                       Pad *
* /                       Pad /
* ^                       ` (^2)
* (-)                     - () or Space
* STO>                    =
* (                       [ (^)
* )                       ] ($)
* ,                       , (.;)
* .                       . or ; (m ou :/) or Num.


ASCII listing for AZERTY keyboards:

+-Key and 2nd--------+
! TI Key face        !
! PC equivalence     !
+--------------------+

+------+ +------+ +------+ +------+ +------+
!  Y=  ! !WINDOW! ! ZOOM ! !TRACE ! !GRAPH !
!  F1  ! !  F2  ! !  F3  ! !  F4  ! !  F5  !
+------+ +------+ +------+ +------+ +------+

+------+ +------+ +------+
!  2nd ! ! MODE ! ! DEL  !
!Shift ! !TabEsc! !InsDel!
+------+ +------+ +------+

+------+ +------+ +------+
!Alpha ! !X,T,n ! ! Stat !
! Ctrl ! !  %  ! !  *  !
+------+ +------+ +------+

+Test--+ +Angle-+ +Draw--+ +Distr-+ +------+
! MATH ! !MATRX ! ! PRGM ! ! VARS ! !CLEAR !
!  A   ! !  B   ! !  C   ! !  <>  ! !Backsl!
+------+ +------+ +------+ +------+ +------+

Finance+ +Sin-1-+ +Cos-1-+ +Tan-1-+ +Pi----+
! X-1  ! ! SIN  ! ! COS  ! ! Tan  ! !   ^  !
!  D   ! !  E   ! !  F   ! !  G   ! !  H  !
+------+ +------+ +------+ +------+ +------+

+Racine+ +EE----+ +{-----+ +}-----+ +e-----+
! X^2  ! !   ,  ! !  (   ! !   )  ! !   /  !
!  I   ! !  , J ! ! ^ K ! ! $ L ! ! / M  !
+------+ +------+ +------+ +------+ +------+

+10^x--+ +u-----+ +v-----+ +w-----+ +[-----+
! LOG  ! !  7   ! !  8   ! !  9   ! !   *  !
!  N   ! ! 7 O  ! ! 8 P  ! ! 9 Q  ! ! * R  !
+------+ +------+ +------+ +------+ +------+

+e^x---+ +L4----+ +L5----+ +L6----+ +]-----+
!  LN  ! !  4   ! !  5   ! !  6   ! !   -  !
!  S   ! ! 4 T  ! ! 5 U  ! ! 6 V  ! ! - W  !
+------+ +------+ +------+ +------+ +------+

+RCL---+ +L1----+ +L2----+ +L3----+ +Mem---+
!STO-> ! !  1   ! !  2   ! !  3   ! !  + " !
! += X ! ! 1 Y  ! ! 2 Z  ! ! 3 Th ! !  +   !
+------+ +------+ +------+ +------+ +------+

+Off---+ Catalog+ +i-----+ +Ans---+ +Entry-+
! [ON] ! ! 0 esp! !  . : ! ! (-) ?! !ENTER !
!  !  ! !  0   ! ! .    ! !Espace! !Entree!
+------+ +------+ +------+ +------+ +------+


+--------------------------+
! Linking port information !
+--------------------------+
  Link port works with Serial or parallel link, but not the graphlink. You can
receive/send files to the calculator, and play linked games.

The sound emulation is cool. Under DOS, it is listenable, even if there is
a 60 Hz pulse over it. Under Windows, it is a bit more noisy.



+---------------------------------+
! Loading a file without the calc !
+---------------------------------+
  Now a common load interface have been added. Quite easy to use: go into
commandstate [F8] and type 'load filename'. It will detects the file type, and
do what it should.
You can load RAM images, or other TI83 files.

IN ORDER TO LOAD A .83? FILE, YOU MUST PUT THE CALCULATOR IN RECEIVE MODE. If
you don't do that, you'll see a message saying that you aren't in receive mode.

IMPORTANT :
After receiving a file via this method, you won't see any change in the TI-83
display. The Receiving won't seem to have changed. Now, press [On], get out of
the error message, and (if you want) check in the delete menu that YES, IT WORKS

YOU MUST DELETE VARIABLES you want to be overwritten. By default, if a variable
with the same name is found, this variable will be omitted.

This method has been tested with :
  .83b (backup), .83c (complex), .83d (GDB), .83l (list), .83m	(matrix),
  .83n (real),   .83p (Program), .83g (groups)
This also works with 82 files, excepts backups


+-------------+
! Config file !
+-------------+
  The TI-83 emulator can load a config file, in wich you had add all the stuff
you want by default. It is named EMU83.CFG, and should be in the working dir.
Syntax is:

-grey [0|x]          x Tells LCD to emulates greyscals in x shades, or 0 to
                     emulate only in 2 colors + contrast. Default is 0. 4 or 6
                     works cool.

-link P|S|K [xxx]    Use Parallel link / Serial link / speaKer. Default is
                     parallel. xxx indicates address of the port , in hexa. If
                     ommited, it will use LPT1 or COM1.

-speed dd            Set speed adjust to dd (in decimal). The higher it is, the
                     slower the emulation will be. Default is 0 ( full speed )

-img IMAGEFILE       Use IMAGEFILE instead of TI83.IMG

-azerty              Use an AZERTY keyboard ( default is QWERTY )

-background BG.GIF   COOL : this puts a GIF file on the screen

Note : the gif file must be 320*200, and use only the first 128 colors


+--------------+
! Commandstate !
+--------------+
  In commandstate, you can change some stuff without restarting the emulator :

Type 'help' to commands list

cd [dir]             PrintWorkDir/ Change WD to dir
colors [d]           Use greyscal or contrast emulation. Without argument, it
                     displays the current colors used.
grey [d]             Same as above

link [P|S|K] [port]  Same as in the config file
speed [d]            Same as in the config file
load File            Load file (img, 83?)
quit                 Return to the emulator


+----------+
! Debugger !
+----------+
  Just press ? for help.

D [Start [End]] - Dump
  -> print memory contents

E Addr [Data]   - Enter
  -> set (Addr) to data. Each bytes must be spaced.
  ex : E 8039 0 EA DC

G [End]         - Go
  -> return to the emulator, or run until PC = End

R [Reg]         - view/change Registers

T or Enter      - Trace
  -> Execute one opcode

U [Start [End]] - Unassemble

V               - View LCD state : screen, plotscreen, registers

?               - Help

Q               - Quit the emulator
  -> Return to DOS


Notes :
 . 'Q' even stop the emulator, not only the debugger
 Use 'G' instead, if you want to return to the emulator
 . Ctrl+C also quits, but it's a dirty exit


+-----------------------------+
! Backup files (state images) !
+-----------------------------+

When you use F11 to quit the emulator, its state will be saved as TI83.IMG.
When you start it again, this file will be loaded.
You can override the default name of TI83.IMG adding a -img ... line in the
config file parameter.

The current file format is as follows:

Offset          Length        Description
------          ------        -----------
0x0000          0x8000        Image of RAM

Regs:
0x8000          0x0002        AF register
0x8002          0x0002        BC register
0x8004          0x0002        DE register
0x8006          0x0002        HL register
0x8008          0x0002        PC register

0x800A          0x0002        AF' register
0x800C          0x0002        BC' register
0x800E          0x0002        DE' register
0x8010          0x0002        HL' register

0x8012          0x0002        RFlo
0x8014          0x0002        RFhi
0x8016          0x0002        I (interrupt reg)
0x8018          0x0002        Imode

0x801A          0x0002        IX register
0x801C          0x0002        IY register
0x801E          0x0002        sIFF1, SIFF2
0x8020          0x0002        SP


Misc:
0x8022          0x0001        Current ROM page
0x8023          0x0001        Keypad Mask
0x8024          0x0001        Interrupt Mask
0x8025          0x0001        Interrupt Status
0x8026          0x0001        Power Register
0x8027          0x0001        Link Register
0x8028          0x0001        Display Contrast

LCD83 part:
0x8029          0x0300        LCD Screen buffer
0x8329          0x0001        LCD curX
0x832A          0x0001        LCD curY
0x832B          0x0001        LCD depl mode
0x832C          0x0001        LCD HardScroll offset
0x832D          0x0001        LCD IsOff
0x832E          0x0001        LCD Last function
0x832F          0x0001        LCD word Align value


The file size should be 0x8330, in decimal : 33584



+---------+
! Credits !
+---------+

Z80 core based on Amstrad Emulator by
  Bernd Schmidt    (crux@pool.informatik.rwth-aachen.de)

A few parts based on TI-85 emulator v2.0 by (sorted by last name):
 David Ellsworth   (davidells@aol.com)
 Ilya Haykinson    (haykinso@ucla.edu)
 Dines Justesen    (c958362@student.dtu.dk)
 Robert Taylor     (?@?.?) PLEASE MAIL ME IF YOU'VE GOT HIS NEW EMAIL ADDRESS

TI-83 emulation by :
 Florent Dhordain  (jldhordain@nordnet.fr)


+-----------+
! TODO List !
+-----------+
 o Command line support
 o fix the GPF bug in the core when addressing a word @$FFFF
 o Save function ?
 o Game wizard
 o Directory listing in commadstate


+----------+
! Feedback !
+----------+
Any suggestion, advise, bug report, cool background image, cool backup,
complain, help request, ...

Don't hesitate ! Send them to jldhordain@nordnet.fr

