SASC-NG
DVBSoftCAM

cEmuRom10 Class Reference

Inheritance diagram for cEmuRom10:

List of all members.

Public Member Functions

 cEmuRom10 (void)

Protected Member Functions

virtual bool InitSetup (void)
virtual bool UpdateSetup (const unsigned char *emm)
virtual bool MathMapHandler (void)

Detailed Description

Definition at line 401 of file nagra1.c.


Constructor & Destructor Documentation

cEmuRom10::cEmuRom10 ( void  )

Definition at line 410 of file nagra1.c.

References cEmu::Cmd83Chk, cEmu::EmmEnd, cEmu::EmmKey0, cEmu::EmmKey1, cEmu::EmmStart, cEmu::EnsIrdChk, cEmu::FindKeyEnd, cEmu::FindKeyStart, cEmu::InitEnd, cEmu::InitStart, cEmu::MapAddr, cEmu::Rc1H, cEmu::Rc1L, cEmu::SoftInt, and cEmu::StackHigh.

{
  InitStart=0x4000;
  InitEnd  =0x81ca;
  EmmStart =0x6a71;
  EmmEnd   =0x81f7;
  EmmKey0  =0x7172;
  EmmKey1  =0x717a;
  FindKeyStart=0x712c;
  FindKeyEnd  =0x713d;
  MapAddr  =0x2020;
  Rc1H     =0x004a;
  Rc1L     =0x004b;
  EnsIrdChk=0x7427;
  Cmd83Chk =0x7421;
  SoftInt  =0x4004;
  StackHigh=0x3ff;
}

Member Function Documentation

bool cEmuRom10::InitSetup ( void  ) [protected, virtual]

Reimplemented from cEmu.

Definition at line 429 of file nagra1.c.

References cEmuRom10Core::CoreInitSetup(), and cEmuRom10Core::DoMaps().

{
  return DoMaps(false,0x5A00) && CoreInitSetup();
}
bool cEmuRom10::MathMapHandler ( void  ) [protected, virtual]

Reimplemented from cEmu.

Definition at line 440 of file nagra1.c.

References cEmuRom10Core::Map::A, c6805::a, cEmuRom10Core::Map::B, cEmuRom10Core::Map::C, c6805::Get(), c6805::GetMem(), L_SYS_EMU, cEmuRom10Core::map, cEmuRom10Core::Map::opSize, PRINTF, c6805::Set(), and c6805::SetMem().

{
  PRINTF(L_SYS_EMU,"math call: $%02x",a);
  switch(a) {
    case 0x02:
      switch(Get(0x41)) {
        case 0: map.opSize=0x04; break;
        case 1: map.opSize=0x20; break;
        case 2: map.opSize=0x24; break;
        case 3: map.opSize=0x30; break;
        case 4: map.opSize=0x34; break;
        case 5:
        default: map.opSize=0x40; break;
        }
      return true;

    case 0x0e:
    case 0x0F:
    case 0x10:
      {
      const unsigned short addr=(Get(0x4d)<<8)|Get(0x4e);
      unsigned char tmp[64];
      GetMem(addr,tmp,map.opSize);
      unsigned char *reg;
      switch(a) {
        case 0x0e: reg=map.A; break;
        case 0x0f: reg=map.B; break;
        case 0x10: reg=map.C; break;
        default: return false;
        }
      SetMem(addr,reg,map.opSize);
      memcpy(reg,tmp,map.opSize);
      Set(0x41,map.opSize);
      return true;
      }

    case 0x29:
      Set(0x120,1);
      return true;
    }
  return cEmu::MathMapHandler();
}
bool cEmuRom10::UpdateSetup ( const unsigned char *  emm) [protected, virtual]

Reimplemented from cEmu.

Definition at line 434 of file nagra1.c.

References cEmuRom10Core::CoreUpdateSetup(), and c6805::Set().

{
  Set(0x006e,0x4B);
  return CoreUpdateSetup(emm);
}

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines