std::string system_error_prep( const std::string & who, const fs::path & path1, int sys_err_code ) { return who + ": \"" + path1.native_file_string() + "\": " + system_message( sys_err_code ); }
void perform_action(fcode_env_t *env) { int n; acf_t a; CHECK_DEPTH(env, 2, "perform_action"); n = POP(DS); a = (acf_t)POP(DS); PUSH(DS, (fstack_t)ACF_TO_BODY(a)); if (run_action(env, a, n)) { system_message(env, "Bad Object action"); } }
void __cdecl instruction_error(char* vaMessage,...) { char message[1000]; va_list vl; va_start(vl, vaMessage); vsprintf(message, vaMessage, vl); va_end(vl); #ifdef NEOPOP_DEBUG system_debug_message(message); debug_abort_instruction = TRUE; #else system_message("[PC %06X] %s", pc, message); #endif }
//----------------------------------------------------------------------------- // state_restore() //----------------------------------------------------------------------------- void state_restore(char* filename) { _u16 version; if (system_io_state_read(filename, (_u8*)&version, sizeof(_u16))) { switch(version) { case 0x0050: read_state_0050(filename); break; default: system_message(system_get_string(IDS_BADSTATE)); return; } #ifdef NEOPOP_DEBUG system_debug_message("Restoring State ..."); system_debug_refresh(); #endif } }
bs_system_exception::bs_system_exception (const std::string &who, error_code ec, const boost::format &message) : bs_exception (who, message.str () + ". System error: " + system_message (ec)) { m_err_ = ec; }
bs_system_exception::bs_system_exception (const std::string &who, error_code ec, const std::string &what) : bs_exception (who, what + ". System error: " + system_message (ec)) { m_err_ = ec; }
const char* thread_exception::message() const { if (m_sys_err != 0) return system_message(m_sys_err).c_str(); return what(); }
static void read_state_0050(char* filename) { NEOPOPSTATE0050 state; int i,j; if (system_io_state_read(filename, (_u8*)&state, sizeof(NEOPOPSTATE0050))) { //Verify correct rom... if (memcmp(rom_header, &state.header, sizeof(RomHeader)) != 0) { system_message(system_get_string(IDS_WRONGROM)); return; } //Apply state description reset(); eepromStatusEnable = state.eepromStatusEnable; //TLCS-900h Registers pc = state.pc; sr = state.sr; changedSP(); f_dash = state.f_dash; eepromStatusEnable = state.eepromStatusEnable; for (i = 0; i < 4; i++) { gpr[i] = state.gpr[i]; for (j = 0; j < 4; j++) gprBank[i][j] = state.gprBank[i][j]; } //Timers timer_hint = state.timer_hint; for (i = 0; i < 4; i++) //Up-counters timer[i] = state.timer[i]; timer_clock0 = state.timer_clock0; timer_clock1 = state.timer_clock1; timer_clock2 = state.timer_clock2; timer_clock3 = state.timer_clock3; //Z80 Registers memcpy(&Z80_regs, &state.Z80_regs, sizeof(Z80)); //Sound Chips memcpy(&toneChip, &state.toneChip, sizeof(SoundChip)); memcpy(&noiseChip, &state.noiseChip, sizeof(SoundChip)); //DMA for (i = 0; i < 4; i++) { dmaS[i] = state.dmaS[i]; dmaD[i] = state.dmaD[i]; dmaC[i] = state.dmaC[i]; dmaM[i] = state.dmaM[i]; } //Memory memcpy(ram, &state.ram, 0xC000); } }
//===== HALT void sngHALT() { system_message("CPU halt requested and ignored.\nPlease send me a saved state."); cycles = 8; }