SpecBAS 0.800 Released!
Hi folks, it's that time again for another release. I was going to add a few more features, but I have other projects on the go at the moment, and it's looking like being a while... So I'm releasing what I have.
Feel free to report bugs and suchlike as they pop up - there's been a lot of rewriting of the core interpreter in this one. It's faster (though as your CPU speed increases the optimisations matter less - 600MHz Pandora version is a lot faster) and as a result, likely less reliable for now. I'll get the bugs fixed... Most have been ironed out by now!
Anyway, get it from here:
https://sites.google.com/site/pauldunn/SpecOS.zip
And install as usual. The changelog consists of the following:
Enjoy!
D.
Feel free to report bugs and suchlike as they pop up - there's been a lot of rewriting of the core interpreter in this one. It's faster (though as your CPU speed increases the optimisations matter less - 600MHz Pandora version is a lot faster) and as a result, likely less reliable for now. I'll get the bugs fixed... Most have been ironed out by now!
Anyway, get it from here:
https://sites.google.com/site/pauldunn/SpecOS.zip
And install as usual. The changelog consists of the following:
Added: Optimised variable accesses local to procedures, quite a nice result there Speedups added to any commands that utilise the stack - GO SUB, DO .. LOOP, WHILE, UNTIL etc TEXTURE$ converts a string to a graphic-string for use in, i.e., fills LET can now assign a value to multiple variables - LET a,b,c=0 or LET a$,b$,c$="Hi" for example More optimisation to internal string handling You can, if you really want, start a line with any number of statement separators (:) Protected banks show up with a small "key" icon to indicate their locked state in LIST BANK Converted the whole interpreter to store token handlers inside the tokens themselves - much more efficient Improved variable caching to save on look-ups, results in a respectable speed boost String operations should now be quite a lot quicker due to a better string copying routine CONST name,value - sets a constant. Like a variable, but much faster to process as no look-up is needed SCALE sx,sy is now a standalone command SCALE can now be used in INPUT the same as in PRINT Sprite clones now inherit OVER and such, but still don't cause collisions Sprites can now wrap - use WRAP WINDOW or WRAP CLIP (to wrap to the clipping region) after SPRITE NEW Converted Sprite movement systems to relative offsets instead of absolutes LIST BANK now lists banks in ID order Added an Out of Memory error for overrunning the various stacks allocated to BASIC Sprites now have their own OVER mode. Set it with SPRITE NEW id,x,y [COLLIDE] [OVER m] or SPRITE OVER id,mode INCLUDE now searches the "include:" assign for files if they're not found in the current directory Fixed: Certain embedded PRINT commands were evaluated in the wrong order Fixed sprite wrapping for sprites that don't quite ... wrap properly REM splitting is bugged - so has been disabled for now pending a proper fix Forcing a SCROLL? prompt with a large font caused too much scrolling LIST VAR array() now displays empty arrays correctly You can no longer kill SpecBAS by resizing the editor windows too small Automatically created "system" banks can no longer be destroyed by the user Default mouse pointer is now restored if the current graphic being used is deleted or replaced Graphic banks, when rotated, were displaced on their own canvas Sprite Info handlers (such as SPRITEw et al) would crash with a negative frame value Some errors would render their lines non-editable SPRITE FLIP and SPRITE MIRROR didn't work correctly for sprites of even width/height, only odd Errors that return an "Invalid Keyword" error caused issues with the expression evaluator LIST BANK 0 listed ... interesting values for window metrics READing into a string array with one dimension now works as it should - these take precedence over regular string slicers Streams can now access memory banks like they are supposed to Eraseing (or generally mucking about with) a graphic bank that is the current drawing surface resets drawing to the default window SPRITEw and SPRITEh, when called with a spriteid that points to an empty sprite, crashed specbas LOAD "filename" BANK NEW now returns the correct bank ID number BANK ERASE wouldn't function correctly because it assumed all banks were fonts Banks can now be unprotected properly Many range-limited operations were overruning their allocated memory PRINTing at the very bottom of the screen might have caused a Scroll? message after all CASE no longer overwrites the case-stack and jumps to END CASE properly after WHEN The constant "PI" and the function of the same name were clashing... unsurprisingly! Rapid keyboard hammering could cause a crash as the internal keybuffer may get cleared while the interpreter is working on it Sprite collision now checks both the window -and- the display for sprite-to-sprite collision ON COLLIDE is cleared properly after NEW and RUN VAL no longer crashes specbas with invalid characters Sprite collision now only checks pixels in the sprite's window, not the overall screen display String slicing with one element such as LET a$(1)="H" for a string variable now works again Sprites now inherit the correct window info when changed to a new window PRINTed newlines were taking up two rows of characters rather than one, which resulted in erroneous "Scroll?" prompts
Enjoy!
D.
Post edited by Dunny on
Comments
The optimisations should help Pi users out too. Edit: Updated my Pi console build and I reckon I'm getting a 50% speedup on things like the plasma demo. Nice one!
B
zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
Sinclair FAQ Wiki
It can also be found more directly at: www.reallyquick.co.uk/specbas
in the rare times (like right now) that the SpecBAS homepage is down.
If he's otherwise engaged though, I can do one tomorrow (my own Pi build is console based and has quite a lot of customisation).
B
zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
Sinclair FAQ Wiki
You can "wget http://freestuff.grok.co.uk/specbas-pi.deb && sudo dpkg -i specbas-pi.deb" from a command prompt on your Pi to install/upgrade to the latest version (this will create a SpecBAS icon in the Start->Programming menu and, if you don't already have a ~/specbas home folder it will create one for you and fill it with the extra fonts and demo programs.
If you want the old-style manual install: http://freestuff.grok.co.uk/specbas-raspi.zip is the place to go.
Looking forward to playing about with this new build myself as Dunny reckons it should be a fair bit faster on lower-spec hardware like the Pi :)
Glad there's been a nice speedup on the Pi - was hoping that would be the case. I really need to get one for my empty 48k case!
I've hugely sped up line drawing, which affects polygons and curves, and I've also rewritten the ellipse, rectangle and filled polygon routines.
I've been drawing them one pixel at a time, and testing each pixel for things like INVERSE, clipping rectangles and OVER - I now only do that for each call to a line draw or circle etc which reduces the number of tests per pixel to practically zero.
Here's a nice little proggy that demonstrates the polygon routines:
Save it as text in your specbas home directory as usual. The speedups are only available on the Pi currently, v0.801 will be out for PC Windows/Linux shortly.
Enjoy, everyone :)
D.
Games List 2016 - Games List 2015 - Games List 2014
Hope not. If it does, let me know. I've not seen any floating point errors in well over a year.
D.
oooo I get them at least once a "project"
Maybe I'm using an older one than I thought...cheers
As I said, if you do get one of those then let me know what you were doing, what you think caused it, and if you can - a small listing that demonstrates the crash. If you can do all that, I can fix the error. If you look at the "bug reports" thread on the official forums, you can see that I've fixed hundreds.
D.
..and followed the enclosed instructions to the letter from Chris C. on installing SpecBAS to finally run my first application and written program from SpecBAS...!!!!
Yaaaayy... its a wonderful day!!!!...
:)
Big Thanks for creating this, and to everyone else in their work in porting it across to other platforms (Raspberry Pi, Pandora, etc...)...
:smile:
Not sure if this is the best place but....this listing keeps dying on me despite re typing from a previously saved listing etc
EDIT - just trying SPECbas now, is there a way to import this code or do I need to type it all in again?
Yeah, that would be because it's a Speccy BASIC listing and not a SpecBAS listing. You have to bear in mind that for things to be upgraded - in this case, the screen display - some things had to go:
1. There is no BORDER, so the command doesn't exist.
2. Because the screen is 8 bits per pixel, and each pixel has its own colour, ATTR doesn't exist.
3. UDGs are now 64 bytes each, rather than 8 - this is because the font is also 8 bits per pixel. Have a look at some of the demos ("pattern" is one) to see how UDGs are made. The manual tells you how to type them in.
The rest should be fine, but you'll have to rework or work around those issues. Just simply saving it from BASin and then importing directly into specbas won't work.
D.
cheers man, but to clarify this listing stacks BASin not Specbas and those commands seem to work fine in BASin :-?
Well, BASin is a Spectrum emulator, so it will have all the Sinclair BASIC commands intact. SpecBAS is Sinclair BASIC on a much more powerful platform and takes advantage of newer hardware - and because the original BASIC gave commands and functions that allowed you to control that older hardware (a 1 bit per pixel screen with attributes, which ensured that UDGs would be 1 bit per pixel) those commands made no sense in SpecBAS.
I've tried to keep as much compatibility as I can, but there are some things that you'd need to work around or remove entirely.
ATTR in SpecBAS can't make any sense, as each pixel of a character square can be any colour, rather than just two on the Spectrum.
If you're reporting a bug in BASin, then this is entirely the wrong thread for that :)
D.
Someone find me Grusso cos I've not found the bug report thread for it :lol:
I see you've found the unofficial bug reports thread - it's quite fun to read, given that none of the bugs are ever likely to be fixed ;)
D.
damn...
two things with that program and basin
1. line 3010 (the massive PRINT line) was too big
2. line 1090 had an invalid UDG "w" when run
so I split line 3010 and changed the "w" to a "c" and it works in Basin
get the BAS file here.
https://sites.google.com/site/steashii/Home/wookie.bas?attredirects=0&d=1
cheers man - the w was me trying to fix another error on the fly....didn't work :lol: