Commit graph

19 commits

Author SHA1 Message Date
Michel Heily c9811cc272 all: refactoring audio stuff and using structopt in desktop app
Former-commit-id: 8fb2e158eba5f81bc9fb953bfa6d0f4d9e505a61
Former-commit-id: c436751be80c9517401777ec5060061383d75929
2022-09-13 01:52:05 +03:00
Michel Heily 4db32b1af2 Get rid of the VideoInterface trait
Former-commit-id: 30a14ff0609b385b80b4c17a8f70e89fce816509
Former-commit-id: 519aeea19b3faa37b732463ecfdddb9730322021
2022-09-12 01:13:01 +03:00
Michel Heily 407818d32a Deprecate InputDevice trait
Former-commit-id: 4d25e16d0a6a0a55a5204c28230620dba3531e08
Former-commit-id: da149cb9ebb1258693272a4e9daa615902d99e6e
2022-09-12 00:11:50 +03:00
Michel Heily f3fac5e3b8 Implement new gdbstub target for arm7tdmi, add a small example & test as well
Former-commit-id: 16ba6dada28f8beb5971413acbbe153a26aa9ec3
Former-commit-id: f0661ad20245110797fd99fe16d3fb11382bb78a
2022-09-08 23:40:38 +03:00
Michel Heily 4c5d35c5d1 Clippy fixes
Former-commit-id: 6107b2249a5b5e42eb5add5f6a0c37c373d77147
Former-commit-id: 1387473cc566db7eb898222b319cc1bcfde886f5
2022-09-08 23:40:38 +03:00
Michel Heily a289900f6a Refactor Bus traits into the arm7tdmi crate
Former-commit-id: 0027611bd4c777dcb7a4d3de6b0cc90cd649faa8
Former-commit-id: 41e30b29f97aee9e5d256a4f8d0c92ac1c761ac7
2022-09-06 02:04:50 +03:00
Michel Heily d4b91257b7 Gotta make clippy happy #2
Former-commit-id: 25d2b2b52c4113ceb299908248773bb7e4bfd6c9
Former-commit-id: a612adacf46b62d8a5bd78bdcd3b0bc6323898a5
2022-09-05 01:34:21 +03:00
Michel Heily 28fb9ffa70 chore: Refactor into crates
Been wanting to do this for a long time.
This does impose performance issues when building with the vanilla
release profile, as cargo does not perform optimizations across crate
boundary (we care mostly about inlining).
so I added release-lto profile

Also fixed some broken stuff I found across the project, meh


Former-commit-id: 06d03263cc6245313f3ea22c715479ab6da7c4d4
Former-commit-id: f93abd10c67ea8a3b8072b47462be5eca4f3e02b
2022-09-04 23:54:44 +03:00
Michel Heily 586a5bf16c core: arm7tdmi: Refactor display->disass.
Also, move core::disass into core::arm7tdmi::disass


Former-commit-id: 82f60cb814d6cf23e62565e34b61f8771e704525
Former-commit-id: 345ddaac674c78e77e62f106d7c0deda857fe5ed
2020-11-24 00:45:07 +02:00
Michel Heily 7e2c9d040a [perf] core: gpu: Refactor to use unpacked mmio configuration during rendering
* Convert gpu bitfield!() registers to unpacked form, and defer pack/unpack to bus read/write operations


Former-commit-id: 26e7d7d62d6418ce7bcdb8e414cabe5ddb56333d
Former-commit-id: 716ddd9fe2b7b95b7613fc549a7bee406272478b
2020-11-06 06:26:00 -08:00
Michel Heily fb32b9a671 core: Implement mGBA log support.
It's quite an handy way to log messages from ROMs, so I thought it'd be nice to add it.


Former-commit-id: 6869bdb58cfa883ac1ca6832f0bbeeab0edcf552
Former-commit-id: 89d7d826c7a906bbb68f9f4305bb92cd50bb2296
2020-10-24 05:59:48 -07:00
Michel Heily b003dc950f core: Implement bios read protection when CPU is not executing from bios.
Fixes #109
Fixes #106
Fixes MegaMan email menu freezing and probably some more games


Former-commit-id: ed37520f2bc732b07334261dfe3d23cccf3fc04c
Former-commit-id: d7f206b0f405ffe09a3b36d90268f1d683a64cea
2020-10-18 06:59:06 -07:00
Michel Heily a3546cbe07 Run cargo-fmt
Former-commit-id: b0a8fe8948fe8affe3377acf0c72af8d78717789
Former-commit-id: fee6919ea7cf16c5bf6e1bd21b993770cc08998f
2020-10-17 06:36:02 -07:00
Michel Heily bce4456f42 [breaking-change] Remove game ROM and bios from savestate file.
This breaks the API of GameBoyAdvanvce::save_state and restore_state methods.
Currently as WIP only SDL2 frontend will adjust.


Former-commit-id: 1df15c8697fef0f6adddb07a6d653947c622ba12
Former-commit-id: 2ea339dc6a0d1e7539d167c4df29694b408303da
2020-10-17 06:36:02 -07:00
Michel Heily 0de8a60006 core: Start working on a scheduler
A more robust cycle aware event scheduling, to easily implement serial-io, dmg audio channels and improve accuracy.
This brings a slight performance hit :/

I also ran dos2unix on some of the files :D


Former-commit-id: 62f4ba33e3a083b7976d6512ba6f5720ec493aa0
Former-commit-id: a4b3a92cd1eb156bbe9fd0ef77fbb0e7a45660cb
2020-10-17 06:36:02 -07:00
Michel Heily dc7cd24e8d [perf] Refactor&Optimize inner core::arm7tdmi APIs.
Avoid passing ArmInstruction struct to handlers, as accesses to its fields can result in memory operations.


Former-commit-id: 6ea1719e36a0fefa1b30bdae4d6e8ab4dbf3af1a
Former-commit-id: e5855b8258f98d3f4c0819f3aec2fd0f47fef545
2020-10-10 11:08:26 -07:00
Michel Heily ba2eff82ac platform/android: Big re-write of native interface
Mainly convert mainloop and audio thread into native code for
performance increase. (Calling into JNI every frame was costy)

The code was cleaned up quite a bit, but I may have introduced new bugs
in this process :<


Former-commit-id: fdbc21b5ab39f3d2e36647fd1177dc9a84a16980
Former-commit-id: ac765dbee8c994e1b69cc694846511837c2685b9
2020-09-30 00:27:00 +03:00
Michel Heily 08a7cd966a core: add "no_video_interface" feature
Former-commit-id: 0b1462e3ef1ab65c37e2c0fce54bc7f5c2f9f2b5
Former-commit-id: 7b837be4dcb477b048f0118c4ab30f97eb445363
2020-09-30 00:10:47 +03:00
Michel Heily 879374a9b0 Refactor dir rustboyadvance-core -> core
Former-commit-id: 5af970f6d56d321472f2b91885e41ca113390986
Former-commit-id: 748e222a36362eb5ac8909068c32f2d3f98ca536
2020-05-30 13:43:37 +03:00
Renamed from rustboyadvance-core/src/lib.rs (Browse further)