From e970ba3c5b1fec773399419b562920a47d8f2cea Mon Sep 17 00:00:00 2001 From: SoulGateKey Date: Fri, 19 Sep 2025 23:23:28 +0800 Subject: [PATCH 1/3] add basic CiRCLE support --- docs/game_specific_info.md | 1 + readme.md | 1 + titles/cm/read.py | 3 ++- titles/mai2/circle.py | 20 ++++++++++++++++++++ titles/mai2/const.py | 8 ++++++-- titles/mai2/index.py | 14 ++++++++++---- 6 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 titles/mai2/circle.py diff --git a/docs/game_specific_info.md b/docs/game_specific_info.md index 0906f3d..53f7f35 100644 --- a/docs/game_specific_info.md +++ b/docs/game_specific_info.md @@ -230,6 +230,7 @@ Presents are items given to the user when they login, with a little animation (f | SDEZ | 22 | maimai DX BUDDiES PLUS | | SDEZ | 23 | maimai DX PRiSM | | SDEZ | 24 | maimai DX PRiSM PLUS | +| SDEZ | 25 | maimai DX CiRCLE | ### Importer diff --git a/readme.md b/readme.md index afe90fe..2957186 100644 --- a/readme.md +++ b/readme.md @@ -83,6 +83,7 @@ Games listed below have been tested and confirmed working. Only game versions ol + BUDDiES PLUS + PRiSM + PRiSM PLUS + + CiRCLE + O.N.G.E.K.I. + SUMMER diff --git a/titles/cm/read.py b/titles/cm/read.py index 5eb8632..a36e6f1 100644 --- a/titles/cm/read.py +++ b/titles/cm/read.py @@ -209,7 +209,8 @@ class CardMakerReader(BaseReader): "1.40": Mai2Constants.VER_MAIMAI_DX_BUDDIES, "1.45": Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS, "1.50": Mai2Constants.VER_MAIMAI_DX_PRISM, - "1.55": Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS + "1.55": Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS, + "1.60": Mai2Constants.VER_MAIMAI_DX_CIRCLE } for root, dirs, files in os.walk(base_dir): diff --git a/titles/mai2/circle.py b/titles/mai2/circle.py new file mode 100644 index 0000000..dc2b0e0 --- /dev/null +++ b/titles/mai2/circle.py @@ -0,0 +1,20 @@ +from typing import Dict + +from core.config import CoreConfig +from titles.mai2.prismplus import Mai2PrismPlus +from titles.mai2.const import Mai2Constants +from titles.mai2.config import Mai2Config + + +class Mai2Circle(Mai2PrismPlus): + def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None: + super().__init__(cfg, game_cfg) + self.version = Mai2Constants.VER_MAIMAI_DX_CIRCLE + + async def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict: + user_data = await super().handle_cm_get_user_preview_api_request(data) + + # hardcode lastDataVersion for CardMaker + user_data["lastDataVersion"] = "1.60.00" + return user_data + diff --git a/titles/mai2/const.py b/titles/mai2/const.py index e395ba0..ad53bc2 100644 --- a/titles/mai2/const.py +++ b/titles/mai2/const.py @@ -62,6 +62,7 @@ class Mai2Constants: VER_MAIMAI_DX_BUDDIES_PLUS = 22 VER_MAIMAI_DX_PRISM = 23 VER_MAIMAI_DX_PRISM_PLUS = 24 + VER_MAIMAI_DX_CIRCLE = 25 VERSION_STRING = ( "maimai", @@ -88,7 +89,8 @@ class Mai2Constants: "maimai DX BUDDiES", "maimai DX BUDDiES PLUS", "maimai DX PRiSM", - "maimai DX PRiSM PLUS" + "maimai DX PRiSM PLUS", + "maimai DX CiRCLE" ) KALEIDXSCOPE_KEY_CONDITION={ 1: [11009, 11008, 11100, 11097, 11098, 11099, 11163, 11162, 11161, 11228, 11229, 11231, 11463, 11464, 11465, 11538, 11539, 11541, 11620, 11622, 11623, 11737, 11738, 11164, 11230, 11466, 11540, 11621, 11739], @@ -139,7 +141,9 @@ class Mai2Constants: "135": VER_MAIMAI_DX_FESTIVAL_PLUS, "140": VER_MAIMAI_DX_BUDDIES, "145": VER_MAIMAI_DX_BUDDIES_PLUS, - "150": VER_MAIMAI_DX_PRISM + "150": VER_MAIMAI_DX_PRISM, + "155": VER_MAIMAI_DX_PRISM_PLUS, + "160": VER_MAIMAI_DX_CIRCLE } @classmethod diff --git a/titles/mai2/index.py b/titles/mai2/index.py index d753379..013df40 100644 --- a/titles/mai2/index.py +++ b/titles/mai2/index.py @@ -33,6 +33,7 @@ from .buddies import Mai2Buddies from .buddiesplus import Mai2BuddiesPlus from .prism import Mai2Prism from .prismplus import Mai2PrismPlus +from .circle import Mai2Circle class Mai2Servlet(BaseServlet): @@ -70,7 +71,8 @@ class Mai2Servlet(BaseServlet): Mai2Buddies, Mai2BuddiesPlus, Mai2Prism, - Mai2PrismPlus + Mai2PrismPlus, + Mai2Circle ] self.logger = logging.getLogger("mai2") @@ -349,8 +351,10 @@ class Mai2Servlet(BaseServlet): internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS elif version >= 150 and version < 155: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM - elif version >= 155: + elif version >= 155 and version < 160: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS + elif version >= 160: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE elif game_code == "SDGA": # Int if version < 105: # 1.0 @@ -375,9 +379,11 @@ class Mai2Servlet(BaseServlet): internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS elif version >= 150 and version < 155: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM - elif version >= 155: + elif version >= 155 and version < 160: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS - + elif version >= 160: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE + elif game_code == "SDGB": # Chn if version < 110: # Muji internal_ver = Mai2Constants.VER_MAIMAI_DX From 66659b59b705e959bd2346f70686ecd96ce3f898 Mon Sep 17 00:00:00 2001 From: SoulGateKey Date: Fri, 3 Apr 2026 07:21:42 +0800 Subject: [PATCH 2/3] add basic CiRCLE PLUS support --- docs/game_specific_info.md | 1 + titles/cm/read.py | 3 ++- titles/mai2/circleplus.py | 20 ++++++++++++++++++++ titles/mai2/const.py | 7 +++++-- titles/mai2/index.py | 12 +++++++++--- 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 titles/mai2/circleplus.py diff --git a/docs/game_specific_info.md b/docs/game_specific_info.md index 53f7f35..c53b00e 100644 --- a/docs/game_specific_info.md +++ b/docs/game_specific_info.md @@ -231,6 +231,7 @@ Presents are items given to the user when they login, with a little animation (f | SDEZ | 23 | maimai DX PRiSM | | SDEZ | 24 | maimai DX PRiSM PLUS | | SDEZ | 25 | maimai DX CiRCLE | +| SDEZ | 26 | maimai DX CiRCLE PLUS | ### Importer diff --git a/titles/cm/read.py b/titles/cm/read.py index a36e6f1..fc0d7c1 100644 --- a/titles/cm/read.py +++ b/titles/cm/read.py @@ -210,7 +210,8 @@ class CardMakerReader(BaseReader): "1.45": Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS, "1.50": Mai2Constants.VER_MAIMAI_DX_PRISM, "1.55": Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS, - "1.60": Mai2Constants.VER_MAIMAI_DX_CIRCLE + "1.60": Mai2Constants.VER_MAIMAI_DX_CIRCLE, + "1.65": Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS } for root, dirs, files in os.walk(base_dir): diff --git a/titles/mai2/circleplus.py b/titles/mai2/circleplus.py new file mode 100644 index 0000000..d7cd337 --- /dev/null +++ b/titles/mai2/circleplus.py @@ -0,0 +1,20 @@ +from typing import Dict + +from core.config import CoreConfig +from titles.mai2.circle import Mai2Circle +from titles.mai2.const import Mai2Constants +from titles.mai2.config import Mai2Config + + +class Mai2CirclePlus(Mai2Circle): + def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None: + super().__init__(cfg, game_cfg) + self.version = Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS + + async def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict: + user_data = await super().handle_cm_get_user_preview_api_request(data) + + # hardcode lastDataVersion for CardMaker + user_data["lastDataVersion"] = "1.65.00" + return user_data + diff --git a/titles/mai2/const.py b/titles/mai2/const.py index ad53bc2..046c619 100644 --- a/titles/mai2/const.py +++ b/titles/mai2/const.py @@ -63,6 +63,7 @@ class Mai2Constants: VER_MAIMAI_DX_PRISM = 23 VER_MAIMAI_DX_PRISM_PLUS = 24 VER_MAIMAI_DX_CIRCLE = 25 + VER_MAIMAI_DX_CIRCLE_PLUS = 26 VERSION_STRING = ( "maimai", @@ -90,7 +91,8 @@ class Mai2Constants: "maimai DX BUDDiES PLUS", "maimai DX PRiSM", "maimai DX PRiSM PLUS", - "maimai DX CiRCLE" + "maimai DX CiRCLE", + "maimai DX CiRCLE PLUS" ) KALEIDXSCOPE_KEY_CONDITION={ 1: [11009, 11008, 11100, 11097, 11098, 11099, 11163, 11162, 11161, 11228, 11229, 11231, 11463, 11464, 11465, 11538, 11539, 11541, 11620, 11622, 11623, 11737, 11738, 11164, 11230, 11466, 11540, 11621, 11739], @@ -143,7 +145,8 @@ class Mai2Constants: "145": VER_MAIMAI_DX_BUDDIES_PLUS, "150": VER_MAIMAI_DX_PRISM, "155": VER_MAIMAI_DX_PRISM_PLUS, - "160": VER_MAIMAI_DX_CIRCLE + "160": VER_MAIMAI_DX_CIRCLE, + "165": VER_MAIMAI_DX_CIRCLE_PLUS } @classmethod diff --git a/titles/mai2/index.py b/titles/mai2/index.py index 013df40..70b8226 100644 --- a/titles/mai2/index.py +++ b/titles/mai2/index.py @@ -34,6 +34,7 @@ from .buddiesplus import Mai2BuddiesPlus from .prism import Mai2Prism from .prismplus import Mai2PrismPlus from .circle import Mai2Circle +from .circleplus import Mai2CirclePlus class Mai2Servlet(BaseServlet): @@ -72,7 +73,8 @@ class Mai2Servlet(BaseServlet): Mai2BuddiesPlus, Mai2Prism, Mai2PrismPlus, - Mai2Circle + Mai2Circle, + Mai2CirclePlus ] self.logger = logging.getLogger("mai2") @@ -353,8 +355,10 @@ class Mai2Servlet(BaseServlet): internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM elif version >= 155 and version < 160: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS - elif version >= 160: + elif version >= 160 and version < 165: internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE + elif version >= 165: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS elif game_code == "SDGA": # Int if version < 105: # 1.0 @@ -381,8 +385,10 @@ class Mai2Servlet(BaseServlet): internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM elif version >= 155 and version < 160: internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS - elif version >= 160: + elif version >= 160 and version < 165: internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE + elif version >= 165: + internal_ver = Mai2Constants.VER_MAIMAI_DX_CIRCLE_PLUS elif game_code == "SDGB": # Chn if version < 110: # Muji From dbbed538a58546406424457218ee15f7083be417 Mon Sep 17 00:00:00 2001 From: SoulGateKey Date: Fri, 3 Apr 2026 07:25:58 +0800 Subject: [PATCH 3/3] basicly handle GameNationalDataApi to avoid crash --- titles/mai2/circleplus.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/titles/mai2/circleplus.py b/titles/mai2/circleplus.py index d7cd337..7ca3cb0 100644 --- a/titles/mai2/circleplus.py +++ b/titles/mai2/circleplus.py @@ -18,3 +18,8 @@ class Mai2CirclePlus(Mai2Circle): user_data["lastDataVersion"] = "1.65.00" return user_data + async def handle_get_game_national_data_api_request(self, data: Dict) -> Dict: + return { + "nextIndex": 0, + "nationalDataList": [] + }