mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-08 14:30:55 +00:00
Clean-up + further command line options
This commit is contained in:
parent
2869755819
commit
f04ce09a7d
@ -16,15 +16,16 @@ void init_gpu_map() {
|
||||
}
|
||||
|
||||
void init_machine_properties() {
|
||||
PowerMac6100_Properties.emplace("gestalt", StringProperty("100"));
|
||||
PowerMac6100_Properties.emplace("machineid", StringProperty("Nubus Power Mac"));
|
||||
PowerMac6100_Properties.emplace("cputype", StringProperty("PPC_MPC601"));
|
||||
PowerMac6100_Properties.emplace("motherboard", StringProperty("Nubus"));
|
||||
PowerMac6100_Properties.emplace("ioboard", StringProperty("Nubus_IO"));
|
||||
PowerMac6100_Properties.emplace("ram", StringProperty("8"));
|
||||
PowerMac6100_Properties.emplace("ram", StringProperty("16"));
|
||||
PowerMac6100_Properties.emplace("gfxcard", StringProperty("Nubus_Video"));
|
||||
PowerMac6100_Properties.emplace("gfxmem", StringProperty("1"));
|
||||
|
||||
PowerMacG3_Properties.emplace("gestalt", StringProperty("510"));
|
||||
|
||||
PowerMacG3_Properties.emplace("machineid", StringProperty("Power Mac G3 Beige"));
|
||||
PowerMacG3_Properties.emplace("cputype", StringProperty("PPC_MPC750"));
|
||||
PowerMacG3_Properties.emplace("motherboard", StringProperty("Grackle"));
|
||||
PowerMacG3_Properties.emplace("ioboard", StringProperty("Heathrow"));
|
||||
@ -42,7 +43,7 @@ uint32_t get_gfx_card(std::string gfx_str) {
|
||||
} catch (std::string bad_string) {
|
||||
std::cerr << "Could not find the matching GFX card for " << bad_string << std::endl;
|
||||
|
||||
return 0x168A523B;
|
||||
return ILLEGAL_DEVICE_VALUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -53,13 +54,13 @@ uint32_t get_cpu_type(std::string cpu_str) {
|
||||
} catch (std::string bad_string) {
|
||||
std::cerr << "Could not find the matching CPU value for " << bad_string << std::endl;
|
||||
|
||||
return 0x168A523B;
|
||||
return ILLEGAL_DEVICE_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
void search_properties(uint32_t chosen_gestalt) {
|
||||
std::string cpu_str = "OOPS";
|
||||
uint32_t cpu_type = 0x168A523B;
|
||||
uint32_t cpu_type = ILLEGAL_DEVICE_VALUE;
|
||||
uint32_t ram_size = 0;
|
||||
uint32_t gfx_size = 0;
|
||||
uint32_t gfx_type = 0;
|
||||
|
@ -43,21 +43,21 @@ using namespace std;
|
||||
or 0x30C064 (Nubus Macs).
|
||||
*/
|
||||
static const map<uint32_t, string> rom_identity = {
|
||||
{0x416C6368, "Performa 6400"}, // Alchemy
|
||||
//{"Come", "PowerBook 2400"}, //Comet
|
||||
{0x436F7264, "Power Mac 5200/6200 series"}, // Cordyceps
|
||||
{0x47617A65, "Power Mac 6500"}, // Gazelle
|
||||
{0x476F7373, "Power Mac G3 Beige"}, // Gossamer
|
||||
{0x416C6368, "Performa 6400"}, // Alchemy
|
||||
//{"Come", "PowerBook 2400"}, // Comet
|
||||
{0x436F7264, "Power Mac 5200/6200 series"}, // Cordyceps
|
||||
{0x47617A65, "Power Mac 6500"}, // Gazelle
|
||||
{0x476F7373, "Power Mac G3 Beige"}, // Gossamer
|
||||
{0x47525820, "PowerBook G3 Wallstreet"},
|
||||
//{"Hoop", "PowerBook 3400"}, //Hooper
|
||||
//{"Hoop", "PowerBook 3400"}, // Hooper
|
||||
{0x50425820, "PowerBook Pre-G3"},
|
||||
{0x50444D20, "Nubus Power Mac or WGS"}, // Piltdown Man (6100/7100/8100)
|
||||
{0x50697020, "Bandai Pippin"}, // Pippin
|
||||
//{"Powe", "Generic Power Mac"}, //PowerMac?
|
||||
//{"Spar", "20th Anniversay Mac"}, //Spartacus
|
||||
{0x50444D20, "Nubus Power Mac"}, // Piltdown Man (6100/7100/8100)
|
||||
{0x50697020, "Bandai Pippin"}, // Pippin
|
||||
//{"Powe", "Generic Power Mac"}, // PowerMac?
|
||||
//{"Spar", "20th Anniversay Mac"}, // Spartacus
|
||||
{0x544E5420, "Power Mac 7xxxx/8xxx series"}, // Trinitrotoluene :-)
|
||||
{0x5A616E7A, "Power Mac 4400/7220"}, // Zanzibar
|
||||
//{"????", "A clone, perhaps?"} //N/A (Placeholder ID)
|
||||
//{"????", "A clone, perhaps?"} // N/A (Placeholder ID)
|
||||
};
|
||||
|
||||
|
||||
|
@ -4,4 +4,6 @@ std::map<std::string, StringProperty> PowerMac6100_Properties;
|
||||
|
||||
std::map<std::string, StringProperty> PowerMacG3_Properties;
|
||||
|
||||
void init_machine_properties(); // JANKY FUNCTION TO FIX VS 2019 BUG!
|
||||
void init_machine_properties(); // JANKY FUNCTION TO FIX VS 2019 BUG!
|
||||
|
||||
#define ILLEGAL_DEVICE_VALUE 0x168A523B
|
20
main.cpp
20
main.cpp
@ -65,7 +65,7 @@ int main(int argc, char** argv) {
|
||||
else {
|
||||
|
||||
std::string rom_file = "rom.bin", disk_file = "disk.img";
|
||||
int ram_size = 64, gfx_mem = 2, machine_gestalt = 510, video_card_vendor = 0x1002, video_card_id = 0x4750;
|
||||
int ram_size = 64, gfx_mem = 2, video_card_vendor = 0x1002, video_card_id = 0x4750;
|
||||
|
||||
for (int arg_loop = 1; arg_loop < argc; arg_loop++) {
|
||||
string checker = argv[arg_loop];
|
||||
@ -93,13 +93,23 @@ int main(int argc, char** argv) {
|
||||
arg_loop++;
|
||||
string ram_amount = argv[arg_loop];
|
||||
ram_size = stoi(ram_amount);
|
||||
LOG_F(INFO, "RAM SET TO: %d", ram_size);
|
||||
LOG_F(INFO, "SYSTEM RAM set to: %d", ram_size);
|
||||
}
|
||||
else if ((checker == "gfxmem") || (checker == "/gfxmem") || (checker == "-gfxmem")) {
|
||||
arg_loop++;
|
||||
string ram_amount = argv[arg_loop];
|
||||
gfx_mem = stoi(ram_amount);
|
||||
LOG_F(INFO, "GFX MEMORY SET TO: %d", gfx_mem);
|
||||
string vram_amount = argv[arg_loop];
|
||||
gfx_mem = stoi(vram_amount);
|
||||
LOG_F(INFO, "GFX MEMORY set to: %d", gfx_mem);
|
||||
}
|
||||
else if ((checker == "romfile") || (checker == "/romfile") || (checker == "-romfile")) {
|
||||
arg_loop++;
|
||||
rom_file = argv[arg_loop];
|
||||
LOG_F(INFO, "ROM FILE will now be: %s", rom_file.c_str());
|
||||
}
|
||||
else if ((checker == "diskimg") || (checker == "/diskimg") || (checker == "-diskimg")) {
|
||||
arg_loop++;
|
||||
rom_file = argv[arg_loop];
|
||||
LOG_F(INFO, "Load the DISK IMAGE from: %s", rom_file.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user