to read a TELETEXT page buffer?

Here for general support for B series TVs, request and problem solve area.
Post Reply

geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

to read a TELETEXT page buffer?

Post by geo650 »

Hello friends.
Is there any method to read teletext buffer? I need a function to get teletext buffer for selected page or the whole buffer. I am not sure if it is held in external DRAM or somewhere inside chipset's memory. I hope it is held in DRAM.
One teletext page should occupy ca. 1KB of memory.

I have been trying to read 2GB range of system memory and didn't find anything. Where to find these data in?


A FEW DAYS LATER... (text below edited many times, last time 2011-05-16)

I tried ttx dumping functions of debug menu. They created 3 files in /mtd_rwarea directory:
- ttx_BefEnhDump.bin
- ttx_AftEnhDump.bin
- ttx_PESDump.bin
They contain teletext pages. We can see packet structure and can find 0x55 0x55 0x27 preamble in every one packet. These bytes are clock run in bytes and framing code. Packets are also always separated (started) by a byte of unknown meaning (0x02).

I have also found these packets in DRAM memory. You don't need to call teletext viewer. Packets are stored in the background process.
Because I couldn't see any readable text in these packets, I've tried to switch bit order (LSbit <--> MSbit), I mean such operation on a single byte:

Code: Select all

b = ((b & 0x80) >> 7) | ((b & 0x40) >> 5) | ((b & 0x20) >> 3) | ((b & 0x10) >> 1) |
    ((b & 0x08) << 1) | ((b & 0x04) << 3) | ((b & 0x02) << 5) | ((b & 0x01) << 7);

b = b & 0x7F;  // and to remove correction codes and make text more clear to read
Decoding teletext packets is not very big problem because it is well documented.
See this document: http://www-user.tu-chemnitz.de/~heha/vt25/tele1.pdf (Enhanced Teletext specification).

I've found thousands of teletext packets (over 1000 TTX pages) somewhere in memory range 0x06C00000 - 0x15C00000 visible from exeDSP process (through injected so-library and /dev/mem file). There might be other buffers with packets, too.

Switching to external source (like HDMI) clears buffers. That's good.

Auto-changing pages (like subtitles) seems to "stay in place", I mean they are updated in the same memory addresses. That's also good news.

Next step is to find a variable (or array) name of exeDSP that points to that buffer (or buffers). Or even better, to find an "event" (interrupt) that moves data from teletext decoder to DRAM memory. Without your help it might be too difficult for me.
The goal is to make a function which will copy selected teletext page (or its packets) to a buffer or answer that it has not been received yet.

Cool applications are coming... 8-)


Small update: Looks like I've found only "analog" packets, i.e. read from analog sources (ATV, CVBS-input, SCART-input). Memory dumps show that teletext packets stored from DVB (digital) source have no clock-run-in bytes and framing codes. I understand why but now I have a problem with finding them.


LATER:

I think I've found a piece of pattern of every DVB-teletext packet. It is started by: 0x02 (or 0x03), 0x2C, 0x?? (variable), 0xE4 (untouched bytes). It seems it is working for teletext data of DVB sources around me.

Post Reply

Return to “[B] Support”