• entries
    222
  • comments
    608
  • views
    588361

BBC BASIC's improved filling, *EXEC and Lights Out

Sign in to follow this  

898 views

Progress on the TI-83+/TI-84+ port of BBC BASIC continues - I'm hoping to get a beta release out soon. [smile]


I've done quite a lot of work on the graphics features. Every shape that is plotted can be set to either the foreground colour, background colour or to invert the pixels it covers. This wasn't implemented properly (everything was always drawn in the foreground colour) which has been corrected.

The first image in the above group shows the flood-filler in action, filling inside and outside a triangle. The second image demonstrates the ellipse drawing and filling code by qarnos. It had a small amount of overdraw, which is not normally a problem, but in an inverting plot mode drawing a pixel twice causes it to reset to its original value. This ends up leaving gaps in the circle. Fortunately he was able to give me a lot of help in fixing it. [smile]

The third image demonstrates a non-standard feature I've added - being able to set your own fill patterns. The GCOL statement lets you set the foreground or background colour, and for values between black and white a dithered fill pattern is substituted instead. GCOLPAT takes a pointer to an 8x8 pixel fill pattern and subsequent fill operations will use that instead; passing FALSE (0) to GCOLPAT or setting a colour normally via GCOL reverts to the standard dither fills.

I've also done a small amount of benchmarking. There's a sample program in the TI-83+ guidebook that draws a Sierpinski triangle.


On a regular 6MHz TI-83+, the TI program takes 7 minutes and 8 seconds to run. A direct translation to BBC BASIC executes in 2 minutes and 21 seconds, and a simplified version executes in 1 minute and 56 seconds.


I'm also trying to improve the number of OS-level "star" commands. Above is a demonstration of *EXEC which reads console input from a text file. A file is opened for output using OPENOUT, some text is written into it using PRINT#, and then it it *EXECuted. This is one possible way of converting a text file into a BBC BASIC program.


Finally, I'm trying to write a game as an example program. The above screenshot shows an incomplete clone of the Lights Out game by Tiger Electronics.
Sign in to follow this  


5 Comments


Recommended Comments

Quote:
Original post by Reelix
You seem to be really good at that game!

Lots of practice before recording for the gif? :)
I have the original handheld version and played through it many times years back, so yes - lots of practice. [grin]
Quote:
Original post by MarijnStevens
How do you capture the movies ?

I have an ti-84 but your movies are way to smooth to run on real hardware, right ?
BBC BASIC is much faster than the built-in programming language on the TI-83+/TI-84+ series calculators. The speed of the GIFs depend on your browser. Opera and Firefox run them at the correct speed (though Firefox applies an ugly filtering to them). They play back too slowly in IE.

As for software, I'm using the Wabbitemu emulator by RevSoft. Press Esc to start/stop recording to GIF.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now