TV_Text Driver for ImageCraft C
jazzed
Posts: 11,803
Attached is a TV text driver using the TV.spin native asm binary.
This package contains a libasm.a which has wordmove, wordfill,
memcpy, and cognewNative functions. Copy libasm.a to your
c:\iccv7prop\lib directory for successful link.
The next package to be produced in this way will most likely be Graphics.
The time challenge is writing equivalent C functions for the spin methods.
Underlying TV or VGA driver should be selectable.
At some point in the near future, I'll put up a library post that
contains all drivers/libraries produced with a better libasm strategy.
Added: TvText_715.zip which is more compatible with ICC release version.
The libasm functions are not in the 715 package since they are in the ICC release.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (jazzed) : 7/15/2008 7:40:03 PM GMT
This package contains a libasm.a which has wordmove, wordfill,
memcpy, and cognewNative functions. Copy libasm.a to your
c:\iccv7prop\lib directory for successful link.
The next package to be produced in this way will most likely be Graphics.
The time challenge is writing equivalent C functions for the spin methods.
Underlying TV or VGA driver should be selectable.
At some point in the near future, I'll put up a library post that
contains all drivers/libraries produced with a better libasm strategy.
Added: TvText_715.zip which is more compatible with ICC release version.
The libasm functions are not in the 715 package since they are in the ICC release.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (jazzed) : 7/15/2008 7:40:03 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style
In order to use the standard 40 X 13 Display·I·had· to also Initialize gTvText.hx =·4.
You might·consider documenting this in the header file. ··(Maybe I just missed it)
Ron
Post Edited (Ron Sutcliffe) : 5/29/2008 7:08:08 AM GMT
The "nudge-down" I mentioned is also in the PASM code. The TV_Array.h is being built on demand now.
Oops. For building on demand, one needs the Propellent package in the executable·path. Please find it at:
http://www.parallax.com/Portals/0/Downloads/sw/propeller/Propellent-v1.1.zip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (jazzed) : 7/15/2008 8:10:26 PM GMT
Will look tonight, my zip file below is definitely WIP, but it will run Ok.
Tab key will open the command line.
Enter·Key to·abort command line and return to the editor
Arrow keys to navigate through text buffer. Encoded (0xb1,05b,0x41..0x44 + 0x80 = 0xc1..0xc4)
Return Key in edit mode will insert a blank line anywhere in the 8k buffer.
I had to use an extra cog to buffer the Serial input. Required for muti byte keyboard code.
ATM the trick is to integrate Serial input, Tvtext and SD card within the 16K limits.
Close but I am 1K over the 16k Limit ATM (bummer!). It's doable, I am still getting get my head around C.
·
Ron
Post Edited (Ron Sutcliffe) : 7/20/2008 12:14:37 PM GMT
One thing to consider for size (and speed) is to use local variables whenever possible instead of globals. Globals need twice as many instructions to use than locals. The "i" index variable in your tv_text file is a good candidate for testing this idea.
ASIDE: Not sure if you know this ... just a friendly FYI. The include file syntax has different meanings. For example: '#include <kyb.h>' tells the preprocessor to look in the default include directories for the file; '#include "kyb.h"' says to look in the local project or module path. I had to add the local project directory to my build options to compile your files. Seems like ICC's build options don't always get reloaded ....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
UR comments noted.
Its time for a re-write now that I'm half way through the 780 pages of C for dummies. LOL.
I can see plenty of scope to cut code already. I might even manage to make it readable the next time round.
If I can get this under 16K, with SD there is a resoanable chance that something useful might be achieved in 30K, 2k for kernal.
Thats for others to do, I just want to get a small tight Tiny editor working well and with simple hooks via the cmd line.
Ron·
·