Esempio n. 1
0
/* C64-specific reset sequence.  */
void machine_specific_reset(void)
{
    serial_traps_reset();

    ciacore_reset(machine_context.cia1);
    ciacore_reset(machine_context.cia2);
    sid_reset();

    rs232drv_reset(); /* driver is used by both user- and expansion port ? */
    rsuser_reset();

    printer_reset();

    /* FIXME: whats actually broken here? */
    /* reset_reu(); */

    /* The VIC-II must be the *last* to be reset.  */
    vicii_reset();

    cartridge_reset();
    drive_reset();
    datasette_reset();
    plus60k_reset();
    plus256k_reset();
    c64_256k_reset();
}
Esempio n. 2
0
static int plus60k_activate(void)
{
    plus60k_ram = (BYTE *)lib_realloc((void *)plus60k_ram, (size_t)0xf000);

    log_message(plus60k_log, "PLUS60K expansion installed.");

    if (!util_check_null_string(plus60k_filename)) {
        if (util_file_load(plus60k_filename, plus60k_ram, (size_t)0xf000,
                           UTIL_FILE_LOAD_RAW) < 0) {
            log_message(plus60k_log,
                        "Reading PLUS60K image %s failed.", plus60k_filename);
            if (util_file_save(plus60k_filename, plus60k_ram, 0xf000) < 0) {
                log_message(plus60k_log,
                            "Creating PLUS60K image %s failed.", plus60k_filename);
                return -1;
            }
            log_message(plus60k_log, "Creating PLUS60K image %s.", plus60k_filename);
            return 0;
        }
        log_message(plus60k_log, "Reading PLUS60K image %s.", plus60k_filename);
    }

    plus60k_reset();
    return 0;
}
Esempio n. 3
0
File: c64.c Progetto: peterled/vice
void machine_specific_reset(void)
{
    int iecreset = 1;
    resources_get_int("IECReset", &iecreset);

    serial_traps_reset();

    ciacore_reset(machine_context.cia1);
    ciacore_reset(machine_context.cia2);
    sid_reset();

    rs232drv_reset(); /* driver is used by both user- and expansion port ? */
    rsuser_reset();

    printer_reset();

    /* FIXME: whats actually broken here? */
    /* reset_reu(); */

    /* The VIC-II must be the *last* to be reset.  */
    vicii_reset();

    cartridge_reset();
    if (reset_poweron || iecreset) {
        drive_reset();
    }
    datasette_reset();
    plus60k_reset();
    plus256k_reset();
    c64_256k_reset();

    reset_poweron = 0;
}
Esempio n. 4
0
/* C64-specific reset sequence.  */
void machine_specific_reset(void)
{
    serial_traps_reset();

    ciacore_reset(machine_context.cia1);
    ciacore_reset(machine_context.cia2);
    sid_reset();

    if (!vsid_mode) {
        tpicore_reset(machine_context.tpi1);

        acia1_reset();
        rs232drv_reset();
        rsuser_reset();

        printer_reset();

        /* FIXME */
        /* reset_reu(); */
    }

    /* The VIC-II must be the *last* to be reset.  */
    vicii_reset();

    if (vsid_mode) {
        psid_init_tune();
        return;
    }

    cartridge_reset();
    drive_reset();
    datasette_reset();
    reu_reset();
    georam_reset();
    ramcart_reset();
    plus60k_reset();
    plus256k_reset();
    c64_256k_reset();
    mmc64_reset();
}
Esempio n. 5
0
static int plus60k_activate(void)
{
	plus60k_ram = lib_realloc((void *)plus60k_ram, (size_t)0xf000);

#ifdef CELL_DEBUG
	printf("INFO: PLUS60K expansion installed.\n");
#endif

	if (!util_check_null_string(plus60k_filename))
	{
		if (util_file_load(plus60k_filename, plus60k_ram, (size_t)0xf000, UTIL_FILE_LOAD_RAW) < 0)
		{
			#ifdef CELL_DEBUG
			printf("INFO: Reading PLUS60K image %s failed.\n", plus60k_filename);
			#endif
			if (util_file_save(plus60k_filename, plus60k_ram, 0xf000) < 0)
			{
				#ifdef CELL_DEBUG
				printf("INFO: Creating PLUS60K image %s failed.\n", plus60k_filename);
				#endif
				return -1;
			}
			#ifdef CELL_DEBUG
			printf("INFO: Creating PLUS60K image %s.\n", plus60k_filename);
			#endif
			return 0;
		}
		#ifdef CELL_DEBUG
		printf("INFO: Reading PLUS60K image %s.\n", plus60k_filename);
		#endif
	}

	plus60k_reset();
	set_cpu_lines_lock(CPU_LINES_PLUS60K, "PLUS60K");
	return 0;
}