Experimental FemtoBasic for TriBlade Prop
Mike Green
Posts: 23,101
Here's an experimental version of FemtoBasic for the TriBlade Prop, Blade #1. Changes are:
This can be used as a simple terminal for Blade #2 and will be used to test and develop a Winbond Flash Memory driver that supports normal file handling. I plan to substitute the Winbond driver for the normal FemtoBasic SD card support and I plan to add VT100 support so this can be used like propComm for a CP/M terminal emulator.
Some minor updates to the Winbond driver were made and a Basic sample program was added.
Post Edited (Mike Green) : 4/27/2009 2:37:08 AM GMT
The Application key is used as a "break" key rather than ESC. The SD card support is removed. Expressions FLASH [noparse][[/noparse] <flash address> , <byte count> , <buffer address> ] This transmits 1 to 4 bytes to a Winbond Flash Memory and optionally receives or transmits a block of data. <flash address> is 1 to 4 bytes in size with the most significant byte containing an instruction code for the Flash Memory (see the datasheet for details) and usually the 3 least significant bytes containing a 24 bit address in the Flash Memory. If <byte count> is negative, its absolute value is a count of bytes to be sent to the Flash Memory from <buffer address>. If <byte count> is positive, it's a count of bytes to be received from the Flash Memory to <buffer address>. Normally <buffer address> is a hub memory address. If it is zero, then the address of the (long) return value for FLASH[noparse][[/noparse] ] is used. PAGE This returns the address of a 256 byte buffer within FemtoBasic. This is intended for use in BYTE[noparse][[/noparse] ], WORD[noparse][[/noparse] ], and LONG[noparse][[/noparse] ] expressions and in FLASH[noparse][[/noparse] ] expressions. Statements TERM <recv pin> , <xmit pin> , <mode> , <Baud> This starts a simple terminal emulator using FullDuplexSerial with a 256 byte buffer. The parameters are the corresponding values used by the FullDuplexSerial start call. All keyboard characters are sent to the serial pins specified except as noted below based on Turbo Pascal's default definitions. Received characters are displayed on the VGA display. It's intended that the VT100 interpreter from propComm will be used, but currently only the control codes used by Chip's hi-res text VGA driver are interpreted. Carriage return and line feed have their usual meaning. $C0: Left Arrow - ^S $C1: Right Arrow - ^D $C2: Up Arrow - ^E $C3: Down Arrow - ^X $C4: Home - ^Q ^E $C5: End - ^Q ^X $C6: PgUp - ^R $C7: PgDn - ^C $C8: Backspace - ^H $C9: Del - ^G $CA: Ins - ^V $CB: Escape - ^[noparse][[/noparse] $CC: Application Key - Exit to FemtoBasic $D0..$DB: Function keys become ESC A to ESC L
This can be used as a simple terminal for Blade #2 and will be used to test and develop a Winbond Flash Memory driver that supports normal file handling. I plan to substitute the Winbond driver for the normal FemtoBasic SD card support and I plan to add VT100 support so this can be used like propComm for a CP/M terminal emulator.
Some minor updates to the Winbond driver were made and a Basic sample program was added.
Post Edited (Mike Green) : 4/27/2009 2:37:08 AM GMT
Comments
I haven't had any time to even think about the Flash memory, so this is great news. My use of Blade #1 as a Terminal was minimal, just enough to prove the concept ran.
The links LK1 & LK2 join the Blade #1 & #2 SI and SO pins, but requires one end to have it's software reverse the P30 & P31 pins to avoid a conflict.·Below is a possible modification to avoid this conflict. Alternately use a 2 wire crosover plug.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Do you have any updated source?
The Statement: PUB rollUpRegion(x,y,w,h) | i ' Roll up a region of the screen
Causes a compile error : Expected a Unique Parameter Name.
Thanks for all of your good work on this forum...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
The basic flash I/O seems to work. The one thing that I haven't been able to get to work so far is loading and executing Spin (or assembly) programs from flash. The data seems to be loaded fine, checksums ok, but starting up a new Spin interpreter on the code seems to hang. I'm using the same code for that that's used in the EEPROM driver. Eventually I'll figure it out.