-
Notifications
You must be signed in to change notification settings - Fork 128
GME Script line
A script line consists of a list of conditionals, a list of actions, and a so called playlist consisting media file table indices.
A script line has the format aaaa conditionals... bbbb actions... cccc media... where
-
ais the number of conditionals. Each conditional consists of 8 bytes. -
bis the number of actions. Each action is 7 bytes. -
cis a playlist
The conditionals are of the format t1 aaaa cccc t2 bbbb
-
t1&t2(uint8) type ofaandbresp. (0 == register, 1 == value) -
a&b(uint16) value or id of register -
c(uint16) is the comparison operator The rest of the line is only considered when the comparison between the register and the value or other register holds.
Known comparison operators are:
-
FFF9(written$r==m?in tttool's output and the yaml files): Equality -
FFFA(written$r>m?in tttool's output): Greather than -
FFFB(written$r<m?in tttool's output): Less than -
FFFD(written$r>=m?in tttool's output): Greater or equal -
FFFE(written$r<=?in tttool's output): Less or equal -
FFFF(written$r!=m?in tttool's output): Not equal
The actions are of the format rrrr cccc tt mmmm
-
r(uint16) id of register -
c(uint16) is the command -
t(uint8) type ofm(0 == register, 1 == value) -
m(uint16) value or id of register
Known commands are:
-
FFF0(written$r+=m): Increment register$rbymor value of$m -
FFF1(written$r-=m): Decrement register$rbymor value of$m -
FFF2(written$r*=m): Multiply register$rbymor value of$m -
FFF3(written$r%=m): Set register$rto$rmodm -
FFF4(written$r/=m): Set register$rto$rdivm -
FFF5(written$r&=m): Bitwise add to register$rthe value ofm -
FFF6(written$r|=m): Bitwise or to register$rthe value ofm -
FFF7(written$r^=m): Bitwise xor to register$rthe value ofm -
FFF8(writtenNeg($r)): Negate register$r. -
FFF9(written$r:=m): Set register$rtomor value of$m -
FFE0(writtenP(): play one random sample of the media list -
FFE1(writtenP(): play all samples of the media list -
FFE8(writtenP(m)): Play audio referenced by themth entry in the indices list. -
FB00(writtenP(b-a)): Play all samples from that inclusive range.a:= lowbyte(m),b:= highbyte(m) -
FC00(writtenP(b-a)): Play one random sample from that inclusive range.a:= lowbyte(m),b:= highbyte(m) -
FD00(writtenG(m)): Begin gamem. -
F8FF(writtenJ(m)): Jump to scriptm. -
FAFF(writtenC): Cancel game mode.
Currently unknown commands are FE00 and FF00 (in theory there can be more but these have been seen in the wild, at least).
The commands P, G , J and C seem to ignore their registers, C also its parameter (which always is FFFF).
The Tiptoi pen
Revisions
Hardware details
Firmware
OID and codes
Patents
File formats
Games/Books (.gme)
RAV files (Audio Books)
REC file (Recordings)
Tips and Tricks
Switching languages
Tiptoi Books in different Languages
Printing
Other resources
Links and resources
Other pens