From c1fb98960e36374c05ca034dd484647f9c6bb14d Mon Sep 17 00:00:00 2001 From: jakcron Date: Mon, 28 Sep 2015 22:04:47 +0800 Subject: [PATCH] ctrtool: added cpuspeed/enablel2cache to exheader output --- ctrtool/exheader.c | 14 ++++++++++++-- ctrtool/exheader.h | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ctrtool/exheader.c b/ctrtool/exheader.c index 92db1a6..e7fee98 100644 --- a/ctrtool/exheader.c +++ b/ctrtool/exheader.c @@ -136,7 +136,7 @@ void exheader_deserialise_arm11localcaps_permissions(exheader_arm11systemlocalca caps->core_version = getle32(arm11->coreversion); caps->enable_l2_cache = (arm11->flag[0] >> 0) & 1; - caps->use_additional_cores = (arm11->flag[0] >> 1) & 1; + caps->new3ds_cpu_speed = (arm11->flag[0] >> 1) & 1; caps->new3ds_systemmode = (arm11->flag[1] >> 0) & 15; caps->ideal_processor = (arm11->flag[2] >> 0) & 3; @@ -504,7 +504,7 @@ void exheader_verify(exheader_context* ctx) ctx->validold3dssystemmode = Good; ctx->validnew3dssystemmode = Good; ctx->validenablel2cache = Good; - ctx->validuseadditionalcores = Good; + ctx->validnew3dscpuspeed = Good; ctx->validservicecontrol = Good; for(i=0; i<8; i++) @@ -533,6 +533,14 @@ void exheader_verify(exheader_context* ctx) if (ctx->system_local_caps.new3ds_systemmode > accessdesc.new3ds_systemmode) ctx->validnew3dssystemmode = Fail; + if (ctx->system_local_caps.enable_l2_cache != accessdesc.enable_l2_cache) + ctx->validenablel2cache = Fail; + + if (ctx->system_local_caps.new3ds_cpu_speed != accessdesc.new3ds_cpu_speed) + ctx->validnew3dscpuspeed = Fail; + + + // Storage Info Verify if(ctx->system_local_caps.system_saveid[0] & ~accessdesc.system_saveid[0]) @@ -628,6 +636,8 @@ void exheader_print(exheader_context* ctx) fprintf(stdout, "Core version: 0x%X\n", getle32(ctx->header.arm11systemlocalcaps.coreversion)); fprintf(stdout, "System mode: %d %s\n", ctx->system_local_caps.old3ds_systemmode, exheader_getvalidstring(ctx->validold3dssystemmode)); fprintf(stdout, "System mode (New3DS): %d %s\n", ctx->system_local_caps.new3ds_systemmode, exheader_getvalidstring(ctx->validnew3dssystemmode)); + fprintf(stdout, "CPU Speed (New3DS): %d %s\n", ctx->system_local_caps.new3ds_cpu_speed? "804MHz" : "268MHz", exheader_getvalidstring(ctx->validnew3dscpuspeed)); + fprintf(stdout, "Enable L2 Cache: %d %s\n", ctx->system_local_caps.enable_l2_cache ? "YES" : "NO", exheader_getvalidstring(ctx->validnew3dscpuspeed)); fprintf(stdout, "Ideal processor: %d %s\n", ctx->system_local_caps.ideal_processor, exheader_getvalidstring(ctx->valididealprocessor)); fprintf(stdout, "Affinity mask: %d %s\n", ctx->system_local_caps.affinity_mask, exheader_getvalidstring(ctx->validaffinitymask)); fprintf(stdout, "Main thread priority: %d %s\n", ctx->system_local_caps.priority, exheader_getvalidstring(ctx->validpriority)); diff --git a/ctrtool/exheader.h b/ctrtool/exheader.h index a4432c2..f0ac02c 100644 --- a/ctrtool/exheader.h +++ b/ctrtool/exheader.h @@ -72,7 +72,7 @@ typedef struct // flag u8 enable_l2_cache; - u8 use_additional_cores; + u8 new3ds_cpu_speed; u8 new3ds_systemmode; u8 ideal_processor; u8 affinity_mask; @@ -154,7 +154,7 @@ typedef struct int validold3dssystemmode; int validnew3dssystemmode; int validenablel2cache; - int validuseadditionalcores; + int validnew3dscpuspeed; int validcoreversion; int validsystemsaveID[2]; int validaccessinfo;