diff --git a/doc/config/common.md b/doc/config/common.md index 4dcaf432..7dc14c14 100644 --- a/doc/config/common.md +++ b/doc/config/common.md @@ -326,6 +326,20 @@ Bit values are: - 3: EXP: Export (for Asian markets) - 4: CHS: China (Simplified Chinese?) +### `billingType` + +Default: `1` + +Set the billing "type" for the keychip. The type determins what kind of revenue share, +if any, the game maker has with SEGA. Some games may be picky and require types other +then 1 (ex. Crossbeats requires billing type 2), so this option is provided if this +is an issue. Billing types are: + +- 0: No billing? +- 1: Billing type A +- 2: Billing type B1 +- 3: Billing type B2 + ### `systemFlag` Default: `0x64` diff --git a/platform/config.c b/platform/config.c index 848cfbdd..715e3c30 100644 --- a/platform/config.c +++ b/platform/config.c @@ -222,6 +222,7 @@ void nusec_config_load(struct nusec_config *cfg, const wchar_t *filename) filename); cfg->region = GetPrivateProfileIntW(L"keychip", L"region", 1, filename); + cfg->region = GetPrivateProfileIntW(L"keychip", L"billingType", 1, filename); cfg->system_flag = GetPrivateProfileIntW( L"keychip", L"systemFlag", diff --git a/platform/nusec.c b/platform/nusec.c index 7f888a48..cc1030b0 100644 --- a/platform/nusec.c +++ b/platform/nusec.c @@ -134,8 +134,9 @@ HRESULT nusec_hook_init( if (nusec_cfg.platform_id[0] == '\0') { memcpy(nusec_cfg.platform_id, platform_id, sizeof(nusec_cfg.platform_id)); } - - nusec_nearfull = 0x00010200; + + // High 16 bits is billing type, low is actual playlimit + nusec_nearfull = (nusec_cfg.billing_type << 16) + 512; nusec_play_count = 0; nusec_play_limit = 1024; diff --git a/platform/nusec.h b/platform/nusec.h index 60886b12..5d3dd4f2 100644 --- a/platform/nusec.h +++ b/platform/nusec.h @@ -14,6 +14,7 @@ struct nusec_config { uint8_t region; uint8_t system_flag; uint32_t subnet; + uint16_t billing_type; wchar_t billing_ca[MAX_PATH]; wchar_t billing_pub[MAX_PATH]; };