Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MAME-plugin/Version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1-beta1
87 changes: 87 additions & 0 deletions MAME-plugin/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
local exports = {}

local cpu = nil
local paused = false

local breakpointaddr = nil --0x8000
local breakpoint_hit = false

function exports.startplugin()
print("Plugin ZXBS loaded!")

--emu.register_start(function()
emu.add_machine_reset_notifier(function()
cpu = manager.machine.devices[":maincpu"]
print("")
print("CPU detected")

if breakpointaddr then
if cpu.debug then
local id=cpu.debug:bpset(breakpointaddr, "", "")
print("Breakpoint set " .. id)
else
print("DEBUG NO AVAILABLE")
end
end

emu.register_periodic(timer)
end)
end


function timer()
if not cpu or not cpu.debug then
return
end

local current_pc = cpu.state["PC"].value
if current_pc == breakpointaddr and breakpoint_hit == false then
emu.pause()
breakpoint_hit = true
show_registers()
end

--if breakpoint_hit == true and current_pc != breakpointaddr then
-- breakpoint_hit = false
--end
end


function timer2()
local cmd = get_command()

if cmd == "PAUSE" then
emu.pause()
show_registers()
else
if cmd == nil then
return
end
print("UNKNOW COMMAD")
print(cmd)
end
end


function get_command()
local f = io.open("zxbs.tmp","r")
if not f then
return nil
end
local content = f:read("*a")
f:close()
os.remove("zxbs.tmp")
return content
end


function show_registers()
local pc = cpu.state["PC"].value
local af = cpu.state["AF"].value
local bc = cpu.state["BC"].value
local de = cpu.state["DE"].value
local hl = cpu.state["HL"].value
print(string.format("BREAKPOINT PC:%04X AF:%04X BC:%04X DE:%04X HL:%04X",pc, af, bc, de, hl))
end

return exports
10 changes: 10 additions & 0 deletions MAME-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"plugin": {
"name": "zxbs",
"description": "ZX Basic Studio debugger plugin",
"version": "0.1",
"author": "DuefectuCorp",
"type": "plugin",
"start": "start"
}
}
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ Have fun!
- AdolFITO
- HashIron
- SirRickster
- Yoruguaman
- Testers:
- AbenZaX
- Pedro Tomás (Pere)
- Jose Daniel Fernandez Santos (Fenix)
- Yoruguaman
- Super@ado

## Credits
- Icons from [SVG REPO](https://www.svgrepo.com/):
- <a href="https://github.com/blivesta/flexicon?ref=svgrepo.com" target="_blank">Blivesta</a> in MIT License
- <a href="https://dazzleui.gumroad.com/l/dazzleiconsfree?ref=svgrepo.com" target="_blank">Dazzle Ui</a> in CC Attribution License
- <a href="https://dazzleui.gumroad.com/l/dazzleiconsfree?ref=svgrepo.com" target="_blank">Dazzle Ui</a> in CC Attribution License
- <a href="https://github.com/KDE/krita?ref=svgrepo.com" target="_blank">Kde</a> in GPL License
- <a href="https://www.figma.com/@thinkcly?ref=svgrepo.com" target="_blank">Konstantin Filatov</a> in CC Attribution
- <a href="https://dribbble.com/Mohamed_Raouf?ref=svgrepo.com" target="_blank">Mohamed Raouf</a> in CC Attribution License
Expand All @@ -45,5 +46,5 @@ Have fun!
- <a href="https://github.com/siemens/ix-icons?ref=svgrepo.com" target="_blank">Siemens</a> in MIT License
- <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
- <a href="https://www.figma.com/community/file/1071678557813409125?ref=svgrepo.com" target="_blank">Ananthanath A X Kalaiism</a> in PD License


- <a href="https://github.com/siemens/ix-icons?ref=svgrepo.com" target="_blank">Siemens</a> in MIT License
- <a href="https://www.svgrepo.com" target="_blank">SVG Repo</a> CC0 License
186 changes: 186 additions & 0 deletions ZXBSInstaller.Log/ExternalTools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
[
{
"Id": "zxbsinstaller",
"Enabled": true,
"Name": "ZX Basic Studio Installer",
"Author": "Duefectu",
"Description": "This program, and it is used to download, install and keep all external tools and ZX Basic Studio itself up to date.",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://github.com/boriel-basic/ZXBasicStudio",
"LicenseType": "MIT License",
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/ZXBasicStudio/refs/heads/master/LICENSE.txt",
"VersionsUrl": "https://github.com/boriel-basic/ZXBasicStudio/releases/",
"LocalPath": "",
"Unzip": true,
"CreateVerFile": false,
"FullLocalPath": null,
"DirectUpdate": true,
"Group": "ZX Basic Studio",
"Order": 0
},
{
"Id": "zxbasic",
"Enabled": true,
"Name": "Boriel ZX Basic Compiler",
"Author": "Boriel",
"Description": "ZXBCompiler is a BORIEL BASIC cross compiler tool. It's a required tool.'",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://boriel-basic.net",
"LicenseType": "GNU Affero General Public License v3.0",
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/zxbasic/refs/heads/main/LICENSE.txt",
"VersionsUrl": "https://boriel.com/files/zxb/",
"LocalPath": "",
"Unzip": true,
"CreateVerFile": false,
"FullLocalPath": "C:\\ZXNext\\zxbasic\\zxbc.exe",
"DirectUpdate": true,
"Group": "ZX Basic Studio",
"Order": 1
},
{
"Id": "zxbs",
"Enabled": true,
"Name": "ZX Basic Studio",
"Author": "Dr.Gusman, Boriel, Duefectu, AdolFITO, Hash6Iron and SirRickster",
"Description": "IDE (Integrated Development Environment) with code editor, Assembler, UDGs, fonts, sprites, .tap editor, debugger, emulator, etc.",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://github.com/boriel-basic/ZXBasicStudio",
"LicenseType": "MIT License",
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/ZXBasicStudio/refs/heads/master/LICENSE.txt",
"VersionsUrl": "https://github.com/boriel-basic/ZXBasicStudio/releases/",
"LocalPath": "",
"Unzip": true,
"CreateVerFile": false,
"FullLocalPath": null,
"DirectUpdate": true,
"Group": "ZX Basic Studio",
"Order": 2
},
{
"Id": "mame",
"Enabled": true,
"Name": "M.A.M.E.",
"Author": "MAME Development Team",
"Description": "MAME (Multi Arcade Machione Emulator) is a multi-purpose emulation framework.",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://github.com/mamedev/mame",
"LicenseType": "GPL-2.0 / BSD-3-Clause License",
"LicenceUrl": "https://github.com/mamedev/mame?tab=License-1-ov-file",
"VersionsUrl": "https://github.com/mamedev/mame/releases",
"LocalPath": "",
"Unzip": true,
"CreateVerFile": false,
"FullLocalPath": null,
"DirectUpdate": true,
"Group": "ZX Spectrum Next",
"Order": 3
},
{
"Id": "tbbluemame",
"Enabled": true,
"Name": "Next boot ROM",
"Author": "SpectNext Ltd",
"Description": "ZX Basic Studio plugin for MAME. Allows you to debug programmes from ZX Basic Studio.",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://gitlab.com/SpectrumNext/ZX_Spectrum_Next_FPGA",
"LicenseType": "GNU GPLv3",
"LicenceUrl": "https://gitlab.com/SpectrumNext/ZX_Spectrum_Next_FPGA/-/raw/master/LICENSE?ref_type=heads",
"VersionsUrl": "",
"LocalPath": "mame\\roms\\tbblue.zip",
"Unzip": false,
"CreateVerFile": true,
"FullLocalPath": null,
"DirectUpdate": true,
"Group": "ZX Spectrum Next",
"Order": 4
},
{
"Id": "zxbsmame",
"Enabled": true,
"Name": "ZXBS MAME plugin",
"Author": "Duefectu Corp",
"Description": "ZX Basic Studio plugin for MAME. Allows you to debug programmes from ZX Basic Studio.",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://github.com/boriel-basic/ZXBasicStudio",
"LicenseType": "MIT License",
"LicenceUrl": "https://raw.githubusercontent.com/boriel-basic/ZXBasicStudio/refs/heads/master/LICENSE.txt",
"VersionsUrl": "https://www.duefectucorp.com/descargas/zxbsmame/Versions.txt",
"LocalPath": "mame\\plugins\\zxbs",
"Unzip": true,
"CreateVerFile": false,
"FullLocalPath": null,
"DirectUpdate": true,
"Group": "ZX Spectrum Next",
"Order": 5
},
{
"Id": "nextsdimage",
"Enabled": true,
"Name": "ZX Spectrum Next SD image",
"Author": "SpectNext Ltd",
"Description": "ZX Basic Studio plugin for MAME. Allows you to debug programmes from ZX Basic Studio.",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://zxnext.uk/hosted/",
"LicenseType": "MIT License",
"LicenceUrl": "https://zxnext.uk/hosted/",
"VersionsUrl": "",
"LocalPath": "",
"Unzip": true,
"CreateVerFile": false,
"FullLocalPath": null,
"DirectUpdate": true,
"Group": "ZX Spectrum Next",
"Order": 5
},
{
"Id": "hdfmonkey",
"Enabled": true,
"Name": "hdfmonkey - jjjs build",
"Author": "jjjs, gasman, ChaN",
"Description": "A tool for editing the contents of disk images used by ZX Spectrum Next.",
"SupportedOperatingSystems": [
1,
2,
3
],
"SiteUrl": "https://www.specnext.com/forum/viewtopic.php?t=2604",
"LicenseType": "GPL-3.0",
"LicenceUrl": "https://codeberg.org/chwe/hdfmonkey/src/branch/dev-v05x",
"VersionsUrl": "https://www.duefectucorp.com/descargas/hdfmonkey/Versions.txt",
"LocalPath": "",
"Unzip": true,
"CreateVerFile": false,
"FullLocalPath": null,
"DirectUpdate": true,
"Group": "ZX Spectrum Next",
"Order": 6
}
]
15 changes: 13 additions & 2 deletions ZXBSInstaller.Log/Neg/ExternalTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class ExternalTool
/// </summary>
public string VersionsUrl { get; set; }
/// <summary>
/// Local path where the tool will be installed without file name
/// If exists Local path where the tool will be installed without file name
/// </summary>
public string LocalPath { get; set; }
/// <summary>
Expand All @@ -65,14 +65,25 @@ public class ExternalTool
/// </summary>
public bool DirectUpdate { get; set; }
/// <summary>
/// If true, tool will be downloaded as a zip file and unzipped in the local path, otherwise it will be downloaded as is
/// </summary>
public bool Unzip { get; set; }
/// <summary>
/// True, creates a version.txt file in the installation folder
/// </summary>
public bool CreateVerFile { get; set; }
/// <summary>
/// Order in the list
/// </summary>
public int Order { get; set; }
/// <summary>
/// Recommended
/// </summary>
public bool Recommended { get; set; }

/// <summary>
/// Tools group
/// </summary>
public string Group { get; set; }
/// <summary>
/// Versions of the tool
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions ZXBSInstaller.Log/Neg/ExternalTools_Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public class ExternalTools_Version
/// <summary>
/// Numer of the Beta version, 0 if not a beta
/// </summary>
public int BetaNumber { get; set; }
public decimal BetaNumber { get; set; }
/// <summary>
/// Internal version number to order versions
/// </summary>
public int VersionNumber { get; set; }
public decimal VersionNumber { get; set; }
/// <summary>
/// Download url for this version
/// </summary>
Expand Down
Loading