Download source code




*****************************************************************
*								*
*			C64 EMULATOR				*
*			  					*
*		 	   V 1.0				*
*								*
*		  WRITTEN BY SEBASTIAN MACKE 			*
*								*
*			    FOR 				*
*								*
*			   TI92+				*				
*								*
*****************************************************************



Introduction
------------

"C64 Emulator" is a C64 emulator for the TI92+. This program allows you, to use 
your calculator as a c64 and demonstrates the capability of the TI92+.
This is (as I know) the first C64 Emulator for the TI92+ and may be the 
smallest C64 Emulator ever. 
Unfortunately it is only a very rudimentary emulation. You cannot play any
popular games on it.


Requirements
------------

This game does not require any shells and does not require any libraries as well.
It is compatible with AMS version 2.05 (well, I haven' t tried it on any other 
AMS version yet). 

Source Code is included. You need TIGCC to compile it.


How to start the Emulator on the TI
-----------------------------------

Simply copy the following files to the TI and start c64emu().

c64emu.9xz	the binary
c64chars.9xy	chars rom.
c64mem.9xy	first 65516 bytes of the ram.
c64rom.9xy	basic and kernal rom, last 20 bytes of ram, cpu registers


Technical problems
------------------

You will probably recognize, that the program runs very slow. It is more 
than 20 times slower than the original. But I haven't used any assembler to
make it run faster. 

Unfortunately it emulates only a small part of the C64. Just enough to use
Kernal and Basic. It emulates the CPU, memory, keyboard and the textmode.

To count what has not been emulated by me, it would take more than a whole 
sheet of paper. In order to emulate these masses, I would need more processor
power to run it in a tolerable speed.

The screen of a C64 can display 40*25 chars. So on the TI every char can have a
width of 6 pixels. That' s enough.
But the height can only be 5 pixels. You see the problem, if you write a E:
***
*
***
*
***
There is no place for an empty line at the bottom to seperate two chars.
If you write Es below the other it looks like this:
***
*
***
*
***
***
*
***
*
***

The C64 uses 64kb of linear memory. On TI, I only managed to get an address room of 
65516 bytes. That' s 20 bytes missing. So I use the bytes behind my allocated 
ram in the hope that there is no important data.

The keyboard input is very slow. The original C64 tests the keyboard every 1/60 
second. My emulater tests it less often. You must push the buttons until the 
char appears.


How to use the program
----------------------

After starting you see the starting screen of the C64. You may use the keyboard,
to input chars.
I use some keys, that have a different effect:
SIN	: :
COS	: ;
TAN	: HOME
^	: £
LN	: <-


With APPS you return to TIOS. 
With MODE you reset the C64.

It emulates enough to write Basic programs.
Try:

10 FOR i=1 TO 10		
20 PRINT"HELLO WORLD"		
30 NEXT I			
RUN				

Now, you must see this on the screen:
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD

Contact
-------

If you have any comment, suggestions, questions or bug reports, mail me at:
sebastian@macke.de