Compare commits

8 Commits

Author SHA1 Message Date
7b83bba1c1 chore: update zba-gdbstub to zig master 2023-02-07 17:05:38 -06:00
512bd64c01 feat: respond to API changes for software bkpts 2023-02-07 16:02:04 -06:00
ced9519d55 feat: allow gdb writes to certain mem regions 2023-02-07 16:02:04 -06:00
c24adf6944 chore: update gdbstub lib 2023-02-07 16:02:03 -06:00
0e21d4eb74 feat: add gdb support to zba 2023-02-07 16:02:03 -06:00
d48323a8b3 feat: add gdbstub library 2023-02-07 16:02:03 -06:00
c3be1c0a67 chore: update to latest zig build system
I feel like I'm misusing addAnonymousModule
2023-02-07 16:00:06 -06:00
fdf7399e52 chore: update README.md 2023-02-04 19:30:05 -06:00
6 changed files with 15 additions and 16 deletions

View File

@@ -13,7 +13,7 @@ This is a simple (read: incomplete) for-fun long-term project. I hope to get "mo
- [x] Affine Sprites - [x] Affine Sprites
- [ ] Windowing (see [this branch](https://git.musuka.dev/paoda/zba/src/branch/window)) - [ ] Windowing (see [this branch](https://git.musuka.dev/paoda/zba/src/branch/window))
- [ ] Audio Resampler (Having issues with SDL2's) - [ ] Audio Resampler (Having issues with SDL2's)
- [ ] Immediate Mode GUI - [x] Immediate Mode GUI (see [this branch](https://git.musuka.dev/paoda/zba/src/branch/imgui))
- [ ] Refactoring for easy-ish perf boosts - [ ] Refactoring for easy-ish perf boosts
## Usage ## Usage
@@ -91,17 +91,17 @@ zig-datetime | <https://github.com/frmdstryr/zig-datetime>
`bitfields.zig` | [https://github.com/FlorenceOS/Florence](https://github.com/FlorenceOS/Florence/blob/aaa5a9e568/lib/util/bitfields.zig) `bitfields.zig` | [https://github.com/FlorenceOS/Florence](https://github.com/FlorenceOS/Florence/blob/aaa5a9e568/lib/util/bitfields.zig)
`gl.zig` | <https://github.com/MasterQ32/zig-opengl> `gl.zig` | <https://github.com/MasterQ32/zig-opengl>
Use `git submodule update --init` from the project root to pull the git submodules `SDL.zig`, `zig-clap`, `known-folders`, `zig-toml` and `zig-datetime` Use `git submodule update --init` from the project root to pull the git relevant git submodules
Be sure to provide SDL2 using: Be sure to provide SDL2 using:
- Linux: Your distro's package manager - Linux: Your distro's package manager
- MacOS: ¯\\\_(ツ)_/¯ - MacOS: `brew` (install [this formula](https://formulae.brew.sh/formula/sdl2))
- Windows: [`vcpkg`](https://github.com/Microsoft/vcpkg) (install `sdl2:x64-windows`) - Windows: [`vcpkg`](https://github.com/Microsoft/vcpkg) (install `sdl2:x64-windows`)
`SDL.zig` will provide a helpful compile error if the zig compiler is unable to find SDL2. `SDL.zig` will provide a helpful compile error if the zig compiler is unable to find SDL2.
Once you've got all the dependencies, execute `zig build -Drelease-fast`. The executable is located at `zig-out/bin/`. Once you've got all the dependencies, execute `zig build -Doptimize=ReleaseSafe`. The executable is located at `zig-out/bin/`.
## Controls ## Controls

View File

@@ -25,23 +25,22 @@ pub fn build(b: *std.build.Builder) void {
exe.setMainPkgPath("."); // Necessary so that src/main.zig can embed example.toml exe.setMainPkgPath("."); // Necessary so that src/main.zig can embed example.toml
// Known Folders (%APPDATA%, XDG, etc.) // Known Folders (%APPDATA%, XDG, etc.)
exe.addPackagePath("known_folders", "lib/known-folders/known-folders.zig"); exe.addAnonymousModule("known_folders", .{ .source_file = .{ .path = "lib/known-folders/known-folders.zig" } });
// DateTime Library // DateTime Library
exe.addPackagePath("datetime", "lib/zig-datetime/src/main.zig"); exe.addAnonymousModule("datetime", .{ .source_file = .{ .path = "lib/zig-datetime/src/main.zig" } });
// Bitfield type from FlorenceOS: https://github.com/FlorenceOS/ // Bitfield type from FlorenceOS: https://github.com/FlorenceOS/
// exe.addPackage(.{ .name = "bitfield", .path = .{ .path = "lib/util/bitfield.zig" } }); exe.addAnonymousModule("bitfield", .{ .source_file = .{ .path = "lib/util/bitfield.zig" } });
exe.addPackagePath("bitfield", "lib/util/bitfield.zig");
// Argument Parsing Library // Argument Parsing Library
exe.addPackagePath("clap", "lib/zig-clap/clap.zig"); exe.addAnonymousModule("clap", .{ .source_file = .{ .path = "lib/zig-clap/clap.zig" } });
// TOML Library // TOML Library
exe.addPackagePath("toml", "lib/zig-toml/src/toml.zig"); exe.addAnonymousModule("toml", .{ .source_file = .{ .path = "lib/zig-toml/src/toml.zig" } });
// OpenGL 3.3 Bindings // OpenGL 3.3 Bindings
exe.addPackagePath("gl", "lib/gl.zig"); exe.addAnonymousModule("gl", .{ .source_file = .{ .path = "lib/gl.zig" } });
// gdbstub // gdbstub
Gdbstub.link(exe); Gdbstub.link(exe);
@@ -49,7 +48,7 @@ pub fn build(b: *std.build.Builder) void {
// Zig SDL Bindings: https://github.com/MasterQ32/SDL.zig // Zig SDL Bindings: https://github.com/MasterQ32/SDL.zig
const sdk = Sdk.init(b, null); const sdk = Sdk.init(b, null);
sdk.link(exe, .dynamic); sdk.link(exe, .dynamic);
exe.addPackage(sdk.getNativePackage("sdl2")); exe.addModule("sdl2", sdk.getNativeModule());
exe.install(); exe.install();