Nextbuild – nextlib.bas Routine Lists

Here’s a quick list of the routines available with Nextbuild

MMU8(byval slot as ubyte, byval bank as ubyte)
Maps in an 8kb memory slot

MMU8new(byval slot as ubyte, byval memorybank as ubyte)
Maps in an 8kb memory slot but different code

MMU16(byval memorybank as ubyte)
changes 16kb 128k style bank @ $c000, supports full ram
‘ now works slots 6 and 7 will be changed

GetMMU(byval slot as ubyte) as ubyte
a=GetMMU(6) bank set at slot 6

GetReg(byval slot as ubyte) as ubyte
a=GetReg(10) would return register 10

Debug(BYVAL x as UBYTE,byval y as ubyte, s as string)
quick print to ULA for debugging so you don’t need to
include the huge print library

ShowLayer2(byval switch as ubyte)
Controls if L2 is 0 off or 1 on

ScrollLayer(byval x as ubyte,byval y as ubyte)
Scrolls L2 by x y pixels

PlotL2(byVal X as ubyte, byval Y as ubyte, byval T as ubyte)
Plots to L2 at X Y with T colour

CIRCLEL2(byval x as ubyte, byval y as ubyte, byval radius as ubyte, byval col as ubyte)
Draws unfilled circle on to L2

NextRegA(reg as ubyte,value as ubyte)
For use when A being a variable and requires different handling then nextreg const,const

NextReg(reg as ubyte,value as ubyte)
When both values are constants, sets register with value

zx7Unpack(source as uinteger, dest AS uinteger)
unpack zx7 compressed data from source to dest

InitSprites(byVal Total as ubyte, spraddress as uinteger, bank as uinteger=0)
Initaliases sprites from addressable RAM

InitSprites2(byVal Total as ubyte, spraddress as uinteger,bank as ubyte=$0)
Initialises sprites from a specified bank and offset into bank

RemoveSprite(spriteid AS UBYTE, visible as ubyte)
Removes sprite

UpdateSprite(ByVal x AS uinteger,ByVal y AS UBYTE,ByVal spriteid AS UBYTE,ByVal pattern AS UBYTE,ByVal mflip as ubyte,ByVal anchor as ubyte)
Controls specified sprite (spriteid) attributes

LoadBMP(byval fname as STRING)
Loads a BMP image and shows it

ReserveBank() as ubyte
a=ReserverBank() uses the OS to reserve a bank

FreeBank(bank as ubyte)
free a bank reserved previously

LoadSDBank(byval filen as String,ByVal address as uinteger,ByVal length as uinteger,ByVal offset as ulong, bank as ubyte)
Used to preload data into banks when using NEX format.
if the NEX switch is used these commands are processed by the PRECOMPILER and included into the NEX file, the line of code
in the source is then ignored.

LoadSD(byval filen as String,ByVal address as uinteger,ByVal length as uinteger,ByVal offset as ulong)
Used for runtime loading data

SaveSD(byval filen as String,ByVal address as uinteger,ByVal length as uinteger)
Used for runtime saving

DoTileBank16(byVal X as ubyte, byval Y as ubyte, byval T as ubyte, byval B as ubyte)
Draws a 16×16 256 colour tile from B = bank at X Y and T is tile

DoTile8(byVal X as ubyte, byval Y as ubyte, byval T as ubyte)
Draws a 8×8 256 colour tile at X Y and T is tile

DoTileBank8(byVal X as ubyte, byval Y as ubyte, byval T as ubyte, byval b as ubyte)
Draws a 8×8 256 colour tile from B = bank at X Y and T is tile

FDoTile16(tile as ubyte, x as ubyte ,y as ubyte, bank as ubyte)
Draws a 16×16 256 colour tile from B = bank at X Y and T is tile on 320×256

FDoTile8(tile as ubyte, x as ubyte ,y as ubyte, bank as ubyte)
Draws a 8×8 256 colour tile from B = bank at X Y and T is tile on 320×256

L2Text(byval x as ubyte,byval y as ubyte ,m$ as string, fntbnk as ubyte, colormask as ubyte)
Draws string using font in fntbnk at x,y on 256×192

FL2Text(byval x as ubyte,byval y as ubyte ,byval m$ as string, fntbnk as ubyte)
Draws string using font in fntbnk at x,y on 320×256

FPlotL2(y as ubyte ,x as uinteger ,c as ubyte)
Plot on 320×256

FPlotLineV(y as ubyte ,x as uinteger ,h as ubyte, c as ubyte)
Draw Vertical line on 320×256

FPlotLineW(y as ubyte ,x as uinteger ,w as uinteger, c as ubyte)
Draw Horizontal line on 320×256

PalUpload(ByVal address as uinteger, byval colours as ubyte,byval offset as ubyte)
Uploads palette from address

CLS256(byval colour as ubyte)
clears 256×192

ClipLayer2( byval x1 as ubyte, byval x2 as ubyte, byval y1 as ubyte, byval y2 as ubyte )
Clips L2

ClipULA( byval x1 as ubyte, byval x2 as ubyte, byval y1 as ubyte, byval y2 as ubyte )
Clipse ULA

ClipTile( byval x1 as ubyte, byval x2 as ubyte, byval y1 as ubyte, byval y2 as ubyte )
Clips Tile

ClipSprite( byval x1 as ubyte, byval x2 as ubyte, byval y1 as ubyte, byval y2 as ubyte )
Clips Sprite

TileMap(byval address as uinteger, byval blkoff as ubyte, byval numberoftiles as uinteger,byval x as ubyte,byval y as ubyte, byval width as ubyte, byval mapwidth as uinteger)
Draws software tile map from address, with a blkoff block offset.

WaitRetrace(byval repeats as uinteger)
Wait for retrace line

WaitRetrace2(byval repeats as ubyte)
Wait number of vblanks

WaitKey()
Wait for key

Leave a Reply