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 specplus2_reset( void ) { int error; error = machine_load_rom( 0, settings_current.rom_plus2_0, settings_default.rom_plus2_0, 0x4000 ); if( error ) return error; error = machine_load_rom( 1, settings_current.rom_plus2_1, settings_default.rom_plus2_1, 0x4000 ); if( error ) return error; error = spec128_common_reset( 1 ); if( error ) return error; periph_clear(); machines_periph_128(); periph_update(); beta_builtin = 0; spec48_common_display_setup(); 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; }