MaxCoderz.org

Back in business




Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Wed Feb 11, 2009 3:41 am 
New Member

Joined: Wed Sep 03, 2008 1:52 am
Posts: 4
calc84maniac wrote:
Wow... that almost beats pure basic! :insane:
Image

Wow that's insanely fast. Where's a link for download?


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Wed Feb 11, 2009 5:03 am 
Regular Member
User avatar

Joined: Wed Oct 18, 2006 7:34 pm
Posts: 110
Location: The ex-planet Pluto
Nowhere... heh. I just randomly had that screenshot from way back when...

Edit: Also, I'm guessing it was recorded in 15MHz, whereas Ben's was probably 6MHz.

_________________
~calc84maniac has spoken.

Projects:
F-Zero 83+
Project M (Super Mario for 83+)


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Wed Feb 11, 2009 5:21 am 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 3981
Location: I cant seem to get out of this cryogenic chamber!
By not clearing and only drawing the head/(erasing) the tail instead of keeping a list of all elements, you can speed it up considerably. Im assuming thats what calc has done. Very nice btw.

_________________
"My world is Black & White. But if i blink fast enough, i see it in Grayscale."
Image


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Wed Feb 11, 2009 11:22 am 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 2938
Location: Croydon, England
Very nice screenshot, calc84maniac. :D

That's what I do, at any rate; a ring buffer with a pointer to the "head" element some way ahead of the "tail" element. Normally the head and tail pointers move forwards together, but to elongate the snake you can move the head pointer forwards and leave the tail pointer where it was.

As the game world is 24x16 units where each block is either "on" or "off" I use a 48 byte buffer (one bit per block) instead of a 1536 byte 24x16 array. This additional bit manipulation -
Code:
  490 REM Get or set point in the world
  500 DEFPROC_world(X%,Y%,V%)P%=Y%*3+X%DIV8:X%=X%AND7:IF V% world%?P%=world%?P%OR2^X% ELSE world%?P%=world%?P%ANDNOT(2^X%)
  510 ENDPROC
  520 DEFFN_world(X%,Y%)P%=Y%*3+X%DIV8:X%=X%AND7:=world%?P%AND2^X%
- probably does little for speed but it reduces memory concerns somewhat.

In a similar vein the longest snake would be 24x16 units long, and with an X and Y component for each you'd end up with a 3072 byte array, so I instead use a 768 byte buffer.

My screenshot was recorded at 15MHz, but I tried to get speed 9 roughly the same on both. (Last time I checked it played about as fast at 6MHz). You can make it run faster on an SE by removing the delay between frames entirely (currently capped at 3 centiseconds, ie 30ms) which is stored in the static variable S%:
Code:
  260   S%=(9-speed%)*5+3: ...
The game runs in the Windows version of BBC BASIC (where I originally developed it) if you can't be bothered to send it to your calculator. ;)


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Thu Feb 12, 2009 8:18 pm 
Regular Member
User avatar

Joined: Sun Oct 12, 2008 1:42 am
Posts: 137
Location: Boise, Idaho
Wow! :shock:
This is looking great. It makes me feel like I want to learn BBC Basic, but time will not permit... This is really coming along great, Ben.
Aren't you making a documentation on how to use BBC Basic and some coding?
Keep up the good work.

_________________
ImageImage
ImageImage
Image


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Thu Feb 12, 2009 9:31 pm 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 2938
Location: Croydon, England
I'm afraid I don't really go in for tutorials - most of my learning is from reference material and examples. I could try writing a tutorial but for the reasons above I don't think it would be very good. :(

There's always the BBC BASIC for Windows documentation, but I have not yet checked it myself to see how different it is.


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Thu Feb 12, 2009 9:33 pm 
Regular Member

Joined: Sun Sep 14, 2008 10:00 am
Posts: 75
Wesley wrote:
Wow! :shock:
This is looking great. It makes me feel like I want to learn BBC Basic, but time will not permit... This is really coming along great, Ben.
Aren't you making a documentation on how to use BBC Basic and some coding?
Keep up the good work.
Yes, Ben has a nice looking help document with the apps for the calc. I will try this BASIC sometime... It is a new field in calc dev.

EDIT: you are right Ben. It is more documentation of commands. =/ We can solve that solve that. And making update advanced TI-BASIC stuff like grayscale and others would be nice, too. =P


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Thu Feb 12, 2009 10:21 pm 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 2938
Location: Croydon, England
Galandros wrote:
EDIT: you are right Ben. It is more documentation of commands. =/ We can solve that solve that. And making update advanced TI-BASIC stuff like grayscale and others would be nice, too. =P
As you may have noticed there aren't many MODE numbers allocated so in theory it may be possible to create a greyscale mode. The main issue there is runtime memory (as it would require three additional screen buffers, and memory is tight enough as it is). I'd personally rather work on getting the existing graphics commands up to scratch first!


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Fri Feb 13, 2009 5:26 am 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 3981
Location: I cant seem to get out of this cryogenic chamber!
I say using the TI-BASIC+lib method would be feasable, xor'ing screen images every frame instead of a full blow interrupt driven implementation.

I started making a small map demo, ill let you know how it goes :).

_________________
"My world is Black & White. But if i blink fast enough, i see it in Grayscale."
Image


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Fri Feb 13, 2009 11:10 am 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 2938
Location: Croydon, England
What may be useful would be a way to select the buffer that drawing operations write to. That way you could DIM some space on the heap and use that as your second buffer; all you'd then need to do would be to swap this buffer and the regular plotsscreen and call *REFRESH to repaint the LCD.


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Fri Feb 13, 2009 4:06 pm 
New Member

Joined: Fri Feb 13, 2009 3:52 pm
Posts: 1
Is there a way to write small sized text to the screen while in Mode 4?


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/08 r703
PostPosted: Fri Feb 13, 2009 5:26 pm 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 2938
Location: Croydon, England
Not currently, and I don't think it would ever be possible in VDU 4 (text fits in a grid fixed), but it would be possible in VDU 5 (text is drawn at the graphics cursor location) with an additional command. Good idea, I'll add it. :D


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/14 r717
PostPosted: Sat Feb 14, 2009 2:53 am 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 2938
Location: Croydon, England
The new version adds two features. Possibly the most useful is *FONT, which allows you to switch between SMALL and LARGE font sizes when used with VDU 5.

The other main new feature is the rather dangerous *GBUF, which lets you reposition the graphics buffer. A flickery greyscale demo follows:
Code:
   10 MODE3
   20 HIMEM=HIMEM-768:alt%=HIMEM
   30 *ESCOFF
   40 GCOL143:CLG
   50 GCOL0:CIRCLE FILL 192,128,128
   60 GCOL15:CIRCLE FILL 192,128,96
   70 GCOL0:CIRCLE FILL 192,128,40
   80 OSCLI"GBUF"+STR$~alt%
   90 CLG:CIRCLE FILL 192,128,96
  100 REPEAT
  110   OSCLI"GBUF"+STR$~alt%
  120   T%=TIME+3:REPEAT:UNTILTIME>T%
  130   *GBUF
  140   T%=TIME:REPEAT:UNTILTIME>T%
  150 UNTILINKEY0<>-1
  160 *ESCON
  170 *HIMEM

A rather nasty crashing bug has also been fixed (scrolling a one row high text viewport which doesn't fill the width of the screen used to trigger an instant crash).

Edit: There is a mistake in the documentation. buf%=HIMEM:HIMEM=HIMEM-768 would place buf% above the old value of HIMEM. You want to place buf% above the new value of HIMEM, ie HIMEM=HIMEM-768:buf%=HIMEM.

Fortunately BBC BASIC has the 2KB user-definable character buffer above HIMEM anyway so all you'll end up doing is overwriting these characters rather than crashing the calculator. I'll fix the docs in the next version.


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/18 r718
PostPosted: Wed Feb 18, 2009 7:58 pm 
Maxcoderz Staff
User avatar

Joined: Thu Dec 16, 2004 10:06 pm
Posts: 2938
Location: Croydon, England
The new version contains amended documentation and one minor feature; the Clear button now generates ASCII ESC (27) - the same as the On key when *ESC OFF has been used.


Top
 Profile  
 
 Post subject: Re: [News] BBC BASIC Beta Testing - 2009/02/18 r718
PostPosted: Sun Feb 22, 2009 4:45 pm 
New Member

Joined: Sun Nov 30, 2008 12:14 pm
Posts: 5
Nice program, but (on the TiLem emu, fortunately), I had a serious crash while trying to figure out how the thing worked xD (my own fault) and trying to run some of the samples, and it asked me to reinstall the os, I hope this will never happen on my real calc :lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
DVGFX2 By: Matt