58 Commits

Author SHA1 Message Date
zxq5 4bee36eb7f - added support for args in Builder trait
- added is_lib arg for compiler to produce non-main assembly outputs
- updated templates to use include_str
2026-02-23 22:06:07 +00:00
zxq5 71b36dc6b5 reoganised project 2026-02-23 20:32:45 +00:00
zxq5 1d38aca523 added serial-out support to emulator + serial lib & command line mode for dsa emulator 2026-02-23 19:51:05 +00:00
zxq5 7117b927f3 - updated common with new compiler/builder trait to provide a common
interface for build tools
- updated editor and build tooling to use new system
2026-02-22 21:43:22 +00:00
zxq5 240f0e553f fixed failing tests
TODO: add comprehensive testing to everything
2026-02-14 11:50:54 +00:00
zxq5 25a59a6b19 fixed clippy lints 2026-02-14 11:50:36 +00:00
zxq5 c67217a6b8 Merge branch 'main' into compiler 2026-02-14 11:09:33 +00:00
zxq5 e2be83414b - updated assembler to support new shift implementation
- updated emulator to support new shift implementation
- updated emulator to rename NoReg to Null as in the common lib
2026-02-09 00:05:45 +00:00
zxq5 e69514e46e modified editor to include syntax for .dsc files 2026-02-05 01:26:37 +00:00
zxq5 cb65a928c8 fixed bug where stack inspector shows incorrect addresses 2026-02-04 01:59:43 +00:00
zxq5 fa8aa1cd29 integrated compiler in DSA editor 2026-02-04 01:58:55 +00:00
zxq5 98668c681e more optimisations test program ~54MIPS -> ~110MIPS 2025-06-29 02:04:14 +01:00
zxq5 05a25447b2 minor optimisation to reduce unnecessary allocations 2025-06-28 03:43:20 +01:00
zxq5 56d2abe17f - optimised main emulator loop, allowing updates only once every roughly 32,000 instructions.
- optimised memory access patterns, removing unecessary mutability and accesses.
- replaced the standard HashMap with an implementation that uses a faster hashing algorithm.

results:

before:
    - our benchmark program with ~4m instructions would take around for their data to make it to the UI, and a bit over 200ms to actually run

after:
    - our benchmark program with ~4m instructions can run in around 75ms, and the UI receives the update almost instantly.

conclusion:
- emulator performance should be around 2-3x faster than before.
2025-06-28 03:21:46 +01:00
zxq5 620584488b fixed unit tests & misc changes to workspace config 2025-06-26 00:50:58 +01:00
zxq5 1101331f70 fixed a couple of emulator bugs, including fixing shift instructions. finished implementing lib/io/print/print_hex_byte and print_hex_word 2025-06-25 16:31:42 +01:00
zxq5 82b99c127c finished initial interrupts implementation 2025-06-25 00:13:55 +01:00
nullndvoid 92c4660a4d misc: get rid of some errors from Cargo lol 2025-06-24 21:55:11 +01:00
zxq5 d2c1492dca added step(n) feature to emulator, allowing for stepping n instructions at a time 2025-06-24 18:07:11 +01:00
zxq5 76197fac8f finished refactor of emulator - started on loader (needs significant changes before functional in the way that I would like) 2025-06-23 23:45:47 +01:00
zxq5 bc5ddef311 added error handling to emulator 2025-06-23 21:28:38 +01:00
nullndvoid f432fe7665 misc: clippy lint fixes 2025-06-23 18:23:01 +01:00
zxq5 ddd0c27893 found a cause of a memory bug in emulator - fix is TODO (#6) - continued working on brainf interpreter. we really need better debugging tools tbh. 2025-06-23 00:31:09 +01:00
zxq5 6ea3a76d74 fixed some bugs with file picker & loading different file types - will start working on brainf##k interpreter tomorrow because a compiler isn't enough. 2025-06-22 05:19:55 +01:00
zxq5 2b777f55c7 Merge remote-tracking branch 'refs/remotes/origin/main' 2025-06-22 03:54:44 +01:00
zxq5 808b51ff5f updated emulator to support importing .dsb binaries 2025-06-22 03:52:11 +01:00
nullndvoid c7322d8171 emulator on android: crashes but APKs are building 2025-06-22 03:46:42 +01:00
nullndvoid a878483923 emulator: fix build errors in main.rs 2025-06-22 02:21:08 +01:00
nullndvoid b97dcd5692 emulator: start supporting Android, this is WIP
Needs storage permissions, probably extra tweaks
2025-06-22 02:13:06 +01:00
nullndvoid 83259b9217 emulator: use egui file pickers rather than native ones
TODO: Add file types when picking? This is a regression
2025-06-22 02:12:26 +01:00
nullndvoid bbf893290f misc: more clippy fixes, **switched to stable**
The switch was due to rust-analyzer bug on latest nightly, please use stable until [this bug](https://github.com/rust-lang/rust-analyzer/issues/20051) is fixed
2025-06-22 00:42:44 +01:00
nullndvoid 1907bbb200 misc: clippy fixes 2025-06-22 00:30:27 +01:00
nullndvoid 22a8785083 emulator: cut down on cfg directives 2025-06-22 00:03:48 +01:00
zxq5 528ceddade refactor & fixed assembler path handling 2025-06-21 04:05:22 +01:00
zxq5 42c26d4184 added a create-project system to assembler, and fixed a couple of parsing bugs 2025-06-20 03:25:28 +01:00
zxq5 5c83b49328 fixed some clippy warns 2025-06-19 18:50:57 +01:00
nullndvoid a48dfee777 misc: revert "purged .unwrap()"
Harry is an idiot @zxq5 is also an idiot

This reverts commit d4e538a2b3.
2025-06-19 17:01:04 +01:00
zxq5 d4e538a2b3 purged .unwrap() 2025-06-19 16:57:43 +01:00
nullndvoid 78512d95e9 tests: update to reflect new argument ordering 2025-06-19 16:46:07 +01:00
nullndvoid 6f834025ed emulator: imports work relatively to file being assembled (set cwd) 2025-06-19 16:35:00 +01:00
nullndvoid 81433dcbcd misc: apply clippy lints 2025-06-19 15:51:23 +01:00
zxq5 e308362533 idk 2025-06-19 15:18:48 +01:00
zxq5 6b58a17f03 fixed a lot of bugs with the emulator, instruction set and assembler 2025-06-19 01:57:36 +01:00
zxq5 e281bc2d1d IT WORKS HELL YEAH. 2025-06-18 22:53:01 +01:00
nullndvoid 687dea99ca emulator: get RPC working w/ Cargo features 2025-06-17 23:48:28 +01:00
nullndvoid 3a40719e54 misc: back to little endian because I am evil 2025-06-17 19:51:16 +01:00
nullndvoid 0b16246dd2 misc: applied some clippy lints 2025-06-17 19:43:35 +01:00
nullndvoid 868cba376f misc: fix merge conflict 2025-06-17 19:22:01 +01:00
nullndvoid a6be668328 emulator: just saving my changes 2025-06-17 19:19:49 +01:00
zxq5 87fbd6c362 assembler still very broken, dependency resolution works, now working on expanding pseudoinstructions 2025-06-17 03:11:22 +01:00