These patches add szx snapshot support for TTX2000S.
Guesser, what data is it worth to store and resume the current state?
ZXSTTTX2000S
The state of the OEL/Volex TTX2000S teletext adaptor.
// TTX2000S flags
#define ZXSTTTX2000S_PAGED 1
#define ZXSTTTX2000S_COMPRESSED 2
#define ZXSTTTX2000S_CUSTOMROM 4
// TTX2000S Block
typedef struct _tagZXSTTTX2000S
{
ZXSTBLOCK blk;
WORD wFlags;
DWORD dwcbRam;
DWORD dwcbRom;
BYTE chCtrlReg;
BYTE chLine;
BYTE chRam[1];
} ZXSTTTX2000S, *LPZXSTTTX2000S;
Members
blk
The block header. The block id is ZXSTBID_TTX2000S ('T', 'T', 'X', '2').
wFlags
Various flags. This can be a combination of:
Flag Meaning
ZXSTTTX2000S_PAGED The TTX2000S's ROM and RAM are currently
paged in.
ZXSTTTX2000S_COMPRESSED Specifies the RAM (and any custom ROM) have been
compressed with the Zlib compression library.
ZXSTTTX2000S_CUSTOMROM A custom ROM is installed. The Zlib compressed
or uncompressed ROM image begins after the RAM
image at chRam. dwcbRom contains the size of the
compressed (or uncompressed) data.
dwcbRam
Size in bytes of the Zlib compressed or uncompressed TTX2000S RAM.
The uncompressed RAM size is always 1,024 bytes.
dwcbRom
Size in bytes of the Zlib compressed or uncompressed custom TTX2000S ROM
(if one was installed). The uncompressed ROM size is always 8,192 bytes.
chCtrlReg
Last value written to port $7f.
chLine
Current block line (0-15).
chRam
A Zlib compressed or uncompressed image of the TTX2000S's RAM. The
uncompressed RAM size is always 1,024 bytes.
If a custom ROM is installed. The image follows immediately after the RAM
data.
Remarks
None.
With DVB-T or DVB-C in our TV sets for years already and analogue TV decommissioned in many countries, is this peripheral even working anywhere ? If it isn't something for deprecation.
It was shut down here long before I added the emulation! The fact that it's harder to use the original devices without extra hardware to generate the RF signal is all the more reason to emulate it surely 😅
Custom ROM, and paged state are definitely useful. Selected channel possibly though it may no longer be connected to the packet source when re-loaded. The packet data stored in RAM is least useful as it's only relevant for the next 20ms, and not something that's useful for an emulator to ever read back as the packet stream has moved on or gone away.
Saving the internal RAM could still be useful for debugging purposes I suppose.