Skip to content

Commit aaa07f5

Browse files
author
Juan Segura
committed
Launch MAME from ZXBS
1 parent b0ebb97 commit aaa07f5

20 files changed

Lines changed: 425 additions & 94 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Have fun!
2828
## Credits
2929
- Icons from [SVG REPO](https://www.svgrepo.com/):
3030
- <a href="https://github.com/blivesta/flexicon?ref=svgrepo.com" target="_blank">Blivesta</a> in MIT License
31-
- <a href="https://dazzleui.gumroad.com/l/dazzleiconsfree?ref=svgrepo.com" target="_blank">Dazzle Ui</a> in CC Attribution License
31+
- <a href="https://dazzleui.gumroad.com/l/dazzleiconsfree?ref=svgrepo.com" target="_blank">Dazzle Ui</a> in CC Attribution License
3232
- <a href="https://github.com/KDE/krita?ref=svgrepo.com" target="_blank">Kde</a> in GPL License
3333
- <a href="https://www.figma.com/@thinkcly?ref=svgrepo.com" target="_blank">Konstantin Filatov</a> in CC Attribution
3434
- <a href="https://dribbble.com/Mohamed_Raouf?ref=svgrepo.com" target="_blank">Mohamed Raouf</a> in CC Attribution License
@@ -45,5 +45,5 @@ Have fun!
4545
- <a href="https://github.com/siemens/ix-icons?ref=svgrepo.com" target="_blank">Siemens</a> in MIT License
4646
- <a href="https://github.com/32pixelsCo/zest-icons/blob/master/packages/zest-free/LICENSE.md?ref=svgrepo.com" target="_blank">Zest</a> in MIT License
4747
- <a href="https://www.figma.com/community/file/1071678557813409125?ref=svgrepo.com" target="_blank">Ananthanath A X Kalaiism</a> in PD License
48-
49-
48+
- <a href="https://github.com/siemens/ix-icons?ref=svgrepo.com" target="_blank">Siemens</a> in MIT License
49+
- <a href="https://www.svgrepo.com" target="_blank">SVG Repo</a> CC0 License
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
[
2+
{
3+
"Id": "zxbsinstaller",
4+
"Enabled": true,
5+
"Name": "ZX Basic Studio Installer",
6+
"Author": "Duefectu",
7+
"Description": "This program, and it is used to download, install and keep all external tools and ZX Basic Studio itself up to date.",
8+
"SupportedOperatingSystems": [
9+
1,
10+
2,
11+
3
12+
],
13+
"SiteUrl": "https://github.com/boriel-basic/ZXBasicStudio",
14+
"LicenseType": "MIT License",
15+
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/ZXBasicStudio/refs/heads/master/LICENSE.txt",
16+
"VersionsUrl": "https://github.com/boriel-basic/ZXBasicStudio/releases/",
17+
"LocalPath": "",
18+
"FullLocalPath": null,
19+
"DirectUpdate": true,
20+
"Group": "ZX Basic Studio",
21+
"Order": 0
22+
},
23+
{
24+
"Id": "zxbasic",
25+
"Enabled": true,
26+
"Name": "Boriel ZX Basic Compiler",
27+
"Author": "Boriel",
28+
"Description": "ZXBCompiler is a BORIEL BASIC cross compiler tool. It's a required tool.'",
29+
"SupportedOperatingSystems": [
30+
1,
31+
2,
32+
3
33+
],
34+
"SiteUrl": "https://boriel-basic.net",
35+
"LicenseType": "GNU Affero General Public License v3.0",
36+
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/zxbasic/refs/heads/main/LICENSE.txt",
37+
"VersionsUrl": "https://boriel.com/files/zxb/",
38+
"LocalPath": "",
39+
"FullLocalPath": "C:\\ZXNext\\zxbasic\\zxbc.exe",
40+
"DirectUpdate": true,
41+
"Group": "ZX Basic Studio",
42+
"Order": 1
43+
},
44+
{
45+
"Id": "zxbs",
46+
"Enabled": true,
47+
"Name": "ZX Basic Studio",
48+
"Author": "Dr.Gusman, Boriel, Duefectu, AdolFITO, Hash6Iron and SirRickster",
49+
"Description": "IDE (Integrated Development Environment) with code editor, Assembler, UDGs, fonts, sprites, .tap editor, debugger, emulator, etc.",
50+
"SupportedOperatingSystems": [
51+
1,
52+
2,
53+
3
54+
],
55+
"SiteUrl": "https://github.com/boriel-basic/ZXBasicStudio",
56+
"LicenseType": "MIT License",
57+
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/ZXBasicStudio/refs/heads/master/LICENSE.txt",
58+
"VersionsUrl": "https://github.com/boriel-basic/ZXBasicStudio/releases/",
59+
"LocalPath": "",
60+
"FullLocalPath": null,
61+
"DirectUpdate": true,
62+
"Group": "ZX Basic Studio",
63+
"Order": 2
64+
},
65+
{
66+
"Id": "mame",
67+
"Enabled": true,
68+
"Name": "M.A.M.E.",
69+
"Author": "MAME Development Team",
70+
"Description": "MAME (Multi Arcade Machione Emulator) is a multi-purpose emulation framework.",
71+
"SupportedOperatingSystems": [
72+
1,
73+
2,
74+
3
75+
],
76+
"SiteUrl": "https://www.mamedev.org/",
77+
"LicenseType": "GPL-2.0 / BSD-3-Clause License",
78+
"LicenceUrl": "https://www.mamedev.org/",
79+
"VersionsUrl": "",
80+
"LocalPath": "",
81+
"FullLocalPath": null,
82+
"DirectUpdate": true,
83+
"Group": "ZX Spectrum Next",
84+
"Order": 3
85+
},
86+
{
87+
"Id": "tbbluemame",
88+
"Enabled": true,
89+
"Name": "Next boot ROM",
90+
"Author": "SpectNext Ltd",
91+
"Description": "ZX Basic Studio plugin for MAME. Allows you to debug programmes from ZX Basic Studio.",
92+
"SupportedOperatingSystems": [
93+
1,
94+
2,
95+
3
96+
],
97+
"SiteUrl": "https://gitlab.com/SpectrumNext/ZX_Spectrum_Next_FPGA",
98+
"LicenseType": "GPL-3.0",
99+
"LicenceUrl": "https://gitlab.com/SpectrumNext/ZX_Spectrum_Next_FPGA/-/raw/master/LICENSE?ref_type=heads",
100+
"VersionsUrl": "",
101+
"LocalPath": "",
102+
"FullLocalPath": null,
103+
"DirectUpdate": true,
104+
"Group": "ZX Spectrum Next",
105+
"Order": 4
106+
},
107+
{
108+
"Id": "zxbsmame",
109+
"Enabled": true,
110+
"Name": "ZXBS MAME plugin",
111+
"Author": "Duefectu Corp",
112+
"Description": "ZX Basic Studio plugin for MAME. Allows you to debug programmes from ZX Basic Studio.",
113+
"SupportedOperatingSystems": [
114+
1,
115+
2,
116+
3
117+
],
118+
"SiteUrl": "https://github.com/boriel-basic/ZXBasicStudio",
119+
"LicenseType": "MIT License",
120+
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/ZXBasicStudio/refs/heads/master/LICENSE.txt",
121+
"VersionsUrl": "",
122+
"LocalPath": "",
123+
"FullLocalPath": null,
124+
"DirectUpdate": true,
125+
"Group": "ZX Spectrum Next",
126+
"Order": 5
127+
},
128+
{
129+
"Id": "nextsdimage",
130+
"Enabled": true,
131+
"Name": "ZX Spectrum Next SD image",
132+
"Author": "SpectNext Ltd",
133+
"Description": "ZX Basic Studio plugin for MAME. Allows you to debug programmes from ZX Basic Studio.",
134+
"SupportedOperatingSystems": [
135+
1,
136+
2,
137+
3
138+
],
139+
"SiteUrl": "https://github.com/boriel-basic/ZXBasicStudio",
140+
"LicenseType": "MIT License",
141+
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/ZXBasicStudio/refs/heads/master/LICENSE.txt",
142+
"VersionsUrl": "",
143+
"LocalPath": "",
144+
"FullLocalPath": null,
145+
"DirectUpdate": true,
146+
"Group": "ZX Spectrum Next",
147+
"Order": 5
148+
},
149+
{
150+
"Id": "hdfmonkey",
151+
"Enabled": true,
152+
"Name": "hdfmonkey - jjjs build",
153+
"Author": "jjjs, gasman, ChaN",
154+
"Description": "A tool for editing the contents of disk images used by ZX Spectrum Next.",
155+
"SupportedOperatingSystems": [
156+
1,
157+
2,
158+
3
159+
],
160+
"SiteUrl": "https://www.specnext.com/forum/viewtopic.php?t=2604",
161+
"LicenseType": "GPL-3.0",
162+
"LicenceUrl": "https://codeberg.org/chwe/hdfmonkey/src/branch/dev-v05x",
163+
"VersionsUrl": "https://zx.duefectucorp.com/tools/hdfmonkey/versions.txt",
164+
"LocalPath": "",
165+
"FullLocalPath": null,
166+
"DirectUpdate": true,
167+
"Group": "ZX Spectrum Next",
168+
"Order": 6
169+
}
170+
]

ZXBSInstaller.Log/Neg/ExternalTool.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ public class ExternalTool
7272
/// Recommended
7373
/// </summary>
7474
public bool Recommended { get; set; }
75-
75+
/// <summary>
76+
/// Tools group
77+
/// </summary>
78+
public string Group { get; set; }
7679
/// <summary>
7780
/// Versions of the tool
7881
/// </summary>

ZXBSInstaller.Log/ServiceLayer.cs

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static class ServiceLayer
3737
/// <summary>
3838
/// True if the computer is a Mac
3939
/// </summary>
40-
public static bool IsMac=false;
40+
public static bool IsMac = false;
4141
/// <summary>
4242
/// Used to cancel the current operation. It is set to true when the user clicks the cancel button and it is checked in all long operations to stop them if it is true.
4343
/// </summary>
@@ -307,20 +307,39 @@ public static void OpenUrlInBrowser(string url)
307307
/// <summary>
308308
/// Retrieves all external tools configured for use with the application.
309309
/// </summary>
310-
/// <param name="json">Json string with the external tools information</param>
311310
/// <returns>An array of <see cref="ExternalTool"/> objects representing the available external tools. The array is empty
312311
/// if no external tools are configured or can download the config file.</returns>
313-
public static ExternalTool[] SetExternalTools(string json)
312+
public static ExternalTool[] GetExternalTools()
314313
{
315314
try
316315
{
317316
UpdateStatus?.Invoke("Retrieving external tools information...", 5);
318317

319-
var tools = JsonSerializer.Deserialize<ExternalTool[]>(json);
320-
if (tools == null)
318+
// Get external tools list from embded resource
319+
ExternalTool[] tools = null;
321320
{
322-
ShowMessage("ERROR, unable to obtain the list of external tools. Download and install a new version of ZXBSInstaller.");
323-
return null;
321+
var assembly = Assembly.GetExecutingAssembly();
322+
using (Stream? stream = assembly.GetManifestResourceStream("ZXBSInstaller.Log.ExternalTools.json"))
323+
{
324+
if (stream == null)
325+
{
326+
ShowMessage("ERROR, unable to obtain the list of external tools. Download and install a new version of ZXBSInstaller: ERROR #1");
327+
return null;
328+
}
329+
using StreamReader reader = new StreamReader(stream, Encoding.UTF8);
330+
var json = reader.ReadToEnd();
331+
if (string.IsNullOrEmpty(json))
332+
{
333+
ShowMessage("ERROR, unable to obtain the list of external tools. Download and install a new version of ZXBSInstaller: ERROR #2");
334+
return null;
335+
}
336+
tools = JsonSerializer.Deserialize<ExternalTool[]>(json);
337+
if (tools == null)
338+
{
339+
ShowMessage("ERROR, unable to obtain the list of external tools. Download and install a new version of ZXBSInstaller. ERROR #3");
340+
return null;
341+
}
342+
}
324343
}
325344

326345
int max = tools.Length;
@@ -1089,7 +1108,7 @@ public static void DownloadAndInstallTool(ExternalTool tool, ExternalTools_Versi
10891108
return;
10901109
}
10911110

1092-
if(tool.Id == "zxbsinstaller")
1111+
if (tool.Id == "zxbsinstaller")
10931112
{
10941113
ShowStatusPanel($"After installing or updating ZXBSInstaller, run this program from {tool.LocalPath}.");
10951114
}

ZXBSInstaller.Log/ZXBSInstaller.Log.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,14 @@
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

9+
<ItemGroup>
10+
<None Remove="ExternalTools.json" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<EmbeddedResource Include="ExternalTools.json">
15+
<CopyToOutputDirectory></CopyToOutputDirectory>
16+
</EmbeddedResource>
17+
</ItemGroup>
18+
919
</Project>

ZXBSInstaller/Assets/hdfmonkey.png

27.3 KB
Loading

ZXBSInstaller/Assets/mame.png

51.8 KB
Loading
4.43 KB
Loading
16.4 KB
Loading

ZXBSInstaller/Assets/zxbsmame.png

35.1 KB
Loading

0 commit comments

Comments
 (0)