mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-21 23:29:51 +00:00
Fixed RAM check and help prompts
This commit is contained in:
parent
b28549825d
commit
d21515d964
@ -98,8 +98,11 @@ bool loop_ram_check(std::string machine_str, uint32_t* ram_sizes) {
|
||||
for (int checking_stage_one = 0; checking_stage_one < sizeof(ram_sizes); checking_stage_one++) {
|
||||
if (check_ram_size(machine_str, ram_sizes[checking_stage_one]) == false) {
|
||||
LOG_F(ERROR, "RAM BANK ERROR with RAM BANK %d", checking_stage_one);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void search_properties(std::string machine_str) {
|
||||
|
28
main.cpp
28
main.cpp
@ -55,6 +55,17 @@ void display_help() {
|
||||
std::cout << " " << endl;
|
||||
}
|
||||
|
||||
void display_recognized_machines() {
|
||||
std::cout << " " << endl;
|
||||
std::cout << "The following machines are supported by DingusPPC: " << endl;
|
||||
std::cout << "___________________________________________________" << endl;
|
||||
std::cout << "| COMMAND | MACHINE RECOGNIZED |" << endl;
|
||||
std::cout << "___________________________________________________" << endl;
|
||||
std::cout << " pmg3 | Power Mac G3 Beige " << endl;
|
||||
std::cout << " pm6100 | Power Mac 6100 " << endl;
|
||||
std::cout << " " << endl;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
/*
|
||||
Execution Type:
|
||||
@ -108,11 +119,23 @@ int main(int argc, char** argv) {
|
||||
loguru::g_preamble_thread = false;
|
||||
loguru::init(argc, argv);
|
||||
execution_mode = 1;
|
||||
}
|
||||
}
|
||||
else if ((checker == "help") || (checker == "/help") || (checker == "-help")) {
|
||||
display_help();
|
||||
return 0;
|
||||
}
|
||||
else if ((checker == "pmg3") || (checker == "/pmg3") || (checker == "-pmg3")) {
|
||||
machine_name = "PowerMacG3";
|
||||
machine_specified = true;
|
||||
}
|
||||
else if ((checker == "pm6100") || (checker == "/pm6100") || (checker == "-pm6100")) {
|
||||
machine_name = "PowerMac6100";
|
||||
machine_specified = true;
|
||||
}
|
||||
else if ((checker == "machinehelp") || (checker == "/machinehelp") || (checker == "-machinehelp")) {
|
||||
machine_name = "MachineHelp";
|
||||
machine_specified = true;
|
||||
}
|
||||
else if ((checker == "ram") || (checker == "/ram") || (checker == "-ram")) {
|
||||
arg_loop++;
|
||||
string ram_banks = argv[arg_loop];
|
||||
@ -172,8 +195,7 @@ int main(int argc, char** argv) {
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
LOG_F(WARNING, "Invalid machine name specified: %s", machine_name.c_str());
|
||||
display_help();
|
||||
display_recognized_machines();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user