From 687108a705a7a34ea6f003644a0500e68e58b9b3 Mon Sep 17 00:00:00 2001 From: Colin Halseth Date: Sat, 20 Jan 2024 13:05:14 -0800 Subject: [PATCH] Godot verison add colour palette switcher --- Gameboy.Player.Godot/.gitignore | 1 + .../Debuggers/Map Debugger.tscn | 6 + Gameboy.Player.Godot/Debuggers/MapDebugger.cs | 8 +- .../Debuggers/PaletteDebugger.cs | 242 +++++++++++++++--- .../Debuggers/PaletteDebugger.tscn | 169 +++++++++--- Gameboy.Player.Godot/export_presets.cfg | 216 ++++++++++++++++ Gameboy/hardware/gpu/BackgroundMapSpan.cs | 28 +- Gameboy/hardware/gpu/IDebuggablePpu.cs | 1 + Gameboy/hardware/gpu/Ppu.Debug.cs | 1 + 9 files changed, 607 insertions(+), 65 deletions(-) create mode 100644 Gameboy.Player.Godot/export_presets.cfg diff --git a/Gameboy.Player.Godot/.gitignore b/Gameboy.Player.Godot/.gitignore index 4709183..eeb503d 100644 --- a/Gameboy.Player.Godot/.gitignore +++ b/Gameboy.Player.Godot/.gitignore @@ -1,2 +1,3 @@ # Godot 4+ specific ignores .godot/ +[bB]in/ \ No newline at end of file diff --git a/Gameboy.Player.Godot/Debuggers/Map Debugger.tscn b/Gameboy.Player.Godot/Debuggers/Map Debugger.tscn index 3440c53..caf907a 100644 --- a/Gameboy.Player.Godot/Debuggers/Map Debugger.tscn +++ b/Gameboy.Player.Godot/Debuggers/Map Debugger.tscn @@ -37,4 +37,10 @@ text = "Reload" icon = ExtResource("3_fd1ro") expand_icon = true +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 23.0 +text = "Addressing Mode: Method8000" + [connection signal="pressed" from="Reload" to="." method="Refresh"] diff --git a/Gameboy.Player.Godot/Debuggers/MapDebugger.cs b/Gameboy.Player.Godot/Debuggers/MapDebugger.cs index 41323d6..b6ba913 100644 --- a/Gameboy.Player.Godot/Debuggers/MapDebugger.cs +++ b/Gameboy.Player.Godot/Debuggers/MapDebugger.cs @@ -14,21 +14,25 @@ public partial class MapDebugger : Control { [Export] public MapType Map; private BitmapTextureRect rect; + private Label label; // Called when the node enters the scene tree for the first time. public override void _Ready() { this.rect = GetNode("Rect"); + this.label = GetNode