static int spec128_reset( void ) { int error; error = machine_load_rom( 0, 0, settings_current.rom_128_0, settings_default.rom_128_0, 0x4000 ); if( error ) return error; error = machine_load_rom( 2, 1, settings_current.rom_128_1, settings_default.rom_128_1, 0x4000 ); if( error ) return error; error = periph_setup( spec128_peripherals, spec128_peripherals_count ); if( error ) return error; error = spec128_common_reset( 1 ); if( error ) return error; periph_setup_kempston( PERIPH_PRESENT_OPTIONAL ); periph_setup_interface1( PERIPH_PRESENT_OPTIONAL ); periph_setup_interface2( PERIPH_PRESENT_OPTIONAL ); periph_setup_plusd( PERIPH_PRESENT_OPTIONAL ); periph_setup_beta128( PERIPH_PRESENT_OPTIONAL ); periph_update(); periph_register_beta128(); beta_builtin = 0; return 0; }
static int spec48_reset( void ) { int error; error = machine_load_rom( 0, 0, settings_current.rom_48, settings_default.rom_48, 0x4000 ); if( error ) return error; error = periph_setup( peripherals, peripherals_count ); if( error ) return error; periph_setup_kempston( PERIPH_PRESENT_OPTIONAL ); periph_setup_interface1( PERIPH_PRESENT_OPTIONAL ); periph_setup_interface2( PERIPH_PRESENT_OPTIONAL ); periph_setup_plusd( PERIPH_PRESENT_OPTIONAL ); periph_setup_beta128( PERIPH_PRESENT_OPTIONAL ); periph_setup_fuller( PERIPH_PRESENT_OPTIONAL ); periph_setup_melodik( PERIPH_PRESENT_OPTIONAL ); periph_update(); periph_register_beta128(); beta_builtin = 0; memory_current_screen = 5; memory_screen_mask = 0xffff; return spec48_common_reset(); }
static int specplus2a_reset( void ) { int error; error = machine_load_rom( 0, 0, settings_current.rom_plus2a_0, settings_default.rom_plus2a_0, 0x4000 ); if( error ) return error; error = machine_load_rom( 2, 1, settings_current.rom_plus2a_1, settings_default.rom_plus2a_1, 0x4000 ); if( error ) return error; error = machine_load_rom( 4, 2, settings_current.rom_plus2a_2, settings_default.rom_plus2a_2, 0x4000 ); if( error ) return error; error = machine_load_rom( 6, 3, settings_current.rom_plus2a_3, settings_default.rom_plus2a_3, 0x4000 ); if( error ) return error; error = specplus3_plus2a_common_reset(); if( error ) return error; error = periph_setup( peripherals, peripherals_count ); if( error ) return error; periph_setup_kempston( PERIPH_PRESENT_OPTIONAL ); periph_update(); return 0; }
static int pentagon_reset(void) { int error; int i; error = machine_load_rom( 0, 0, settings_current.rom_pentagon512_0, settings_default.rom_pentagon512_0, 0x4000 ); if( error ) return error; error = machine_load_rom( 2, 1, settings_current.rom_pentagon512_1, settings_default.rom_pentagon512_1, 0x4000 ); if( error ) return error; error = machine_load_rom( 4, 2, settings_current.rom_pentagon512_3, settings_default.rom_pentagon512_3, 0x4000 ); if( error ) return error; error = machine_load_rom_bank( beta_memory_map_romcs, 0, 0, settings_current.rom_pentagon512_2, settings_default.rom_pentagon512_2, 0x4000 ); if( error ) return error; error = spec128_common_reset( 0 ); if( error ) return error; error = periph_setup( pentagon_peripherals, pentagon_peripherals_count ); if( error ) return error; periph_setup_kempston( PERIPH_PRESENT_OPTIONAL ); periph_setup_beta128( PERIPH_PRESENT_ALWAYS ); periph_update(); beta_builtin = 1; beta_active = 1; machine_current->ram.last_byte2 = 0; machine_current->ram.special = 0; /* Mark the least 384K as present/writeable */ for( i = 16; i < 64; i++ ) memory_map_ram[i].writable = 1; spec48_common_display_setup(); return 0; }
static int tc2068_reset( void ) { size_t i; int error; error = machine_load_rom( 0, 0, settings_current.rom_tc2068_0, settings_default.rom_tc2068_0, 0x4000 ); if( error ) return error; error = machine_load_rom( 2, -1, settings_current.rom_tc2068_1, settings_default.rom_tc2068_1, 0x2000 ); if( error ) return error; error = periph_setup( tc2068_peripherals, tc2068_peripherals_count ); if( error ) return error; periph_setup_kempston( PERIPH_PRESENT_OPTIONAL ); periph_setup_interface2( PERIPH_PRESENT_OPTIONAL ); periph_update(); for( i = 0; i < 8; i++ ) { timex_dock[i] = fake_mapping; timex_dock[i].page_num = i; memory_map_dock[i] = &timex_dock[i]; timex_exrom[i] = memory_map_rom[2]; timex_exrom[i].bank = MEMORY_BANK_EXROM; timex_exrom[i].page_num = i; memory_map_exrom[i] = &timex_exrom[i]; } error = dck_reset(); if( error ) { ui_error( UI_ERROR_INFO, "Ignoring Timex dock file '%s'", settings_current.dck_file ); } return tc2068_tc2048_common_reset(); }