• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ debugss函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中debugss函数的典型用法代码示例。如果您正苦于以下问题:C++ debugss函数的具体用法?C++ debugss怎么用?C++ debugss使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了debugss函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: getPortOffset

void
Z47Interface::out(BYTE addr,
                  BYTE val)
{
    BYTE offset = getPortOffset(addr);

    debugss(ssH47, ALL, "(%d) = 0x%02x\n", addr, val);

    switch (offset)
    {
        case StatusPort_Offset_c:
            debugss(ssH47, ALL, "StatusPort\n");
            writeStatus(val);
            break;

        case DataPort_Offset_c:
            debugss(ssH47, ALL, " DataPort\n");
            writeData(val);
            break;

        default:
            debugss(ssH47, ERROR, "Unknown Port offset - %d\n", offset);
            break;
    }
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:25,代码来源:Z47Interface.cpp


示例2: debugss

void
HardSectoredDisk::eject(const char* name)
{
    FILE* file;
    debugss(ssFloppyDisk, ALL, "Save: %s\n", name);

    if ((file = fopen(name, "wb")) != nullptr)
    {
        unsigned long readCount;

        for (int head = 0; head < sides_m; head++)
        {
            for (int track = 0; track < tracks_m; track++)
            {
                if ((readCount =
                         fwrite(&rawImage_m[head][track][0], bytesPerTrack_c, 1, file)) != 1)
                {
                    debugss(ssFloppyDisk, ERROR, "Unable to save file: %s head: %d track: %d\n",
                            name, head, track);
                }
            }
        }

        fclose(file);
    }
    else
    {
        debugss(ssFloppyDisk, WARNING, "unable to save file - %s\n", name);
    }
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:30,代码来源:HardSectoredDisk.cpp


示例3: debugss

void
Z47Controller::processReadReadyStatus(void)
{
    debugss(ssH47, ALL, "\n");
    statePosition_m++;

    if (statePosition_m == 2)
    {
        commandComplete();
        return;
    }

    if (statePosition_m != 1)
    {
        debugss(ssH47, ERROR, "Unexpected position\n");
    }

    dataToTransmit_m = readyState;
    curLinkState     = st_Link_AwaitingToTransmit_c;
    countDown_m      = 10;

    // after reading the status, the changed status bits must be reset.
    readyState      &= ~(stat_Ready_Drive0ReadyChanged_c |
                         stat_Ready_Drive1ReadyChanged_c |
                         stat_Ready_Drive2ReadyChanged_c |
                         stat_Ready_Drive3ReadyChanged_c);
}
开发者ID:durgadas311,项目名称:VirtualH89,代码行数:27,代码来源:Z47Controller.cpp


示例4: debugss

BYTE
Z47Interface::in(BYTE addr)
{
    debugss(ssH47, ALL, "(%d)\n", addr);
    BYTE offset = getPortOffset(addr);
    BYTE data   = 0;

    switch (offset)
    {
        case StatusPort_Offset_c:
            readStatus(data);
            debugss(ssH47, ALL, "StatusPort - 0x%02x\n", data);
            break;

        case DataPort_Offset_c:
            readData(data);
            debugss(ssH47, ALL, "DataPort - 0x%02x\n", data);
            break;

        default:
            debugss(ssH47, ERROR, "Unknown Port offset - %d\n", offset);
            break;
    }

    return data;
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:26,代码来源:Z47Interface.cpp


示例5: initialized_m

SoftSectoredDisk::SoftSectoredDisk(const char*     name,
                                   DiskImageFormat format): initialized_m(false)
{
    debugss(ssFloppyDisk, INFO, "Insert Disk: %s\n", name);

    if (format == dif_Unknown)
    {
        determineDiskFormat(name, format);
    }

    switch (format)
    {
        case dif_IMD:
            readIMD(name);
            break;

        case dif_TD0:
            readTD0(name);
            break;

        case dif_RAW:
            readRaw(name);
            break;

        case dif_8RAW:
            readRaw8(name);
            break;

        default:
            // Unknown format
            debugss(ssFloppyDisk, ERROR, "Unknown disk format: %d\n", format);

            break;
    }
}
开发者ID:durgadas311,项目名称:VirtualH89,代码行数:35,代码来源:SoftSectoredDisk.cpp


示例6: debugss

bool
MMS77320::connectDrive(BYTE              unitNum,
                       GenericSASIDrive* drive)
{
    bool retVal = false;

    debugss(ssMMS77320, INFO, "unit (%d), drive (%p)\n", unitNum, drive);

    if (unitNum < numDisks_c)
    {
        if (drives_m[unitNum] == NULL)
        {
            drives_m[unitNum] = drive;
            retVal            = true;
        }
        else
        {
            debugss(ssMMS77320, ERROR, "drive already connect\n");
        }
    }
    else
    {
        debugss(ssMMS77320, ERROR, "Invalid unit number (%d)\n", unitNum);
    }

    return (retVal);
}
开发者ID:durgadas311,项目名称:VirtualH89,代码行数:27,代码来源:mms77320.cpp


示例7: debugss

bool
SoftSectoredDisk::readRaw(const char* name)
{
    // Currently just supporting the RAW HDOS 3.0 disk images... 40 track, single density,
    // single sided, 10 sectors/track, 256 bytes/sector.
    std::ifstream     file;
    unsigned long int fileSize;
    unsigned long int pos = 0;
    BYTE*             buf;

    file.open(name, std::ios::binary);

    if (!file.is_open())
    {
        debugss(ssFloppyDisk, ERROR, "Unable to open file: %s\n", name);
        return false;
    }

    file.seekg(0, std::ios::end);
    fileSize = file.tellg();
    file.seekg(0, std::ios::beg);

    buf      = new BYTE[fileSize];
    file.read((char*) buf, fileSize);

    file.close();

    debugss(ssFloppyDisk, INFO, "RAW File: %s\n", name);

    if (fileSize != (256 * 10 * 40))
    {
        debugss(ssFloppyDisk, ERROR, "Invalid File Size: %s - %ld\n", name,
                fileSize);
        delete [] buf;

        return false;
    }

    for (int trk = 0; trk < 40; trk++)
    {
        Track* track = new Track(0, trk);

        for (int sect = 0; sect < 10; sect++, pos += 256)
        {
            Sector* sector = new Sector(0, trk, sect, 256, &buf[pos]);

            track->addSector(sector);
            track->setDensity(Track::singleDensity);
            track->setDataRate(Track::dr_300kbps);
        }

        tracks_m[0].push_back(track);
    }

    numTracks_m   = 40;
    numHeads_m    = 1;
    initialized_m = false;
    return true;
}
开发者ID:durgadas311,项目名称:VirtualH89,代码行数:59,代码来源:SoftSectoredDisk.cpp


示例8: memset

HardSectoredDisk::HardSectoredDisk(const char* name)
{
    FILE* file;

    initialized_m = true;
    memset(rawImage_m, 0, maxHeads_c * bytesPerTrack_c * maxTracksPerSide_c);

    if ((file = fopen(name, "r")) != nullptr)
    {
        unsigned long readCount;
        int           trk  = 0;
        int           head = 0;

        do
        {
            if (trk == 80)
            {
                // Check to see if we read both sides.
                if (head == 1)
                {
                    break;
                }

                trk = 0;
                head++;
            }

            if ((readCount =
                     fread(&rawImage_m[head][trk][0], bytesPerTrack_c, 1, file)) == 1)
            {
                trk++;
            }
            else if ((trk == 0) && (head == 1))
            {
                // check to see if we have to adjust side and track.
                head = 0;
                trk  = 80;
            }
        }
        while (readCount == 1);

        tracks_m = trk;
        sides_m  = head + 1;
        debugss(ssFloppyDisk, ALL, "Sides: %d  Tracks: %d\n", sides_m, tracks_m);
        fclose(file);
    }
    else
    {
        debugss(ssFloppyDisk, ERROR, "unable to open file - %s\n", name);
        initialized_m = false;
    }

    if (initialized_m)
    {
        debugss(ssFloppyDisk, INFO, "Success %s\n", name);
    }
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:57,代码来源:HardSectoredDisk.cpp


示例9: getPortOffset

void
MMS77316::out(BYTE addr,
              BYTE val)
{
    BYTE offset = getPortOffset(addr);

    debugss(ssMMS77316, VERBOSE, "(addr: %d, %d (0x%x))\n", addr, val, val);

    if (offset >= Wd1797_Offset_c)
    {
        offset -= Wd1797_Offset_c;

        if (offset == WD1797::DataPort_Offset_c)
        {
            // See notes for MMS77316::in()...
            int timeout = 0;

            while (burstMode() && !drqRaised_m && !intrqRaised_m && ++timeout < 16)
            {
                wd1797_m->waitForData();
            }
        }

        wd1797_m->out(offset, val);
    }
    else if (offset == ControlPort_Offset_c)
    {
        debugss(ssMMS77316, VERBOSE, "(ControlPort) %02x\n", val);
        controlReg_m = val;
        drqCount_m   = 0;

        if ((controlReg_m & ctrl_525DriveSel_c) != 0)
        {
            GenericFloppyDrive* drive = getCurrentDrive();

            if (drive)
            {
                drive->motor(true);
            }
        }

        wd1797_m->setDoubleDensity((controlReg_m & ctrl_SetMFMRecordingN_c) == 0);

        if ((controlReg_m & ctrl_EnableIntReq_c) != 0 && (intrqRaised_m || drqRaised_m))
        {
            // Interrupt still pending, but now un-masked. Raise it.
            ic_m->setIntrq(intrqRaised_m);
            ic_m->setDrq(drqRaised_m);
        }

    }
    else
    {
        debugss(ssMMS77316, ERROR, "(Unknown addr- 0x%02x): %d\n", addr, val);
    }
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:56,代码来源:mms77316.cpp


示例10: if

GenericFloppyDrive*
GenericFloppyDrive::getInstance(std::string type)
{
    unsigned int heads;
    unsigned int tracks;
    unsigned int mediaSize;

    if (type.find("FDD_5_25") == 0)
    {
        mediaSize = 5;

        if (type.find("ST") != std::string::npos)
        {
            tracks = 40;
        }
        else if (type.find("DT") != std::string::npos)
        {
            tracks = 80;
        }
        else
        {
            debugss(ssGenericFloppyDrive, ERROR, "number of tracks not specified\n");
            return nullptr;
        }
    }
    else if (type.find("FDD_8" == 0))
    {
        mediaSize = 8;
        tracks    = 77;
    }
    else
    {
        debugss(ssGenericFloppyDrive, ERROR, "disk size not specified\n");
        return NULL;
    }

    if (type.find("SS") != std::string::npos)
    {
        heads = 1;
    }
    else if (type.find("DS") != std::string::npos)
    {
        heads = 2;
    }
    else
    {
        debugss(ssGenericFloppyDrive, ERROR, "number of sides not specified\n");
        return nullptr;
    }

    return new GenericFloppyDrive(heads, tracks, mediaSize);
}
开发者ID:durgadas311,项目名称:VirtualH89,代码行数:52,代码来源:GenericFloppyDrive.cpp


示例11: debugss

void
IOBus::out(BYTE addr,
           BYTE val)
{
    debugss(ssIO, ALL, "(%03o) = 0x%02x\n", addr, val);

    if (iodevices[addr])
    {
        iodevices[addr]->out(addr, val);
    }
    else
    {
        debugss(ssIO, WARNING, "undefined port (%03o) = 0x%02x\n", addr, val);
    }
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:15,代码来源:IOBus.cpp


示例12: debugss

void
MMS77316::lowerIntrq()
{
    debugss(ssMMS77316, INFO, "\n");

    intrqRaised_m = false;
    ic_m->setIntrq(intrqRaised_m);
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:8,代码来源:mms77316.cpp


示例13: debugss

ROM::~ROM()
{
    debugss(ssROM, INFO, "Destroying ROM\n");

    delete[] data_m;
    data_m = 0;
    size_m = 0;
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:8,代码来源:ROM.cpp


示例14: data_m

ROM::ROM(int size):
    data_m(0),
    base_m(0),
    size_m(size)
{
    debugss(ssROM, INFO, "Creating ROM: %d\n", size_m);

    data_m = new BYTE[size_m];
}
开发者ID:mgarlanger,项目名称:VirtualH89,代码行数:9,代码来源:ROM.cpp



注:本文中的debugss函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ debugstr_a函数代码示例发布时间:2022-05-30
下一篇:
C++ debugmsg函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap