Coming soon to a Prop near you - PrEditor
CassLan
Posts: 586
7/1/09
No its not finished yet, however there have been some changes in the approach:
I ran into some issues as far as filesize...I do want to be able to edit programs·with this and 3k~5k just isn't enough.
And now we have no less than TWO on-chip compilable languages (Femto & OMG Sphinx)
In addition, the more features added...the·smaller the editable file could be.
SO what could be done to make this work?
After some talking with Chip, Potatohead and Steve Moracco (sp?) at UPEW, the approach has totally been altered:
Instead of reading a file into memory..making changes to said buffer via user editing, and then writing the file back to SD when the user saves, the new approach is more of a Journaling system.
A chunk of the file is read into memory..enough to display a full page(give or take a little more), and when the user makes edits..these edits are logged into a small changelog buffer(1kb).
When refreshing the display, first the small file buffer is consulted..then the changelog is consulted...then the information is displayed.
After a certain amount of time of inactivity or when the changelog buffer gets close to full (Thinking of having a progress bar for this) the changes will be applied to the file in question on the SD.
I'm confident this will be fast enough to be transparent to the end user..and this will also leave room for future growth of PrEditor.
This approach has many advantages to the former:
*Filesize limitations pretty much gone.
*Possibly a recover on power loss option (The changelog buffer would have to be recorded on SD for this to be feasible)
I've also decided to make a real flow-chart type plan before I jump in, this wont completely alleviate any changes to things written as I go, but I'm sure it will help to have all of the functional dependencies plotted out, and yeild a better end result.
I'd love to hear what folks think about this approach, I'm very motivated after mparks demonstration as this is a very real use for this right now.
Rick
Original Post
Hey all,
I've been working on a text editor, and although its not finished yet, I wanted to share some screen shots.
I'm really happy with how its coming out.
Does it remind you of anything?
Rick
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Prop Forum Search (Via Google)
Post Edited (CassLan) : 7/4/2009 11:25:46 PM GMT
No its not finished yet, however there have been some changes in the approach:
I ran into some issues as far as filesize...I do want to be able to edit programs·with this and 3k~5k just isn't enough.
And now we have no less than TWO on-chip compilable languages (Femto & OMG Sphinx)
In addition, the more features added...the·smaller the editable file could be.
SO what could be done to make this work?
After some talking with Chip, Potatohead and Steve Moracco (sp?) at UPEW, the approach has totally been altered:
Instead of reading a file into memory..making changes to said buffer via user editing, and then writing the file back to SD when the user saves, the new approach is more of a Journaling system.
A chunk of the file is read into memory..enough to display a full page(give or take a little more), and when the user makes edits..these edits are logged into a small changelog buffer(1kb).
When refreshing the display, first the small file buffer is consulted..then the changelog is consulted...then the information is displayed.
After a certain amount of time of inactivity or when the changelog buffer gets close to full (Thinking of having a progress bar for this) the changes will be applied to the file in question on the SD.
I'm confident this will be fast enough to be transparent to the end user..and this will also leave room for future growth of PrEditor.
This approach has many advantages to the former:
*Filesize limitations pretty much gone.
*Possibly a recover on power loss option (The changelog buffer would have to be recorded on SD for this to be feasible)
I've also decided to make a real flow-chart type plan before I jump in, this wont completely alleviate any changes to things written as I go, but I'm sure it will help to have all of the functional dependencies plotted out, and yeild a better end result.
I'd love to hear what folks think about this approach, I'm very motivated after mparks demonstration as this is a very real use for this right now.
Rick
Original Post
Hey all,
I've been working on a text editor, and although its not finished yet, I wanted to share some screen shots.
I'm really happy with how its coming out.
Does it remind you of anything?
Rick
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Prop Forum Search (Via Google)
Post Edited (CassLan) : 7/4/2009 11:25:46 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
If you pair it with FemtoBasicColor, you could almost have something like QBASIC [noparse];)[/noparse]·· [noparse][[/noparse]Edit:] Well, maybe GW-BASIC.
Won't believe it without code. <SMIRK>
Double Wow. Nice Job!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Nice authentic screen captures too, how did you do those?
tubular
I'm really looking forward to this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New ICON coming, gotta wait for the INK to heal, now we have colour!
Good job!
Its definately an attempt at an EDIT.COM/QBASIC clone.
@Tubular- The screen captures are taken from a DVR for security cameras (thats what I do: http://www.cassidydevelopment.net), specifically this card:http://www.dwgsecurity.com/securitycameras/pc/viewPrd.asp?idcategory=2156&idproduct=29139, it accepts any composite video source. I can get them cheap if you want one.
@Mike- It is running on a TV, it uses a modified TV_Text driver for display. During design its been my goal to make it easily portable to VGA. The scroll bars help but you still end up with a 38x9 area for viewable editing, VGA would solve that but IMO take away some of the portability.
I'm really having fun with this and will post the source when its done.
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontrolled.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
@microcontrolled- The TV_Text driver is barely modified, just for Locate(x,y) in one command, and a variation on the Clear Screen command, I'm using ASCII Characters to draw the lines and borders, they are all in the character chart of the propeller tool under the help menu, you can paste them right into the program your working on. It wouldnt be hard to write a Box function that uses the propper TV_Text driver. When its done I will post all the source, I'm gonna be working on it all weekend, so lets hope for the best!!
Rick
We will just need a Compile/Run button next lol [noparse]:)[/noparse]))
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DGSwaner
"When in doubt, use C4" - Jamie Hyneman, Myth Buster
@Shazz- Definitely, opening files from and saving files to SD are top priority.
@DGSwaner- I know what you mean...Wolf3d and QBasic are some of my fondest memories.
@Baggers- I really don't see why this editor·on a "Run" Command couldn't (1) Save the File, (2) Modify some autoexec script (another file) ·(3) Reboot the Prop which could potentially kick on to Femto Running the file....but one thing at a time [noparse];)[/noparse]
All the drop-down menu coding is done, its also been done in a way so that it buffers the screen before drawing the menu...so it can be added to other programs without forcing the program to re-draw itself after a menu selection is made.
I need a 2nd PS2 Breadboard Adapter for the mouse, I will be ordering that tomorrow.
I'll be hitting the Saving/Loading stuff tomorrow.
Now I have a question to the folks that are familiar with SD Card Files, and the Format of text documents...if that is a format..or lack of a format.
I'm hoping some of the folks who have made other editors can lend some advise.
When I read the file off the SD Card..it will be in a string of bytes only?
Is there a limit to the size of an Array of bytes in spin?
Any "End of Line" characters are just like any other byte, and that's up to the editor to render?
Would it be best to keep the file contained as one long Array of bytes when loaded into Prop memory? Or have others found it easier to display as Line1[noparse]/noparse, Line2[noparse]/noparse?
Thanks,
Rick
·
I have a 20000-byte array to work with. I read the file off the SD card (using fsrw) as a whole into the array and massage it from there. In the Windows world, text files typically end lines with CR and LF. For my purposes, I want lines to be null-terminated, so I go through the array and change CRLF pairs to null. Since two bytes are turning into one, I use bytemove to bump the rest of the array up to fill the gap. (I have some code to handle plain LF (*nix) and plain CR (Mac?) line terminators, but I haven't tested it.)
Hope this helps, and good luck. It's looking great so far!
I'm actually looking at your code now...couldn't wait till tommorow [noparse];)[/noparse]
I will let you know how it goes.
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
I was thrown at first because I thought the mode in popen had to be a Zero-terminated string and·String("r")·was not working, but because of the examples mentioned above that was quickly remedied.
@OBC- I had not realized how far you went with the editor..DIR Display..and the switching between BASIC and the editor is really cool.
@Cluso99- Thanks, I'm looking into all these examples!
Oh yeah..any suggestions for a Name?·· PREDIT?
Rick
Post Edited (CassLan) : 4/25/2009 3:41:16 AM GMT
Thanks Tomas Rokicki!!
Rick
I can just say, thanks to all contributors
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Actually it looks like your editor could work out to be a great upgrade to
that idea! Looking forward to playing with your code. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
I'd go for PrEditor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again
Been working on it..my brain is like Jelly, here are some more pics.
@OBC- You have any tricks on how to sort files by name?
Rick
No, I haven't done an Alpha sort for the DIR command, we're due. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
What kind of sort are you looking for?
just filename, or sorted by extension then filename?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
As far as line endings go, you could add the LFCR or CRLF or whatever choice to the options pane.
You should also consider adding the option to convert tabs to spaces and set tab size.
Good progress.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
@jazzed- I was going to have those line ending options available..had not thought about the tab/space conversion, or tab space settings though. Thanks! About the program name "PrEditor", I think its a very clever title and I'm not really concerned about a miss-interpretation based on the fact that it shares the same pronounciation as a word that could be used to describe bad people, I hear that word on nature shows all the time and my mind doesn't flash to images of Dateline NBC. I do appreciate the thought, and perhaps if I was creating this to sell or build some brand image I might change it, but for now I think its fine.
Rick