This document represents most of the commands commonly used in Gamebasic and a brief description of what is does.
Translated text by Hurrycane Version 2
Text originally downloaded from a Japanese site. Translated with software and reworded and optimized by Hurrycane.
All corrections and additions are welcome, just inform gamebasic@seganet.com of the new changes.
PAGE NUMBER (Sega GAMEBASIC BOOK) - COMMAND ----- SHORT DEFINITION
E.g.
PAGE NO. COMMAND DEFINITION
24 ABS - where the absolute value is returned
** Note all references marked with ****** are extremely rough translations ***
*** Things left to do ****
* Fixed point type, floating point type function -------
- General instructions
24 ABS - where the absolute value is returned
29 CINT - Rounding the decimal part, to integer where the value which is done to convert is returned
38 FIX - Cutting down the decimal part, to integer where the value which is converted is returned
38 FKEY - where the function key in the keyboard is defined
39 FOTOSTEP- Start of pool processing
75 RND - where random number value is returned
********
77 SGN - it was specified the mark of the ‚¿ which is inhaled is returned
*******
77 SHIFT - state of the shift key of the Sega Saturn keyboard is inspected
- File function
113 DSKF - where empty capacity of the device which is specified is returned
* Fixed point type function -------------
- Generality instruction
24 ACS - where the character code is returned
35 EPL - where line number of the error which is generated immediately before the is returned
35 ERR - where number of the error which is generated immediately before is returned
40 FRAC - where it returns the decimal part of the numerical value
40 FRE - Remaining capacity of variable area and where size of user area and file area is returned
50 INSTR - Retrieves the character string, and where it returns the information of position
53 LEN - returns the length in the character string
***********
64 where state of the propellant-actuated device Sega Saturn itself control terminal is returned
***********
67 PEEK - where the data of 1 byte is read out from user area
69 POS - where cursor position of the text picture is returned
89 VAL - where the character string is converted to numerical value
89 VERSIONBASIC - where version of the of BASIC is returned
93 XATN - returns the opposite tangent (the arc tangent)
93 XCOS - Returns the cosine (the cosine)
94 XDIST - Returns the Calculated distance from starting point
94 XSIN - Returns the sine (sign)
95 XTAN - Returns the tangent (the tangent)
-BG/ text / video type function
157 GETCHR - where the pattern name data is loaded from the character pattern picture
158 PALETTE - Acquisition pallet value
159 POINT - where color in the coordinate which the bit map picture specifies is detected
162 RGB -It calculates palette value and the data of the color which is specified at the time of 32768 color mode, from each color component
163 RGBADD - calculates palette value and the color data which is specified at the time of 32768 color mode, in every color component increase and decrease value
164 RGBTO - It is close in the value which designates palette value and the data of the color which is specified at the time of 32768 color mode, as target Calculating ‚ column value, which it returns
-OBJ instruction / function
20 (link structure: the parent OBJECT:@PARENT) the related attaching of the OBJECT (the PARENT) 198 where it specifies
21 (link structure: the child OBJECT@CHILD) the related attaching of the OBJECT (the CHILD) 204 where it returns
23 (link structure: the younger brother OBJECT:@RIGHT) the related attaching of the OBJECT (the RIGHT) 205 where it returns
56 (the X position:@XD which is projected on the picture) as for the OBJECT when being projected on the picture, 210 where coordinate is read out
57 (the Y position:@YD which is projected on the picture) as for the OBJECT when being projected on the picture, 210 where coordinate is read out
58 (the Z position:@ZD from on the picture) as for the OBJECT when being projected on the picture, 210 where coordinate is read out
59 (the RADIUS/ZD:@RD) as for the OBJECT when being projected on the picture, 210 where coordinate is read out
62 (the contact flag and the distance:@COLIDIST) 212 where result of collision decision of the OBJECT is inspected
63 (the OBJECT number:@COLIOBJ which contacted) 213 where the OBJECT number which collides with collision decision of the OBJECT is acquired
64 (the matrix M00 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
65 (the matrix M01 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
66 (the matrix M02 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
67 (the matrix M10 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
68 (the matrix M11 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
69 (the matrix M12 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
70 (the matrix M20 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
71 (the matrix M21 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
72 (the matrix M22 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
73 (the matrix M30 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
74 (the matrix M31 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
75 (the matrix M32 at the time of perspective conversion) 214 where matrix value at the time of perspective conversion of the OBJECT is read out
- ƒX ply To / 3 D functions
224 ATRID - where the unused attribute ID is returned
224 POLYGONID - where contents of polygon are read out
225 TEXID - where contents of the texture ID are read out
226 VERTEX - where contents of the apex ID are read out
- Instruction related to sound
267 MMLSTAT () - where the parameter which is in the midst of performing is acquired
272 PLAYSTAT() - where whether or not the sequence number which is specified, while performing you inspect
283 SFRE () - where the free area of ƒ\ƒ"ƒO data area is returned
307 TFRE () - where the free area of timbre data area is returned
309 TPROP ()- where read-out of command of the timbre data is done
* Floating point type function ------------
- Generality instruction
25 ATN - returns the opposite tangent (the arc tangent)
31 COS - returns the cosine for angle (the cosine)
36 EXP - specified function (the digital wood which designates the E as the bottom you express and starts and power) it calculates
56 LOG - where natural logarithm of the numerical value which is specified is returned
78 SIN - Returns the sine (sign)
80 SQR - square root is returned
83 TAN - returns (the tangent)
95 XSQR - square root is returned
- File function
115 LOC - reading and writing position acquisition of the file which is been open
115 LOF - where the terminal of reading and writing position of the file which is been open is returned
* Character string type function --------
25 BIN$ - numerical value is converted to the character string of binary veneration type
26 BINHEX$- where the character string of binary format is converted to the character string of hexadecimal format
27 BITW$ - where it converts the bit width of the data in the character string
28 CHR$ - where the character which corresponds to the character code which is specified is returned
32 DATE$ - where the time of day information is acquired from the built-in clock
42 HEX$ - where the numerical value is converted to the character string of hexadecimal format
43 HEXBIN$ - where the character string of hexadecimal format is converted to the character string of binary format
47 INKEY$ - where information of entry of the key 1 character is read from the keyboard
49 INPUT$ - where it waits until there is entry of specified character several parts
53 LEFT$ - where it returns the character string of the length which is specified from the left side in the character string.
58 MID$ - where it fetches the length from the digit position which specifies the portion in character string
68 PEEK$ - where the data is read out as the character string from user area
75 RIGHT$ - where it returns from the right flank in the character string, fetching the character string of the length which is specified
79 SPACE$ - where the character string of nul of the length which is specified is returned
80 STR$ - numerical value is converted to the character string of decimal format
81 STRING$ - where the character string which repeated the character which is specified is returned
82 STRW$ - the character string which repeated the data which is specified is returned
90 WADD$ - the character string which said the addition and subtraction vis-a-vis the character string is returned
90 WANDOR$ - the character string which said the operation with the AND and the OR vis-a-vis the character string is returned
91 WMUL$ - where the character string which said multiplication vis-a-vis the character string is returned
92 WXOR$ - where the character string which said the operation with the XOR vis-a-vis the character string is returned
- File function
114 FILES$ - where it returns the character string of the file name which agrees retrieving the file
-BG/ text / video type function
160 READCHR$ - where the pattern generator data is sent from the character picture
161 READHEX$ - where the character string of hexadecimal is converted to the character string of reading binary format from the data statement
* Direct executive order and indirect executive order --------------
- Generality instruction
29 CLEAR - Guaranty of variable and initialization and user area and file area of stack
33 DIM - where dominant string variable is declared
25 END - End of program
36 ERROR - where generation of error is simulated
43 IFGOTO - deciding the conditional system which is specified, with the authenticity processing where it branches
44 IFTHENELSEENDUF - deciding the conditional system which is specified, with the authenticity processing where it branches
48 INPUT - where entry in the optional character string is accepted from the keyboard
51 INT - where the maximum integer value which does not exceed the ‚ tie which is specified is returned
54 LET - where value of the formula which is given to the right-hand side, is substituted to the variable of the left-hand side
55 LOCATE - where cursor position of the text picture is specified
56 LOCK - where interruption processing is prohibited
********* 57 where from the digit position which specifies the contents of MI D$ character variable, it replaces to the optional character string
59 NEXT - end of FOR looping processing
68 POKE - where the data is written to the address which user area specifies
69 PRINT - where character is displayed in the text picture
70 PRINTUSING - character is displayed with the format which is specified to the text picture
71 RANDOMIZE - Setting of random number system
********The 72#0101 which shows the start of the REM notes statement
' 72 where start of the notes statement is shown
74 RESUME End of error processing
76 RUN - where the program is executed
79 SKCLOSE - where the software keyboard is closed
83 SWAP - where contents of variable are replaced
85 UNLOCK - where interruption processing is permitted
88 USERDATA () - where status of instruction is returned
91 WIDTH - where the display screen of the text picture is set
- File instruction
98 BLOADCLEAR - where the file is written to contents of the user area which is guaranteed in instruction
99 BSAVECLEAR - where it starts writing the contents of the user area which is guaranteed in instruction to the file
100 CLOSE - End of file access
100 FILES - Retrieving the file, where it displays the file name which exists
101 FORMAT - where the device which is specified is initialized
102 FREAD - where from file area the data is written to character variable
102 FWRITE - where the data is written to file area
103 GLOAD - where it loads to the logical BG which specifies the bit map data which is specified
************
106 BG - the file name which specifies the bitmap data of the logical BG which is specified
106 GSAVE - where it writes out as the data
************
108 KILL - where the file which is specified is deleted
108 LOAD - You read the program list and are dense
110 OPEN - where it prepares in order to read and write the data vis-a-vis the file
112 SEEK - where reading and writing position of the file is specified
-BG/ text / video type instruction system
117 ACTIVE - Setting of default number of default logical BG
118 CCOPY - Transfer of the picture data of the rectangular area which deals with the character picture
120 CIRCLE - where a circle is drawn in the bit map picture
121 CLS - where the picture is erased
122 COLOR - where indicatory color and peripheral color et cetera of the picture are set
122 COLOROFSBG - where it colors the picture and the ƒX ply To picture
124 DISPLAYBG - where the ON/OFF of picture display is done
125 GCOPY - Transfer of the picture data of the rectangular area which deals with the bit map picture
127 KLOAD - where display of Chinese character is made possible
128 KPRINT - Display to bit map picture of Chinese character
132 LINE - where the straight line or rectangle is drawn in the bit map picture
133 MOSAICBG - where the mosaic is applied vis-a-vis the picture
134 PAINT - where it paints with the color which specifies the area of the bit map picture
136 PALETTE - Modification of pallet value
137 PRIORITY - where the precedence where the picture is displayed is set
139 PSET - where the point is displayed in the coordinate which the bit map picture specifies
139 PUTCHAR - Entry of pattern name craftsman/teacher data to character picture
142 ROTATE - where indicatory angle of the rotary picture is set
142 ROTCENTER - where central position of the rotary picture is set
143 ROTOVER - revolution area of surface display setting of part outside
144 ROTPOS - where distance to the center of the rotary picture is set from point of view
145 ROTZOOM - Zoom of rotary BG picture (ƒX The k ring) where it does Enlargement ratio to the respective direction of the surface of revolution is set.
146 SCREEN - Initialization of picture and setting of picture mode
151 SCROLL - usually scroll of the picture
152 SETCHR - where the pattern data which is used in the character picture is written
154 VSYNC - waits until the VSYNC the time when it specifies elapses
155 WINDOW - where the range which is drawn in bit map drawing instruction is specified
156 ZOOM - usually enlargement of the picture
********
166 CAMERAOBJECT - The case where the camera is displayed setting of camera angle the position it is dense
167 PUTSPRITE - ƒX ply To is displayed
*********
169 SETDISP - It projects to the front which extent of the picture plane of the polygon which it sees.
169 SETLIGHT - where the illuminant is set
170 SETPERS - where it sets the angle of view of range of vision
170 SETFONT - where the character data of polygon is defined
172 SETPOLYGON - polygon surface group (the polygon surface list) where it defines
**********
174 SETSPRITE - where ƒX ply To is displayed
**********
175 SETVERTEX - where the apex group which is used with polygon is defined
**********
177 SPRITE$ - ƒX ply To's pattern definition
178 SPRWINDOW - where ƒX ply To, and the range which restricts the display of polygon are set
***********
-OBJ instruction / function
********
215 OBJATROBJECT - where the attribute ID and the polygon ID are specified to the OBJATROBJECT
" Parentage " of the OBJLINKOBJECT 215 where it specifies
" Relative position " from the OBJPOS parent OBJECT 216 where it specifies
216 OBJROT - From angle of the parent OBJECT relative " turning angle "
216 OBJTURN -where it specifies angle of the parent OBJECT relative " turning angle "
217 where it specifies
217 where the OBJTYPEOBJECT is specified
218 OBJZOOMOBJECT - Specifies the "Indicatory magnification ratio "
218 SETATR - where the attribute which is given to each surface of polygon is defined
222 SETTEX - where the texture is defined
************
252 BEEP - alarm is sounded. The ƒ\ƒ"ƒO number "0 " where the error sound which is registered is reset to default warning sound
253 BGMSETSONG - instruction, where the MML which is already registered to sound memory is sounded
254 DSP - where it controls DSP
256 EFFECTMML - Performs the music which is specified in the character string (effective sound)
***********
259 EGEG - (the envelope generator) the which sets parameter
263 LFOLFO - where it sets parameter
The music which is specified in the PLAYMML character string (effective sound) it performs.Performance 1 instruction at a time ending
Waiting 270 where it performs
272 PLAYCONTPLAYPAUSE - where the performance which is stopped at one time is reopened
273 PLAYFADE - using the sequence number which is specified, where it modifies the volume of the sound which it performs gradually
274 PLAYINIT - which initializes sound memory, modifies the block allotment of MML area
279 PLAYPAN - using the sequence number which is specified, where it modifies the generation direction of the sound which it performs
280 PLAYPAUSE - using the sequence number which is specified, where it stops the sound which it performs at one time
280 PLAYSTOP - using the sequence number which is specified, where it stops the sound which it performs
280 PLAYTEMPO - using the sequence number which is specified, where it modifies the speed of the sound which it performs
285 TARG - Rearrangement of timbre data, and register of original sound source
308 TLIST - where simple explanation of the timbre data file is displayed
309 TPROP() - where it rewrites the command of the timbre data
317 VOLUME - where volume is adjusted
-OBJ instruction / function
*******
181 Structural body for ƒX ply To display of OBJ 2 D and 3 D
0 (the OBJECT type:@TYPE) 187 where method of presentation of the OBJECT is specified
1 (the auxiliary flag:@FLAG) the case where the OBJECT is displayed 191 where operation is specified
2 (the OBJECT group:@GROUP) 192 where the group for collision decision of the OBJECT is specified
4 (the X position:@XP) from the parent OBJECT the XP (relative position (X coordinate)) 193 where it specifies
5 (the Y position:@YP) from the parent OBJECT the YP (relative position (the Y-coordinate)) 193 where it specifies
6 (the Z position:@ZP) from the parent OBJECT the ZP (relative position (Z coordinate)) 193 where it specifies
8 (the X angle of rotation:@XR) the XR of the OBJECT (the turning angle for the X axis) specification 194
9 (the Y angle of rotation:@YR) the YR of the OBJECT (the turning angle for the Y-axis) specification 194
10 (the Z angle of rotation:@ZR) the ZR of the OBJECT (the turning angle for the Z axis) specification 194
12 (the X scale:@XS) the XS of the OBJECT (magnification ratio of X axial direction) 194 where it specifies
13 (the Y scale:@YS) the YS of the OBJECT (magnification ratio of Y-axis direction) 194 where it specifies
14 (the Z scale:@ZS) the ZS of the OBJECT (magnification ratio of Z axial direction) the 194#0101 which is specified
16 (the attribute ID number:@ATR) the ATR (ƒX ply To and the ID number of surface information of polygon which are produced in SETATR instruction
) 196 where it specifies
17 (the polygon ID number:@POLYGON) the POLYGON (position information ID number of the polygon which produces in SETPOLYGON instruction)
196 where it specifies
18 (the portable rotational transform sequence:@ORDER) the ORDER (conversion sequence of 3 DOBJECT) 196 where it specifies
19 (the indicatory time:@TIME) indicatory time of the OBJECT (the TIME) 197 where it specifies
24 (the X speed:@XV) the value which is added to the X coordinate of the OBJECT (XV) 205 where it gives
25 (the Y speed:@YV) the value which is added to the Y-coordinate of the OBJECT (the YV) 205 where it gives
26 (the Z speed:@ZV) the value which is added to the Z coordinate of the OBJECT (the ZV) 205 where it gives
28 (the X accelerating:@XA) X speed of the OBJECT (XV) the acceleration which is added (the XA) 206 where it gives
29 (the Y accelerating:@YA) Y speed of the OBJECT (the YV) the acceleration which is added (the XA) 206 where it gives
30 (the Z accelerating:@ZA) Z speed of the OBJECT (the ZV) the acceleration which is added (the XA) 206 where it gives
In order 32 (the X speed limiter:@XL) X speed of the OBJECT (XV) for absolute value not to exceed this value, 207 where it specifies
In order 33 (the Y speed limiter:@YL) Y speed of the OBJECT (the YV) for absolute value not to exceed this value, 207 where it specifies
In order 34 (the Z speed limiter:@ZL) Z speed of the OBJECT (the ZV) for absolute value not to exceed this value, 207 where it specifies
36 (the X rotary speed:@XRV) the XR of the OBJ (the turning angle for the X axis) 208 where the value which is added is given
37 (the Y rotary speed:@YRV) the YR of the OBJ (the turning angle for the Y-axis) 208 where the value which is added is given
38 (the Z rotary speed:@ZRV) the ZR of the OBJ (the turning angle for the Z axis) 208 where the value which is added is given
48 (4 point specified ƒX ply To apex X0:@X P0) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
49 (4 point specified ƒX ply To apex Y0:@Y P0) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
50 (4 point specified ƒX ply To apex X1:@X P1) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
51 (4 point specified ƒX ply To apex Y1:@Y P1) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
52 (4 point specified ƒX ply To apex X2:@X P2) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
53 (4 point specified ƒX ply To apex Y2:@Y P2) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
54 (4 point specified ƒX ply To apex X3:@X P3) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
55 (4 point specified ƒX ply To apex Y3:@Y P3) 2 D ƒX ply To's of TYPE= 3 display (4 point specifications) 209 where position is specified
60 (the specified:@GTEST of the collision decision group) the collision decision group ‚» 211 where it specifies
61 (the radius:@RADIUS for contact decision) 212 where radius of the collision which is used with the GTEST is specified
* Direct executive order -------------
- Generality instruction
31 CONT - reopening the program which is discontinued
33 DELETE - where the program list of specified line is deleted
34 EDIT - where variable of the program list is done
37 FIND - Seeking string or programming where the character string is retrieved
55 LIST - where the program list is displayed
58 NEW - where the program list is erased from memory
73 RENUM - Re-allocation of line numbers
- File instruction
111 SAVE - where the program list is retained
- Generality instruction
31 DATA - where it defines constant as the data
41 GOSUB - where subroutine processing is accessed
41 GOTO - where it moves to the forefront of the line which is specified
51 INTERVAL - where the interval timer is set
59 ONERRORGOTO - where error processing program is specified
60 ONGOSUB - where the subroutine which responds to the value of system is returned
61 ONGOTO - where it moves to the forefront of the line which responds to the value of system
62 ONINTERVAL - where the processing which is accessed with the interval timer interruption is set
63 ONRESTORE - where position of the data which is loaded the by the value of the numerical system which is specified, is specified
64 ONTIMER - where the processing which is accessed with the countdown timer interruption is specified
72 READDATA - where the data which is defined at amount is read out
73 RESTORE - Specification of data read-out position
74 RETURN - Carriage return from subroutine processing
80 STOP - execution of the program is discontinued
94 TIMER - where the countdown timer is set
86 USRDATA - Using user area, where it accesses DATA statement format
- Instruction related to sound
***********
260 ONMMLSTATGOSUBMML - Control command of the (you monitor "!") with the interruption, when value returns, you execute
269 SETSONGDATA - The where bull program is set
Batching converting the MML which is defined in the statement, where it registers to sound memory
Note
* It specified the part of the explanation that the " logical BG " with it has rewritten " < the logical BG> " and so on, it is specified with option.* As for MML another text
* It creates side width with half angle 100 character
(C)1998 Asciicorp./bitslaboratory/espinc.