You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a minimal amount of information and should provide just enough data for the server to execute tasks without security concerns.
78
+
GroovyMiSTer will know of the server by way of init beacon. Upon server boot, and every n seconds therafter,
79
+
an init handshake will be sent to the Groovy core over UDP until the Core acknoledges.
80
+
81
+
This enables the MiSTer to reply even in cases the server machine amy have a dynamic IP.
82
+
Your GroovyMister enabled emulator will need to have it's own configuration including host/IP.
83
+
84
+
The server will attempt to run asyncronous (long running processes) until exit or error.
85
+
Any running processes will be terminated on receipt of the next GMC command over UDP.
41
86
42
-
I initially considered a {command, args} schema but limiting args to single 'word' will make verification much easier.
87
+
Messages including a stderr tail will be displayed on the MiSTer. This is under development for messaging data sources.
43
88
44
89
#### Groovy MiSTer UX
45
90
91
+
psakhis has conceptually reviewed the following and may go forward with something like the following
92
+
46
93
Similar to many other cores a load rom menu setting may be implemented:
47
94
```
48
-
Load Remote GroovyMAME *.gmc
95
+
Load Remote Command *.gmc
49
96
```
50
97
51
98
This will open a file browser interface, pointing to rom-like directory
52
99
```
53
-
/media/fat/games/GroovyMAME/**.gmc
100
+
/media/fat/games/Groovy/**.gmc
54
101
```
55
102
56
103
Upon GMC file selection the core may
57
-
- load the contents into string/chars CMD_STR
58
-
- Check new ini/env key GROOVY_MAME_HOST (Example: "192.168.1.128")
59
-
- Execute syncronous HTTP POST
60
-
- Address: "http://{GROOVY_MAME_HOST}:32105/cmd"
61
-
- Body: "{CMD_STR}"
62
-
- For 200/ok response, close OSD, wait for game broadcast from PC server
63
-
- ? For non-200 response, display error message from body or http status code
104
+
- load binary contents up to 1024 bytes
105
+
- Send bytes as UDP packet to acked Server socket
106
+
- Server will manage process state and errors via text blitting back to the MiSTer
107
+
108
+
#### File Browsing
64
109
65
-
This could trivially be a GET request with query parameters as well. Depends on what the Core's build would best support.
66
110
67
111
#### File Browsing
68
112
I am making some assumptions here that there is a file browsing interface module the core
@@ -100,7 +144,7 @@ To keep the Core's command logic simplified, companion server-side scripts can b
100
144
...
101
145
```
102
146
103
-
I've noted that .zip files are browseable as filesystem, so a single portable zip may reduce FS block fill and make the build/transfer simpler.
147
+
I've noted that .zip files are browseable as filesystem, so a single portable zip may reduce FS block fill and make the build/transfer simpler. I don't know the limits to file density in a zip but could test this.
104
148
105
149
This would allow the server binary to run a CLI command routine that
106
150
- Asks for category/filter preferences
@@ -110,37 +154,4 @@ This would allow the server binary to run a CLI command routine that
110
154
- Dupes into category hierarchies selected.
111
155
- zips directory
112
156
113
-
This could then be trivially SCPed and extracted.
114
-
115
-
This could also be exposed as a special HTTP endpoint for a MiSTer Script to process against the remote
116
-
117
-
### Groovy MiSTer HTTP Server
118
-
119
-
This is a binary CLI app that will live on the GroovyMAME host machine.
120
-
121
-
The IP address or hostname of the server machine should be defined in the MiSTer ini for GroovyMiSTer settings.
122
-
123
-
The server binary itself should be placed in the GroovyMAME application directory for easier cross-platform build pathing. May include .ini configuration for the server's paths and ports to decouple.
124
-
125
-
On execution the server will listen generically to any host, but specifically on port 32105. This port allows for additional GroovyMiSTer UDP expansion but occupies similar range.
126
-
127
-
The server listens for commands on the ` POST /cmd` endpoint. It expects basic single word text data as defined and generated for the .gmc spec.
128
-
Based on the command, a single subprocess may be terminated or replaced.
129
-
130
-
For example: a command will
131
-
- Compare POST body command to known UtilKeywords
132
-
- Execute Utility routine on match
133
-
- Else pattern match for MAME game slug
134
-
- Check GroovyMAME executable for game slug verification
135
-
- Fail if not verifiable
136
-
- Check for existing GroovyMAME subprocess, exit if operational
137
-
- Attempt to create new GroovyMAME subprocess based on game slug
138
-
- Runs as goroutine/async
139
-
- Else fail
140
-
- Return HTTP response
141
-
142
-
The CLI app must be executed/ran on the Server before the GroovyMiSTer core can access it.
143
-
144
-
For a delegated mini-pc this could be run on startup. The server process is extremely light weight and can safely run in the background without significant resource drain.
145
-
146
-
PC, OSX, and Linux builds are possible from the single go repository.
0 commit comments