Beispiel #1
0
PITState *kvm_pit_init(int base, qemu_irq irq)
{
    PITState *pit = &pit_state;

    register_savevm(PIT_SAVEVM_NAME, base, PIT_SAVEVM_VERSION,
		    kvm_pit_save, kvm_pit_load, pit);

    qemu_register_reset(pit_reset, pit);
    pit_reset(pit);

    return pit;
}
Beispiel #2
0
PITState *kvm_pit_init(int base, qemu_irq irq)
{
    PITState *pit = &pit_state;
    PITChannelState *s;

    s = &pit->channels[0];
    s->irq_timer = qemu_new_timer(vm_clock, dummy_timer, s);
    vmstate_pit.pre_save = kvm_pit_pre_save;
    vmstate_pit.post_load = kvm_pit_post_load;
    vmstate_register(base, &vmstate_pit, pit);
    qemu_register_reset(pit_reset, pit);
    pit_reset(pit);

    return pit;
}
Beispiel #3
0
void pc_reset()
{
    cpu_set();
    resetx86();
    mem_updatecache();
    //timer_reset();
    dma_reset();
    fdc_reset();
    pic_reset();
    pit_reset();
    serial_reset();

    setpitclock(models[model].cpu[cpu_manufacturer].cpus[cpu].rspeed);

//        sb_reset();

    ali1429_reset();
//        video_init();
}
Beispiel #4
0
void initpc()
{
    char *p;
//        allegro_init();
    get_executable_name(pcempath,511);
    pclog("executable_name = %s\n", pcempath);
    p=get_filename(pcempath);
    *p=0;
    pclog("path = %s\n", pcempath);

    fdd_init();
    keyboard_init();
    mouse_init();
    joystick_init();
    midi_init();

    loadconfig(NULL);
    pclog("Config loaded\n");

    loadfont("mda.rom", 0, cga_fontdat, cga_fontdatm);
    loadfont("roms/pc1512/40078.ic127", 0, pc1512_fontdat, pc1512_fontdatm);
    loadfont("roms/pc200/40109.bin", 0, pc200_fontdat, pc200_fontdatm);

    codegen_init();

    cpuspeed2=(AT)?2:1;
//        cpuspeed2=cpuspeed;
    atfullspeed=0;

    device_init();

    initvideo();
    mem_init();
    loadbios();
    mem_add_bios();

    timer_reset();
    sound_reset();
    fdc_init();
// #ifdef USE_NETWORKING
    vlan_reset();	//NETWORK
    network_card_init(network_card_current);
// #endif

    loaddisc(0,discfns[0]);
    loaddisc(1,discfns[1]);

    //loadfont();
    loadnvr();
    sound_init();
    resetide();
#if __unix
    if (cdrom_drive == -1)
        cdrom_null_open(cdrom_drive);
    else
#endif
        ioctl_open(cdrom_drive);

    pit_reset();
    /*        if (romset==ROM_AMI386 || romset==ROM_AMI486) */fullspeed();
    ali1429_reset();
//        CPUID=(is486 && (cpuspeed==7 || cpuspeed>=9));
//        pclog("Init - CPUID %i %i\n",CPUID,cpuspeed);
    shadowbios=0;

#if __unix
    if (cdrom_drive == -1)
        cdrom_null_reset();
    else
#endif
        ioctl_reset();
}