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

PROPELLER COLOR BASIC (was VGABASIC)

135

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-02-26 07:09
    Ok,

    I've been working on some new additions and bug fixes for BASIC V3. It isn't prime time yet, but it's close enough for those of you who want to experiment with it. I feel it's reasonable stable, but it needs to be proven, hence still beta.
    This version is compatible with both standard VGA and 256 color VGA modes.

    Start by download and extracting this archive:
    https://www.dropbox.com/s/3trprmwuim6ljrg/BASIC3.zip

    Open the LOAD_EEPROM.spin file and use F10 to load all the required upper EEPROM portions to their required positions.
    It won't look like it did much, but step two will show you it worked.

    Open BASIC3.spin and edit the first section of code to select which color mode you want to use. By default the 256 color settings have been selected. Remark the 256 color section and unremark the 64 color section to set it for that mode. Use F11 to write it to the lower portion of the EEPROM.

    If all has gone well you will see the boot screen and be READY to go.

    New commands:

    PULSOUT {pin} , {duration} Works like the BASIC STAMP version.
    IRCODE (Examples, A=IRCODE or PRINT IRCODE)
    TX Serial TX now works like PRINT (Examples, TX "Line of text", TX 65)

    IRCODE presently sets a repeat loop which is unending, so you'll need a Sony programmed remote to press a button and hit ESC to end your program. (Or just hit the reset button) Working on this issue.

    Jeff
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-23 17:56
    An update on the COLOR BASIC project:

    I've split the project into a two Propeller (or in the case of the PMC, two Quickstart) project.

    Currently, the keyboard, fsrw, sram, and Wii connections are maintained by Propeller #1

    Using a special ESCape sequence command set, the second Propeller handles the following:

    MODE 1 (text mode) which uses the original VGA text driver and SIDcog audio object (98% complete)
    MODE 2 (graphics/sprite mode) which uses macca's sprite driver for limited text, sprite, and tiles. and SIDcog audio object (inital commands 80% complete)

    Developments posted here: http://propellerpowered.com/forum/index.php?topic=492.0

    Jeff
  • Mike GreenMike Green Posts: 23,101
    edited 2013-06-23 22:05
    Very impressive Jeff. Keep up the good work!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-24 16:17
    Thank you Mike!

    Video killed the radio star.. Here's video discussion of the project in detail as well as a demonstration.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-24 18:18
    Thank you Mike!

    Video killed the radio star.. Here's video discussion of the project in detail as well as a demonstration.
    This looks quite cool. I keep wanting to experiment with multi-propeller systems but never seem to get around to it. This seems like it might be a good entry into that world. I guess I can just order the PMC kit along with a second QuickStart to run your code, right? You removed the existing female header on one of the QuickStarts when you made this video. Is this required or can I leave those connectors in place and just add the male and female connectors in the second header position?

    I'm curious to see if I can get a simple bytecode Basic that I wrote a while ago working on this dual propeller platform. Did you say that the video board that comes with the PMC has an SRAM chip on it? Can that be replaced by a SPI flash chip?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-24 18:45
    @David,

    I removed the female connector on the second Quickstart only as a way to make the modifications more visable in pics and video. There should be no need to remove it otherwise. The PMC doesn't come with the extra SRAM chip, but has an SPI socket location on the PCB which we've put a 32k SPI chip into. You could easily use any other compatible SPI flash/ram chip in that socket.

    Jeff
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-24 18:50
    Additional note: I'm probably making the EE's shutter a little when they see me directly connecting Propeller I/O together without resistors, plugging them together hot, etc. Yes, I know...

    Part of this project is my abuse of the Propeller itself a bit to see just how strong some of it's internal protection is.

    I've yet to damage a Propeller itself in the last seven years. This little chip seems to be able to take quite a bit of abuse and keep right on going.

    Jeff
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-24 19:17
    Additional note: I'm probably making the EE's shutter a little when they see me directly connecting Propeller I/O together without resistors, plugging them together hot, etc. Yes, I know...

    Part of this project is my abuse of the Propeller itself a bit to see just how strong some of it's internal protection is.

    I've yet to damage a Propeller itself in the last seven years. This little chip seems to be able to take quite a bit of abuse and keep right on going.

    Jeff
    If this works out do you plan to make a PCB with two Propeller chips on it or a variant of the VGA+ board with a Propeller so that you don't have to "abuse the Propeller chip" anymore? Do you think you can resolve the video noise problem you mentioned in your video with this configuration or is it inherent in the scheme you used to connect the two QuickStart boards?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-24 19:22
    @David,

    Anything is possible as this point.. Certainly the easy plugging one Quickstart directly into another is a darn simple solution that appears to be working very well. I have have had more than one day dream about creating a mainboard with more than one Quickstart plug, for multiple Quickstart usage, but at this point, I'm focused on the software side of the project.

    Jeff
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-24 19:38
    @David,

    Anything is possible as this point.. Certainly the easy plugging one Quickstart directly into another is a darn simple solution that appears to be working very well. I have have had more than one day dream about creating a mainboard with more than one Quickstart plug, for multiple Quickstart usage, but at this point, I'm focused on the software side of the project.

    Jeff
    I'm mostly interested in the software side as well. I'd like to try your Color Basic and I'd also like to see if I can get my bytecode Basic working. It should be quite a bit faster than Femto since the bytecode interpreter is written in PASM and it can also run code from external memory allowing for larger programs.
  • KeithEKeithE Posts: 957
    edited 2013-06-24 21:40
    Jeff - what was the "kids microcontroller adventures book" that inspired this latest incarnation? Is it modern or a vintage book?

    Thanks,
    Keith
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-26 15:32
    @KeithE,

    I can't find a picture of the book that I bought, but here's another of the series. (actually links to several of them)
    http://www.amazon.com/Space-Attack-Micro-Adventure-Number/dp/0590331655/ref=pd_sim_b_2

    It's a vintage, early teen book. At different times in the story, you have to stop and type in a BASIC program to solve part of the adventure.


    On another note, this project is taking a new twist this afteroon with a change I think will be in the correct direction. Under the last double-stack design, I'm interconnecting all of the VGA and Audio pins.
    I just assembled another set that has only 5v,3v,Grd,Vss,Vdd and 12,13 interconnected. The end result should work like this...

    Top board VGAplus256 I/O module
    Middle board controlling VGA, FSRW, Keyboard, SidCog,SRAM,Wii (Quickstart #1)
    Bottom board contains BASIC and BASIC coding space. Reasonable expection for at least 12k BASIC programming space with addition of new commands. (Quickstart #2)

    This solves the issue of screen noise and certainly having multiple pins connected directly to each other.

    Jeff
    628 x 437 - 85K
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-26 15:43
    @KeithE,

    I can't find a picture of the book that I bought, but here's another of the series. (actually links to several of them)
    http://www.amazon.com/Space-Attack-Micro-Adventure-Number/dp/0590331655/ref=pd_sim_b_2

    It's a vintage, early teen book. At different times in the story, you have to stop and type in a BASIC program to solve part of the adventure.


    On another note, this project is taking a new twist this afteroon with a change I think will be in the correct direction. Under the last double-stack design, I'm interconnecting all of the VGA and Audio pins.
    I just assembled another set that has only 5v,3v,Grd,Vss,Vdd and 12,13 interconnected. The end result should work like this...

    Top board VGAplus256 I/O module
    Middle board controlling VGA, FSRW, Keyboard, SidCog,SRAM,Wii (Quickstart #1)
    Bottom board contains BASIC and BASIC coding space. Reasonable expection for at least 12k BASIC programming space with addition of new commands. (Quickstart #2)

    This solves the issue of screen noise and certainly having multiple pins connected directly to each other.

    Jeff
    Won't this cause a problem for Basic programs that want to address external devices? The Basic program will be running on the bottom Propeller so it's I/O pins won't be accessible since the standard QuickStart female header on the bottom board will be blocked by the top QuickStart and the VGA board on top of it. Actually, I guess your previous configuration had the same problem. Too bad you can't sandwich the VGA board between the two QuickStarts and use the top board to run Basic so that all of its pins are available.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-26 16:09
    Already thought of that. Yes, there will be some limitations from BASIC, but there is no reason why we can't pass I/O data through the serial connection. Certainly, I'm planning to contine to support serial connections, etc.

    Jeff
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-26 16:49
    Already thought of that. Yes, there will be some limitations from BASIC, but there is no reason why we can't pass I/O data through the serial connection. Certainly, I'm planning to contine to support serial connections, etc.

    Jeff
    Yeah, I guess that will do until your 2 QuickStart motherboard is available! :-)
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-06-26 16:51
    Some great ideas here.

    I have been testing out some ideas similar to this. It seems to me that if you want decent SD access, that is not possible with just cog code, and the drivers out there use maybe 1/3 of hub ram. But conflicting with this are display drivers, and the best use of propeller ram for a display driver is to use as much/all of hub ram for the display.

    It seems this heads to the logical conclusion that you need two propellers.

    I've got some idea too that adding a touchscreen might be best with 3 propellers. Yes - it is another propeller, but it saves one ram chip and eight TTL chips.

    Going off on a tangent, touchscreens are tricky. At first glance they seem simple - toggle some pins and send out pixels. Where they get complicated is when you have text with true-type fonts and when you have game sprites and that needs an external ram chip, and for really fast screen refresh of text, two ram chips side by side for 16 bits per pixel. But maybe not?... Maybe more propeller chips works out cheaper?

    I'm thinking of a hardware platform that can do VGA, TV and touchscreen all with the same board. There may well be ways on such a board to give the user more code space than 12k?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-26 19:05
    Dr_Acula wrote: »
    Some great ideas here.

    I have been testing out some ideas similar to this. It seems to me that if you want decent SD access, that is not possible with just cog code, and the drivers out there use maybe 1/3 of hub ram. But conflicting with this are display drivers, and the best use of propeller ram for a display driver is to use as much/all of hub ram for the display.

    It seems this heads to the logical conclusion that you need two propellers.

    I've got some idea too that adding a touchscreen might be best with 3 propellers. Yes - it is another propeller, but it saves one ram chip and eight TTL chips.

    Going off on a tangent, touchscreens are tricky. At first glance they seem simple - toggle some pins and send out pixels. Where they get complicated is when you have text with true-type fonts and when you have game sprites and that needs an external ram chip, and for really fast screen refresh of text, two ram chips side by side for 16 bits per pixel. But maybe not?... Maybe more propeller chips works out cheaper?

    I'm thinking of a hardware platform that can do VGA, TV and touchscreen all with the same board. There may well be ways on such a board to give the user more code space than 12k?
    Bill Henning did something like this with his Morpheus board and maybe Cluso too with his TriBlade. Does anyone know how they split things up between the different Propeller chips?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-26 21:05
    Dr_Acula wrote: »

    I'm thinking of a hardware platform that can do VGA, TV and touchscreen all with the same board. There may well be ways on such a board to give the user more code space than 12k?

    Actually, right now the only limitation is the size of the BASIC interpeter itself and the size of the serial object. I've got a version of the new configuration running tonight, (minus a few commands) and I've got around 22k free. Once I have an established communication system, it really doesn't seem that it would be difficult to implement other language or OS systems which could take advantage of the facilities offered by the second Propeller.

    The other interesting part is that now, given that I'm moving FSRW to the second Propeller, I can load multiple versions of the I/O system at will.

    Jeff
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-29 15:15
    Actually, right now the only limitation is the size of the BASIC interpeter itself and the size of the serial object. I've got a version of the new configuration running tonight, (minus a few commands) and I've got around 22k free. Once I have an established communication system, it really doesn't seem that it would be difficult to implement other language or OS systems which could take advantage of the facilities offered by the second Propeller.

    The other interesting part is that now, given that I'm moving FSRW to the second Propeller, I can load multiple versions of the I/O system at will.

    Jeff

    Any news on the two Propeller version of PMC? I finished building my single Propeller PMC and it seems to work fine. I need to dig out a SPI flash chip to plug into the SRAM socket to see if I can run ebasic but I'll need your VASP running on a second Propeller to make it use the VGA and PS2 ports instead of the serial connection.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-29 18:04
    I'm working on the remote FSRW rountines this afternoon. I'm about 1/3 into them now.. I'll post an update on PP forums tonight.

    Jeff
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-29 18:09
    Where can I find the schematic for the VGAplus256 board? I'm particularly interested in how the SPI socket is wired.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-29 20:52
    I believe this is what you are looking for.
    https://www.dropbox.com/sh/qwhixzvtlrvp1u1/tU3HYzRiE-/Schematics/VGAplus_extended_features.pdf
    David Betz wrote: »
    Where can I find the schematic for the VGAplus256 board? I'm particularly interested in how the SPI socket is wired.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-30 04:14
    Thanks! Unfortunately, this presents a problem for SPI flash chips since pin 3 is /WP and must be pulled high to allow writing to the flash. Any chance of adding that to the next revision of the VGAplus256 board?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-30 09:49
    David Betz wrote: »
    Thanks! Unfortunately, this presents a problem for SPI flash chips since pin 3 is /WP and must be pulled high to allow writing to the flash. Any chance of adding that to the next revision of the VGAplus256 board?
    I notice that the VGAplus256 board has the /HOLD pin of the SPI SRAM socket tied to 3.3v directly. Can I do the same with /WP? I thought pull-up resistors were needed.
  • jazzedjazzed Posts: 11,803
    edited 2013-06-30 10:01
    David Betz wrote: »
    I notice that the VGAplus256 board has the /HOLD pin of the SPI SRAM socket tied to 3.3v directly. Can I do the same with /WP? I thought pull-up resistors were needed.

    No problem. Put a 10K pull-up on pin 1 for most flash chips to work correctly (it's a power-up thang).
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-30 10:11
    jazzed wrote: »
    No problem. Put a 10K pull-up on pin 1 for most flash chips to work correctly (it's a power-up thang).
    Hmmm.. There is no pull-up on pin 1 on the VGAplus256 board either. It's beginning to look like I'm trying to do something that wasn't planned for in the original design. Maybe I'd better stick with using the socket for an SRAM chip. It means I won't be able to run ebasic on the PMC though. Oh well...
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-06-30 10:24
    Just updated the PP Expanding BASIC by adding a second Quickstart thread. I believe I now have most FSRW functions working correctly now.

    @David, Have you installed some female headers into the experimenter's ports on the side of the unit? You'll be able to access a lot of the I/O, Vss, Vdd from there.

    Jeff
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-30 11:59
    Just updated the PP Expanding BASIC by adding a second Quickstart thread. I believe I now have most FSRW functions working correctly now.

    @David, Have you installed some female headers into the experimenter's ports on the side of the unit? You'll be able to access a lot of the I/O, Vss, Vdd from there.

    Jeff

    No, I haven't done anything other than build the PMC and test it. I haven't done anything with the second QuickStart yet. I've been trying to find a way to get a flash chip to work in the SPI SRAM socket without having to hack the VGAplus256 board.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-30 15:56
    I posted this on the PropellerPowered forum as well. Sorry for the double posting. This is in reference to your modified interconnection diagram where you only connect P12-13 between the two QuickStart boards.

    I notice that you're connecting many VSS and VDD lines between the two boards. Is that necessary? Would it work to connect only a single pin for each? Also, is it necessary to connect VIN between the boards? Would it work if I connect power to the QuickStart that has the VGAplus256 board plugged into it and powered the second QuickStart with only a single VSS and VDD connection?

    Edit: If I want to be really paranoid (about code I might write not yours!) what value of resistor should I use to connect P12-13 between the two Propeller chips?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-06-30 17:00
    Okay, I connected VSS and VDD between the two Quickstart boards and P12-13 through 10k resistors and I can get your two-Propeller version of Color Basic running.

    dual-pmc.jpg
    1024 x 768 - 118K
Sign In or Register to comment.