static int plus256k_activate(void) { plus256k_ram = lib_realloc((void *)plus256k_ram, (size_t)0x40000); log_message(plus256k_log, "PLUS256K hack installed."); if (!util_check_null_string(plus256k_filename)) { if (util_file_load(plus256k_filename, plus256k_ram, (size_t)0x40000, UTIL_FILE_LOAD_RAW) < 0) { log_message(plus256k_log, "Reading PLUS256K image %s failed.", plus256k_filename); if (util_file_save(plus256k_filename, plus256k_ram, 0x40000) < 0) { log_message(plus256k_log, "Creating PLUS256K image %s failed.", plus256k_filename); return -1; } log_message(plus256k_log, "Creating PLUS256K image %s.", plus256k_filename); return 0; } log_message(plus256k_log, "Reading PLUS256K image %s.", plus256k_filename); } plus256k_reset(); set_cpu_lines_lock(CPU_LINES_PLUS256K, "PLUS256K"); return 0; }
static int plus60k_activate(void) { plus60k_ram = lib_realloc((void *)plus60k_ram, (size_t)0xf000); #ifdef CELL_DEBUG printf("INFO: PLUS60K expansion installed.\n"); #endif if (!util_check_null_string(plus60k_filename)) { if (util_file_load(plus60k_filename, plus60k_ram, (size_t)0xf000, UTIL_FILE_LOAD_RAW) < 0) { #ifdef CELL_DEBUG printf("INFO: Reading PLUS60K image %s failed.\n", plus60k_filename); #endif if (util_file_save(plus60k_filename, plus60k_ram, 0xf000) < 0) { #ifdef CELL_DEBUG printf("INFO: Creating PLUS60K image %s failed.\n", plus60k_filename); #endif return -1; } #ifdef CELL_DEBUG printf("INFO: Creating PLUS60K image %s.\n", plus60k_filename); #endif return 0; } #ifdef CELL_DEBUG printf("INFO: Reading PLUS60K image %s.\n", plus60k_filename); #endif } plus60k_reset(); set_cpu_lines_lock(CPU_LINES_PLUS60K, "PLUS60K"); return 0; }