Shop OBEX P1 Docs P2 Docs Learn Events
Full Screen Text Editor *fixed* (and moving toward expansion) — Parallax Forums

Full Screen Text Editor *fixed* (and moving toward expansion)

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2010-06-07 16:01 in Propeller 1
This is version 1.2 of a text editor for the Propeller, intended as an add-on
tool for PropDos users. Launching the Propedit will allow you to create/load/save
text files. This version is limited to a single page of text, but that will be increased
in later revisions. Think of this as NOTEPAD for PropDOS.

This version has squashed the major bugs which prevented it from being useful.
I'm working on a few more cursor rule adjustments for the next release, but it
is now a *working* editor.

Give it a spin and let me know.

Edit Added:
A mutli-page version of this editor is also attached (Version 1.3b)
It is in Alpha, so I'm still bug chasing.. but it supports up to five pages of text.
Version 1.3b has most of the load/save bugs worked out.

OBC

rename with .zip extension

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange

Post Edited (Oldbitcollector) : 7/29/2008 2:42:31 AM GMT

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-08 04:13
    Nice, I always wanted to see an editor done. I see you're putting you snow days to good use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-08 05:26
    Snow somewhere around 8" now..

    A long overdue PropDOS update is also in the works....

    *removal of PropCOMM (moved to separate file)
    *addition of "DOS-like" execution of .bin files. (no more typing 'spin filename.bin')

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

    Post Edited (Oldbitcollector) : 3/8/2008 8:35:02 AM GMT

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-08 07:59
    Found a minor bug that was causing it to loose it's data when using F8 to exit.

    Fixed and attached to top thread..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • csfancsfan Posts: 14
    edited 2008-03-08 15:15
    Oldbit,

    Keyboard pin in I/O settings for Hydra board needs to be 13 instead of 12.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-08 23:11
    csfan said...
    Oldbit,

    Keyboard pin in I/O settings for Hydra board needs to be 13 instead of 12.

    Thanks. I think I have it right now.

    Did some edits to improved switching between the editor and menu screen.
    [noparse][[/noparse]ESC] now toggles between them. Loading a file now loads and takes you to
    the editor. Also I've added a DIRECTORY command.

    Interface feels more natural to use now..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • QuattroRS4QuattroRS4 Posts: 916
    edited 2008-03-08 23:33
    OBC,
    Love the avatar - I've got two boys about that age - trying that and worse !!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'
  • Mike_GTNMike_GTN Posts: 106
    edited 2008-04-20 18:35
    Hi OBC,

    Took your Text Editor for a quick spin today. I had to change the Keyboard pin back to 12 for use on a Hybrid. If left as 13 all keyboard LEDs just flash and no key input is possible. A very nice text editor, that should suddenly find many uses.

    I did think of a possible upgrade to the Aigeneric TV driver, the ability to load a font stored on SD card instead of this being hard coded. Obviously you need something to
    start off with (reference to this file stored in eeprom) select a new font set, also save this reference to eeprom then reboot. I see complications to this scheme, which looked great on paper. Did also think about a fixed status bar showing the X and Y information for the current cursor position, amongst other things.

    Another nice project from the OBC collection!!

    With regards

    Mike.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-04-20 18:48
    I could have sworn I released a copy of Propeller Editor that worked with .64c fonts loaded from SD?!?

    Sigh.. Can't keep track of my own releases..

    If I haven't posted it, I will dig it up and see if I remember why.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • Ym2413aYm2413a Posts: 630
    edited 2008-04-20 19:16
    When I get things set back up over here. I'm going to have to give this a try. [noparse]:)[/noparse]
    I've known about this program for a while but havn't tried it yet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Share the knowledge: propeller.wikispaces.com
    Lets make some music: www.andrewarsenault.com/hss

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-04-21 23:03
    @Mike

    This is a version of PropEDIT (CGEdit) which will allow you to load 64c fonts from the SD.
    While it works, it's considered unfinished as it doesn't support font color. *yet [noparse]:)[/noparse]

    rename with .zip extension
    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)


    39K
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-26 01:02
    I've discovered a real flaw with this release and haven't yet wrapped my mind around how to solve it.
    (Perhaps a few more brains involved will be able to do more...)

    I'm posting this because "stevenmess2004" asked, and I thought it belonged in it's own thread.

    Here goes..

    This Full Screen Editor grabs all keystokes (other than cursor controls) and keeps track in screen[noparse]/noparse.
    As a result, all keystrokes are displayed on screen immediately.

    When the file is saved, (and here's where I *think* the bug is, the empty spots are fulled with spaces)
    and the file is written to the SD.

    Another mystery is why normal text files are unable to load properly, but I suspect issues along
    the same vein.

    I think this could become a very powerful editor for the Prop, but it's going to require more
    programming experience than I currently have myself...

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-06-26 01:43
    I would suggest a separate buffer for the text all the time. Then you would probably need to write an assembly driver (spin probably isn't fast enough) to copy the stuff from the text buffer to the display buffer.

    When you wanted to save or load something you just need to use the text buffer and not the display buffer which should be a lot easier. Also, if you filled the text buffer with spaces it should same you some other hassles.

    You could set the assembly driver to either continually update the display buffer or to just update when asked to (say whenever a key is pressed). Also, you could make the assembly driver so that it started at some arbitrary place in the buffer and then you would be able to have more than one screen.

    ----
    Well I just had a better look at your code and it looks like you are already doing half of what I suggested so its probably not all that useful...
  • vampyrevampyre Posts: 146
    edited 2008-06-26 03:37
    a good text editor is surprisingly hard to write, but i think stevenmess is on the right track.

    i wouldn't update the screen except when its edited though, and then only the line of the screen the cursor is on. doing it that way probably wouldn't require ASM
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-07-05 14:11
    Great idea! yeah.gif I tested it with the Hybrid board and only made one change.

    keyboard = 12 '' I/O for keyboard connection ' (changed it from 13) keyboard = 13 '' I/O for keyboard connection

    Unfortunately my HD card quit a few days ago & therefore, I could not test that part of the program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-26 03:45
    DUH! Finally hit me what is causing the bug in this editor!

    I was fiddling with notepad while working on another project..

    A corrected release will be uploaded in a day to so..

    Funny how the brain works..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-26 20:50
    Major bugs resolved in this version (top of thread). AFAIK
    Still can't believe I didn't see this till now. (Been bugging me for months!)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • VIRANDVIRAND Posts: 656
    edited 2008-07-26 22:03
    This is very nice. I just tried it today. I made something similar using TV_TEXT but for the use of a control panel terminal
    so it doesn't save anything. What our programs both lack is certain keys such as insert and delete which should be
    easy if we can find the cursor locations and use BYTEMOVE.

    BYTEMOVE is probably also the key to scrolling and having a larger text file, by simple transfers between the
    screenbuffer and a textfile in RAM when you push the cursor past the vertical edges of the screen.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-27 03:30
    I've implemented BYTEMOVE to expand the editor to 5 pages.
    I doesn't scroll *YET* and has a couple issues I'm chasing down,
    but is another step in the right direction..

    (Attached to the top thread)

    Ok guys, we have a primitive text editor for the Propeller, now we need
    some sort of compiler and we can move toward ditching Proptool, and
    developing apps on the Prop itself... tongue.giftongue.giftongue.gif

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-27 03:43
    Here's a thread on a compiler-compiler that runs on the Propeller, reads a source file from an SD card into a 32K "page" of EEPROM, then processes that to produce a 32K source file in Spin which gets written to another SD card file. The Spin file has to be compiled on a PC, but this is a step in the right direction. It can compile itself (the true test of a compiler-compiler).

    http://forums.parallax.com/showthread.php?p=692011

    If anyone wants to play with it, I have a partially written Basic to LMM binary compiler using a lot of the same code. I ran out of space and plan to split it up into passes when I have some time to work on it this Fall.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-27 04:00
    I forgot about Meta! We're closing in on this... [noparse]:)[/noparse]

    I'd love to play with that if you don't mind sharing..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-27 05:27
    Here's my long ignored working directory, comes with no guarantees, no documentation or explanation other than that Ouroboros.spin is an attempt to create an editor front end, never quite worked. I think there was a problem with the SD card I/O routines. ExOuroboros.spin is the beginning of a compiler. It can process declarations and allocate storage and some of the code generation for expressions and simple flow of control seemed to work (just started being tested).
  • ClemensClemens Posts: 236
    edited 2008-07-27 10:43
    Thanks, Jeff for this application.

    Just for the fun of it I added Phils cool phonemic voice synthesizer.

    Here's the related discussion of his work:
    http://forums.parallax.com/showthread.php?p=613308

    Press F9 in main menu to have the text read to you.smile.gif
    Makes it a lot·easier to try out different ways to write words to get them to sound right without having to compile a lot, doesn't it?

    Start with "#1aybee+7seedee++ee ef--jee"
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-27 14:27
    This is why I LOVE this forum...

    I go to bed after submitting a text editor and wake up with a speech toy!
    Collaborative projects are just awesome! Looking forward to playing with this later.

    A question, did you notice that blank spaces are 1's and carriage returns are not 3's not 13.

    Edit:
    Actually this might even be nicer to add to version 1.3a as I update @screen on every pass
    and F9 could just be added to the editor. Neat Idea!

    #0eigh--#2eigh--#1eigh--#3eigh-- heh..


    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange

    Post Edited (Oldbitcollector) : 7/27/2008 3:43:20 PM GMT
  • ClemensClemens Posts: 236
    edited 2008-07-28 18:10
    You're right, it's even more comfortable with version 1_3a.
    F9 now·speaks the text in editing mode also. smile.gif
    Now I have to do some character remapping, I'm using a german keyboard and finding those special characters on it is a pain...
    Oldbitcollector said...
    A question, did you notice that blank spaces are 1's and carriage returns are not 3's not 13.
    Um, not really, no,·I didn't look at the code very closely, just pasted some lines from the talking demo. smile.gif It's really amazing, how easy this is with spin.
    Cheers,

    Clemens
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-29 02:44
    Neat upgrade! A fun way to play with the speech toys!

    I've attached 1.3b to the top of the thread.. It's a bit more stable in LOAD/SAVE.
    It's dropping a character at the very end of each page, but it's close enough to be
    useful as a multi-page editor.

    Edit: Bah! New bug found, not saving files as truly DOS compatible.
    I'll have this straightened out in a day or two. Then you'll be able to edit Femto files
    as well.



    I was day-dreaming the other day... What if we created a webserver running Propellant
    that could receive a .spin file and send back binary? Wouldn't remove the PC entirely,
    but it could make things interesting for those with a PropNIC. (or equiv)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange

    Post Edited (Oldbitcollector) : 7/29/2008 3:41:12 AM GMT
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-06-07 00:58
    I'm wondering if this text editor would work with Kye's new super Fat32 sd card code?

    This program could be just perfect for editing small autoexec and batch files that you can leave on the sd card and change settings without having to recompile spin programs. Useful for 'out in the field' applications.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-06-07 16:01
    It would work, but it needs a good re-write..

    I dropped the project after mparks editor was released, but for the life of me I can't find the thread.
    Also Casslan did an excellent editor as well.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
Sign In or Register to comment.