VGA colour and VT100 objects
pullmoll
Posts: 817
Attached is a VGA object that can do 80x30 characters with separate foreground and background colour per character. The VT100 emulation can be used to write to the screen using the well known escape sequences. The vgademo code contains only a small excerpt of the supported escape sequences.
The frame buffer requires 80 x 30 words or 1200 longs.
The timing is set for a 80MHz Propeller and video outputs are on pins 16..23.
Oops: v0.0.2 fixes a bug with the underline cursor, which was never displayed.
v0.0.3: Still playing around. This adds underlined characters to the font and uses them with the corresponding VT100 attribute.
v0.0.4: This one uses an 8x8 font with 128 characters only, so it saves a lot of hub RAM. The character scanlines are doubled to make the font 8x16. Underline is generated for the 2nd half of the character set, i.e. char + $80.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
Post Edited (pullmoll) : 5/14/2010 8:13:55 PM GMT
The frame buffer requires 80 x 30 words or 1200 longs.
The timing is set for a 80MHz Propeller and video outputs are on pins 16..23.
Oops: v0.0.2 fixes a bug with the underline cursor, which was never displayed.
v0.0.3: Still playing around. This adds underlined characters to the font and uses them with the corresponding VT100 attribute.
v0.0.4: This one uses an 8x8 font with 128 characters only, so it saves a lot of hub RAM. The character scanlines are doubled to make the font 8x16. Underline is generated for the 2nd half of the character set, i.e. char + $80.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
Post Edited (pullmoll) : 5/14/2010 8:13:55 PM GMT
Comments
As I was also wanting 1024 to divide down to 256x192 [noparse]:D[/noparse] but I'll just have to have borders, I can live with that [noparse]:D[/noparse]
Thanks, will have a play with this, and the Z80 emu [noparse]:D[/noparse] any guesses what I'm making? lol [noparse]:D[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Higher resolutions won't work, that's true. They may be possible without a CLUT and just the foreground colour in the attribute byte, but that wasn't what I wanted. With the two lookups per character there is no time left for any extra instruction (or perhaps for one, but not for two). It was very, very tight
I guess you're going to emulate some colour computer? I don't know the Spectrum specs, but the resolution is certainly lower than 80x30 characters.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
yes, Pullmoll, the res is 256x192 pixels, thankfully bitmapped, so should save some cycles not having to get char from font, which will allow it to get the palette.
Do you know the Timex 1000? was that what they called it in the states?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Nope, it won't fit. The 1400 longs is too much with all the other code in place. There is some space to gain from cog initialization code, but it is scattered throughout the memory space: the qz80 cog, the serial i/o cog, the SPI SD + XMM cog, the VT100 cog. Right now the CP/M+MP/M screen buffer reuses the I/O cog's init space ($200 longs) plus what it needs for 80x40 characters = $320 longs, so it preserves $120 longs after the I/O cog's initial code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
Post Edited (pullmoll) : 5/9/2010 1:07:24 PM GMT
zx-81?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I always have someone watching my back.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
http://en.wikipedia.org/wiki/ZX_Spectrum
That one? Hmmm.... lots of 16K games on cassette available!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Post Edited (potatohead) : 5/9/2010 4:38:02 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
en.wikipedia.org/wiki/Timex_Sinclair_2068
Sorry for being off topic Pullmoll....
Baggers you should really start a new thread if you are doing a Speccy emulator, that is if you haven't already finished it while I am typing this post
Regards,
Coley
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX - The home of the Hybrid Development System and PropGFX Lite
Depending on how they chose to do the video, that computer would do 256 colors on NTSC TV's just like the CoCo 3 can, and I never got to try it... (would have too) [noparse]:)[/noparse]
The end product would have been 128x192x256! Never exploited over here, just as the CoCo 3 160x200x256 wasn't. I believe that's because few people really knew about it being possible, and the conflict with PAL displays where it was not possible to do in the same way.
Somebody somewhere needs to toss up a NTSC speccy demo for the next Breakpoint. [noparse]:)[/noparse] [noparse][[/noparse]goes off in search of screenies to see what the video signal was like]
No chance at that. Can't find anything on the NTSC beasties... Oh well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Post Edited (potatohead) : 5/9/2010 7:32:54 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I always have someone watching my back.
Oh bother! That demo just looks so cool in colour.
Which part doesn't fit - the driver code, or the buffer needed for the screen? If the latter, would it be possible to split up the display into parts and fit those into the reused hub space?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Post Edited (Dr_Acula) : 5/10/2010 6:40:05 AM GMT
The buffer doesn't fit. It would allocate 688 longs in addition to the 512 it reuses from the I/O cog initialization space. It may be possible to scatter the video RAM around, but the VT100 code would become a mess: think of scrolling through several memory ranges. I'd rather not try it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
Trying to compile this using the lastest BST and lastest Propeller Tool I'm getting some compile errors.
The first stop is the "#define DracBladeProp"
Can this be compiled using Propeller Tool on the demoboard?
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered?
Propeller Feature Projects: PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
With BST you have to enable the extended syntax in the compiler options to allow #defines.
You can also just remove the #define DracBladeProp. It isn't currently used - it was intended to try to have a frame buffer in XMM.
The one thing you may have to change is the first pin of the VGA output group. It's 16 for the DracBlade and the first parameter to vga.start()
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
First of all, thanks for this object, it's exactly what I was looking for. I need a little help though: what would be needed to modify it to output 640x400 (80x25) instead of 640x480 (80x30)? I tried to change the settings as shown here:
http://tinyvga.com/vga-timing/640x400@70Hz
but for some reason my monitor detects this as 640x350 (and obviously doesn't display the whole 25 lines). I have to mention that I couldn't change the polarity of the vertical sync to positive (as specified in the forementioned page), because when I try to change 'vn' to 0 in vgacolour.spin I get a very strange output (completely desynchronized). I'm quite new to this, and I'm not sure what to do anymore. Searching the forums for "640x400 vga" didn't help much.
I too need 80x25 to better emulate a real terminal.
But I also need 100 MHz operation to work on a PropCade board.
Have you actually tried it on a 100MHz Prop?
Would this ANSI term help?
https://www.dropbox.com/sh/qwhixzvtlrvp1u1/zupPP-EA4Q/PropellerBASIC/Useful%20Binaries/sources/ansiterm.zip
Jeff