From fca8fef362b94c7d1d10a743995dcefb7433071d Mon Sep 17 00:00:00 2001 From: Bottersnike Date: Mon, 27 Jun 2022 23:09:04 +0100 Subject: [PATCH] Groovemaster and RS232C --- docs.py | 24 +- ini_lexer.py | 68 ++ templates/base.html | 2 +- templates/pages/sega/index.html | 4 +- .../pages/sega/software/groovemaster.html | 837 ++++++++++++++++++ templates/pages/sega/software/jvs.html | 2 +- .../sega/software/{comio.html => rs232c.html} | 10 +- 7 files changed, 932 insertions(+), 15 deletions(-) create mode 100644 ini_lexer.py create mode 100644 templates/pages/sega/software/groovemaster.html rename templates/pages/sega/software/{comio.html => rs232c.html} (97%) diff --git a/docs.py b/docs.py index a5f24fb..3eedd32 100644 --- a/docs.py +++ b/docs.py @@ -8,6 +8,7 @@ from livereload import Server # Importing performs monkeypatching import xml_lexer # NOQA: F401 +import ini_lexer # NOQA: F401 app = Flask(__name__) @@ -52,6 +53,7 @@ SEGA_CONTENTS = { "dongle.html": "Dongles", "keychip.html": "Keychips", }), + "groovemaster.html": "GrooveMaster.ini", }), "network": ("Networking", { "allnet.html": "ALL.Net" @@ -73,14 +75,20 @@ class Part: PARTS = { "838-14971": Part("838-14971", "Aime NFC daughter board", "NFC RW BD TN32MSEC003S"), - "838-15221": Part("838-15221", "Serial I/F BD Touchpanel Gunze", "The interface board for the touchscreen on MaiMai versions pre-DX.") + "838-15221": Part("838-15221", "Serial I/F BD Touchpanel Gunze", + "The interface board for the touchscreen on MaiMai versions pre-DX.") } -def part(id): - if (part := PARTS.get(id)): - return f'{part.name}ASSY IDSEGA {part.id}Description{part.description}' - return f'{id}' +def part(id_): + if (part := PARTS.get(id_)): + return ( + f'{part.name}' + f'ASSY IDSEGA {part.id}' + f'Description{part.description}' + '' + ) + return f'{id_}' def generate_xrpc_list(): @@ -355,7 +363,7 @@ def sitemap(): return response -if __name__ == '__main__': +def run_dev(): app.config['TEMPLATES_AUTO_RELOAD'] = True app.config['DEBUG'] = True @@ -364,3 +372,7 @@ if __name__ == '__main__': server = Server(app.wsgi_app) server.watch(".") server.serve(port=3000) + + +if __name__ == '__main__': + run_dev() diff --git a/ini_lexer.py b/ini_lexer.py new file mode 100644 index 0000000..225a63b --- /dev/null +++ b/ini_lexer.py @@ -0,0 +1,68 @@ +# from pygments.lexer import RegexLexer +# from pygments.token import Text, Comment, Operator, Name, String +# from pygments.lexers import _lexer_cache +# from pygments.lexers._mapping import LEXERS + +# def italic_attr(lexer, m): +# yield m.start(), String, '"' +# yield m.start() + 2, Comment, m.group()[3:-1] +# yield m.end() - 1, String, '"' + + +# def italic_generic(lexer, m): +# yield m.start(), Comment, m.group() + + +# def italic_tag(lexer, m): +# yield m.start(), Name.Tag, "<" +# name = m.group()[3:] +# if name.endswith(">"): +# yield m.start() + 1, Comment, name[:-1] +# yield m.end() - 1, Name.Tag, ">" +# else: +# yield m.start() + 1, Comment, name + + +# def italic_tag_close(lexer, m): +# yield m.start(), Name.Tag, "" + + +# def repeat_tag_close(lexer, m): +# before, _, after = m.group().partition("[]") +# yield m.start(), Name.Tag, before +# yield m.start() + len(before), Operator, "[]" +# yield m.start() + len(before) + 2, Name.Tag, after + + +# def italic_attr_name(lexer, m): +# name, _, after = m.group().partition("*") +# yield m.start(), Name.Attribute, name +# yield m.start() + len(name), Operator, "*" +# yield m.start() + len(name) + 1, Name.Attribute, after + +from pygments.lexer import RegexLexer, bygroups +from pygments.token import Comment, Name, String, Whitespace +from pygments.lexers import _lexer_cache +from pygments.lexers._mapping import LEXERS + + +class CustomIniLexer(RegexLexer): + name = 'amINI' + aliases = ['amini'] + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r'[;#].*', Comment.Single), + (r'([a-zA-Z0-9]+?)([ \t]+)([a-zA-Z0-9]+)', bygroups(Name.Attribute, Whitespace, String)), + ] + } + + +_lexer_cache[CustomIniLexer.__name__] = CustomIniLexer + +LEXERS["CustomIniLexer"] = ("ini_lexer", "CustomIniLexer", ("amini", ), (), ()) + +__all__ = ("CustomIniLexer", ) diff --git a/templates/base.html b/templates/base.html index 465d876..c6b3cc5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,7 +23,7 @@ {% block rootbody %}{% endblock %} {{ generate_footer()|safe }} - + \ No newline at end of file diff --git a/templates/pages/sega/index.html b/templates/pages/sega/index.html index c54a556..5016008 100644 --- a/templates/pages/sega/index.html +++ b/templates/pages/sega/index.html @@ -52,8 +52,8 @@ JAMMA Video Standard. Unless specified otherwise, this refers to JVS version 2. - comio - An unofficial name used to refer to the modified JVS standard some devices use + RS232C + A modified JVS-like framing many SEGA-made serial devices uses ALL.Net diff --git a/templates/pages/sega/software/groovemaster.html b/templates/pages/sega/software/groovemaster.html new file mode 100644 index 0000000..edd7e05 --- /dev/null +++ b/templates/pages/sega/software/groovemaster.html @@ -0,0 +1,837 @@ +{% extends "sega.html" %} +{% block title %}GrooveMaster.ini{% endblock %} +{% block body %} +

GrooveMaster.ini

+

Note: This page is specifically regarding maimai, as this is the game I have been focusing my efforts on. + Other games may use a similar format, or they might use a totally different one; I have no idea. This page exists + because I was going to make it as a personal notes document but figured it worth making public instead.

+ +

Despite the name, GrooveMaster.ini is not an ini file. Each line follows the KEY_NAME value + format. Lines may begin with a hash to indicate a comment. The file is split into four sections, as shown below.

+ +
{% highlight "amini" %}#*************************************
+# maimai DEBUG SETTING
+# デバッグ系コンフィグ設定を記載する
+#*************************************
+
+#====================================================
+#描画関係
+#====================================================
+KEYNAMES values
+
+#====================================================
+#システム関係
+#====================================================
+KEYNAMES values
+
+#====================================================
+#GAME ASSINMENT上書き
+#====================================================
+KEYNAMES values
+
+#====================================================
+#デバッグ関係
+#====================================================
+KEYNAMES values
+{% endhighlight %}
+

Config values

+ +

I'll sort these into the categories below later. Maybe.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultMeaning
VIEW_COURSEint0
SET_ICONint-1
SET_TITLEint-1
SET_PLATEint-1
SET_FRAMEint-1
SET_CHALLENGEint0
SET_OP_SPEEDint-1
SET_OP_ANSWERint-1
SET_OP_SEint-1
SET_OP_BGINFOint-1
SET_OP_STAR_ROTint-1
SET_OP_MIRRORint-1
SET_OP_MOVIEBRIGHTint-1
SET_JUDGE_DISPint-1
SET_AIMEID_1Pint-1
SET_AIMEID_2Pint-1
+ +

Drawing related

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultMeaning
ROTATEint0By default two 1920x1080 displays are expected positioned in portrait but set in Windows as landscape, + thus the game renders sideways. This setting tells the game to render upright instead.
SCREENSHOTint0
CAPTURE_X0int0
CAPTURE_X1int0
CAPTURE_Y0int0
CAPTURE_Y1int0
CAPTURE_Wint0
CAPTURE_Hint0
+ +

System related

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultMeaning
DEVint0Enable dev mode. This adds some utility keybindings, and runs a (terrible) touchscreen emulator.
NO_RINGint0Indicate that we are not running on Ring* hardware. This disables the use of all drivers.
NO_JVSint0Disable the use of \\.\mxjvs.
NO_SERIALint0Disable the use of all COM devices (aime readers, LEDs, touchscreen, and the camera).
NO_REBOOTint0Disable the daily 7am reboot.
VIRTUAL_AIMEint0
USB_DL_DISABLEint0
NO_LINKCHECKint0
NO_DELIVERint0Disable OTA updates (via mxgfetcher and mxdeliver).
NO_RESTRICTint0
1P_ONLYint0Disable the 2P display. This also disables the top banner, rendering only the main play region of 1P. +
NO_WAITint0
SET_FREEPLAYint0
SET_TOTAL_MACHINEint-1
SET_LINK_IDint-1
SET_TRACKS_1Pint-1
SET_TRACKS_MULTIint-1
SET_TRACKS_EVENTint-1
SET_OFFLINE_MODEint-1
SET_EVENT_MODEint-1
SET_ADVERTISE_MODEint-1
SET_ADVERTISE_SOUNDint-1
SET_CAMERA_POSITIONint-1
SET_FRIEND_TESTint0
SET_CLOSE_HOURint-1
SET_CLOSE_MINUTEint-1
SET_ALL_OPENint-1
SET_OPEN_SECRETint-1
SET_OPEN_EVENTint-1
SET_AIME_SELECTint0
SET_REGIONstrempty string
SET_CLOCK_DATEint-1
SET_CLOCK_BOOSTint-1
SET_DRESS_CODEint-1
GO_CAMERA_UPLOADint0
GO_COLLECTIONint0
SET_AUTO_PLAYint-1
SET_ARAYA_SPEEDint-1
LIVE_COMMENTint0
SPEAK_SPEAKERint0
SET_AGINGint-1
QUICK_BOOTint0
+ +

GAME ASSINMENT overwrite

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultMeaning
GO_RESULT_1_1PACVfloat50.0
GO_RESULT_1_2PACVfloat50.0
GO_RESULT_1_SYNCfloat50.0
GO_RESULT_2_1PACVfloat80.0
GO_RESULT_2_2PACVfloat80.0
GO_RESULT_2_SYNCfloat80.0
GO_RESULT_3_1PACVfloat97.0
GO_RESULT_3_2PACVfloat97.0
GO_RESULT_3_SYNCfloat99.0
GO_RESULT_4_1PACVfloat100.0
GO_RESULT_4_2PACVfloat100.0
GO_RESULT_4_SYNCfloat100.0
+ The following values are all used to force-unlock tracks in the PANDORA BOXX event. Setting them to + 8004444900999999 will force-unlock all tracks. +
PANDORA_GREEN_1Plong
PANDORA_MAIMAI_1Plong
PANDORA_PINK_1Plong
PANDORA_MURASAKI_1Plong
PANDORA_MILK_1Plong
PANDORA_ORANGE_1Plong
PANDORA_FINALE_1Plong
PANDORA_GREEN_2Plong
PANDORA_MAIMAI_2Plong
PANDORA_PINK_2Plong
PANDORA_MURASAKI_2Plong
PANDORA_MILK_2Plong
PANDORA_ORANGE_2Plong
PANDORA_FINALE_2Plong
+ +

Debug related

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultMeaning
SET_DEBUG_MODEint-1
DEBUG_MENUint-1
DEBUG_CARDint-1
DEV_STRINGint-1
DISP_NETSTATint-1
PERFORMANCE_POSint-1
RESOURCE_TEXTint-1
ITEM_VIEWint-1
HOME_RANKER_USERIDstr0:0:0
HOME_RANKER_3RD_RATEX100int-1
CTRACK_DAYSint0
SUPERVISIONint0
OLD_SERVER_TRANS_DISABLEint0
DEBUG_COL_PLAYCOUNTint-1
EVENT_INFO_CHECKint0
STRESS_CHECKint0
PREV_FFA_FLAMEint10
PREV_SKIP_FLAMEint60
SET_SILENT_MODEint0
SET_VIEWER_PLAYint0
SET_SPECIAL_VIEWER_PLAYint0
SET_NO_SDTint0
TIMING_TAPint0
TIMING_HOLDONint0
TIMING_HOLDOFFint0
TIMING_SLIDEint0
ACHIEVE_SLIDEint0
DISPLAY_TAPint0
+{% endblock %} \ No newline at end of file diff --git a/templates/pages/sega/software/jvs.html b/templates/pages/sega/software/jvs.html index a9665bd..8626ede 100644 --- a/templates/pages/sega/software/jvs.html +++ b/templates/pages/sega/software/jvs.html @@ -8,7 +8,7 @@ it is in Japanese. A rather excelent translation can be The differences between the two formats are document here. + variant on the format. The differences between the two formats are document here.

Escaping

diff --git a/templates/pages/sega/software/comio.html b/templates/pages/sega/software/rs232c.html similarity index 97% rename from templates/pages/sega/software/comio.html rename to templates/pages/sega/software/rs232c.html index e803f65..e7e7f6e 100644 --- a/templates/pages/sega/software/comio.html +++ b/templates/pages/sega/software/rs232c.html @@ -1,5 +1,5 @@ {% extends "sega.html" %} -{% block title %}JVS{% endblock %} +{% block title %}RS232C{% endblock %} {% block body %}

JAMMA Video Standard - Alternative version

Note: This page assumes you have read the documentation regarding the JAMMA video @@ -136,9 +136,9 @@ 51 - + Read back the MIFARE key 1+ - + 6 M @@ -160,9 +160,9 @@ 55 + Read back the Aime key - - + 6