Sphinx and VGA?
rwgast_logicdesign
Posts: 1,464
Ive looked around a bit and havent really found an answer to this.
Im putting together some stuff for a sphinx system and I was wondering if there was an easy way to use a VGA driver instead of NTSC. A tv just doesn't have a high enough resolution to be useful, and dragging one out from the garage is pretty inconvienet.
Im putting together some stuff for a sphinx system and I was wondering if there was an easy way to use a VGA driver instead of NTSC. A tv just doesn't have a high enough resolution to be useful, and dragging one out from the garage is pretty inconvienet.
Comments
Whats that it can be done? OK ill buy that, if you prove me wrong!!!
Seriously it's really strange no one else has wanted to see sphinx on a usable display for editing, Im surprised NTSC was the chosen route in the first place!! I mean there's people who have ported NTSC games over to VGA, so this cant be that hard for someone with the right skill set. I hope to get there one day but anything video related without a driver isn't on my list of to do's until iv'e thoroughly mastered spin, and gotten in to PASM. Alas im still a mediocre prop programmer striving for better skills, learning how to deal with hardware while wrapping my mind around the propeller paradigm at the same time. Toto, were not in MS-VC anymore, I kept calling createwindowex but my propeller didn't do anything!
The more I think about it it though, having a 4x40 serial display built in the keyboard may be even better. Nothing spectacular just something compact i can write code on and interface to new chips easily, kind of a propeller exploration tool for those times when a laptop with cables and boards dangling from it isnt a real option.
http://www.parallax.com/Sphinx/tabid/850/Default.aspx
BTW: I happen to be working on a VGA text editor for Sphinx right now...
Knowing you, the editor will be easy to modify for a wide range of display settings (rows, columns) and different drivers :-)
I have been running Sphinx on PropCade with a TV output in the past, but would love to use my 80x30 VGA single cog driver instead.
My favorite small text mode editor under Linux is still "joe" - some of the old Wordstar key bindings are still hard wired in my fingers.
I'm sure it could be modified for other display drivers. But, my main goal is to be able to edit .spin files and show the special characters.
To that extend, I'm current using a driver that supports the ROM font.
First wanted to use VgaHiResText (or drivers like yours or kuroneko), but I think it only supports characters 0..127
Using the rom fonts for the editor makes perfect sense, and is worth the additional cog for the schematic etc symbols, so using VgaHiResText is the right choice.
Currently I only support characters 0-127 as I use bit 7 to indicate "inverse", however it would be easy to allow for 256 characers at the expense of more hub memory. I have to store my fonts in the hub, and unfortunately my drivers cannot use the rom fonts as I had to go to an unusual interleaved scan line format for the fonts to get the cycle count low enough to do single cog drivers.
Its especially nice that your doing it Ray, that means it will most likely get done, and be pretty quality stuff! How far a long are you with this editor? How much RAM do you estimate we will have to sacrifice to use VGA?
@Bill, Ive been wondering about Largos ever since I got in to the propeller. There doesn't seem to be much on your site about it, is this project still active?
I had some ideas about how to do it, but those all turned out to take up too much memory.
So, I'm trying out different ideas.
Starting with Spin viewer with the idea of adding editing later...
I expect that Largos will wake up from his coma after the P2 is released
Long answer:
It really is a much better fit for the P2. I can make it work on a P1 (and eventually intend to) however it will run much better/faster on the P2.
Basically what happened is that I did not have as much spare time as I'd have liked in the last few years; for some strange reason wifey insists that I prioritize my time in the following order:
- consulting work
- product development for mikronauts
- wifey/family time (basically any non-snoring time after 50hr-60hr per week)
- fun side projects (while wifey is cooking or reading)
One problem was that the available C compilers for the Prop ended up going down a different path than what I would have needed for Largos, and I did not have time to port a compiler myself. With the P2 having far more resources in terms of memory and processor speed, that should not matter as much.
The following was how I was going to write an editor, but I don't have time to do it. I am leaving out minor details.
1. Keep a virtual buffer on disk, pre-initialized to spaces.
2. Size it for MAXLINES * MAXLINESIZE (say 4000 * 256)
3. have a one-dimensional word array in the hub, for example 'map[MAXLINES]'
4. pre-initialize map so that map[0..MAXLINES-1] = 0..MAXLINES-1
5. have a one line edit buffer used when a line is modified
6. you need a few variables: numlines, currline, topscreen, botscreen, and later add regiontop, regionbottom to support moves, cuts, pastes etc
- to load a file, load the text.vm file with the file you want to edit, or just have the clear file with one active line.
- all edits happen to a line buffer, which is flushed to text.vm when the cursor leaves that line
- line inserts, deletions etc only effect the map[] array until the file is saved
- cut/paste/delete of regions also only effect the map[] array until the file is saved
- when the file is saved, the map[] is re-initialized as per (4) above
I was going to use an SPI ram for the text buffer, but SD should be fast enough (with the line mapping array) in terms of response time.
Here is the link
http://forums.parallax.com/showthread.php/138251-A-Propeller-OS-that-can-run-on-multiple-hardware...?highlight=propeller%20os