home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
Geneve
/
9640news
/
CAT17
/
CART4TH.ARK
< prev
next >
Wrap
Text File
|
2006-10-19
|
4KB
|
113 lines
?
NOTE: The following info comes from the NETWORK-99 NEWSLETTER. Each issue
contains 4-6 pages loaded with Forth related articles and code. I recommend
it to anyone interrested in the Forth language.
A 12 issue subscription to the newsletter is $10, back issues are available
for $1 each. Send check or money order to:
BRIAND SANDERSON
C/O LTC MICHAEL C. SANDERSON
HEADQUARTERS 2ND/33RD ARMOR
P.O. BOX 4356
APO NY 09045
-----------------------------------------------------------------------------
HOW TO READ A CARTRIDGE!!!!
First, make sure the cartridge you want to read does not contain any
GROM chips. Since many of the TI licensed carts contain GROM and GPL code, it
is best to stick with 3rd party carts such as the Atarisoft carts. These are
written entirely in TMS9900 Assembly Language, and are easily read. Since
there is no automatic reset when one of these carts is inserted, it is very
easy to read from Forth!
Load -DUMP from Forth's menu. When the cursor returns, gently pull
out the E/A cart and insert a readable one. To read this cart all you have to
do is type: HEX 6000 1FFF DUMP and watch the cart's contents print to the
screen. To print to a printer, just load the -PRINT commands before you
switch carts and type SWCH before the DUMP and UNSWCH after. It is also
possible to save to disk using the same proceedure, but changing the file
attributes on SCR# 72. Of course, getting it to run from disk without the
cart is another story! Please let us know if you succeed. You should be able
to disassemble the code and check out the source code with one of the
disassemblers floating around, or wait for the Forth disassembler in a future
issue of the NETWORK-99 NEWSLETTER. Good Luck!
-----------------------------------------------------------------------------
Here is a short routine that allows you to "freeze" a number of rows from the
top of the screen. It assumes you are in Text mode, but can be adapted for
other needs. Just type DEMO for a demonstration.
DECIMAL
: FREEZE ( ROWS --- ) 40 * SCRN_START ! ;
: UNFREEZE 0 SCRN_START ! ; : BORDER 22 0 DO 42 EMIT LOOP ;
:DEMO 0 0 GOTOXY BORDER 0 3 GOTOXY ." THIS SECTION IS FROZEN"
0 6 GOTOXY BORDER 0 23 GOTOXY 8 FREEZE 20 0 DO I SPACES
." THIS SECTION IS NOT!" CR LOOP ;
-----------------------------------------------------------------------------
...FORTH BUGS...
Screen 72, line 5, change "PAB_ADDR" to "PAB-ADDR"
Then change the printer info on lines 3,4, and 5 to match your printer specs.
Screen 58, 11th line down, change 1st exclamation point (!) to a tick (').
Screen 58, swap 11th line down with 10th line down.
Screen 22, 6th line down, words: 3800 ' SATR ! should be moved to Screen 23,
3rd line from top. Add it to the end.
Now you can stop pulling out your hair while trying to get sprites to work
from
Forth.
Forth manual, Appendix D, page 30, 4th defination should be, "ENDOF".
Forth manual, chap 6, page 3, "SCREEN" must follow 2 color values, foreground
and background colors, or screen writing becomes transparent.
Forth manual, chap 10, page 3, definition of DOWN should read:
: DOWN -100 ALLOT DROP ;
and on the next page, the "83C4" should read:
HEX 83C4 ! DECIMAL
------------------------------------------------------------------------------
Here's a screen to test those sprite routines. It's a simple game. You control
the white circle, with the joysticks or arrow keys and try to catch the
blinking circle which the computer moves. Just load the screen and type GAME.
( SPRITE DEMO NETWORK-99 NEWSLETTER VOL1#6 )
BASE->R HEX GRAPHICS 800 SSDT 0 MAGNIFY
3C42 8181 8181 423C 1 SPCHAR 003C 7E7E 7E7E 3C00 2 SPCHAR
50 50 F 1 1 SPRITE 50 50 6 2 2 SPRITE
DECIMAL
: BLINK 1 2 SPRPAT 15 RND 2 SPRCOL 2 2 SPRPAT ;
: ZIGZAG 100 RND 50 - 100 RND 50 - 2 MOTION BLINK ;
: CATCH? 1 2 1 COINC IF BEEP THEN ;
: JOYSTICK 1 JOYST ROT 18 = IF QUIT THEN
SWAP 10 * SWAP -10 * 1 MOTION ;
: GAME 3 #MOTION BEGIN ZIGZAG JOYSTICK CATCH? AGAIN ;
R->BASE
------------------------------------------------------------------------------
Keep on FORTHin'!!!
)3=GUUUUUUUU
Download complete. Turn off Capture File.