Make your own retro games on a virtual game console. Program in the classic BASIC language and create sprites, tile maps, sound and music with the included tools. As a beginner you will quickly understand how to create simple text games or show your first sprite on a tile map. As an experienced programmer you can discover the full potential of retro hardware tricks!
Imagine LowRes NX as a handheld game console with a d-pad, two action buttons and a little rubber keyboard below a slidable touchscreen. LowRes NX was inspired by real 8- and 16-bit systems and simulates chips for graphics, sound and I/O, which actually work like classic hardware. It supports hardware sprites as well as hardware parallax scrolling, and even offers vertical blank and raster interrupts to create authentic retro effects.
The programming language of LowRes NX is based on second-generation, structured BASIC. It offers all the classic commands, but with labels, loops and subprograms instead of line numbers. Graphics and sound are supported by additional commands and you can even access the virtual hardware directly using PEEK and POKE. You have complete control over the program flow, there is no standard update function to implement.
LowRes NX includes all the tools you need: The Gfx Designer for editing sprites, tiles, fonts and maps, as well as the Sound Composer for music and sound effects. All of these are just normal BASIC programs. You can change and improve them or even create your own custom editors.
Send your games directly to other users or share them via the website. All programs are open source, so you can play them, learn from them and edit them. Do you prefer making just art or music? Share your creations as assets and let other programmers use them in their projects.
Try some of the included programs to see how LowRes NX can look like. Have a look at the action game LowRes Galaxy 2, the text adventure LowRes Adventure, and the demo Star Scroller.
Once you have played enough, you can create your first own program.
Type these lines:
PRINT "WELCOME!" PRINT "WHAT IS YOUR NAME?" INPUT ">";N$ PRINT "HELLO ";N$;"!"
Now run your program. This is a little example using the keyboard. Let's try something with a gamepad. Create another new program and type this:
GAMEPAD 1 X=76 Y=60 DO IF UP(0) THEN Y=Y-1 IF DOWN(0) THEN Y=Y+1 IF LEFT(0) THEN X=X-1 IF RIGHT(0) THEN X=X+1 SPRITE 0,X,Y,225 WAIT VBL LOOP
Run this program and you will see an "A" on the screen which you can move around using the gamepad.
A program file contains a complete game or application, including all its data, stored as simple text. The first part is the BASIC source code. Please read the programming chapters for further explanation.
The second part are the cartridge ROM entries. These are up to 16 numbered data blocks, which can contain any kind of data, for example graphics, level maps, music, etc. When a program is running, all its ROM entries are accessible in the first 32 KB of the memory.
You can easily create and edit ROM entries by using tools. Tools are normal NX programs, but they are specifically made for editing data. They can access any NX file as a "virtual disk" and use its ROM entries like files.
There are two ways of using tools:
Let's try it. Open your program with the moving "A" (from the "Getting Started" chapter) and select "Gfx Designer" from the Tools menu.
Draw something as character #1 (keep #0 empty), then tap on "File" and save as file 2 ("Main Characters"). Now return to the source code editor and you will see some hexadecimal data below your program. This is your image! To see it, change the line
SPRITE 0,X,Y,225
to
SPRITE 0,X,Y,1
and run your program. There it is!
Keep in mind that tools don't save automatically, so never forget to save before you exit them.
For an easy start you should use the ROM entry numbers of the following table. Their data is made ready for use automatically.
| #0 | Keep empty for default font |
| #1 | Color palettes |
| #2 | Characters (sprites, tiles) |
| #3 | Background (tile map) |
| #15 | Sounds and music |
If cartridge ROM entry 0 is not used by a program, the compiler adds character data for the default font. It occupies the characters 192-255 and is automatically copied to video RAM on program start. If you want to use the default font, make sure to keep ROM entry 0 unused.
Use the Gfx Designer to draw characters (sprites, tiles, fonts), design backgrounds (tile maps, screen layouts) and edit color palettes.
On the bottom right there are three tabs for the different sections of the program: The character editor, the palette editor and the background editor. You can use the keys 1, 2 and 3 to switch between them when running LowRes NX on a computer.
The Gfx Designer loads the main palettes (file 1), characters (file 2), and background (file 3) on startup, but keep in mind that it doesn't save automatically.
At the bottom part you see the 256 characters split into four pages. There you can select the current one for editing. Keep the last page empty, if you want to use the default font. Also character #0 should be empty for a clean background.
The top left square is for drawing the current character using the selected color.
| FILE | Go to the characters file menu. |
| MOV | Move the pixels of the current character. |
| 16*16 | Go to the 16x16-pixel edit screen. |
| FLIP | Flip the current character horizontally or vertically. |
| SPIN | Rotate the current character. |
| CLR | Clear the current character with the selected color. |
| CUT | Copy and clear the current character. |
| COP | Copy the current character. |
| PAS | Paste the copied character. |
| SEL | Change the size of the selection. |
The size of the selection affects all edit tools on this screen, as well as drawing in the background editor.
The bottom part is identical to the character editor.
In the box at the left you select the current color palette.
On the right you can edit each color of the current palette using the RGB sliders. The first color is usually transparent and unused, except the first color of palette 0, which is used as the screen backdrop color.
| FILE | Go to the palettes file menu. |
Here you draw your background using the character and color palette currently selected on the other screens.
| FILE | Go to the background file menu. |
| Pan | Drag the visible map area. |
| Draw | Draw with the current mode. |
| Erase | Erase cells including their attributes. |
| FLIP | Toggles the X/Y flip attributes. |
| PRI | Toggles the priority attribute. |
You can use the arrow or WASD keys to scroll the map when running LowRes NX on a computer. The keys Z, X, C, V and B select the tool.
The draw tool has different modes. By tapping the button again, when it's already selected, you can change the mode:
| Draw | Edit single cells. |
| Fill | Edit areas by dragging. |
| Character | Draw with the selected character and color palette, using the selected flip and priority attributes. |
| Palette | Change the color palette only. |
| Priority | Change the priority only. Cells with priority 1 are shown in green, all others in red. |
| Stamp | Select an area by dragging and then draw with it (copy and paste). |
From here you load and save characters, color palettes and the background separately. There is no option to save everything at once.
The list shows all 16 files of the current virtual disk, or in other words the ROM entries of the program you are editing. Select one and tap on Load or Save.
| NEW | Clear all characters. |
| FON | Copy a standard font to the current page. |
| PAG | Load only one page from the selected file to the current page. Useful to include fonts from another file, for example. |
| NEW | Reset to the default colors. |
| NEW | Clear the complete background (keeping its size). |
| SIZE | Go to the size menu, where you can choose the width and height of the background (in cells), as well as the cell size (8x8 or 16x16 pixels). |
The Sound Composer serves to create sound presets, sequences ("tracks") and complete songs.
It loads the main sound data (file 15) on startup, but keep in mind that it doesn't save automatically. A sound file includes all sound and music data.
A sound is a preset with all available sound parameters (waveform, envelope, LFO, etc.). It can be used directly with the PLAY command in your program or as an instrument in a track/song.
A track is a sequence of 32 steps for a single voice, where each step can play a note or modify the sound. It can be used in your program for complex sound effects and short melodies (e.g. "level up") with the TRACK command. Tracks are also used to create songs.
A pattern is a block of music, which defines which track should be
played on each of the four voices. Patterns will be played one after
another, except for the following cases: If the next pattern is empty,
the song is stopped. When the current pattern finishes and has a "loop
end" flag, the player jumps back to the previous pattern with a "loop
start" flag. When a pattern finishes and has a "stop" flag, the player
stops.
If you want to create music for a game and you plan to use
additional sound effects, you should leave at least one voice empty.
The 64 patterns can be used for one long song or several shorter ones. By using the "loop" and "stop" flags songs can be separated. To play one specific song, just start at its first pattern. To play a song in your program use the MUSIC command.
The Sound Composer has three tabs in the top right corner for the different sections: The pattern editor, the track editor and the sound editor. This is a "Tracker"-style program, which means the timeline goes from top to bottom, not from left to right. So the steps in a track are also called rows. Most values in the range from 0 to 15 are shown in hexadecimal format (0-F).
There is some keyboard support when running LowRes NX on a computer: The arrow keys move the cursor and the key rows simulate a musical keyboard with two octaves to enter notes. The return key enters a note stop, backspace deletes the current note and space toggles between play (pattern/track) and stop.
Here you can select a pattern, choose its tracks for all voices and edit directly the notes of each selected track. There is also a toggle button for the "loop" and "stop" flags for the current pattern. If you set notes in a voice without track, it selects automatically a free track. Use the star symbol from the musical keyboard, if you want to stop/release a note in a track.
Here you can select and edit a single track with additional parameters:
| S | Sound |
| V | Volume |
| C | Sound command |
| P | Parameter |
Define and test your sounds here. The currently selected sound will be used in the other editors for new notes.
These commands allow you to change parameters dynamically while playback. Use them in the track editor.
| C | P | Purpose |
|---|---|---|
| 0 | 0 | No command |
| 0 | x | Mix (1=left, 2=right, 3=center/both) |
| 1 | x | Attack Time |
| 2 | x | Decay Time |
| 3 | x | Sustain Level |
| 4 | x | Release Time |
| 5 | x | LFO Rate |
| 6 | x | LFO Frequency Amount |
| 7 | x | LFO Volume Amount |
| 8 | x | LFO Pulse Width Amount |
| 9 | x | Pulse Width |
| D | x | Slow Speed (like E, but +16) |
| E | x | Speed (ticks per row, 8 by default) |
| F | 0 | Break Track/Pattern |
| F | 1 | Cut Note / Volume 0 |
The programming language of LowRes NX is based on second-generation, structured BASIC (1985 style).
This manual is meant to be a reference for people with prior programming experience. If you are new to programming, you should look for tutorials on the LowRes NX website and then check this manual for further details.
Available value types are strings and numbers (floating point).
Variable names can contain letters (A-Z), digits (0-9) and underscores (_), but cannot begin with a digit. Reserved keywords (commands, functions) cannot be used as variable names, but they can be part of them. There is a list in the chapter "Reserved Keywords".
Examples of valid variable names:
X A1 LONG_VARIABLE_NAME PRINTER
Examples of invalid variable names:
2B PRINT
String variable names end with a $ symbol, for example:
A$ NAME$
Variables are not explicitly declared, but they need to be initialized with a value before you can read from them. Values are assigned to variables using the equal symbol:
NAME$="LOWRES NX" LIVES=3
Hexadecimal and binary notation can be used for number values:
$FF02 %11001011
DIM [GLOBAL] var-list
Defines arrays with the highest index for each dimension:
DIM A(100) DIM MAP(31,23,1),NAMES$(9),SCORES(9)
Access elements from arrays, indices start from 0:
DIM SCORES(9) SCORES(0)=100 SCORES(9)=5 PRINT SCORES(0),SCORES(9)
All elements of arrays are automatically initialized, using zeros (0) or empty strings ("").
With the optional GLOBAL keyword the arrays will be accessable from all subprograms.
UBOUND(var[,dimension])
Returns the upper bound (the highest index) of a dimension of the array var.
The dimension parameter is an optional number used when the array is multi-dimensional, and specifies the dimension of the array. The default value is 1.
DIM SCORES(9) FOR I=0 TO UBOUND(SCORES) PRINT SCORES(I) NEXT I
A label marks a position in a program and is used for commands like GOTO. It consists of a name, using the same rules as for variables, followed by a colon.
TESTLABEL:
| Symbol | Example | Purpose |
|---|---|---|
| - | -B | Negation |
| ^ | X^3 | Exponentiation |
| * | 2*Y | Multiplication |
| / | X/2 | Division |
| \ | X\2 | Integer Division |
| + | C+2 | Addition |
| - | 100-D | Subtraction |
| MOD | X MOD 2 | Modulo |
Operations are performed in mathematical order, for example multiplications and divisions are performed before additions and subtractions.
PRINT 10+2*5-8/4+5^2
The order can be specified explicitly through the use of parentheses, for example:
PRINT (3+4)*5
| Symbol | Example | Purpose |
|---|---|---|
| = | A=10 | Equal |
| <> | A<>100 | Not equal |
| > | B>C | Greater than |
| < | 5<X | Less than |
| >= | X>=20 | Greater than or equal |
| <= | X<=30 | Less than or equal |
A relational operator expression returns the value true (-1) or false (0).
| Symbol | Example | Purpose |
|---|---|---|
| NOT | NOT (X=15) | "Not" |
| AND | A=1 AND B=12 | "And" |
| OR | X=10 OR Y=0 | "Or" |
| XOR | A XOR B | "Exclusive Or" |
All operators are available for numbers. Relational and addition operators are usable with strings, too:
SUM=1+3 IF SUM<5 THEN PRINT "LESS THAN 5" NAME$="LOWRES NX" GREET$="HELLO "+NAME$+"!" IF NAME$>"LOWRES" THEN PRINT GREET$ IF SUM=4 AND NAME$<>"" THEN PRINT "OK"
REM remark ' remark
Allows you to put comments into your program. REM lines are not executed. You can use an apostrophe (') in place of the word REM.
 PRINT "BYE"
IF expr THEN command [ELSE command]
Checks if the given expression is true or false. If it's true, the command after THEN is executed, otherwise the one after ELSE. The ELSE part is optional.
INPUT "NUMBER A:";A INPUT "NUMBER B:";B PRINT "SAME? "; IF A=B THEN PRINT "YES" ELSE PRINT "NO" IF A<B THEN PRINT "A LESS THAN B" IF A>B THEN PRINT "A GREATER THAN B"
If you want to execute more than one command (or avoid long lines), you can use the block version of the IF command. It must be closed with the line END IF.
IF expression THEN commands [ELSE IF expression THEN] commands [ELSE] commands END IF
Blocks can be nested like in this example:
PRINT "NUMBER OF PLAYERS" INPUT "1-4: ";N IF N<1 OR N>4 THEN PRINT "WRONG INPUT" PRINT "RESTART!" ELSE IF N=1 THEN PRINT "SINGLE-PLAYER" ELSE PRINT "MULTI-PLAYER" IF N=4 THEN PRINT "MAXIMUM" END IF END IF
GOTO label
Jumps to the given label and continues the program execution there.
PRINT "START" GOTO GAMELEVEL GAMEOVER: PRINT "GAME OVER" END GAMELEVEL: PRINT "PLAYING" GOTO GAMEOVER
GOSUB label
Adds the current program position to a stack and jumps to the given label. The program after the label is called a subroutine and must be finished using RETURN.
FOR I=1 TO 5 GOSUB SHOWNUMBER NEXT I END SHOWNUMBER: PRINT "NUMBER",I RETURN
NOTE: Subroutines exist mostly for historical reasons. You should prefer the more powerful and safer subprograms.
RETURN
Jumps back to the position of the last call of GOSUB and removes it from the stack.
RETURN label
Works like GOTO, but clears the whole stack. Use this to exit from a subroutine, if you want to continue your program somewhere else.
FOR I=1 TO 5 GOSUB SHOWNUMBER NEXT I END SHOWNUMBER: IF I=4 THEN RETURN GAMEOVER PRINT "NUMBER",I RETURN GAMEOVER: PRINT "GAME OVER"
END
Stops the program from any position. The program is also stopped automatically after the last line of code.
PRINT "THIS HAPPENS" END PRINT "THIS DOESN'T"
WAIT VBL
Waits for the next frame. This (or WAIT n) should be the last command in all loops which do animations and/or handle input, like the main game loop.
DO PAL RND(3) TEXT RND(19),RND(15),"*" WAIT VBL LOOP
WAIT n
Waits n frames (n/60 seconds), where the minimum for n is 1. Subprograms running from interrupts (ON VBL/RASTER, MUSIC) will continue to work as normal during this period.
WAIT 1 is the same as WAIT VBL, so why is there WAIT VBL? Because it looks cooler and nerdier! A little guideline: Use WAIT VBL in loops for smooth animations and input handling, and WAIT n if you actually want to wait some time.
PRINT "INUTILIS" PRINT "PRESENTS..." WAIT 60 PRINT "THE WAIT PROGRAM!"
FOR var=a TO b [STEP s] commands NEXT var
Performs a series of commands in a loop a given number of times. The FOR command uses the variable var as a counter, starting with the value a. All commands until NEXT are executed, then the counter is increased by s (or 1 if STEP is omitted). A check is performed to see if the counter is now greater than b. If not, the process is repeated. If it is greater, the program continues with the lines after NEXT.
FOR I=1 TO 8 PRINT I NEXT I
FOR I=2 TO 16 STEP 2 PRINT I NEXT I
If STEP s is negative, the loop is executed until the counter is less than value b.
FOR I=8 TO 1 STEP -1 PRINT I NEXT I
Loops can be placed inside of others:
FOR P=0 TO 3 PAL P FOR N=1 TO 4 PRINT N NEXT N NEXT P
DO commands LOOP
Performs commands in an endless loop. You can use GOTO or EXIT to leave it.
DO PAL RND(3) PRINT "FOREVER" LOOP
REPEAT commands UNTIL expression
Executes the commands in a loop until the given expression is true. The loop is executed at least once.
REPEAT A=RND(9) PRINT A UNTIL A=0
WHILE expression commands WEND
Executes the commands in a loop as long as the given expression is true.
A=4 WHILE A<10 PRINT A A=A+1 WEND
EXIT
Exits immediately from a loop created with the FOR...NEXT, REPEAT...UNTIL, WHILE...WEND, or DO...LOOP commands.
DO INPUT "ENTER E TO EXIT:";A$ IF A$="E" THEN EXIT PRINT "GOING ON..." LOOP PRINT "END"
SUB name [(parameter-list)] commands END SUB
Defines a subprogram with the given name. The optional parameter list can contain two types of entries: simple variables and array variables (followed by an empty parentheses pair). Entries are separated by commas. By default all variables inside the subprogram are local.
NOTE: Don't use GOTO or GOSUB to jump out of a subprogram!
CALL name [(argument-list)]
Executes the subprogram with the given name and returns to the current position after finishing it. The argument list must match the parameters of the SUB definition. Simple variables, single array elements and entire arrays (followed by an empty parentheses pair) are passed by reference to the subprogram. Other expressions are passed by value.

GLOBAL variable-list
Makes variables from the main program available to all subprograms. The list can contain simple variables only. For arrays you should use DIM GLOBAL. This command cannot be used within a subprogram.
GLOBAL SCORE,TRIES TRIES=3 CALL WIN(10) CALL WIN(20) SUB WIN(N) SCORE=SCORE+N PRINT "SCORE:",SCORE,"TRIES:",TRIES END SUB
PRINT expression-list
Outputs text to the current window. Expressions can be strings or numbers, separated by commas or semicolons. A comma separates the output with a space, a semicolon outputs without space. End the list with a comma or semicolon to keep the cursor at the end of the output, otherwise a new line is started.
PRINT "HELLO WORLD" PRINT 42 PRINT 1+3 PRINT "SCORE:",100 PRINT "ONE "; PRINT "LINE"
INPUT ["prompt";]var
Lets the user enter a text or number on the keyboard and stores it in the variable var. Optionally it can show a prompt text before (cannot be a variable).
INPUT automatically enables the keyboard.
INPUT "NAME:";N$ INPUT "AGE:";AGE PRINT "HELLO ";N$;"!" PRINT "SOON YOU ARE ";AGE+1
LOCATE cx,cy
Moves the text cursor to column cx and row cy relative to the current window.
LOCATE 2,4 PRINT "HELLO"
CURSOR.X CURSOR.Y
Returns the current column (X) or row (Y) of the text cursor relative to the current window.
WINDOW cx,cy,w,h,b
Sets the text output window to cell position cx,cy and sets the size to w columns and h rows. Text will be written to background b (0 or 1).
WINDOW 6,4,8,4,0 PRINT "LONG TEXT IN A SMALL WINDOW"
CLW
Clears the window with spaces and resets the text cursor position.
PRINT "HELLO" CLW PRINT "BYE"
GAMEPAD n
Enables gamepads for n (1 or 2) players. Once the gamepad is enabled, the program cannot change to touchscreen/mouse input anymore.
UP(p) DOWN(p) LEFT(p) RIGHT(p)
Returns true if the given direction is currently pressed on the direction pad of player p (0/1).
UP TAP(p) DOWN TAP(p) LEFT TAP(p) RIGHT TAP(p)
With the optional TAP keyword, this function returns true only for the first frame the button is pressed.
GAMEPAD 1 DO IF UP(0) THEN PRINT "UP" IF DOWN(0) THEN PRINT "DOWN" IF LEFT TAP(0) THEN PRINT "TAP <" IF RIGHT TAP(0) THEN PRINT "TAP >" WAIT VBL LOOP
BUTTON(p[,n])
Returns true if button A (n=0) or B (n=1) is currently pressed by player p (0/1). If the parameter n is omitted, both buttons (A and B) are checked.
BUTTON TAP(p[,n])
With the optional TAP keyword, this function returns true only for the first frame the button is pressed.
 By default it's enabled, so if you press the pause button, the program stops and shows "PAUSE" on the screen, until the button is pressed again.
PAUSE
Pauses the program and shows the default "PAUSE" screen, even if automatic pause handling is disabled.
PAUSE
Returns true if the pause button was pressed, otherwise false. After calling this function its value is cleared, so it returns each button tap only once. The automatic pause handling needs to be disabled for this function.
GAMEPAD 1 PAUSE OFF DO IF PAUSE THEN PRINT "PAUSE PRESSED" WAIT VBL LOOP
Use touchscreen support only if you think it will work well with a computer mouse, too. If you want to create your own game buttons, keep in mind that your game might be unplayable on a computer, because it won't support the keyboard or a real gamepad. Always consider using the standard gamepad functions.
TOUCHSCREEN
Enables the touchscreen/mouse support. Once it's enabled, the program cannot change to gamepad input anymore.
TOUCH.X TOUCH.Y
Returns the current X or Y pixel position where the user touches the screen, or where it was touched the last time.
TOUCH
Returns true if the screen is currently touched.
TOUCHSCREEN DO IF TOUCH THEN PRINT TOUCH.X,TOUCH.Y WAIT VBL LOOP
TAP
Returns true if the screen is currently touched and was not touched the last frame.
 While the keyboard is enabled, gamepads don't work.
KEYBOARD OPTIONAL
Enables the keyboard, but won't show an on-screen keyboard on touchscreen devices. Programs using this mode should be completely usable with gamepad or touch control and use the keyboard for alternative input only.
INKEY$
Returns the last pressed key as a string. If no key was pressed, it returns an empty string (""). After calling this function its value is cleared, so it returns each pressed key only once. The keyboard needs to be enabled for this function.
KEYBOARD ON DO I$=INKEY$ IF I$<>"" THEN PRINT I$ WAIT VBL LOOP
All graphics in LowRes NX are based on characters. A character is an 8x8-pixel image with 3 colors plus transparent. It's displayed with one of the 8 programmable color palettes.
At program start all characters from ROM entry 2 are copied to video RAM to make them immediately usable.
The display is composed of 3 layers, which are from back to front:
Each sprite and background cell has an attribute called "priority". By setting it, the cell or sprite will appear on a higher display layer. Actually there are 6 layers, from back to front:
Sprites are independent objects, which can be freely moved on the screen. They can have a size of 8x8 pixels (one character) or up to 32x32 pixels by grouping several characters. Each sprite has the standard character attributes (color palette, flip X/Y, priority) and additionally its size.
SPRITE n,[x],[y],[c]
Sets the position (x,y) and character (c) of sprite n (0-63). All parameters can be omitted to keep their current settings.
SPRITE n [PAL pal] [FLIP fx,fy] ... [PRIO pri] [SIZE s]
Sets one or more attributes of sprite n (0 - 63):
| pal | palette number (0-7) |
| fx | flip horizontally (0/1) |
| fy | flip vertically (0/1) |
| pri | priority (0/1) |
| s | size (0-3): 0: 1 character (8x8 px) 1: 2x2 characters (16x16 px) 2: 3x3 characters (24x24 px) 3: 4x4 characters (32x32 px) |
SPRITE 0,32,64,193 SPRITE 1,64,64,193 SPRITE 1 PAL 1 SIZE 3 FOR X=64 TO 128 SPRITE 1,X,, IF X=96 THEN SPRITE 1 FLIP 1,0 WAIT VBL NEXT X
SPRITE.A n,a
Sets all attributes of sprite n (0-63) as a single 8-bit value. See "Sprite Registers" for more information.
NOTE: It's easier to set these values with the attributes syntax of the SPRITE command.
SPRITE OFF [n] SPRITE OFF a TO b
Hides one or more sprites. If all parameters are omitted, all sprites (0 - 63) are hidden. With one parameter only the given sprite is hidden. The last option is to hide sprites in the range from a to b.
SPRITE.X(n) SPRITE.Y(n)
Return the position of sprite n.
SPRITE.C(n)
Returns the character of sprite n.
SPRITE.A(n)
Returns the attributes of sprite n as an 8-bit value. See "Sprite Registers" for more information.
SPRITE HIT(n[,a [TO b]])
Returns true if sprite n collides with another sprite (which means that pixels overlap). If no more parameters are given, it will check with all other visible sprites. If the a parameter is added, it will check only with that sprite a. If all parameters are given, it will check with all sprites from number a to number b.
SPRITE 0,32,64,225 SPRITE 1,96,68,226 FOR X=32 TO 128 SPRITE 0,X,, IF SPRITE HIT(0,1) THEN SPRITE 0 PAL 1 ELSE SPRITE 0 PAL 0 END IF WAIT VBL NEXT X
HIT
Returns the number of the sprite which collided with the sprite of the last call of SPRITE HIT.
A background is a map of 32x32 character cells, which is used for text and tile based maps or images. Each cell has the information of which character it contains and additional attributes (color palette, flip X/Y, priority).
As a character has the size of 8x8 pixels, the resulting background size is 256x256 pixels, which is larger than the actual screen (160x128). By modifying the scroll offset of a background, the visible area can be moved.
If the visible area moves out of the borders of the background, the display wraps around the edges. This can be used to achieve endless scrolling.
There is a mode for 16x16-pixel cells. When active, each cell will show 2x2 characters, similar to big sprites. This mode also increases the background size to 512x512 pixels. Use the CELL SIZE command to enable it.
For most of the commands and functions that access backgrounds their cell co-ordinates can be outside of the background size (32x32). They will be wrapped around the edges, so for example a character drawn at position 34,-2 will actually appear at position 2,30.
CLS
Clears both backgrounds with character 0 and resets the current window to the default one.
CLS b
Clears background b with character 0.
PAL p
Sets the palette number (0-7) attribute for cell and text commands.
PRINT "HELLO" PAL 1 PRINT "LOWRES NX!"
FLIP fx,fy
Sets the values (0 or 1) for horizontal (fx) and vertical (fy) flip attributes for cell and text commands.
PRINT "LOWRES NX" FLIP 0,1 PRINT "LOWRES NX" FLIP 1,0 PRINT "XN SERWOL"
PRIO p
Sets the priority (0 or 1) attribute for cell and text commands.
ATTR a
Sets all attributes for cell and text commands as a single 8-bit value. See "BG Data" for more information.
NOTE: It's easier to use the commands PAL, FLIP and PRIO.
BG n
Sets the current background (0 or 1) for cell and text commands.
CELL cx,cy,c
Sets the cell at position cx,cy of the current background to character c using the current attributes.
PAL 2 CELL 1,1,225 CELL 2,1,226 PAL 1 CELL 3,1,227
CELL.C(cx,cy)
Returns the character of the cell at position cx,cy of the current background.
CELL.A(cx,cy)
Returns the attributes of the cell at position cx,cy of the current background as an 8-bit value. See "BG Data" for more information.
BG FILL cx1,cy1 TO cx2,cy2 CHAR c
Sets all cells in the area from cx1,cy1 to cx2,cy2 of the current background to character c using the current attributes.
PAL 2 BG FILL 2,2 TO 17,13 CHAR 225 PAL 1 BG FILL 10,8 TO 17,13 CHAR 226
TINT cx,cy [PAL pal] ... [FLIP fx,fy] [PRIO pri]
Changes the palette and/or other attributes of the cell at position cx,cy of the current background. The cell's character and omitted attributes stay unchanged.
BG FILL 2,2 TO 17,13 CHAR 225 TINT 10,8 PAL 1 FLIP 0,1
BG TINT cx1,cy1 TO cx2,cy2 ... [PAL pal] [FLIP fx,fy] [PRIO pri]
Changes the palette and/or other attributes of all cells in the area from cx1,cy1 to cx2,cy2 of the current background. The cells' characters and omitted attributes stay unchanged.
BG FILL 2,2 TO 17,13 CHAR 225 BG TINT 10,8 TO 15,11 PAL 1
BG SOURCE a[,w,h]
Sets the current source for the BG COPY command. The two-dimensional map starts at memory address a, has a width of w and a height of h cells.
Without the size parameters, Gfx Designer's background data format is assumed: The width is read from address a+2, the height from a+3 and the actual map data starts at a+4.
By default ROM entry 3 is used as source.
'USE A MAP FROM ROM ENTRY 4 BG SOURCE ROM(4) 'USE A MAP FROM WORKING RAM BG SOURCE $A000,32,32
BG COPY cx1,cy1,w,h TO cx2,cy2
Copies a two-dimensional part of the current source to the current background.
'SHOW SCREEN FROM GFX DESIGNER BG COPY 0,0,20,16 TO 0,0
BG SCROLL cx1,cy1 TO cx2,cy2 STEP dx,dy
Moves the content of all cells in the area from cx1,cy1 to cx2,cy2 horizontally by dx and vertically by dy cells.
DO BG SCROLL 0,0 TO 19,15 STEP -1,0 CELL 18,RND(15),193+RND(62) WAIT 5 LOOP
MCELL.C(cx,cy)
MCELL.A(cx,cy)
Work like the CELL.C and CELL.A functions, but get a cell from the source map (BG SOURCE) instead of the current background. If the co-ordinates are outside of the map bounds, the functions return -1.
MCELL cx,cy,c
Works like the CELL command, but sets a cell in the source map (BG SOURCE) instead of the current background. The source must be in working RAM, otherwise you will get an "Illegal Memory Access" error.
TEXT cx,cy,s$
Outputs the string s$ to the current background at cell position cx,cy using the current attributes.
PAL 3 TEXT 15,15,"HELLO"
NUMBER cx,cy,n,d
Outputs the number n to the current background at cell position cx,cy using the current attributes. The number is formatted to show always d digits. This command is preferred over TEXT to show numbers, as it doesn't need to convert numbers to strings.
NUMBER 15,0,321,5
FONT c
Sets the current character range used for text output. c is the character where the font starts (space).
The default value is 192, which points to the standard font, if available.
SCROLL b,x,y
Sets the scroll offset of background b (0/1) to pixel co-ordinates x,y.
TEXT 0,7,"SCROLLING BACKGROUND" FOR I=0 TO 256 SCROLL 0,I,0 WAIT VBL NEXT I
SCROLL.X(b) SCROLL.Y(b)
Return the scroll offset of background b.
SPRITE VIEW ON
SPRITE VIEW OFF
Shows or hides the complete sprite layer without changing any of the sprites' settings.
BG VIEW ON n
BG VIEW OFF n
Shows or hides background n (0 or 1).
CELL SIZE b,s
Sets the cell size for background b (0 or 1), where s can be:
| 0 | 1 character (8x8 pixels) |
| 1 | 2x2 characters (16x16 pixels) |
PALETTE n,[c0],[c1],[c2],[c3]
Sets all four colors of palette n (0-7). Color 0 is only used for palette 0 and shown as the screen's backdrop color. The color parameters can be omitted to keep their current settings. Valid color values are 0-63 and can be calculated like this:
VALUE = RED * 16 + GREEN * 4 + BLUE
RED, GREEN and BLUE are values from 0 to 3.
By default all palettes are read from ROM entry 1.
PRINT "COLORS!" WAIT 30 PALETTE 0,48,63,63,0 WAIT 30 PALETTE 0,3,,, WAIT 30 PALETTE 0,12,,,8
COLOR(p,n)
Returns the value of color n (0-3) from palette p (0-7). You can get the RED, GREEN and BLUE values like this:
RED = INT(VALUE / 16) GREEN = INT(VALUE / 4) MOD 4 BLUE = VALUE MOD 4
ON RASTER CALL name
Sets a subprogram which is executed for every screen line before it's drawn. Usually used to change color palettes or scroll offsets to achieve graphical effects. Raster subprograms should be short (see "CPU Cycles").
ON RASTER OFF
Removes the current subprogram.
ON RASTER CALL RAINBOW PRINT "RAINBOW WRITER" INPUT A$ SUB RAINBOW PALETTE 0,(RASTER+TIMER) MOD 64,,, END SUB
RASTER
Returns the current screen line (y position). Use this in a raster subprogram.
ON VBL CALL name
Sets a subprogram which is executed each frame. Can be used to update animations or sounds, even if the main program is blocked by WAIT or INPUT. VBL subprograms should not be very long (see "CPU Cycles").
ON VBL OFF
Removes the current subprogram.
ON VBL CALL BLINK PRINT "BLINK WRITER" INPUT A$ SUB BLINK PALETTE 0,TIMER MOD 64,,, END SUB
TIMER
Returns the number of frames shown since LowRes NX was started. The value wraps to 0 when 5184000 is reached, which is about 24 hours.
LowRes NX has four independent sound generators (voices). Each one can play sawtooth, triangle, pulse and noise waveforms, and has frequency, volume and pulse width settings. An additional envelope generator and LFO per voice makes complex sounds and instruments possible.
You can use the tool "Sound Composer" (or compatible programs) to create music, tracks and sound presets.
MUSIC [p]
Starts playback of a song at pattern p. If the parameter p is omitted, it starts at pattern 0.
TRACK n,v
Plays track n once on voice v. Each voice can play a track independently, so this can be used for sound effects, even while music is playing.
PLAY v,p[,len] [SOUND s]
Plays a sound on voice v (0-3). p is the pitch:
| Note | Pitch (with different octaves) | |||||||
|---|---|---|---|---|---|---|---|---|
| C | 1 | 13 | 25 | 37 | 49 | 61 | 73 | 85 |
| C# | 2 | 14 | 26 | 38 | 50 | 62 | 74 | 86 |
| D | 3 | 15 | 27 | 39 | 51 | 63 | 75 | 87 |
| D# | 4 | 16 | 28 | 40 | 52 | 64 | 76 | 88 |
| E | 5 | 17 | 29 | 41 | 53 | 65 | 77 | 89 |
| F | 6 | 18 | 30 | 42 | 54 | 66 | 78 | 90 |
| F# | 7 | 19 | 31 | 43 | 55 | 67 | 79 | 91 |
| G | 8 | 20 | 32 | 44 | 56 | 68 | 80 | 92 |
| G# | 9 | 21 | 33 | 45 | 57 | 69 | 81 | 93 |
| A | 10 | 22 | 34 | 46 | 58 | 70 | 82 | 94 |
| A# | 11 | 23 | 35 | 47 | 59 | 71 | 83 | 95 |
| B | 12 | 24 | 36 | 48 | 60 | 72 | 84 | 96 |
The optional parameter len is the length in 1/60 seconds, the maximum is 255. 0 means, that the sound won't stop automatically. If the parameter is omitted, the current value of the voice is kept.
By default the current sound settings of the voice are used. Add the SOUND parameter to use the sound number s from the Sound Composer tool.
PLAY 0,49,20 WAIT 30 PLAY 0,53,20 WAIT 30 PLAY 0,56,40 WAIT 60
STOP [v]
Stops the current sound and track on voice v. If the parameter is omitted, all voices, tracks and music are stopped. If a voice's envelope has a release time, the sound won't stop immediately, but fade out.
VOLUME v,[vol],[mix]
Sets the volume of voice n (0-3) to vol (0-15) and its outputs to mix (0-3):
| 0 | Muted |
| 1 | Left |
| 2 | Right |
| 3 | Left and right (center) |
All parameters can be omitted to keep their current settings.
SOUND v,[w],[pw],[len]
Sets the basic sound parameters of voice v (0-3).
w is the waveform:
| 0 | Sawtooth |
| 1 | Triangle |
| 2 | Pulse |
| 3 | Noise |
pw is the pulse width (0-15), a value of 8 results in a square wave. This parameter only has an effect for the pulse waveform.
len is the sound length in 1/60 seconds, the maximum is 255. 0 means, that the sound won't stop automatically. If the length is set using this command, the length parameter of PLAY can be omitted.
All parameters can be omitted to keep their current settings.
ENVELOPE v,[a],[d],[s],[r]
Sets the volume envelope generator of voice v (0-3).
a is the attack time, d is the decay time, and r is the release time. All times are non-linear and range from 0 (2 ms) to 15 (12 s)
s is the sustain level (0-15), which is the volume after the decay time and before the sound gets released.
All parameters can be omitted to keep their current settings.
ENVELOPE 0,1,6,8,8 PLAY 0,49,20 WAIT 30 PLAY 0,53,20 WAIT 30 PLAY 0,56,40 WAIT 120
LFO v,[r],[fr],[vol],[pw]
Sets the LFO (low frequency oscillator) of voice v (0-3).
r is the LFO rate and ranges from 0 (0.12 Hz) to 15 (18 Hz) in a non-linear manner.
The other paramters set the amount of the effect on different sound parameters: fr for frequency/pitch, vol for volume and pw for pulse width. These values range from 0 to 15.
All parameters can be omitted to keep their current settings.
LFO 0,12,4,0,0 PLAY 0,49,20 WAIT 30 PLAY 0,53,20 WAIT 30 PLAY 0,56,40 WAIT 120
LFO WAVE v,[w],[i],[e],[t]
Sets options for the LFO wave of voice v (0-3). All parameters can be omitted to keep their current settings.
| w | wave (0-3): 0: triangle 1: sawtooth 2: square 3: random |
| i | invert (0/1) |
| e | env mode enabled (0/1) |
| t | trigger enabled (0/1) |
By default the LFO adds its output to the normal sound parameters. If invert is enabled, it subtracts. By enabling the env mode, the LFO stops after one cycle, so it can be used as an additional envelope generator. If the trigger is enabled, the LFO restarts for each played sound, otherwise it runs continuously. Trigger is enabled implicitly with the env mode.
SOUND SOURCE a
Sets the current data source for the PLAY, MUSIC and TRACK commands to the memory address a. This only affects the following calls to these commands, already started playback keeps its own data source. The data is assumed to be in the format of the Sound Composer tool.
By default ROM entry 15 is used as source.
MUSIC(n)
Returns the status of playing music. Specify n for the information you want to get:
| 0 | The current pattern |
| 1 | The current row |
| 2 | The current tick |
| 3 | The current speed (0 = stopped) |
DATA constant-list
Stores comma separated numeric and string constants (values, but no variables or expressions) that are accessed by the READ command. DATA commands are not executed and may be placed anywhere in the program.
READ commands access DATA in order, from the top of a program until the bottom. All constants of all DATA commands are read as one continuous list of items.
READ var-list
Reads values from DATA commands and assigns them to the comma separated variables in var-list. The program has an internal pointer to the current DATA value. With each value read, the pointer will move to the next DATA value.
FOR I=0 TO 3 READ TYPE$,POWER PRINT TYPE$;":",POWER NEXT I DATA "LASER",10,"BLASTER",15 DATA "PLASMA",20,"FUSION",30
RESTORE [label]
Changes the internal read pointer to another position. This allows to reread data or to select specific data. If the label parameter is omitted, READ will start again from the top of the program. Otherwise the pointer will be set to the jump label.
RESTORE SHIELDS FOR I=0 TO 1 READ TYPE$,POWER PRINT TYPE$;":",POWER NEXT I DATA "LASER",10,"BLASTER",15 SHIELDS: DATA "SIMPLE",30,"ADVANCED",60
LowRes NX simulates chips for graphics, sound and I/O, the cartridge ROM, working RAM and persistent RAM. Everything is accessible in a 64 KB memory map, which is described in the chapter "Hardware Reference".
PEEK(a)
Returns the byte value (0-255) at memory address a.
TOUCHSCREEN PRINT "TOUCH!" DO IF PEEK($FF75) AND %10 THEN PRINT PEEK($FF72),PEEK($FF73) END IF WAIT VBL LOOP
POKE a,v
Sets the memory at address a to value v. v is a numeric expression from 0 to 255; numeric expressions outside this range are truncated to 8 bits.
POKE $9000,232 POKE $9002,233
PEEKW(a)
Returns the two-byte value (-32768 to 32767) at memory address a.
POKEW a,v
Writes a two-byte value at memory address a. v is a numeric expression from -32768 to 32767; numeric expressions outside this range are truncated to 16 bits.
PEEKL(a)
Returns the four-byte value (-2147483648 to<PHONE_NUMBER>) at memory address a.
POKEL a,v
Writes a four-byte value at memory address a. v is a numeric expression from -2147483648 to<PHONE_NUMBER>; numeric expressions outside this range are truncated to 32 bits.
'EXAMPLE USES PERSISTENT RAM HI=PEEKL($E000) PRINT "HIGHSCORE:" PRINT HI INPUT "SCORE:";SC IF SC>HI THEN POKEL $E000,SC PRINT "RESTART!"
COPY a,n TO d
Copies n bytes starting from memory address a to address d. The source and the destination areas may overlap.
'COPY CHARACTERS FROM ROM 'ENTRY 4 TO VIDEO RAM COPY ROM(4),SIZE(4) TO $8000
FILL a,n[,v]
Sets n bytes starting from memory address a to value v, or 0 if the parameter is omitted.
ROL a,n
Takes the byte at address a and rotates its bits left by n places.
ROR a,n
Takes the byte at address a and rotates its bits right by n places.
ROM(n)
Returns the memory address of ROM entry n.
SIZE(n)
Returns the number of bytes of ROM entry n.
The file commands can be used to store data on a virtual disk, which can contain up to 16 files. Its format is the same as the ROM entries part in a program file. This makes it possible to use any NX program directly as a virtual disk to edit its data.
Virtual disks are meant to be used for development tools only, for example image and map editors or music programs. Games should use persistent memory instead. Imagine that the standard LowRes NX console wouldn't have a disk drive.
LOAD f,a[,n[,o]]
Loads the file number f from the current virtual disk to memory starting at address a.
Optionally the parameter n can be used for the maximum number of bytes that should be loaded. 0 means no limit. With the optional parameter o an offset in the file can be set.
LOAD is meant to be used for tools only. Use ROM entries for game data or persistent memory for game states.
SAVE f,c$,a,n
Saves n bytes starting at memory address a to the current virtual disk as a file number f (0-15) with comment c$ (up to 31 characters).
If this file was loaded before, consider keeping its original comment or allow the user to edit it before saving. If the file is new, the comment should contain at least the type of data, e.g. "CHARACTERS" or "MUSIC".
SAVE is meant to be used for tools only. Use persistent memory to store game states.
FILES
Loads the current file directory for use with FILE$.
FILE$(f)
Returns the comment string of file number f. Call FILES before accessing the file directory to update its content, or use FILE$ directly after LOAD or SAVE.
FILES FOR I=0 TO 15 PRINT I,FILE$(I) NEXT I
FSIZE(n)
Returns the number of bytes of file number n. Call FILES before accessing the file directory to update its content, or use FSIZE directly after LOAD or SAVE.
PI
PI is the ratio of the circumference of a circle to its diameter: 3.1415926535...
SIN(x)
The sine of x, where x is in radians.
COS(x)
The cosine of x, where x is in radians.
TAN(x)
The tangent of x, where x is in radians.
ASIN(x)
The arc sine of x, where x must be in the range of -1 to +1. The range of the function is -(PI/2) <= ASIN(x) <= (PI/2).
ACOS(x)
The arc cosine of x, where x must be in the range of -1 to +1. The range of the function is 0 <= ACOS(x) <= PI.
ATAN(x)
The arctangent of x in radians, i.e. the angle whose tangent is x. The range of the function is -(PI/2) <= ATAN(x) <= (PI/2).
HSIN(x)
The hyperbolic sine of x.
HCOS(x)
The hyperbolic cosine of x.
HTAN(x)
The hyperbolic tangent of x.
ABS(x)
The absolute value of x.
SGN(x)
The sign of x: -1 if x < 0, 0 if x = 0 and +1 if x > 0.
INT(x)
The largest integer not greater than x; e.g. INT(1.3) = 1 and INT(-1.3) = -2.
EXP(x)
The exponential of x, i.e. the value of the base of natural logarithms (e = 2,71828...) raised to the power x.
LOG(x)
The natural logarithm of x; x must be greater than zero.
SQR(x)
The non-negative square root of x; x must be non-negative.
RND
The next number in a sequence of random numbers uniformly distributed in the range 0 <= RND < 1.
RND(n)
The second syntax generates a random integer between 0 and n inclusive.
RANDOMIZE x
Sets the seed for random numbers to x, which should be an integer value. By default a program starts with seed 0, so the sequence of random numbers is always the same.
RANDOMIZE TIMER
If you want different random numbers each time you run your program, you should insert this line at the beginning.
RANDOMIZE TIMER FOR I=1 TO 16 PRINT RND(1000) NEXT I
MIN(x,y)
The MIN function returns the smallest value of two expressions.
MAX(x,y)
The MAX function returns the largest value of two expressions.
SWAP var1,var2
Swaps the data between any two variables of the same type.
A=10 B=40 SWAP A,B PRINT A PRINT B
INC var
Increases the value of the variable by one. INC A does the same as A=A+1, but costs less CPU cycles.
DEC var
Decreases the value of the variable by one. DEC A does the same as A=A-1, but costs less CPU cycles.
ADD var,x
Adds the value x to the variable, where x can the positive or negative. ADD A,X does the same as A=A+X, but costs less CPU cycles.
ADD var,x,base TO top
The second syntax of ADD helps with repeating counters.
A=0 DO ADD A,2,0 TO 10 PRINT A LOOP
It's the same as:
A=0 DO A=A+2 IF A>10 THEN A=0 IF A<0 THEN A=10 PRINT A LOOP
But again the ADD command costs less CPU cycles.
LEFT$(s$,n)
Returns a new string with the first n characters of s$.
PRINT LEFT$("LOWRES NX",3)
LEFT$(s$,n)=a$
Overwrites the first characters in the variable s$ with the first n characters of a$.
A$="FOORES NX" LEFT$(A$,3)="LOWER" PRINT A$
RIGHT$(s$,n)
Returns a new string with the last n characters of s$.
RIGHT$(s$,n)=a$
Overwrites the last characters in the variable s$ with the last n characters of a$.
MID$(s$,p,n)
Returns a new string with n characters of s$, starting at character p. The first character has the position 1.
PRINT MID$("LOWRES NX",4,3)
MID$(s$,p,n)=a$
Overwrites the given text range in the variable s$ with the first n characters of a$.
A$="LOWFOO NX" MID$(A$,4,3)="RESTAURANT" PRINT A$
INSTR(d$,s$[,p])
Searches the first occurrence of s$ inside of d$ and returns its start position. If it's not found, the function returns 0. Usually the function starts searching at the beginning of the string. Optionally it can start searching at position p.
PRINT INSTR("LOWRES NX","RES")
CHR$(n)
Returns a string containing one character with ASCII code n.
FOR I=32 TO 90 PRINT CHR$(I) NEXT I
ASC(a$)
Supplies you with the ASCII code of the first character of a$.
PRINT ASC("L")
LEN(a$)
Returns the number of characters in a$.
VAL(a$)
Converts a number written in a$ into a numeric value.
STR$(n)
Converts the number n into a string.
BIN$(n[,len])
Converts the number n into a binary string with at least len digits.
HEX$(n[,len])
Converts the number n into a hexadecimal string with at least len digits.
System commands are a link between the virtual console and the LowRes NX application.
TRACE expression-list
Outputs text to the debugging window. Expressions can be strings or numbers, separated by commas. This command is ignored if the debug mode is not enabled.
'RUN IN DEBUG MODE A=13 B$="GO" TRACE "TEST",A,B$
SYSTEM n,v
Sets the system status n to value v. Currently only one status is available:
| 0 | Energy Saving Mode: Enable with v different from 0. In this mode the screen refreshes with a very low rate whenever there is no user input. It does not affect the virtual CPU, the code still runs at full speed. |
LowRes NX has a simplified simulation of CPU cycles. There is a fixed limit of cycles per frame. This assures the same program execution speed on all devices, so if you optimize your program on your device to run smoothly, it will run the same on all other devices.
Each execution of a command, function or operator, as well as access to a variable or a constant count 1 cycle. Some operations have additional costs:
| Total cycles per frame | 17556 |
| Cycles per VBL interrupt | 1140 |
| Cycles per raster interrupt | 51 |
The main program may spend any number of cycles, but when the limit is reached before a WAIT VBL or WAIT command, the execution continues in the next frame. If interrupts exceed their limit, you will see black scanlines on the screen.
$0000 - Cartridge ROM (32 KB) $8000 - Character Data (4 KB) $9000 - BG0 Data (2 KB) $9800 - BG1 Data (2 KB) $A000 - Working RAM (16 KB) $E000 - Persistent RAM (4 KB) $FE00 - Sprite Registers (256 B) $FF00 - Color Registers (32 B) $FF20 - Video Registers $FF40 - Audio Registers $FF70 - I/O Registers
A character is an 8x8-pixel image with 2 bits per pixel, with a resulting size of 16 bytes. The video RAM has space for 256 characters.
The first 8 bytes of a character contain the low bits of all its pixels, followed by 8 more bytes containing the high bits of all pixels.
A background is a map of 32x32 character cells. Each cell occupies two bytes:
- Character number - Attributes: Bit Purpose 0-2 Palette number 3 Flip X 4 Flip Y 5 Priority 6-7 Unused
Imagine it as a battery buffered RAM on the game cartridge. Use it for data like game positions or high score tables. The content of the persistent RAM will be saved automatically when you exit the program and loaded when you run it. Each program saves its persistent RAM separately.
There are 64 sprites available, each occupies 4 bytes:
- X position - Y position - Character number - Attributes: Bit Purpose 0-2 Palette number 3 Flip X 4 Flip Y 5 Priority 6-7 Size: 0: 1 character (8x8 px) 1: 2x2 characters (16x16 px) 2: 3x3 characters (24x24 px) 3: 4x4 characters (32x32 px)
Note: X and Y sprite position registers have an offset of 32, so they can move out of the top/left screen borders without using negative numbers. Using the BASIC commands, this offset is removed for convenience.
There are 8 palettes of each 4 colors. One color is one byte:
Bits Component 0-1 Blue 2-3 Green 4-5 Red
$FF20 - Attributes: Bit Purpose 0 Sprites enabled 1 BG0 enabled 2 BG1 enabled 3 BG0 cell size, 4 BG1 cell size: 0: 1 character (8x8 px) (BG 256x256 px) 1: 2x2 characters (16x16 px) (BG 512x512 px) $FF21 - BG0 scroll offset X $FF22 - BG0 scroll offset Y $FF23 - BG1 scroll offset X $FF24 - BG1 scroll offset Y $FF25 - Scroll offset MSB (most significant bits) used for big cell size only: Bit Purpose 0 BG0 X+256 1 BG0 Y+256 2 BG1 X+256 3 BG1 Y+256 $FF26 - Raster line
There are registers for 4 voices:
$FF40 - Voice 0 $FF4C - Voice 1 $FF58 - Voice 2 $FF64 - Voice 3
Each voice occupies 12 bytes:
- Frequency low-byte - Frequency high-byte - Status: Bit Purpose 0-3 Volume 4 Mix to left 5 Mix to right 6 Init 7 Gate - Peak meter (read only) - Attributes: Bit Purpose 0-3 Pulse width 4-5 Wave: 0: Sawtooth 1: Triangle 2: Pulse 3: Noise 6 Timeout enabled - Length (timeout) - Envelope byte 1: Bit Purpose 0-3 Attack 4-7 Decay - Envelope byte 2: Bit Purpose 0-3 Sustain 4-7 Release - LFO attributes: Bit Purpose 0-1 Wave: 0: Triangle 1: Sawtooth 2: Square 3: Random 2 Invert 3 Env mode enabled 4 Trigger enabled - LFO settings byte 1: Bit Purpose 0-3 LFO Rate 4-7 Frequency amount - LFO settings byte 2: Bit Purpose 0-3 Volume amount 4-7 Pulse width amount - Reserved
Note: The frequency is a 16-bit value: f = hertz * 16
$FF70 - Gamepad 0 status $FF71 - Gamepad 1 status Gamepad status: Bit Purpose 0 Up 1 Down 2 Left 3 Right 4 Button A 5 Button B $FF72 - Last touch X position $FF73 - Last touch Y position $FF74 - Last pressed key (ASCII code) $FF75 - Status: Bit Purpose 0 Pause button 1 Touch $FF76 - Attributes: Bit Purpose 0-1 Gamepads enabled: 0: off 1: 1 player 2: 2 players 2 Keyboard enabled 3 Touchscreen enabled
This is the format used for the PLAY, MUSIC and TRACK commands. It's valid to store only the sound presets, if no MUSIC or TRACK commands are used with this data. If any tracks are available, all patterns must be stored. Empty tracks after the last used one don't need to be stored.
Offset - Content 0 - 16 sound presets 128 - 64 patterns 384 - 64 tracks
Each sound preset occupies 8 bytes and matches the format of the audio registers of one voice, but without the first 4 bytes.
Each pattern occupies 4 bytes:
- Voice 0: Bit Purpose 0-6 Track index (64 = voice unused) 7 Flag loop start - Voice 1: Bit Purpose 0-6 Track index (64 = voice unused) 7 Flag loop end - Voice 2: Bit Purpose 0-6 Track index (64 = voice unused) 7 Flag song stop - Voice 3: Bit Purpose 0-6 Track index (64 = voice unused)
Each track occupies 96 bytes and consists of 32 entries with each 3 bytes:
- Note pitch (0 = empty) - Data (ignored if note is 0): Bit Purpose 0-3 Volume 4-7 Sound - Control: Bit Purpose 0-3 Parameter 4-7 Command
These commands, functions and syntaxes should not be used anymore and may be removed in future versions.
SPRITE.A n,(pal,fx,fy,pri,s)
Use SPRITE (new syntax) or SPRITE.A (single value only) instead.
ATTR (pal,fx,fy,pri,s)[,m]
ATTR a,m
Use PAL, FLIP, PRIO or ATTR (single value only) instead. Use TINT and BG TINT for replacing attribute masks.
DISPLAY (s,b0,b1,c0,c1)
DISPLAY a
Use BG VIEW ON/OFF, SPRITE VIEW ON/OFF and CELL SIZE instead.
DISPLAY
Use PEEK($FF20) instead.
LFO.A v,(w,r,e,t)
Use LFO WAVE instead.
The following is a list of reserved words used in LowRes NX BASIC. If you use these words as variable names, a syntax error will be generated.
Keywords marked with an asterisk have no function yet, but are reserved for future versions.


paranoid(1f) - [DEVELOPER] call doubleprecision and real versions of paranoia(3f) (LICENSE:PD)
Synopsis
Description
Example
Author
License
paranoid
This program and the routines it calls can be used to test various Fortran compiler options.The paranoid(1f) command is strictly for use by developers. This program and the sparanoi(3f) and dparanoi(3f) procedures all need recompiled with the compiler options being tested. Then the program is run and the resulting tests and their output are examined.
The results require interpretation and an understanding of program internals.
Because programs are often built with a variety of compilers and compiler options on a number of different platforms it is prudent to select options that choose operations that meet the double precision specification defined in the IEEE 754-1985 standard when available; but "failure" of the strict testing performed does not imply a flaw in the program.
This permits developers to verify that the compiler and loader options selected while building a program and the system hardware currently being used reasonably perform floating point operations.
Sample beginning of dialog ...
============================================================ Tuesday, February 7th, 2017 4:35:06 AM UTC-0300 sysname: CYGWIN_NT-10.0 release: 2.6.0(0.304/5/3) version: 2016-08-31 14:32 nodename: buzz machine: x86_64 This file was compiled by GCC version 5.4.0 using the options -I /usr/include/w32api -I /home/urbanjs/V600/lib/CYGWIN64_GFORTRAN -mtune=generic -march=x86-64 -g -Wunused -Wuninitialized -Wall -std=f2008 -fbounds-check -fbacktrace -finit-real=nan -fno-range-check -frecord-marker=4 -J /home/urbanjs/V600/lib/CYGWIN64_GFORTRAN ============================================================ *paranoid*" double precision test(3f) Is this a program restart after failure (1) or a start from scratch (0) ?
Public Domain
| paranoid (1) | January 01, 2020 |


Man hurled racist insults at Exeter McDonalds worker
Exeter magistrates court heard that it was 'an unpleasant incident which was racially aggravated'
by Ted DavenportA 38 year old smoker told a McDonalds worker that he was a 'refugee' and to 'go back to his own country'.
Wayne Davies was drunk when he lit up inside the restaurant in Exeter's High Street and was asked to leave one evening last December.
Davies shouted at worker Ben Sharma: "You are not worth £3. I bet they don't pay you. You are getting the sack.
"Send that refugee back to his own country."
Exeter magistrates court heard that it was an unpleasant incident which was racially aggravated.
Davies, of no fixed abode, admitted racially aggravated intentional harassment and was given an 18 month long conditional discharge.
Rob Jacobs, defending, said this was the second incident in the McDonalds involving Davies in three days.


| [Top] | [Contents] | [Index] | [ ? ] |
Version 1.17 – December 2021
This package provides some simple magic value features that simulate the Unix file(1) command to determine the type of a file
or of bytes
from the content. It has an internal set of magic number information or it can process the magic files from
local ~Unix system configuration.
To get started quickly using SimpleMagic, see section Start Using Quickly. There is also a PDF version of this documentation.
Gray Watson http://256stuff.com/gray/
| 1. Start Using Quickly | Start using SimpleMagic quickly. | |
| 2. Using SimpleMagic | How to use SimpleMagic. | |
| 3. Open Source License | Open Source license for the project. | |
| Index of Concepts | Index of concepts in the manual. |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To use SimpleMagic you need to do the following steps. For more information, see section Using SimpleMagic.
ContentInfoUtil
instance
with the default constructor, it will load the internal magic entries file. See section How To Load Magic Entries.
ContentInfoUtil
class to get content-types for files or byte[]
:
ContentInfoUtil util = new ContentInfoUtil(); ContentInfo info = util.findMatch("/tmp/upload.tmp"); // or ContentInfo info = util.findMatch(inputStream); // or ContentInfo info = util.findMatch(contentByteArray); // display content type information if (info == null) { System.out.println("Unknown content-type"); } else { // other information in ContentInfo type System.out.println("Content-type is: " + info.getName()); } |
If the findMatch(...)
method does not recognize the content then it will return null. If it does match one of the
entries then it will return a ContentInfo
class which provides:
OTHER
Here are some examples of ContentInfo
output:
For somewhat more extensive instructions, see section Using SimpleMagic.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| 2.1 Downloading Jar | Downloading the SimpleMagic jar. | |
| 2.2 How To Load Magic Entries | Loading in the magic entries from files. | |
| 2.3 How To Find The Content Info | Finding the content type from data. | |
| 2.4 Content Information | Content type information returned. | |
| 2.5 Using With Maven | How to use with Maven. |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To get started with SimpleMagic, you will need to download the jar file. The SimpleMagic release page is the default repository but the jars are also available from the central maven repository.
The code works with Java 6 or later.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The library uses various magic byte information to be able to find and determine details about random blocks of bytes. By default, SimpleMagic has a built in version of a magic file that was copied from a CentOS Linux system. It contains, ~2400 magic file entries describing a number of different file types. It also has an additional ~6600 lines which provide more details about the detected content types.
The magic entries are relatively complex but in general look something like the following. The configuration line says to
look at the start of the file for the string "GIF8"
. If it is there then the file is "GIF image data".
0 string GIF8 GIF image data |
If you do not want to use the internal magic definitions, you can also construct the ContentInfoUtil
class with a file
or directory to have it parse and use another definition file.
ContentInfoUtil util = new ContentInfoUtil("/etc/magic"); |
WARNING: although we’ve tried to support different types of magic entries, there are local per-OS variations that may not be supported.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Once you have loaded the magic entry information into your ContentInfoUtil
, you can use the utility class to find
the content info of files, byte arrays, or InputStream
s. The base method gets content info information from a
byte[]
.
byte[] uploadedBytes = ...; ContentInfo info = util.findMatch(uploadedBytes); |
You can also get the content type of a file which is read with a FileInputStream
:
ContentInfo info = util.findMatch("/tmp/uploadedFile.tmp"); // File uploadedFile = ... // ContentInfo info = util.findMatch(uploadedFile); |
If you have an InputStream
, you can also use it directly:
InputStream inputStream = ... ContentInfo info = util.findMatch(inputStream); |
If you want to process a stream of bytes as the bytes are being read, you can use the ContentInfoInputStreamWrapper
utility class. This takes an InputStream
which it wraps and delegates to. After you have read the bytes through
the wrapper, you can call the findMatch()
method to get its content information.
HttpServletRequest request = ... ContentInfoInputStreamWrapper inputStream = new ContentInfoInputStreamWrapper(request.getInputStream()); // read in the file from the http request, ... // after we have read it in, we can get its content-info ContentInfo info = inputStream.findMatch(); |
For the file and stream versions, the first 10 kilobytes of the data is read and processed.
There is also a long internal list of file types copied from the Apache list. Not all of the files in this list have associated magic number information. However, with the list you can look up mime-types or by file-extension and get the associated information.
You can use the internal list to lookup by file-extension:
// find details about files with .pdf extension ContentInfo info = ContentInfoUtil.findExtensionMatch("file.pdf"); // you can even just pass in the extension name ContentInfo info = ContentInfoUtil.findExtensionMatch("DOC"); |
Or you can look up by mime-type:
// find details about this mime-type ContentInfo info = ContentInfoUtil.findMimeTypeMatch("image/vnd.dwg"); |
Some internal entries provide more information than others. This list is a work in progress. Please submit improvements and edits as necessary.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If the findMatch(...)
method does not recognize the content then it will return null. If it does match one of the
entries then it will return a ContentInfo
class which provides:
OTHER
. This is determined by mapping the
mime-type string to an internal enumerated type and is not determined from the magic file entries.
Here are some examples of ContentInfo
output:
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To use SimpleMagic with maven, include the following dependency in your ‘pom.xml’ file:
<dependency> <groupId>com.j256.simplemagic</groupId> <artifactId>simplemagic</artifactId> <version>1.17</version> </dependency> |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document is part of the SimpleMagic project.
Copyright 2021, Gray Watson
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that this permission notice appear in all copies.
 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
The author may be contacted via the SimpleMagic home page.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| Jump to: | /
A B C D E F G H I L M O P Q S U W |
|---|
| Jump to: | /
A B C D E F G H I L M O P Q S U W |
|---|
| [Top] | [Contents] | [Index] | [ ? ] |
| [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Gray Watson on December 29, 2021 using texi2html 1.82.
The buttons in the navigation panels have the following meaning:
| Button | Name | Go to | From 1.2.3 go to |
|---|---|---|---|
| [ < ] | Back | Previous section in reading order | 1.2.2 |
| [ > ] | Forward | Next section in reading order | 1.2.4 |
| [ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
| [ Up ] | Up | Up section | 1.2 |
| [ >> ] | FastForward | Next chapter | 2 |
| [Top] | Top | Cover (top) of document | |
| [Contents] | Contents | Table of contents | |
| [Index] | Index | Index | |
| [ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated by Gray Watson on December 29, 2021 using texi2html 1.82.


Toggle navigation
Vast Challenge 2016
Prox-out
Prox-out
Prox_out route
prox-mobile
Building
Building Power
Building Temperature
Building Air Flow
Harmful Gas
Water Heater
Indoor Temperature
Set heat point
Set cool point
HVAC inlet outlet
HVAC inlet outlet by zone
点击转到冯昊安的综合版
Black background
White background
Floor 1 Temperature
Floor 2 Temperature
Floor 3 Temperature


{% extends "layout.html" %} {% block content %}
Please verify that the following information is correct. If it is not, you may change it by changing the input.


Resets the grid to the initial state.
reset([noRefresh])
| noRefresh |
boolean, indicates if to refresh the grid after reset |
Returns undefined.
Description
The .reset() method will do the following:
- Set vertical scroll position to 0
- Set horizontal scroll position to 0
- Clear user search
- Clear user sort
- Unselect selected records
- Collapse expanded records
- If remote data source, it will retrieve records with offset = 0
This method will not remove records (use .clear for that). If you just want to
reset search fields, you need to use .searchReset method.
After reset is complete, the .refresh method will be called, unless you pass
noRefresh indicator.
If you have grid defined in the following way:
You can reset grid by:


Represents the file-system and contains a broad set of operations for
manipulating files. An asynchronous and a synchronous version of each
operation is provided. The asynchronous versions take a handler as a
final argument which is called when the operation completes or an error
occurs. The handler is called with two arguments; the first an exception,
this will be None if the operation has succeeded. The second is the
result - this will be None if the operation failed or there was no result
to return. The synchronous versions return the results, or throw
exceptions directly.
|
|
|
|
|
|
|
|
copy_sync(self,
frm,
to)
Synchronous version of FileSystem.copy |
source code
|
|
|
|
|
|
|
copy_recursive_sync(self,
frm,
to)
Synchronous version of FileSystem.copy_recursive |
source code
|
|
|
|
|
|
|
move_sync(self,
frm,
to)
Synchronous version of FileSystem.move |
source code
|
|
|
|
|
|
|
truncate_sync(self,
path,
len)
Synchronous version of FileSystem.truncate |
source code
|
|
|
|
chmod(self,
path,
perms,
dir_perms=None,
handler=None)
Change the permissions on a file, asynchronously. |
source code
|
|
|
|
chmod_sync(self,
path,
perms,
dir_perms=None)
Synchronous version of FileSystem.chmod |
source code
|
|
|
|
props(self,
path,
handler)
Get file properties for a file, asynchronously. |
source code
|
|
|
|
props_sync(self,
path)
Synchronous version of FileSystem.props |
source code
|
|
|
|
lprops(self,
path,
handler)
Obtain properties for the link represented by {@code path}, asynchronously. |
source code
|
|
|
|
lprops_sync(self,
path)
Synchronous version of FileSystem.props |
source code
|
|
|
|
link(self,
link,
existing,
handler)
Create a hard link, asynchronously.. |
source code
|
|
|
|
link_sync(self,
link,
existing)
Synchronous version of FileSystem.link |
source code
|
|
|
|
symlink(self,
link,
existing,
handler)
Create a symbolic link, asynchronously. |
source code
|
|
|
|
symlink_sync(self,
link,
existing)
Synchronous version of FileSystem.symlink |
source code
|
|
|
|
|
|
|
unlinkSync(self,
link)
Synchronous version of FileSystem.unlink |
source code
|
|
|
|
|
|
|
read_symlink_sync(self,
link)
Synchronous version of FileSystem.read_symlink |
source code
|
|
|
|
delete(self,
path,
handler)
Delete a file on the file system, asynchronously. |
source code
|
|
|
|
delete_sync(self,
path)
Synchronous version of FileSystem.delete |
source code
|
|
|
|
|
|
|
delete_recursive_sync(self,
path)
Synchronous version of FileSystem.delete_recursive |
source code
|
|
|
|
mkdir(self,
path,
perms=None,
handler=None)
Create a directory, asynchronously. |
source code
|
|
|
|
mkdir_sync(self,
path,
perms=None)
Synchronous version of FileSystem.mkdir |
source code
|
|
|
|
mkdir_with_parents(self,
path,
perms=None,
handler=None)
Create a directory, and create all it's parent directories if they do
not already exist, asynchronously. |
source code
|
|
|
|
mkdir_with_parents_sync(self,
path,
perms=None)
Synchronous version of FileSystem.mkdir_with_parents |
source code
|
|
|
|
|
|
|
read_dir_sync(self,
path,
filter=None)
Synchronous version of FileSystem.read_dir |
source code
|
|
|
|
|
|
|
read_file_as_buffer_sync(self,
path)
Synchronous version of FileSystem.read_file_as_buffer |
source code
|
|
|
|
|
|
|
write_buffer_to_file_sync(self,
path,
buf)
Synchronous version of FileSystem.write_buffer_to_file |
source code
|
|
|
|
open(self,
path,
perms=None,
read=True,
write=True,
create_new=True,
flush=False,
handler=None)
Open a file on the file system, asynchronously. |
source code
|
|
|
|
open_sync(self,
path,
perms=None,
read=True,
write=True,
create_new=True,
flush=False)
Synchronous version of FileSystem.open |
source code
|
|
|
|
|
|
|
create_file_sync(self,
path,
perms=None)
Synchronous version of FileSystem.create_file |
source code
|
|
|
|
|
|
|
exists_sync(self,
path)
Synchronous version of FileSystem.exists |
source code
|
|
|
|
|
|
|
fs_props_sync(self,
path)
Synchronous version of FileSystem.fs_props |
source code
|
|


---
layout: home
permalink: /verticals/professional-services
---
← Home
Professional Services Updated Friday, May 28
Hashtags
{% assign hashtags_proServices = site.data.hashtags | where: "vertical", "Professional Services" %}
{% for hashtag in hashtags_proServices %}
{% include icon-hashtag.svg %}
{{hashtag.name}} copy
{{hashtag.description}}
{% endfor %}
Upcoming Topics
{% assign topics_proServices = site.data.topics | where: "vertical", "Professional Services" %}
{% for topic in topics_proServices %}
{{ topic.day }}
{{ topic.date }}
{{ topic.name }}
{{ topic.description }}
{% endfor %}
Common Terms & Phrases
Consider educating your followers about these, as needed
{% assign phrases_proServices = site.data.phrases | where: "vertical", "Professional Services" %}
{% for phrase in phrases_proServices %}
{{ phrase.name }}
{{ phrase.description }}
{% endfor %}
Example posts from small businesses
{% assign filtered_posts = site.data.posts | where: "vertical", "Professional Services" %}
{% if filtered_posts.size == 0 %}
There aren't any featured posts for this subvertical.
{% else %}
{% for post in filtered_posts %}
{% endfor %}
{% endif %}


This application was built to demonstrate web application development using:
The application uses local browser storage to avoid incorporation of a proper database subsystem or REST back end. It is built in ES6 and translated using babel. It is packed into a single javaScript bundle with webpack.
To create a new task, enter the task text in the box. To mark a task complete, click on the task label.


Man found with stab wounds inside car in Markham: police
by Codi Wilson, CP24.comA man has suffered serious injuries after a stabbing in Markham late Monday night.
At around 11 p.m., a man was in his car on Treeline Court when he was approached by three suspects, York Regional Police say.
A video of the incident shows some type of altercation near the vehicle before three suspects flee to a nearby park.
The victim was found inside his vehicle suffering from serious but non-life-threatening injuries.
Police are asking anyone with information about the incident to contact investigators.


Signup Form
Company Name :
Company name is required.
No numbers and special charecter are allowed
It must be up to 15 characters
It should be more than 1 character
E-Mail:
Email is required.
The Email Id is invalid.
It must be up to 30 characters
Address:
Address is required.
Password :
Password is Required
Password should not blank space.
password must be between 8 to 16 characters!!
password must be between 8 to 16 characters!!
Confirm Password :
Confirm Password is Required
Password not matched!!
SignUp
Already have an account?
Login


Famine: What WAS I doing in there?
This is an old gag. It's where someone seems to have a storage space set in his hair. Usually, that hairstyle is an afro, but not always. Why is he capable of doing this? Because he has Hammerspace Hair!
A minor variation is when a character keeps things stored in his beard. Can also be invoked if a character's entire body is covered with hair.
Subtrope of Hammerspace.
For times when it seems like someone's hair must have been hidden in hammerspace, see Compressed Hair. This is actually a real technique some people employ in street fights, so employing this tactic can make one a Combat Pragmatist.
Examples:
- Apparently, this kid is a walking piggy bank.
- Nabeshin from Excel Saga would occasionally keep things in his hair. Like big guns.
Excel: That's some serious dandruff, man.
- Nabeshin's cameo in Hayate the Combat Butler has him randomly fall over at one point, at which a handful of items fall out. Oh, and he himself was hiding in it before.
- A line from Mahou Sensei Negima!. Kotaro had just pulled a vial out of his hair, with only Chamo asking, "He hid it in his hair?"
- Lambo from Katekyō Hitman Reborn! keeps a bazooka bigger than he is in his hair.
- Yu Yu Hakusho: Kurama and his Rose Whip. He pulls the rose right out of his hair the first time we see it, and apparently he keeps a lot of other seeds for his plant-weapons up there as well.
- In the Tengen Toppa Gurren Lagann movie, Yoko pulls a pistol out of her hair while fighting Adiane.
- Bobobo-bo Bo-bobo naturally includes this among its many hair-related sight gags.
- Ga-Rei:
- Even when downsized to a puppy, the inugami Byakuei from still manages to fit a huge double-bladed sword in his tail. His real size is a lot bigger, though.
- Fujiko plays it mostly straight: she hides shuriken in her, well, wig.
- In episode seven of Wandaba Style, Michael Hanagata is wearing a spacesuit and gets a call on his cellphone. He manages to take the call without taking off his helmet by shaking his head, dislodging his cellphone from his afro. It's later revealed that he keeps it in there all the time. Also in episode seven, his shoulder devil pops out his afro as well.
- Dasonu Maso of Sgt. Frog can travel through space in his own afro, then land wherever he liked (usually the Hinata house) whereupon his limbs, then the rest of him would emerge from it.

- Iris in Pokémon hides her Axew in her bushy hair.
- Tails in Sonic X apparently is able to tuck away Chaos Emeralds in the fluff of his tails. In one episode he also gets a screwdriver from apparently nowhere, most likely his... Hammerspace Tail Fur? One can only hope.
- Duo Maxwell from Mobile Suit Gundam Wing subverts this trope. He wears hairpins... ostensibly to control flyaways, but he actually uses tthem for picking locks.
- In Toriko, Sunny's "Satan Hair" is combination of this and Stomach of Holding, since its hair that will "eat" anything it touches and store it for later use. He can even use it to swallow energy blasts and spit them back at the offender.
- Garterbelt from Panty & Stocking with Garterbelt stores all sorts of things in his Funny Afro, including paper messages from Heaven and extra bullet belts for his machine guns.
 Somewhat subverted in that while the machine gun is bigger than V.V., it is smaller than his hair.
- 18th-century caricatures poke fun at the huge, elaborate wigs in fashion at the time, sometimes showing them used for smuggling.
- Léonard le Génie: Leonardo often pulls objects out of his beard, most notably a blunderbuss.
- Monica's Gang has Fluffy/Floquinho, a Lhasa Apso-like dog. Sometimes whole groups of people get lost in it!
- Modesty Blaise likes to use her signature weapon as a hair pin.
- Calvin manages to store his Transmogrifier Gun in his hair in Calvin and Hobbes: The Series.
- In chapter 3 of Mr. Dudeman's Wish, Mr. Messy pulls a map of Dillydale out of his hair.
- Adagio Dazzle does this in Sucker for a Cute Face.
- Invoked with a blooper of a Sonic the Hedgehog fancomic, Umbrella, taking place after the moment Shadow grabs a Chaos Emerald out of hammerspace and teleports elsewhere.
Amy: Wait... He kept that emerald in his quills the whole time?
- In My Little Pony: Equestria Girls, Pinkie Pie has the same ability as her pony counterpart (see below), pulling a clipboard and pen out of her curly and fluffy hair. In the sequel Rainbow Rocks, she stashes cookies and her drumsticks in here. In Friendship Games, she even pulls out a fully-cooked cake and pie.
- The Pirates! In an Adventure with Scientists!: The Pirate Captain hides plenty of bizarre stuff in his beard, including his precious Pirate Parrot... er... Pirate Dodo.
- In Foxy Brown, the title character hides a pistol in her afro.
- In Coffy, the protagonist (like the character above, also played by Pam Grier) hides small blades in her afro. See below under Real Life.
- In Braveheart, William Wallace hides a mace behind his hair and down his back.
- In Ferris Bueller's Day Off, Edie McClurg (School Secretary) pulls like three pencils from her fluffy curls and goes back for another! This wasn't a special effect — the actress and director, between takes, wondered how many pencils she could hide in her hair... apparently the answer was "more than 4".
- In Leprechaun in the Hood, Ice T pulls a knife and then a baseball bat out of his 'fro.
- This occurs in the film and novel Hannibal, in which Starling gives officers a pre-arrest warning that their HIV-positive arrest target likes to hide syringes in her hair, knowing that law-enforcement officers like to shove their suspect down by the head when putting them in the car.

- In John Waters' 1988 Hairspray, Velma hides a bomb in her beehive hairdo.
- Done in a creepy way in Lorna Landvik's Angry Housewives Eating Bon-Bons: the abusive husband of one of the women forces her to wear her hair in the same outdated, complicated updo that his mother favors. She begins to hide things in her hair — like rolled up tissues, candy, etc. — to feel like she was subverting him.
- In the science fiction novel Steel Beach, a member of an Animal Wrongs Group never bathes or cuts his hair or beard. A number of animals and insects live in his hair.
- In the Smart Junior books by The Princeton Review, Barnaby's impressive hair is known to provide whatever the team needs at a given moment.
- In Meredith Ann Pierce's Treasure at the Heart of the Tanglewood, there's Hannah and her fertile tresses.
- In the Corellian Trilogy of the Star Wars Expanded Universe, Chewbacca keeps a few things hidden under his fur, such as a comlink (walkie-talkie/cell phone).
- In the stand-alone Novel Airman by Eoin Colfer, when an older friend and teacher is cornered by Marshal Bonvilain, the villain, Bonvilain says: "Now you probably have a dirk in your beard, or a derringer up your sleeve, or some other spy trick."  Or when her many guns run out of ammo.
- Apparently, on the Discworld it's a common skill among dwarfs to be able to hide battle axes in one's beard.
- In Megan Whalen Turner's Queen's Thief series, one of the major plot twists in the first book comes about as the result of the hero's use of this trope.
- In Dune, it's mentioned that the Emperor's Sardaukar soldiers carry a wire hidden in their hair to use as a garrote if captured and disarmed.
- In Danger 5, Stalin can use his moustache to hide full grown women. Which he does. The gag is later repeated with the Dodgy Toupee of the President of the World.
- Hannah Montana: Miley's Aunt Dolly always keeps her cell phone in her enormous blonde hairdo, because her pants are too tight.
- The Mighty Boosh: Rudy something something (he goes by many names) has an actual door (of Cuckoondo) in his afro.
- Stargate Atlantis: Ronon Dex hides a number of throwing knives in his dreadlocks.
Shepard: How many of those do you have in there?
Ronon: How many do you need?
- When he debuted on Monday Night Raw an image of Carlito with a pair of brass knuckles in his hair began circulating around the web(along with other weapons, including a grenade). WWE Day Of Reckoning even had him pulling an apple out of his afro.
- Abe "Action" Jackson has been said to have "foreign hair", as in his Afro is big enough to hide a weapon in.
- In SNK vs. Capcom, huge Street Fighter wrestler Hugo has tiny Bao from The King of Fighters cameo in his intro. Where does Bao happen to pop up (and hide in when the fights start)? Hugo's sizable hair.◊
- In the Neo Geo fighting game Savage Reign, gymnast Carol fights with an Olympic pink ball; if thrown as a projectile, she produces another from underneath her hair. Her hair isn't much past her shoulder, and the ball is about as large as her whole head...
- In Final Fantasy XIII, Sazh keeps a baby chocobo in his afro. Fan Nicknames: "Chocofro", "Frocobo".
- Pokémon:
- According to flavor text, Zoroark parents carry their young in their hair.
- Munchlax stores food in its long fur. However, because it is so hungry, it forgets that it's even there until it rots.
- In the Pokémon Masters mobile game, Iris mentions that she sometimes stores things in her hair. Her Haxorus stored berries in her hair once... and when taken out later they looked exactly the same as they did before they went in her hair.
- In Ozy and Millie, Ozy goes out in a cold snap before his winter coat comes in. The result is that it comes in all at once, leaving him extremely fluffy. Millie takes advantage of this to hide things in him, up to and including a piano.
- In the webcomic Everyday Heroes, Carrie uses this trope literally once or twice.
- Eddie from Emergency Exit can pull random things (including hammers) from his hair. This is eventually revealed to be because he forced a portal into his skull to keep the villains from getting it. It's also apparently when he became such a Cloudcuckoolander.
- Rufus from Terinu, being a fox furry, has on at least one occasion hidden a locator unit for his ship in his tail.
- A Loonatic's Tale: The Zinc family hair eats things. But since it's normal hair by all other standards, it doesn't actually do anything with this stuff once it's got it. So if it gets a hold of something really important and you need to pull it out, you'll probably bring some debris, and perhaps the odd bird carcass, along with it.
- APT Comic: Ammika does this occasionally.
Inferno: Where are you keeping that map, anyway?
- Amber from Matchu has picking stuff out of her insanely long hair as her morning routine. Such things include quarters, pizza boxes, potted plants, a-bombs, her cat and her best friend.
Amber: What were you doing in there?
Famine: What WAS I doing in there?
- Wrestling parody site Scoopthis.com had a Running Gag about WCW wrestler Meng's afro serving this purpose. At one point, his fro ate Rey Mysterio.
- "There is no chin under Chuck Norris's beard, only another fist."
- Inverted: "There is a windmill in my beard."◊
- This Flareon manages to contain an Eevee in its tail. An Eevee is only about half the height and 1/4 the weight of a Flareon, but still, that's quite a hiding spot.
- Fluffle Puff has all sorts of weird stuff contained in her seeming-endless fluff; she can house the Mane 6, the Diarchs, Discord, Chryssi and Fausticorn, and Spike once took days to navigate her fur to scratch her back.
- In the Rooster Teeth Shorts, Beard Meeting, Burnie and Blaine's search for a room to have a meeting in Adam's beard, much to his displeasure.
- In Rhett & Link's Hair Song, Link mentions this as a benefit of hair that goes down.
- The Simpsons:
- Marge Simpson. She has carried money in it at various times and it's strong enough to hold a beach umbrella. And a ten-pin bowling ball (though not at the same time!).
- Sideshow Bob likewise hid evidence of his electoral fraud in his giant 'fro.
- The Super Globetrotters (the 2nd Harlem Globetrotters cartoon) has Gizmo Man, one of the team members; sporting a truly epic Funny Afro. He also just took a moment of rooting around and whatever he wanted could be found in that 'fro.
Fluid Man: Man, that Lou's better than traveler's cheques!
- In an episode of Family Guy, Peter grows a beard in which he keeps several birds.
- Speaking of which, here's a limerick by Edward Lear, 1846, adapted as a cartoon short◊ for Sesame Street:
''There was an old man with a beard
Who said, "It is just as I feared!
"Two owls and a wren,
"Four larks and a hen
"Have all built their nests in my beard!" - Uncle Ruckus from The Boondocks suspect Huey is hiding something in his afro, when he's doing a commentary on the season one DVD.
- In the French cartoon franchise Il était une fois..., most incarnations of the Maestro have a Hammerspace beard that reaches to his ankles, stores everything in the world, and possibly serves as a Godiva Beard.
- Shag from Road Rovers. He once hid another team member in his fur.
- Captain Caveman: The title character, being completely covered in hair, would often pull out things from his chest. Including dinosaurs.
- Dexter's Laboratory: Val Hallen of the Justice Friends, in a one-off gag involving an X-ray.
- An episode of Jimmy Two-Shoes has Heloise keeping one of her gadgets in her ponytail.
- My Little Pony: Friendship Is Magic: Pinkie Pie can use her curly and fluffy mane to produce/hide all manner of objects, including a flashlight and a scrapbook. Most egregious is when she's able to produce a full cake and have it still be edible or a full-sized, fully functional confetti cannon out of there. Has become Memetic Mutation in the fanbase that she has a Pocket Dimension in there somewhere.
- Steven's pet lion in Steven Universe has an entire pocket dimension in his mane, and it is often used to store items like his sword for withdrawal at a moment's notice. When Steven brings Lars Back from the Dead, Lars' hair leads to the same dimension, connecting the two.
- The Shirley in Shaun the Sheep is sometimes shown to have all kinds of things hidden in her wool- a hammer and nails, large stacks of money, and even a car tire.
- Grandpa Smurf in The Smurfs stores a lot of stuff in his beard.
- In one episode of Kaeloo, Mr. Cat dresses up as Jules Winnfield for most of the episode and uses a wig which he uses to store stuff.
- In Total Drama, particularly in the Total Drama Revenge of the Island episode "Truth or Laser Shark," Anne Maria has stated that she kept her hair spray (among other things) in her "poof." It's a mystery how she can carry a can of hairspray, let along a whole bunch of cans, in a hairdo that's as hard as a ship's hull.
- Li'l Gideon in Gravity Falls hides pieces of Journal #2 inside his over-sized pompadour.
- In 2008, Amy Winehouse was filmed taking cocaine on stage, after apparently taking the vial out of her hair.

- As stated in the trope description, this is actually a rather nasty fighting technique: people put sharp things in their hair not for their own use, but place them there with the expectation that other people will attempt to grab their hair in a fight.
- On the 2013 Teen Tournament of Jeopardy!, contestant Leonard Cooper remarked that a fellow student hid a highlighter pen in his Funny Afro, which went undiscovered for several days.
- Some Sikh warriors would wear a trident, or Trehsool Mukh, in their turbans. Their hair itself was wound around the skull to protect it. Source.
- In the great days of the French court at Versailles, society ladies and courtiers favoured really big hair. The pompadour style involved piling up both long natural hair and adding hair extensions into progressively more baroque styles which were practically welded into place, which often incorporated cages of birds, pet animals in cages, and in one instance a brief fad for entire clocks incorporated into the pellicure....
- Oral tradition in Suriname has quite a few stories about slaves hiding rice or other grains in their hair as an emergency food source.


A C implementation of the Constrained Application Protocol (RFC 7252)
Copyright (C) 2010–2022 by Olaf Bergmann bergm.nosp@m.ann@.nosp<EMAIL_ADDRESS>and others
About libcoap
libcoap is a C implementation of a lightweight application-protocol for devices that are constrained their resources such as computing power, RF range, memory, bandwidth, or network packet sizes. This protocol, CoAP, is standardized by the IETF as RFC 7252. For further information related to CoAP, see http://coap.technology.
You might want to check out libcoap-minimal for usage examples.
The following RFCs are supported
- RFC7252: The Constrained Application Protocol (CoAP)
- RFC7390: Group Communication for the Constrained Application Protocol (CoAP)
- RFC7641: Observing Resources in the Constrained Application Protocol (CoAP)
- RFC7959: Block-Wise Transfers in the Constrained Application Protocol (CoAP)
- RFC7967: Constrained Application Protocol (CoAP) Option for No Server Response
- RFC8132: PATCH and FETCH Methods for the Constrained Application Protocol (CoAP)
- RFC8323: CoAP (Constrained Application Protocol) over TCP, TLS, and WebSockets [No WebSockets support]
- RFC8516: "Too Many Requests" Response Code for the Constrained Application Protocol
- RFC8768: Constrained Application Protocol (CoAP) Hop-Limit Option
- RFC9175: CoAP: Echo, Request-Tag, and Token Processing
There is (D)TLS support for the following libraries
- OpenSSL (Minimum version 1.1.0) [PKI, PSK and PKCS11]
- GnuTLS (Minimum version 3.3.0) [PKI, PSK, RPK(3.6.6+) and PKCS11]
- Mbed TLS (Minimum version 2.7.10) [PKI and PSK]
- TinyDTLS [PSK and RPK] [DTLS Only]
Documentation
This set of pages contains the current set of documention for the libcoap APIs.
License Information
This library is published as open-source software without any warranty of any kind. Use is permitted under the terms of the simplified BSD license. It includes public domain software. libcoap binaries may also include open-source software with their respective licensing terms. Please refer to LICENSE for further details in the source.


--- layout: page title: About header-img: "img/about-bg.png" ---
Sachin is a full-stack web developer and creative problem-solver from Chicago who brings years of leadership experience with him in his journey into the world of coding. Before learning web development, Sachin taught STEM robotics and coding to elementary students, which inspired him to study software engineering. Sachin also spent many years abroad teaching English on beautiful Jeju Island in South Korea.


Circumflex Web Framework is a DSL for quick and robust web application development.
Here's the sample web application:
class Main extends RequestRouter {
get("/") = "Hello world!"
get("/posts/:id") = "Post #" + uri("id")
post("/form") = {
// do some work
// render FreeMarker template:
ftl("/done.ftl")
}
}
There's a couple of projects hosted on GitHub which can help you understand Circumflex Web Framework better:


You may use custom drop directives to allow multiple models to be dropped into single container in more clear manner. In this example you may drop fruits from first basket to second (one by one), or drop entire basket to move all items from it to the second one.


@********************************************************* * general 2 bar layout with project menu on left * * used on project pages * * @param projects all the projects available to whom? * * @param user name of current user who is logged in * * @param body main html, from other templates * ********************************************************@ @(projects: Seq[Project], user: User)(body: Html) @layouts.main("welcome to Smarter Data", user) {


Defining the Future And Achieving New Milestones
Here at Troika, every day we are discovering and implementing new technologies that set the stage for what tomorrow will look like. Find out how we recently entered the forefront of radiospectroscopy
We Need the Best and Brightest.
In order to ensure that we can keep our edge against the competition at home or abroad, we cultivate talent through numerous scholarships for high school and university students, as well as creating agreements with schools for internship opportunities.
International Partnership and Collaboration
We need to be able to collaborate with our allies in order to be stronger together. That's why Troika conducts collaborating projects with firms all around the world to build upon one another's advancements.


Pat's Salmon Cookies
Home
Sales
Shop
Add Store
New Store Name
Minumum Customers Per Hour
Maximum Customers Per Hour
Avg Cookies Per Customer
Sales by Location