static int spec16_reset( void ) { int error; error = machine_load_rom( 0, settings_current.rom_16, settings_default.rom_16, 0x4000 ); if( error ) return error; ensure_empty_mapping(); periph_clear(); machines_periph_48(); periph_update(); /* The one RAM page is contended */ memory_ram_set_16k_contention( 5, 1 ); memory_map_16k( 0x0000, memory_map_rom, 0 ); memory_map_16k( 0x4000, memory_map_ram, 5 ); memory_map_16k( 0x8000, empty_mapping, 0 ); memory_map_16k( 0xc000, empty_mapping, 0 ); memory_current_screen = 5; memory_screen_mask = 0xffff; spec48_common_display_setup(); return 0; }
int tc2068_init( fuse_machine_info *machine ) { machine->machine = LIBSPECTRUM_MACHINE_TC2068; machine->id = "2068"; machine->reset = tc2068_reset; machine->timex = 1; machine->ram.port_from_ula = tc2048_port_from_ula; machine->ram.contend_delay = spectrum_contend_delay_65432100; machine->ram.contend_delay_no_mreq = spectrum_contend_delay_65432100; machine->ram.valid_pages = 3; ensure_empty_mapping(); machine->unattached_port = spectrum_unattached_port_none; machine->shutdown = NULL; machine->memory_map = tc2068_memory_map; return 0; }