mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-02-21 13:56:46 +01:00
- merged all Hex Editor Neo structure definitions for MStar *.dbm variants into a single file
- added more DBM configurations
This commit is contained in:
@@ -17,6 +17,9 @@ namespace ChanSort.Loader.Android
|
||||
if (file.StartsWith("dvr_rtk_tv") && file.EndsWith(".db"))
|
||||
return new AldenSerializer(inputFile);
|
||||
|
||||
if (!file.EndsWith(".db"))
|
||||
return null;
|
||||
|
||||
throw LoaderException.TryNext(SerializerBase.ERR_UnknownFormat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,12 @@ lenName=64
|
||||
offProgNr=64
|
||||
offLcn=66
|
||||
offTransponderIndex=70
|
||||
offServiceType=76
|
||||
;offSkip=79
|
||||
;maskSkip=0x08
|
||||
;offLock=79
|
||||
;maskLock=0x10
|
||||
;offFavorites=81
|
||||
offTsid=96
|
||||
offOnid=98
|
||||
offSid=100
|
||||
@@ -78,12 +84,74 @@ offProgNr=64
|
||||
offLcn=66
|
||||
offSatelliteIndex=70
|
||||
offTransponderIndex=72
|
||||
offServiceType=80
|
||||
offSkip=81
|
||||
maskSkip=0x08
|
||||
offLock=81
|
||||
maskLock=0x10
|
||||
offFavorites=83
|
||||
offTsid=100
|
||||
offOnid=102
|
||||
offSid=104
|
||||
offPcrPid=108
|
||||
offVideoPid=110
|
||||
|
||||
;---------------------------------------
|
||||
|
||||
[dbm:785256]
|
||||
; overall file layout
|
||||
isDvbS=true
|
||||
offChecksum=0x0000
|
||||
offDataLength=0x0002
|
||||
offData=0x0006
|
||||
|
||||
offSatelliteBitmap=0x0006
|
||||
lenSatelliteBitmap=32
|
||||
offSatelliteData=0x0026
|
||||
numSatellite=254
|
||||
lenSatelliteData=80
|
||||
|
||||
offTransponderBitmap=0x4f86
|
||||
lenTransponderBitmap=376
|
||||
offTransponderData=0x50fe
|
||||
numTransponder=3000
|
||||
lenTransponderData=36
|
||||
|
||||
offChannelBitmap=0x1f6f2
|
||||
lenChannelBitmap=500
|
||||
offChannelData=0x1f8e6
|
||||
numChannel=4000
|
||||
lenChannelData=164
|
||||
|
||||
;satellite record
|
||||
offSatName=0
|
||||
lenSatName=34
|
||||
offLowFreq=34
|
||||
offHighFreq=36
|
||||
offOribalPos=74
|
||||
|
||||
;transponder record
|
||||
offFreq=0
|
||||
offSymRate=20
|
||||
|
||||
;channel record
|
||||
offName=0
|
||||
lenName=64
|
||||
offProgNr=64
|
||||
offLcn=66
|
||||
offSatelliteIndex=70
|
||||
offTransponderIndex=72
|
||||
offServiceType=80
|
||||
offSkip=81
|
||||
maskSkip=0x08
|
||||
offLock=81
|
||||
maskLock=0x10
|
||||
offFavorites=83
|
||||
offTsid=100
|
||||
offOnid=102
|
||||
offSid=104
|
||||
offPcrPid=108
|
||||
offVideoPid=110
|
||||
|
||||
;---------------------------------------
|
||||
|
||||
@@ -130,6 +198,12 @@ offProgNr=64
|
||||
offLcn=66
|
||||
offSatelliteIndex=70
|
||||
offTransponderIndex=72
|
||||
offServiceType=80
|
||||
offSkip=81
|
||||
maskSkip=0x08
|
||||
offLock=81
|
||||
maskLock=0x10
|
||||
offFavorites=83
|
||||
offTsid=100
|
||||
offOnid=102
|
||||
offSid=104
|
||||
@@ -181,6 +255,12 @@ offProgNr=64
|
||||
offLcn=66
|
||||
offSatelliteIndex=70
|
||||
offTransponderIndex=72
|
||||
offServiceType=80
|
||||
offSkip=81
|
||||
maskSkip=0x08
|
||||
offLock=81
|
||||
maskLock=0x10
|
||||
offFavorites=83
|
||||
offTsid=100
|
||||
offOnid=102
|
||||
offSid=104
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace ChanSort.Loader.DBM
|
||||
public DbmSerializer(string inputFile) : base(inputFile)
|
||||
{
|
||||
this.Features.ChannelNameEdit = ChannelNameEditMode.None;
|
||||
this.Features.CanSkipChannels = false;
|
||||
this.Features.CanLockChannels = false;
|
||||
this.Features.CanSkipChannels = true;
|
||||
this.Features.CanLockChannels = true;
|
||||
this.Features.CanHideChannels = false;
|
||||
this.Features.DeleteMode = DeleteMode.NotSupported;
|
||||
this.Features.CanHaveGaps = false;
|
||||
this.Features.FavoritesMode = FavoritesMode.None;
|
||||
this.Features.MaxFavoriteLists = 0;
|
||||
this.Features.FavoritesMode = FavoritesMode.Flags;
|
||||
this.Features.MaxFavoriteLists = 4;
|
||||
this.Features.AllowGapsInFavNumbers = false;
|
||||
this.Features.CanEditFavListNames = false;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace ChanSort.Loader.DBM
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.Provider));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.Encrypted));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.ServiceType));
|
||||
list.VisibleColumnFieldNames.Remove(nameof(ChannelInfo.ServiceTypeName));
|
||||
list.VisibleColumnFieldNames.Add(nameof(ChannelInfo.ServiceTypeName));
|
||||
}
|
||||
|
||||
string iniFile = Assembly.GetExecutingAssembly().Location.Replace(".dll", ".ini");
|
||||
@@ -175,6 +175,14 @@ namespace ChanSort.Loader.DBM
|
||||
c.ServiceId = mapping.GetWord("offSid");
|
||||
c.PcrPid = mapping.GetWord("offPcrPid");
|
||||
c.VideoPid = mapping.GetWord("offVideoPid");
|
||||
c.Skip = mapping.GetFlag("Skip", false);
|
||||
c.Lock = mapping.GetFlag("Lock", false);
|
||||
var serviceType = mapping.GetByte("offServiceType");
|
||||
c.ServiceTypeName = serviceType == 1 ? "TV" : serviceType == 2 ? "Radio" : "";
|
||||
|
||||
var fav = mapping.GetByte("offFavorites");
|
||||
fav = (byte)(((fav >> 1) & 0x0E) | (fav & 0x01)); // A=1, B=4, C=8, D=16
|
||||
c.Favorites = (Favorites)fav;
|
||||
|
||||
var transpIdx = isDvbS ? mapping.GetWord("offTransponderIndex") : mapping.GetByte("offTransponderIndex");
|
||||
var tp = this.DataRoot.Transponder.TryGet(transpIdx);
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#include "chansort.h"
|
||||
|
||||
struct s_Transponder
|
||||
{
|
||||
var off0 = current_offset;
|
||||
dword Freq;
|
||||
byte unk1[4];
|
||||
word SymRate;
|
||||
var off1 = current_offset;
|
||||
|
||||
byte unk[36 - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Channel
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[64];
|
||||
word progNrMinus1;
|
||||
word lcn;
|
||||
byte u3[2];
|
||||
byte transponderIndex;
|
||||
byte u4[25];
|
||||
word tsid;
|
||||
word onid;
|
||||
word sid;
|
||||
|
||||
byte u5[2];
|
||||
word pcrPidMaybe;
|
||||
word vpidMaybe;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[160 - (off1-off0)];
|
||||
};
|
||||
|
||||
|
||||
public struct DBM_163772_DvbC
|
||||
{
|
||||
word BytesumPlus0x55;
|
||||
dword DataLengthForBytesum;
|
||||
|
||||
byte TransponderBitmap[16];
|
||||
s_Transponder TransponderData[100];
|
||||
|
||||
var off0 = current_offset;
|
||||
byte unk1[0x0E3C - off0];
|
||||
|
||||
byte ChannelBitmap[126];
|
||||
s_Channel ChannelData[1000];
|
||||
|
||||
byte Extra[*];
|
||||
};
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
#include "chansort.h"
|
||||
|
||||
struct s_Satellite
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[34];
|
||||
word LowFreq;
|
||||
word HighFreq;
|
||||
var off1 = current_offset;
|
||||
byte u1[74 - (off1 - off0)];
|
||||
word OrbitalPos;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[84 - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Transponder
|
||||
{
|
||||
var off0 = current_offset;
|
||||
dword Freq;
|
||||
byte unk1[16];
|
||||
word SymRate;
|
||||
var off1 = current_offset;
|
||||
|
||||
byte unk[36 - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Channel
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[64];
|
||||
word progNrMinus1;
|
||||
word lcn;
|
||||
byte u3[2];
|
||||
word satelliteIndex;
|
||||
word transponderIndex;
|
||||
byte u4[26];
|
||||
word tsid;
|
||||
word onid;
|
||||
word sid;
|
||||
|
||||
byte u5[2];
|
||||
word pcrPidMaybe;
|
||||
word vpidMaybe;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[164 - (off1-off0)];
|
||||
};
|
||||
|
||||
|
||||
public struct DBM_781736_DvbS
|
||||
{
|
||||
word BytesumPlus0x55;
|
||||
dword DataLengthForBytesum;
|
||||
|
||||
byte SatelliteBitmap[28];
|
||||
s_Satellite SatelliteData[200];
|
||||
|
||||
byte TransponderBitmap[376];
|
||||
s_Transponder TransponderData[3000];
|
||||
|
||||
var off0 = current_offset;
|
||||
byte unk1[0x1E930 - off0];
|
||||
|
||||
byte ChannelBitmap[502];
|
||||
s_Channel ChannelData[4000];
|
||||
|
||||
byte Extra[*];
|
||||
};
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
#include "chansort.h"
|
||||
|
||||
struct s_Satellite
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[34];
|
||||
word LowFreq;
|
||||
word HighFreq;
|
||||
var off1 = current_offset;
|
||||
byte u1[74 - (off1 - off0)];
|
||||
word OrbitalPos;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[84 - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Transponder
|
||||
{
|
||||
var off0 = current_offset;
|
||||
dword Freq;
|
||||
byte unk1[16];
|
||||
word SymRate;
|
||||
var off1 = current_offset;
|
||||
|
||||
byte unk[40 - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Channel
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[64];
|
||||
word progNrMinus1;
|
||||
word lcn;
|
||||
byte u3[2];
|
||||
word satelliteIndex;
|
||||
word transponderIndex;
|
||||
byte u4[26];
|
||||
word tsid;
|
||||
word onid;
|
||||
word sid;
|
||||
|
||||
byte u5[2];
|
||||
word pcrPidMaybe;
|
||||
word vpidMaybe;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[164 - (off1-off0)];
|
||||
};
|
||||
|
||||
|
||||
public struct DBM_793736_DvbS
|
||||
{
|
||||
word BytesumPlus0x55;
|
||||
dword DataLengthForBytesum;
|
||||
|
||||
byte SatelliteBitmap[28];
|
||||
s_Satellite SatelliteData[200];
|
||||
|
||||
byte TransponderBitmap[376];
|
||||
s_Transponder TransponderData[3000];
|
||||
|
||||
var off0 = current_offset;
|
||||
byte unk1[0x21810 - off0];
|
||||
|
||||
byte ChannelBitmap[502];
|
||||
s_Channel ChannelData[4000];
|
||||
|
||||
byte Extra[*];
|
||||
};
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
#include "chansort.h"
|
||||
|
||||
struct s_Satellite
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[34];
|
||||
word LowFreq;
|
||||
word HighFreq;
|
||||
var off1 = current_offset;
|
||||
byte u1[74 - (off1 - off0)];
|
||||
word OrbitalPos;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[76 - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Transponder
|
||||
{
|
||||
var off0 = current_offset;
|
||||
dword Freq;
|
||||
byte unk1[16];
|
||||
word SymRate;
|
||||
var off1 = current_offset;
|
||||
|
||||
byte unk[36 - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Channel
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[64];
|
||||
word progNrMinus1;
|
||||
word lcn;
|
||||
byte u3[2];
|
||||
word satelliteIndex;
|
||||
word transponderIndex;
|
||||
byte u4[26];
|
||||
word tsid;
|
||||
word onid;
|
||||
word sid;
|
||||
|
||||
byte u5[2];
|
||||
word pcrPidMaybe;
|
||||
word vpidMaybe;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[164 - (off1-off0)];
|
||||
};
|
||||
|
||||
|
||||
public struct DBM_948368_DvbS
|
||||
{
|
||||
word BytesumPlus0x55;
|
||||
dword DataLengthForBytesum;
|
||||
|
||||
byte SatelliteBitmap[32];
|
||||
s_Satellite SatelliteData[254];
|
||||
|
||||
byte TransponderBitmap[376];
|
||||
s_Transponder TransponderData[3000];
|
||||
|
||||
var off0 = current_offset;
|
||||
byte unk1[0x1f2fc - off0];
|
||||
|
||||
byte ChannelBitmap[626];
|
||||
s_Channel ChannelData[5000];
|
||||
|
||||
byte Extra[*];
|
||||
};
|
||||
|
||||
186
source/Information/FileStructures_for_HHD_Hex_Editor_Neo/dbm.h
Normal file
186
source/Information/FileStructures_for_HHD_Hex_Editor_Neo/dbm.h
Normal file
@@ -0,0 +1,186 @@
|
||||
#include "chansort.h"
|
||||
#pragma script("get_doc_size.js")
|
||||
|
||||
/*
|
||||
structure definition for various variants of MStar (aka MorningStar) DVB-C and DVB-S receiver channel list formats.
|
||||
Also used by various models from brands like AEG, Akiwa, Auvisio, Boca, Botech, Comag, Dyon, LogiSat, Kjaerulff, Micro, Megasat, Schwaiger, SeaSat, Strong, TechniSat, TeleSystem, Trekstor, Xoro, Zehnder, ...
|
||||
Typical file names include: vodafone.DBM, HB_DATABASE_6_29.DBM, MAS_HRS8520_23_08_2011.DBM, ...
|
||||
*/
|
||||
|
||||
struct s_Satellite
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[34];
|
||||
word LowFreq;
|
||||
word HighFreq;
|
||||
var off1 = current_offset;
|
||||
byte u1[74 - (off1 - off0)];
|
||||
word OrbitalPos;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[satRecordLength - (off1 - off0)];
|
||||
};
|
||||
|
||||
struct s_Transponder
|
||||
{
|
||||
var off0 = current_offset;
|
||||
dword Freq;
|
||||
byte unk1[16];
|
||||
word SymRate;
|
||||
var off1 = current_offset;
|
||||
|
||||
byte unk[transponderRecordLength - (off1 - off0)];
|
||||
};
|
||||
|
||||
enum e_Favorites : byte
|
||||
{
|
||||
A=0x01,
|
||||
B=0x04,
|
||||
C=0x08,
|
||||
D=0x10
|
||||
};
|
||||
|
||||
enum e_Flags : byte
|
||||
{
|
||||
Skip=0x08,
|
||||
Lock=0x10
|
||||
};
|
||||
|
||||
enum e_ServiceType : byte
|
||||
{
|
||||
TV=1,
|
||||
Radio=2
|
||||
};
|
||||
|
||||
struct s_Channel
|
||||
{
|
||||
var off0 = current_offset;
|
||||
byte Name[64];
|
||||
word progNrMinus1;
|
||||
word lcn;
|
||||
byte u3[2];
|
||||
word satelliteIndex;
|
||||
word transponderIndex;
|
||||
byte u4[bytesBetweenTransponderIndexAndServiceType];
|
||||
e_ServiceType serviceType;
|
||||
e_Flags flags;
|
||||
byte u5;
|
||||
e_Favorites favorites;
|
||||
byte u6[16];
|
||||
word tsid;
|
||||
word onid;
|
||||
word sid;
|
||||
|
||||
byte u7[2];
|
||||
word pcrPidMaybe;
|
||||
word vpidMaybe;
|
||||
|
||||
var off1 = current_offset;
|
||||
byte unk[channelRecordLength - (off1-off0)];
|
||||
};
|
||||
|
||||
|
||||
public struct DBM
|
||||
{
|
||||
var satBitmapLength = 0;
|
||||
var satRecordCount = 0;
|
||||
var satRecordLength = 0;
|
||||
var transponderBitmapLength = 0;
|
||||
var transponderRecordCount = 0;
|
||||
var transponderRecordLength = 0;
|
||||
var unknownDataLength = 0;
|
||||
var channelBitmapLength = 0;
|
||||
var channelRecordCount = 0;
|
||||
var channelRecordLength = 0;
|
||||
var bytesBetweenTransponderIndexAndServiceType = 6;
|
||||
|
||||
switch (GetDocumentSize())
|
||||
{
|
||||
case 163772:
|
||||
// TechniSat DVB-C vodafone.DBM
|
||||
satBitmapLength = 0;
|
||||
satRecordCount = 0;
|
||||
satRecordLength = 84;
|
||||
transponderBitmapLength = 16;
|
||||
transponderRecordCount = 100;
|
||||
transponderRecordLength = 36;
|
||||
unknownDataLength = 22;
|
||||
channelBitmapLength = 126;
|
||||
channelRecordCount = 1000;
|
||||
channelRecordLength = 160;
|
||||
bytesBetweenTransponderIndexAndServiceType = 2;
|
||||
break;
|
||||
case 781736:
|
||||
// Strong HB_DATABASE_1_18.DBM, Xoro HB_DATABASE_6_29.DBM
|
||||
satBitmapLength = 28;
|
||||
satRecordCount = 200;
|
||||
satRecordLength = 84;
|
||||
transponderBitmapLength = 376;
|
||||
transponderRecordCount = 3000;
|
||||
transponderRecordLength = 36;
|
||||
unknownDataLength = 22;
|
||||
channelBitmapLength = 502;
|
||||
channelRecordCount = 4000;
|
||||
channelRecordLength = 164;
|
||||
break;
|
||||
case 785256:
|
||||
// Strong HB_DATABASE_5_4.DBM
|
||||
satBitmapLength = 32;
|
||||
satRecordCount = 254;
|
||||
satRecordLength = 80;
|
||||
transponderBitmapLength = 376;
|
||||
transponderRecordCount = 3000;
|
||||
transponderRecordLength = 36;
|
||||
unknownDataLength = 20;
|
||||
channelBitmapLength = 500;
|
||||
channelRecordCount = 4000;
|
||||
channelRecordLength = 164;
|
||||
break;
|
||||
case 793736:
|
||||
// Xoro HB_DATABASE_8_19.DBM
|
||||
satBitmapLength = 28;
|
||||
satRecordCount = 200;
|
||||
satRecordLength = 84;
|
||||
transponderBitmapLength = 376;
|
||||
transponderRecordCount = 3000;
|
||||
transponderRecordLength = 40;
|
||||
unknownDataLength = 22;
|
||||
channelBitmapLength = 502;
|
||||
channelRecordCount = 4000;
|
||||
channelRecordLength = 164;
|
||||
break;
|
||||
case 948368:
|
||||
// Comag SL40HD_V1_17_02, Xoro HRS 8520, ...
|
||||
satBitmapLength = 32;
|
||||
satRecordCount = 254;
|
||||
satRecordLength = 76;
|
||||
transponderBitmapLength = 376;
|
||||
transponderRecordCount = 3000;
|
||||
transponderRecordLength = 36;
|
||||
unknownDataLength = 22;
|
||||
channelBitmapLength = 626;
|
||||
channelRecordCount = 5000;
|
||||
channelRecordLength = 164;
|
||||
break;
|
||||
default:
|
||||
$assert(false, "Structure for this file size is not supported");
|
||||
break;
|
||||
}
|
||||
|
||||
word BytesumPlus0x55;
|
||||
dword DataLengthForBytesum;
|
||||
|
||||
byte SatelliteBitmap[satBitmapLength];
|
||||
s_Satellite SatelliteData[satRecordCount];
|
||||
|
||||
byte TransponderBitmap[transponderBitmapLength];
|
||||
s_Transponder TransponderData[transponderRecordCount];
|
||||
|
||||
byte unknown[unknownDataLength];
|
||||
|
||||
byte ChannelBitmap[channelBitmapLength];
|
||||
s_Channel ChannelData[channelRecordCount];
|
||||
|
||||
byte Extra[*];
|
||||
};
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
ChanSort Change Log
|
||||
===================
|
||||
|
||||
2023-01-06
|
||||
- added support for numerous .DBM file formats used by DVB-C and DVB-S receivers based on
|
||||
MStar chips. Known brands to use this format include Xoro, TechniSat, Strong, Comag and
|
||||
many more. (If your file isn't recoginezed, please send it to me to add support for it)
|
||||
|
||||
2023-01-04
|
||||
- TCL/Thomson: improved file detection (.tar file or directory containing DtvData.db,
|
||||
satellite.db, cloneCRC.bin)
|
||||
|
||||
Reference in New Issue
Block a user