View Full Version : Converting Hydra video drivers for Demoboard

03-27-2009, 01:19 AM
Greetings everyone -- Prop N00b here, trying to do something useful while teaching myself Spin. I have rewritten PropDOS from the ground up, ditching the music functions but providing much better command parsing and functions for exploring the SD card. I would like to clean this up and release it to the obex on the MIT license. I'll also be doing this with my next project, which is a file system that can *gasp* access more than one file at a time.

My problem is that the aigeneric TV driver which propDOS uses isn't MIT licensed. I've converted to the tv_terminal driver, but that provides only 13 lines on screen. All of the 24 line drivers on the obex are written for the Hydra, and I am going quietly mad trying to get one of them to run on my demoboard. The Parallax drivers and aigeneric seem to have code to just take the lowest video pin as an argument and do the setup, but all of the obex 24-line drivers just say "edit the pasm." OK I've edited the pasm and I can't get any of the blasted things (or any of the other drivers that seem to be based on SimpleNTSC) to display video.

Original lines I know I need to change:

Hydra video is on the low nibble of the pin group at 24, demoboard on the high nibble at 12, so

movs vcfg, #%0000_0111 goes to
movs vcfg, #%0111_0000


movi vcfg, #%0_10_101_000 goes to
movi vcfg, #%0_11_101_000

pin 12 is in group 1 not group 3 so

movi vcfg, #3 goes to
movi vcfg, #1

and pin 12 isn't pin 24 so

tvport_mask = #%0000_0111<<24 goes to
tvport_mask = #%0000_0111<<12

I have gone through these drivers line by line looking for anything else that might be appropriate to change and I can't find anything. Does anybody have any idea what I am missing, or if you have a version that's working with the demoboard could you post it for me?

Thanks, and thanks to Parallax for creating the most amazing chip I have seen in years. I only learned that it existed two weeks ago and it's turning my entire job upside down.

--Roger Williams aka localroger

Oldbitcollector (Jeff)
03-27-2009, 02:00 AM
Great to see more power added to PropDOS.

What TV driver are you using? Maybe I can wade in and assist?
Post your code.


New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

03-27-2009, 11:25 PM
First, the Demoboard has a 5MHz clock while the Hydra has a 10MHz clock so you need to update your clock setting (i.e. _XINFREQ = 5_000_000 + 0000·and _CLKMODE = XTAL1 + PLL16X )

Second, the Demoboard uses pins 12-15 for video, versus pins 24-27 for the Hydra, so you need to update VCFG (vgroup & vpins) & DIRA.

MOVS VCFG, #%01110000
MOVD VCFG, #%001
MOV DIRA, idira
idira LONG $00007000

You don't need to change VCFG[31..23].

03-28-2009, 08:40 AM
I suspect AiGeneric was written by Hippy - ask him about using the code (with due acknowledgement of course).

Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp (http://forums.parallax.com/showthread.php?p=786418), SixBladeProp (http://forums.parallax.com/showthread.php?p=780033), website (Multiple propeller pcbs) (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index (http://forums.parallax.com/showthread.php?p=778427))
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

Oldbitcollector (Jeff)
03-28-2009, 08:46 AM

Not sure how you are making out, but this thread (http://forums.parallax.com/showthread.php?p=679210) may be of interest to you.

This where the 8x8 driver had it's humble beginnings.


New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

03-29-2009, 08:13 AM
I'm the author of the 8x8 drivers, built off of SIMPLE_NTSC. The license is "use it, have fun with it, modify it, and share it". I need to go back and update the license in OBEX. Sorry about that.

In the 6502 emulation project thread, in the HYDRA sub-forum, the version of this driver attached to the later versions of the 6502 prototype emulation have been modified to use the nice and spiffy font file system built as part of AiGeneric. I would use those, if you are building something off of the drivers. Lots of fonts available, and most of them are ASCII compliant. (this will make your job easier)


Propeller Wiki: Share the coolness! (http://propeller.wikispaces.com/)
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net (http://propeller.wikispaces.com/Join+us+on+IRC%21/)
Safety Tip: Life is as good as YOU think it is!

Post Edited (potatohead) : 3/29/2009 1:18:29 AM GMT

04-01-2009, 08:04 AM
Thanks everyone, I just moved past the problem for now by converting to the tv_text driver supplied with the proptool and left inline docs for converting to aigeneric for anyone interested; now I have an actual application I need to get done and I'm wrestling with the serial port drivers. I have to be picky about the licenses and such because I'm doing this for an actual company. I've convinced them that some of the low level learning stuff I do like converting the FAT16 code to a form I can use for my own purposes should be shared with the community. It is Parallax's whole attitude, requiring the MIT on obex code so that we can *cough* lift it ourselves that has convinced them that this is a good idea. (The fact that I will be doing plenty of industry specific stuff I _won't_ be posting here helped a lot too.) The Propeller is unique and needs to be supported. There is so much we can do with it that can't be done any other way, except for maybe ten times the price.

I'll be putting my first effort up in a few days, I'm in the cleaning it up for public consumption phase right now.

Oldbitcollector (Jeff)
04-01-2009, 08:16 AM
Good news. The AiGeneric driver has been approved for MIT license.
It will be posted officially soon. You are welcome use use the existing driver under MIT.

Edit: Just posted 9:30pm


New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

Post Edited (Oldbitcollector) : 4/1/2009 1:40:48 AM GMT

04-01-2009, 08:44 PM
I'd love to see what you have done in your re-write of propdos.. Are you planing on sharing?