示例#1
0
文件: z1.cpp 项目: pockemul/PockEmul
bool Cz1::init(void)				// initialize
{
//    if (!fp_log) fp_log=fopen("z1.log","wt");	// Open log file
//    pCPU->logsw = true;
#ifndef QT_NO_DEBUG
//    pCPU->logsw = true;

#endif
    initExtension();
    CpcXXXX::init();

//    for(int i = 0; i < 0x10000; i++) mem[i] = i & 0xff;

    pHD66108->init();

    i80l188ebcpu->eoi = 0x8000;
    io_b8 = timer0Control = timer2Control = 0;

    intPulseId = pTIMER->initTP(240);

    lastIntPulse = false;

    pCENTCONNECTOR = new Cconnector(this,36,1,Cconnector::Centronics_36,"Parrallel Connector",false,QPoint(715,50));
    publish(pCENTCONNECTOR);
    pSIOCONNECTOR = new Cconnector(this,9,2,Cconnector::DB_25,"Serial Connector",false,QPoint(0,50));
    publish(pSIOCONNECTOR);
    pSERIALCONNECTOR = new Cconnector(this,3,3,Cconnector::Jack,"Serial Jack Connector",false,QPoint(0,20));
    publish(pSERIALCONNECTOR);

//    pUART->init();
//    pUART->pTIMER = pTIMER;

    pCENT->init();
    pCENT->setBufferSize(10);

    QHash<int,QString> lbl;
    lbl.clear();
    lbl[1] = "STROBE";
    lbl[2] = "D1";
    lbl[3] = "D2";
    lbl[4] = "D3";
    lbl[5] = "D4";
    lbl[6] = "D5";
    lbl[7] = "D6";
    lbl[8] = "D7";
    lbl[9] = "D8";
    lbl[10]= "ACK";
    lbl[11]= "BUSY";
    lbl[31]= "INIT";
    lbl[32]= "ERROR";
    QHash<int,QString> lbl_serial;
    lbl_serial.clear();
    lbl_serial[1] = "RXD";
    lbl_serial[2] = "TXD";
    WatchPoint.remove(this);
    WatchPoint.add(&pCENTCONNECTOR_value,64,36,this,"Centronic 36pins connector",lbl);
    WatchPoint.add(&pSERIALCONNECTOR_value,64,3,this,"Synchronous serial connector",lbl_serial);

    return true;
}
示例#2
0
bool Ce500::init(void) {
//    pCPU->logsw = true;
#ifndef QT_NO_DEBUG
    pCPU->logsw = true;
#endif
    initExtension();

    CpcXXXX::init();

//    pRP5C01->init();
    pCONNECTOR	= new Cconnector(this,11,0,Cconnector::Sharp_11,"Connector 11 pins",false,QPoint(1,87));		publish(pCONNECTOR);

    WatchPoint.remove(this);
    QHash<int,QString> lbl;
    lbl[1]="MT_OUT2";
    lbl[2]="GND";
    lbl[3]="VGG";
    lbl[4]="BUSY";
    lbl[5]="D_OUT";
    lbl[6]="MT_IN";
    lbl[7]="MT_OUT1";
    lbl[8]="D_IN";
    lbl[9]="ACK";
    lbl[10]="SEL2";
    lbl[11]="SEL1";
    WatchPoint.add(&pCONNECTOR_value,64,11,this,"Standard 11pins connector",lbl);

//	if(emsmode!=0) EMS_Load();

    return true;
}