Free Science Fiction Stories

Free stories from the depths of my imagination

Wee Basic 0.81 New version of nintendo ds basic interpreter

Wee81

Version 0.81

(Thanks to banana joe and montesquou for their suggestions in the comments for the last version)

- revamped load screen now lists files in the root directory for you to select (no more typing in file names)
- more colours added to lines and plots
black 1
blue 2
green 3
cyan 4
red 5
magenta 6
brown 7
white 8
gray 9
light blue 10
light green 11
light cyan 12
light red 13
light magenta 14
yellow 15
bright white 16
(colour 0 deletes)
- new sprite functions to flip vertically and horizontally:
* hflip <sprite no>,<screen>
* vflip <sprite no>,<screen>
- for/next now has a step parameter (the step parameter is added in square brackets):
for <variable>=<numexpression> to <numexpression> [<numexpression>]
eg for i = 10 to 1 [-2], for j= 10 to 100 [10]
- you can now use ‘;’ with print to keep on the same line (see sample program)
- new math functions added: sqr, pi, asin, acos, atan, sinh, tanh, cosh and abs
eg let x=pi, let s=sqr(5)+pi-tanh(10)+abs(-10)
- fixed: label errors
- fixed: crash when file is loaded that exceeds editor capacity

Download:WeeBasic81

(Change .ppt to .rar and unpack – as always, use at own risk)

September 4, 2009 Posted by freescifistories | Nintendo DS | | 13 Comments

Wee Basic 0.8 (another update) – Basic interpreter for the nintendo ds

Yes folks it’s a big day for news (who am I kidding, I’m the only one who reads this blog!).  Wee has been updated yet again to version 0.8.

Wee08

New/fixed:

- new dashboard with save, run and load icons (touch to enable)
- cursor is off the screen for save and load
- key combination to break: you can now hold ‘A’ and ‘Start’ at the same time to break a running program (eg if you get stuck
in an infinite loop)
- all keys are now supported for key() operator, including L and R keys  and Start and Select keys  Summary of values returned by key():

X: 200
Y: 201
A: 202
B: 203
Left: 204
Right: 205
Up: 206
Down: 207
L: 208
R: 209
Start: 210
Select: 211

- input statement bugs fixed

Download here:Wee08

As usual change .ppt to .zip and you’re awaaaayyyy (at your own risk of course)

June 16, 2009 Posted by freescifistories | Nintendo DS | | 31 Comments

Wee Basic 0.7 Released

Wee’s in for an update yet again.

Wee07

changes:

- editor bugs inserting text and backspacing fixed: many thanks to Peter Reissner (aka s54boc) for fixing these
- new splash screen
- cursor starts in correct position on launching wee basic
- comments can now be made in program.  Just start with ‘rem’ and everything is ignored until a ‘*’.  For example:

rem this will be ignored *
print 1 “This will not be ignored”

- cursor is now off-screen while a BASIC program is running

Download here: Wee07

Change .ppt extension to zip and you’re right to go.  A always, use at your own risk.

Wee072(Above, Peter Reissner’s program)

May 31, 2009 Posted by freescifistories | Nintendo DS | | 8 Comments

Wee Basic 0.6 Released

Summary

Good news for me and myselves. The new version of Wee Basic has arrived.

Where exactly are we on this road map to hell? Wee basic now has:

- backgrounds
- sprites
- sounds
- microphone
- key presses (keyboard and most hardware keys)
- stylus touches (touch recognition and coordinates)
- motion
- primitive graphics
- basic printing and coordinate printing
- both screens can be used
- core basic commands
- usable editor with save/load, using text files

(But don’t pee in your pants yet my lovelies).

Version 0.6

Fixed:

- editor has been completely revamped thanks to Alan’s txtwriter source code. See http://ds.spacemonkeymafia.com.
I modified some of txtwriter’s basic editing code for the Wee Basic editor.
- bug in boolexpressions (for if/while) using strings

added/changed:

- added motion commands (untested)
motion (keyword initializes motion – throws an error if no motion card detected)
motx, moty (motion coordinates)
example:

motion
let x=motx
let y=moty
print 1 “Motionx: “+x
print 1 “Motiony: “+y
end

- playmp3 now has optional settings
Syntax is playmp3 <filename> <volume>,<pan>,<bitrate> (each is an integer or number variable)
You can still use playmp3 without options if you want to keep it simple

As usual, download wee06.ppt and change extension to zip – enjoy. Usual rider – use at own risk.
Download: wee06

March 18, 2009 Posted by freescifistories | Nintendo DS | | 38 Comments

To Zomboula: Wee 0.5, sounds and all

Commenter zomboula’s gonna be mighty pleased with this new version of Wee Basic because:

- it has SOUND (can play mp3s); and

- you can record and play from the DS MICROPHONE.

Yipppppeeeeeeeeee!!

One more surprise: some of you my be happier with the editor. Not brilliantly astonishingly pleased, but a tinsy bit happier.

As usual, download the ppt file and change the extension to zip. Archive includes a sample program to test the new commands.

Happy programming.

PS Wee Basic manual is now a separate page on this site. Enjoy my friends. (Sorry for being presumptuous – I really have no friends except for me, me and me!

wee05

(As always, use at own risk)

November 6, 2008 Posted by freescifistories | Nintendo DS | | 14 Comments

Wee Basic and Neo Spring Comp 2008

Forgot to mention that I’m pleased (but not insanely outrageously excitedly enthusiastically ready to pop a  multitude of corks) that Wee Basic came in the top 10 winners of the Neo Spring Competition.

See: http://www.neoflash.com/forum/index.php?topic=5080.0

Thank you to Dr Neo et al.  I’m assuming that Dr Neo is not a medical practitioner and likely not the holder of a phd.  I think he’s a doctor of competitions.

Actually, this is all a bit meh.  I think I’ll go back to my hovel which is a metaphor for the rock I live under, which is a metaphor for the simile that my life is like eternal confinement  (I’d take the red pill any day).

By the way, I’m sick of using the comments for arguments between my many different personalities so if someone wants to leave a comment, don’t feel shy!  Well, back to my medication….

May 16, 2008 Posted by freescifistories | Nintendo DS | | 4 Comments

Wee Tic Tac Toe Demo

I’ve written a tic tac toe demo for Wee Basic in order to demonstrate use of about 95% of the language. The main things it leaves out are sprites and backgrounds which were demonstrated on the release of Wee 0.4.

Tic tac toe is based on a program written by Tim Hartnell in his Giant Book of Computer Programs in the 1980’s, modified for Wee Basic using a great tool called BAS2SB which converts line numbers into standard BASIC. I recommend both Tim Hartnell’s books and BAS2SB.

This blog does not allow me to upload txt files (ver frustrating!) so I’ve put a ppt extension on the file. To use it, just change the ppt extension to txt. Download here:tictactoe.ppt

Here’s a screenshot (not that pretty but I’m sure someone will improve it):

tictactoe.jpg

If you are getting “statement expected” error at the end of this program or the sprite demo, see my post in this topic:

http://www.neoflash.com/forum/index.php/topic,5039.0.html

March 22, 2008 Posted by freescifistories | Nintendo DS | | No Comments Yet

Wee Basic – Now with Sprites and Backgrounds

Yes, you heard it. Wee Basic now allows the use of sprites and backgrounds so you can try your hand with real Nintendo DS games using simple BASIC.

running.jpg

weeneo.jpg

I’ve even entered Wee Basic for the first time in the NeoFlash summer coding competition: http://www.neoflash.com/forum/index.php/topic,4951.0.html

Version 0.4

Download: wee04.ppt

To use the demo program,put Wee and all of the gif files and demo.txt into the root directory of your card.
Then load the demo in Wee Basic, press A or start to run and enjoy!
Don’t forget to DLDI patch Wee for your card.

Fixed:

- bugs with nested ifs

added/changed

- neo splash screen
- sprites on both screens (must be gif files)
- backgrounds on both screens (must be gif files)
- can uses start or A to start a program running
- new commands:

loadspr number,screen,x,y,,width,height,file name (creates a sprite specified by the file name on the screen specified at the specified coordinates)
movspr number, screen, x,y (moves an existing sprite specified by the number to new coordinates x and Y on the screen)
delspr number, screen (deletes the specified sprite)
backgr screen, file name (creates a background on the specified screen with the gif file specified by the file name)

Notes:

- file names must be valid gif files and you must specify the full file name
- gif files must be kept in the root directory of your card
- don’t try to move or delete sprites that you haven’t created
- each screen has its own numbered sprites, so you can specify the number 1 for a sprite on the top and bottom screens but don’t specify the same number for sprites on the same screen

(Look at the demo program for examples)

As always, when you download the file, change the extension from PPT to ZIP.

Edit: As Goomek pointed out in the comments, I forgot the demo program.  Here it is (just copy and paste into a text file):

let soldier=1
let bottom=0
let top=1
let keya=202
let keyb=203
let right=205
let left=204
let soldx=5
let soldy=95

cls 1
keyhide
cls 0

gosub topback:
gosub botback:
gosub soldspr:

lab start:

let k=0
let k=key()

if k=keyb
gosub jump:
endif

if k=keya
goto finish:
endif
if k=right or k=left
gosub movsold:
endif

goto start:

lab finish:
end

sub key:
let k=0
while k=0
let k=key()
wend
return

sub topback:
backgr top,”island.gif”
return

sub botback:
backgr bottom,”lake.gif”
return

sub soldspr:
createspr soldier,bottom,
soldx,soldy,32,64,
“soldier.gif”
return

sub movsold:
if k=right
let soldx=soldx+20
movspr soldier,bottom,
soldx,soldy
endif
if k=left
let soldx=soldx-20
movspr soldier,bottom,
soldx,soldy
endif
return

sub jump:
for i=1 to 4
let soldy=soldy-20
movspr soldier,bottom,
soldx,soldy
gosub delay:
next
for i=1 to 4
let soldy=soldy+20
movspr soldier,bottom,
soldx,soldy
gosub delay:
next
return

sub delay:
for j=1 to 10
next
return

March 19, 2008 Posted by freescifistories | Nintendo DS | | 5 Comments

Wee Windows – Now you can program for the DS on Windows

The official poll winners are those who asked for Wee Basic on windows. Now you know the power of the poll!

Wee Windows: Windows version of Wee Basic

Instructions

1. Key mapping

D-Pad: use PC arrow keys

A, B, X and Y: PC keys F1, F2, F3 and F4

Keyboard: Use PC Keyboard

(Do not use the on-screen keyboard in the emulator as it is only there to show if the keyboard is hidden or not on the real DS. Other than that it does NOTHING).

2. Mostly self explanatory. Use ‘run’ in menu to run your basic program ( a DS emulator will suddenly appear!)

3. To install: change ppt to zip. The unzip all files into a single folder of your choice.

4. Known issues

-pressing F12 crashes when using key()
- stylus coordinates cannot be used – they don’t scale to the DS
- only capital appear when using the input function
- residual keypress on run

Be gentle with me. It’s only a first release :)

Download here:release-01.ppt

As usual change ppt to zip before opening.

This program comes with no warranty of any kind – use at own risk.

January 15, 2008 Posted by freescifistories | Nintendo DS | | 4 Comments

Wee Basic Keywords Updated

I have updated the keywords document for Wee Basic so that it is more helpful. I will continue to update it so that anyone can pick up programming on the DS quickly and easily.

Download: wee-basic-keywords.doc

December 3, 2007 Posted by freescifistories | Nintendo DS | | No Comments Yet