One of the reasons for the popularity of the Topfield range of Personal Video Recorders is their open API, which allows users to write programs to modify the PVR's interface.
Once you've downloaded all of the API software from Topfield's Korean site, you'll notice that the documentation is a little sparse. Don't let that put you off, as there's plenty of help out there.
Note that if you don't install into c:\cygwin then you must ensure that the correct directory name is in the PATH, the C_INCLUDE, the CPLUS_INCLUDE and (this isn't mentioned in the guide) in TAP.LD.
The programming process is:
- edit .c file
- run build.bat to compile
- if successful, use Altair to copy it across to the Toppy
- test it on the Toppy
- repeat from the start until bug free
If you have problems then the place to ask is in the Australian Topfield forums or the new UK Toppy forums. There really needs to be a programming Wiki to hold those commonly-asked questions, but there isn't one yet.
A great way to learn is to look at other programs to see how things are done. Most of the TAPs now available also provide their source.
A great sticking point for beginners is that the API documentation is not as comprehensive as it could be, and trial and error is usually required to complete your understanding of particular functions. The following example shows the problem I had when trying to create a TAP to show a new screen aspect ratio (14:9, half-way between the 4:3 of television, and 16:9 of cinema).
From the API pdf:
TAP_Channel_Scaleint TAP_Channel_Scale( int mainSub, long x, long y, long w, long h, bool anim )
� It changes the size of screen.
mainSub : 1 � main screen, 0 � sub screen
x, y : upper-left coordinate of the screen
w,h : width and height of the screen.
anim : if TRUE, it is scaled smoothly.
Return value : : If 0, there is no errors.
Good, that looks to be just what I need. I just need to zoom in and shifting the 16:9 picture left and up a bit.
After playing with this for a while I found that the width and height were not independent, and could not be increased. At this point I abandoned this TAP project. Proper documentation, in the API docs or a wiki, would have saved me a lot of time.
Regardless of the documentation problems, the fact that there's an API at all is a marvellous thing, and should be applauded.