MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / InitializeIO

Method InitializeIO

source/SerialComms.cpp:957–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

955//===========================================================================
956
957void CSuperSerialCard::InitializeIO(LPBYTE pCxRomPeripheral)
958{
959 const UINT SSC_FW_SIZE = 2*1024;
960 const UINT SSC_SLOT_FW_SIZE = 256;
961 const UINT SSC_SLOT_FW_OFFSET = 7*256;
962
963 BYTE* pData = GetFrame().GetResource(IDR_SSC_FW, "FIRMWARE", SSC_FW_SIZE);
964 if(pData == NULL)
965 return;
966
967 memcpy(pCxRomPeripheral + m_slot*SSC_SLOT_FW_SIZE, pData+SSC_SLOT_FW_OFFSET, SSC_SLOT_FW_SIZE);
968
969 // Expansion ROM
970 if (m_pExpansionRom == NULL)
971 {
972 m_pExpansionRom = new BYTE [SSC_FW_SIZE];
973 memcpy(m_pExpansionRom, pData, SSC_FW_SIZE);
974 }
975
976 RegisterIoHandler(m_slot, &CSuperSerialCard::SSC_IORead, &CSuperSerialCard::SSC_IOWrite, NULL, NULL, this, m_pExpansionRom);
977}
978
979//===========================================================================
980

Callers

nothing calls this directly

Calls 2

RegisterIoHandlerFunction · 0.85
GetResourceMethod · 0.80

Tested by

no test coverage detected