Shop OBEX P1 Docs P2 Docs Learn Events
PROPELLER COLOR BASIC (was VGABASIC) — Parallax Forums

PROPELLER COLOR BASIC (was VGABASIC)

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2014-03-02 10:33 in Propeller 1
PROPELLER COLOR BASIC V2 - (A major fork off FemtoBASIC)

Final home for updates. (This project is nearing completion.)
https://www.dropbox.com/sh/qwhixzvtlrvp1u1/y-JshwklWj/PropellerBASIC

Hardware Requirements:
Demoboard or Propellerpowered VGA+ -:- VGA, Keyboard, & Audio (optional SD & Wii Classic Controller)


vgabasic400.jpg


This software would not have been possible without help and contributions from:
  • Mike Green (FemtoBASIC)
  • Tomas Rokicki (FemtoBASIC, & FSWR)
  • Marko Lukat (Despair & Hope VGA driver)
  • Pat Daderko (Wii Controller driver)
  • Johannes Ahlebrand (TinySynth)
  • Michael Park (Edit)

A complete list of commands is being generated, but some hightlights include:
PLOT, NOTEON, NOTEOFF, REDEFINE.

Advanced: Copy the BASIC.BIN and BASEDIT.BIN to your SD card and
use F1 to jump from BASIC to a full screen editor.

Try this code with it...
10 COLOR 111,0
20 CLS
30 A=RND(100)
40 B=RND(75)
50 C=RND(250)
60 PLOT A,B,C
70 GOTO 30

..more to come..

OBC
400 x 300 - 97K
«1345

Comments

  • pedwardpedward Posts: 1,642
    edited 2012-05-19 18:25
    Pictures...or it didn't happen! :lol:
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-19 18:27
    pedward wrote: »
    Pictures...or it didn't happen! :lol:

    Ok.. I'll post one.. (See OP) For the example program shot you'll have to run it yourself.. :)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-29 21:08
    Update (top link updated)

    Ran into some stability issues due to my use of memory.
    I believe I have things straightened out with 4k available in the programming space.

    (Thanks to Mike Green and Marko Lukat for being a second pair of eyes.)

    I *think* I can work some very that small audio driver that Ahle2 did into this with some simple graphics commands.

    Edit: Interestingly, the little BASIC plotting program I posted in the OP visually demonstrates how NOT RANDOM the Propeller can be when fishing for random results.

    OBC
  • pik33pik33 Posts: 2,366
    edited 2012-05-29 22:52
    how NOT RANDOM the Propeller can be when fishing for random results.

    Use "real random" object. It shows how random a Propeller can be. This if first processor I can see which can generate real random numbers without external hardware.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-30 08:06
    pik33 wrote: »
    [/I]Use "real random" object. It shows how random a Propeller can be. This if first processor I can see which can generate real random numbers without external hardware.

    I was thinking about that.. I'm down to around 3k+ open space left right now so it's a matter of what features are most important to me now.

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-30 22:04
    Added some new tricks tonight..

    This code finally works..
    10 REM ** Wii Controlled Drawing in BASIC **
    15 COLOR 88,0
    20 CLS
    30 C=222
    40 A=50
    50 B=50
    60 REM ** START OF LOOP **
    70 IF JOY = 64 THEN A=A+1
    80 IF JOY = 256 THEN A=A-1
    90 IF JOY = 2048 THEN C=C+10
    100 IF JOY= 128 THEN B=B-1
    110 IF JOY= 32 THEN B=B+1
    200 PLOT A,B,C
    210 GOTO 60
    
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-02 22:19
    Major release update added to the OP.

    Included now is Michael Park's EDIT (Full Screen Edit) / Jump back and forth using [F1] from BASIC to EDIT.
    Also included is Ahle2's TinySynth.
    Many minor refinements.

    I'm about 99% happy with this software now, and the combination of the objects used makes this just awesome.
    (See list of authors in the OP)

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-12 19:45
    Bugfix edition 2.2b

    See OP for download location.
    • Fixed COLOR command to display 64 colors using 0-63 (instead of 0-254)
    • Added missing DECAY feature
    • Fixed FILTER settings


    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-13 23:06
    Mods and patches 2.2c release

    See OP for download location
    • Adjusted PLOT command to 64 colors
    • OUTA & INA statements can be invoked directly
    • Minor updates
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-16 22:12
    Mods and patches 2.2d release

    See OP for download location
    • Added boundaries to LOCATE to prevent overflow.
    • Added color entries for .BAS files during DIR.
    • Added PLUCK (synth) command
    • Added a bunch of program examples.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-17 14:56
    Mods and patches 2.2e {amazed I had still had room} release

    See OP for download location
    • Added FullDuplexSerial commands: SERIAL, TX, RX
  • Mike GreenMike Green Posts: 23,101
    edited 2012-06-17 15:05
    Nice work! The way you presented the kit on Instructables was also very well done.
  • JT CookJT Cook Posts: 487
    edited 2012-06-17 16:06
    What you should concentrate on now is creating some basic programs to show it off. Code up some quick games and demos so people can see it in action.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-17 18:52
    JT Cook wrote: »
    What you should concentrate on now is creating some basic programs to show it off. Code up some quick games and demos so people can see it in action.

    Already working on a bunch of little demos. I've got some bigger stuff in the works.

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-26 21:18
    Revision and Additions:
    • Added additional color variation in DIR for .TXT, .BAS, and .BIN files
    • Added RUN "filename.bas" to the RUN command. Works in both intermediate and program modes.
    • Added VER version command to allow users to check their current revision.

    Outside of this release, I've started toying with the SRAM code which will be accessible in the next version of the VGA+ board (arriving this week) BASIC with 32k+ of available RAM sounds enticing.

    OBC
  • JT CookJT Cook Posts: 487
    edited 2012-06-29 18:02
    I think what would be fun is add 1 BPP sprites that can be controlled via PEEK/POKE regs or just setup basic commands like Sprite1X, Sprite2IMG, etc. That way the sprites do not take up much memory and it will come closer to being a little gaming machine.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-29 18:51
    JT Cook wrote: »
    I think what would be fun is add 1 BPP sprites that can be controlled via PEEK/POKE regs or just setup basic commands like Sprite1X, Sprite2IMG, etc. That way the sprites do not take up much memory and it will come closer to being a little gaming machine.

    That is "exactly" the direction I'd like to go with this project. As I move into the 32K SRAM it should start to open all kinds of possibilities like this.

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-29 21:42
    I've been attempting to wrap my head around Mike's tokenizer code in BASIC. It looks like I should be able to redirect the commands and code in and out of SRAM at will. Could be fun to assign the first 16k of SRAM for BASIC, and the following 16k as "High memory" for things like character redefinement and data statement information. Certainly, string variables should no longer be an issue.

    This project is certainly going to force my Spin coding to continue to evolve..

    OBC
  • pik33pik33 Posts: 2,366
    edited 2012-06-29 23:45
    Having a SRAM it is possible to use real graphic modes as in Atari or C64. I have 4 pieces of 32k256 - it is time to attach them to a demoboard and then wtite an "Atari 8-bit" like graphics driver.

    8-bit Atari has a display list controlled graphics. The display list tells "display one line of 8x8 text" or" display one line of 320 px 2 colors grapgic" or "160px 4 color" "get display data from here" etc.
    Then you have commands in Atari Basic like "graphics 0" - set 40x25 text mode - or "graphics 8" - set 320x184 graphic mode and two lines of text at the bottom of the screen.

    Atari 8 bit graphic modes uses up to 8k of RAM.

    What is your SRAM and how is it connected to the Propeller?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-30 07:48
    QuickVGA_RevG.png


    Here's the next revision of the QuickVGA+ board I'm waiting to get back in.

    The SPI socket is located on:
    • P6 Clk
    • P7 Si
    • P8 So
    • P9 Cs

    Edit: Oh, yeah. We also implemented Phil's simple VGA fix so you'll get 64 colors in BASIC now.

    OBC
    885 x 598 - 44K
  • John AbshierJohn Abshier Posts: 1,116
    edited 2012-06-30 09:14
    Jeff, at the Chicago Propeller Expo you had a VGA+ with a uSD card loaded with games, BASIC programs, etc. Is an image of that card available for download?

    John Abshier
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-06-30 20:08
    Hi John!

    I will setup an image, but for now you can find all of the items between these two locations:

    The Propellerpowered Archive: http://www.propellerpowered.com/library and the BASIC examples thread:

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-07-01 22:19
    I'm working on an experimental version of BASIC which includes a 32K SRAM chip. (I haven't posted it yet)

    A check for an extended memory chip is done at boot, if discovered the boot message indicates it.
    A POKE command has been added
    A PEEK command has been added.


    I still need to add a statement to clear extended memory when the "NEW" command is issued.

    I haven't decided if I want extended memory to stay current when "REBOOT" or program "LOAD" is issued.
    Currently it keeps it's memory. This might be handy. Thoughts?

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-07-02 20:09
    Just some (cellphone) screenshots...

    BASIC_w32k_extended.jpg


    BASIC with 32K of extended (SRAM) memory detected!

    triple_stack.jpg


    My triple stack prototyping setup. The center board is a servo/sensor board with the SRAM added.


    OBC
    743 x 643 - 284K
    384 x 512 - 158K
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-07-03 18:04
    RELEASE UPDATE 2.2h (SRAM Edition)
    • Corrected LOCATE X,Y bug
    • Added BOX command
    • Added LINE command
    • Added SRAM support. (PEEK,POKE,CLEAR)


    SRAM is tested for upon boot. A message will display when properly detected.
    Manual has been updated to reflect new command usage as well.

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-07-04 13:28
    RELEASE UPDATE 2.2i
    • Re-wrote Wii Controller Driver for 2x speed increase, reclaiming 100 longs.


    OBC
  • PerryPerry Posts: 253
    edited 2012-07-04 14:34
    I am trying out your "COLOR BASIC" program at 108MHz clock, but it can't mount SD card.

    First problem might be my non standard SD card settings (11,0,9,8) ' cause I screwed up pin 10.

    Second question is fsrwfemto has no revision info. Is it only FAT16 compatible?

    Perry
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-07-04 16:04
    @Perry,

    You can adjust the audio settings in your copy to 11 and 11 for both right/left channel audio. That should get it out of the way of your setup. I used the latest version of Femto, but is only FAT16 compatible. I'm county every byte of memory and had to keep it light. My apologizes for the lack of comments. I used Phil's clean program which stripped them while it was doing it's job. I'm steady replacing them as I work.

    I've pushed the clock up to 96Mhz here with no problems, haven't tried 108mhz, but can't see why it shouldn't work as well.

    OBC
  • PerryPerry Posts: 253
    edited 2012-07-04 18:08
    @Perry,

    You can adjust the audio settings in your copy to 11 and 11 for both right/left channel audio. That should get it out of the way of your setup. I used the latest version of Femto, but is only FAT16 compatible. I'm county every byte of memory and had to keep it light. My apologizes for the lack of comments. I used Phil's clean program which stripped them while it was doing it's job. I'm steady replacing them as I work.

    I've pushed the clock up to 96Mhz here with no problems, haven't tried 108mhz, but can't see why it shouldn't work as well.

    OBC

    OK I formatted a 1GB to FAT16.
    That almost worked, I also had to change the SRAM settings, this board is my "stupid video" platform and does not have standard TV parts on it so I set the SRAM to 12,13,14,15 and both audios to 5.

    managed to save a simple "first.bas" file.

    Now if I can only remember the BASIC syntax I will try some more programs.

    Thanks Jeff
    Perry

    P.S. when should you create the "desktop.tmp" file on the SD card?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-07-04 20:12
    @Perry

    There is a .PDF in the distribution site which should help you with the command-set.
    The "desktop.tmp" is handled automatically.

    OBC
Sign In or Register to comment.