family basic token help

Started by ramidavis, May 01, 2012, 05:24:45 pm

Previous topic - Next topic


I found this page with a list of tokens (commands) for v2 and v3 of family basic:

What has my interest though, are these(v3):
crash     ???
click      ???
err         ???

UglyJoe, anyone...
Care to take a stab at what these do, how to use them??
There was a mouse for famicom, if i remember correctly, right?

I actually found some guides and a translation of (most) the manual for v2, and have been playing around with the roms (v2 and v3), but really would love to get a good look at the v3 manual.


CLICK [ON|OFF] - turns the "clicking" sound made while you type on and off -- has nothing to do with a mouse.  I'm not sure about the other ones and don't have the time right now to look them up.  If no one else knows them I'll look them up when I get a chance.


May 02, 2012, 05:37:24 pm #2 Last Edit: May 02, 2012, 06:44:48 pm by UglyJoe
I'll post these commands as I figured them out.

CALL [address]  Calls a subroutine at the given address.  Appears to function like a 6502 JSR instruction.  If you had a way of inserting arbritrary 6502 ASM (like using the POKE command), you could use it to call an ASM method.  I've pointed it to subroutines in the Family Basic V3 rom and it seems to run until you hit a RTS instruction.  Looks like, if it hits some bad code, it will do a reset and clear.  I actually have this command in my V2 manual, but it's missing from PlayPower's translated V2 manual.  I guess there's more than one version of the manual ;D

VCT n -- n is the number of a sprite.  The method returns the direction that the sprite is moving in (see DEF SPRITE for direction info).  Returns 0 if the sprite is not moving.  VCT is short for Vector.

ERR - Prints the error code of the last error.  This has to be setup using "ON ERROR GOTO xx" where xx is a line number.  When an error occurs in your program, it will jump to line xx.  At this time, you can use ERR to determine what the error code was (and can use ERL to determine what line the error occured on).

(from V3 manual)

CRASH n -- n is the number of a sprite.  Checks if sprite n is overlapping with another sprite.  Returns the ID (0-7) of the sprite that it overlaps.  Returns -1 if its not overlapping another sprite.  Returns -2 if the sprite doesn't exist.

(from V3 manual)


Manuel posted scans of the V3 manual a while ago, but they were hosted on MegaUpload and, well, you know.  I've reuploaded the scans onto FW's server: