Commit graph

63 commits

Author SHA1 Message Date
Muhammad Nauman Raza cacf71b61c refactor: with clippy
Former-commit-id: c57ef7336468ec1b2386a1c3faa753468b45eeb3
Former-commit-id: a98ec18b83a192c371cedbf3cd0efbb1586c4552
2024-03-22 20:35:05 +00:00
Muhammad Nauman Raza 4179b0ec28 refactor: clippy autofix
Former-commit-id: da7665869588cdb52e96ceeb2edcb7e7c13a4d44
Former-commit-id: 785d0e54cf09f781feecffd6512f3353d6b150e5
2024-03-22 19:50:34 +00:00
Michel Heily e4e2c710be fixes & improvements
Former-commit-id: 1ddeb07bde78a676201037c0bb269ff8122d29c2
Former-commit-id: f9c0eaa2a1073dba82dfb4d3594fbc0b979ef2e0
2022-10-04 22:45:14 +03:00
Michel Heily 838ca43ac4 Gdb fixes
Former-commit-id: f8507472a94386902962d1ffead7dd6f85624d82
Former-commit-id: 15446ef199288e887b7bc02fec08f9798c4c6ea2
2022-09-20 23:58:54 +03:00
Michel Heily c8c1cdd57b Gdb fixes
Former-commit-id: 2940580fc6b3760d77b5598b0faf72a773183304
Former-commit-id: cf3f361178c75d4e39832774bdd052ef8aab6be8
2022-09-19 00:10:55 +03:00
Michel Heily 3bb480c120 Mark minifb as deprecated
Former-commit-id: 5d1e4a45832df51c7e0504be91a84e24e73fd901
Former-commit-id: 900d6e1cb9d4e69338e0bea78a37b8a1f91acce6
2022-09-17 02:20:13 +03:00
Michel Heily c47d9e1f11 Experimental gdbserver
Former-commit-id: e78618b03c745bb9820216e6d9f8c1f4cade28d5
Former-commit-id: 5851f5930e07d8132e643bbe6773bdd0bd42fad6
2022-09-17 02:19:46 +03:00
Michel Heily a750cb8e16 Cleanup sdl2 desktop app
Former-commit-id: abc58c25406c6a16efa8acf771ebe2bc95343236
Former-commit-id: 90fbe62bbdd7758fe582280d499a4d23440c7fb5
2022-09-15 00:34:48 +03:00
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 0f64f07133 fixes
Former-commit-id: bfa963ac13e76b7e3cf2eb2e23651eb3189d3cbb
Former-commit-id: 6602c3b0a22327d5ceb85063c9934b3490e1da01
2022-09-12 00:41:35 +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 12d9edf5c4 Fix some cargo-clippy, and broken sub-crates
Former-commit-id: 93db7bc11bff9a48f4d66e0a378cd77ab42ca197
Former-commit-id: a6ce714c2a6a4112ff30d748c0686b1b2da41c6b
2022-09-05 00:34:00 +03:00
Michel Heily 255806ff69 Move rustbodyadvance-jni to platform/
Former-commit-id: c4565bfe5bf7c4887b6b86c44afbf6b55ac76811
Former-commit-id: b3f296200b0a718ba5509db0cce1117e0fb38a1a
2022-09-05 00:02:00 +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 76d9102231 arm: remove old code
Former-commit-id: 906a5b902726c000fcdc1a01443c6662da72b2c9
Former-commit-id: ab2dac2ae2c066758645026b6484cd1a9355831a
2021-07-03 22:29:55 +03:00
Michel Heily ff472db249 core: debugger: Use mut references for GameBoyAdvance
Former-commit-id: e1490c0777537e7d8eee4e9d1fbb53f8c957fdc7
Former-commit-id: f6be5b7940c4f3d517fa564830be607321ade534
2021-06-09 01:24:31 +03:00
Michel Heily 2ec52fb722 sdl2: Add silent mode
Former-commit-id: b8e3a8809501f32f819b74a1e4dd094d77a4b367
Former-commit-id: 027be1f05ae9f274e6a3527d209ac5ff696d8c56
2021-06-09 00:54:09 +03:00
Michel Heily aaf1a71a9d android: Fix takePersistableUriPermission() error on Android 10
Used wrong Intent ACTION


Former-commit-id: 6a46248d5f9b977558b85ef4bab1939a5a08a9b3
Former-commit-id: dd086c794870474d8e4e49341bc868baae5c1696
2020-10-27 02:06:23 +02:00
Michel Heily 764adc4c69 android: chmod+x ./gradlew
Former-commit-id: b16df501eadeae7c27460b174d03adf5db8851b7
Former-commit-id: eac97645b01b35dfd6164d0c4050ec68dcdf5988
2020-10-20 01:59:00 +03:00
Michel Heily 4d3c8c6952 android: Set targetSdkVersion to 26
Former-commit-id: 647d36a6c84561063475819d1dad2c58a731d1c0
Former-commit-id: b3dcb6a1d72f0f1634e23e2b08e9d1d8c74d9790
2020-10-19 15:54:54 -07:00
Michel Heily 4ea8d9ccba Adapt android build to new from_saved_sate changes
Former-commit-id: b6b225be3a9dd654c8f375b9f521950fa898969c
Former-commit-id: 3ec1e3134579e4c3204acd14e4e8a37adbc2d686
2020-10-19 15:54:54 -07:00
Michel Heily 1ca261e5c7 core: Get rid of that BoxedMemory nonsense
Just directly impl Bus trait for Box<[u8]>


Former-commit-id: 7b8a29972520afb7ff197708b9c2146b293a5f29
Former-commit-id: 0c528165ed899fad14b1e25995fdfe8ae004da2a
2020-10-17 16:58:52 -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 91c3b5321a platform/android: Add menu options to capture a screenshot as the library preview image
Former-commit-id: 59d0858d93cb2681bb3e4230c44858a2fe28f208
Former-commit-id: 41b094d2f7971c3ef9e53234bd0c65e56ef99e20
2020-10-01 01:56:32 +03:00
Michel Heily d1bf01d562 platform/android: Add option to import/export save files
Also some typos and reformatting parts of the code


Former-commit-id: 0f1de44fab44a09c49d08421a3c2032123d3023b
Former-commit-id: 810b6b1bce1f7feeee7c33bec5ff16915367db17
2020-10-01 01:56:32 +03:00
Michel Heily 3c6628138c platform: Minor fixes and adjustments from previous commit
Former-commit-id: b8e8f73c8202f93e4bb2a575ee3d1b3083ddabb1
Former-commit-id: 355c634b4da8fbea1d228da8fc95e37012237bbd
2020-09-30 00:47:30 +03: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
Tibor Nagy 4050dcdf2f core: Add error handling to cartridge header parsing
Former-commit-id: 4e65ccd597bc082f259788f0870287254e852a2f
Former-commit-id: ebb62516936dc0f27dc9761aeb6bb6faa8ec58b5
2020-05-30 15:35:12 +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
Michel Heily c131e73ce1 Support controll remove/add events for SDL2 frontend
Former-commit-id: b0e97f9c9b3f0b32140f1425159088270be6a433
Former-commit-id: b158c5c4ac491561f33f71d2bcd5cf069d55b343
2020-05-23 11:45:25 +03:00
Michel Heily bccb31c142 Remove 'reqwest' dependency from sdl2 frontend
It was useless and lengthened the build time


Former-commit-id: 44b9c836d9b75142ef4bdb3602ede3f87b03f08f
Former-commit-id: 4c737704103654673366a7a83bf9b7614df40416
2020-05-21 23:18:20 +03:00
Michel Heily e1ec96f9e4 Use elf-support feature in sdl2 frontend
Former-commit-id: 70d1718ae5a18b8ffe7d03fd2a251479224a41ac
Former-commit-id: 54ec2c969dca62644b28bd936e2a03b3786efc52
2020-05-21 23:18:20 +03:00
Michel Heily 8e1ba1117c core: More RTC work
Former-commit-id: be2955b08d65c547d206d637ae499dbad892a87a
Former-commit-id: 19f0e4e6f9c598c35fb8172d93a1519f921eb27f
2020-05-21 23:18:20 +03:00
Tibor Nagy 6161892237 sdl2: Only import things under Windows in build.rs
To suppress unused import warnings under Linux.

Former-commit-id: 8730aa1d753861e5179f85ee9c95c66ad0dd62bd
Former-commit-id: 505dc43254fa109cd96feee8de5f6d8e2d30abf3
2020-05-15 16:25:27 +03:00
Michel Heily be36345849 Add experimental RetroArch Core
Former-commit-id: 5d6bd10c6e9214f5980eddf86ed92d35c0e9ea93
Former-commit-id: 2ad4828ecbb3de7924f6103b106c7ec06c7822cc
2020-05-15 13:25:12 +03:00
Tibor Nagy 7646c2d6de sdl2: Clear Sdl2Video canvas before drawing onto it
Resizing the window could leave artifacts from the previous frame on
the canvas that is not overwritten by the self.canvas.copy(...) call.


Former-commit-id: c5479c3e9346a25f2d5e7a7f7b8198a71d16e16a
Former-commit-id: a2cc07de426ed1eca5437e30f4a15278065d856c
2020-05-13 22:17:44 +03:00
Tibor Nagy b980c7aa7d sdl2: Add window icon
Former-commit-id: 920d73c22836099234db2c1fe096f2d4268174e0
Former-commit-id: e2d6902830e3887255e0d816c056f199f1dc453b
2020-05-13 22:17:44 +03:00
Tibor Nagy bdf99282da sdl2: Window needs to be redrawn when restoring it from the taskbar
Fixes regression introduced by d0c525d80c3a09680cb9dfa056030db3ac6b7ce3 [formerly fc575f9f12e3782aa08f13aebdadbac50e98b2c5] [formerly fe172bedc6bf70b1022f419986585981bc9f3642]


Former-commit-id: 0f4c3ef3c12f794429ca9f498ca7314835375cc4
Former-commit-id: 9a8e5eb676e3e307af8cd5982d4d50204418c34d
2020-05-13 22:17:44 +03:00
Michel Heily 13c3e74973 sdl2: Allow toggling frame limiter with right stick
Former-commit-id: 1207b84dbd6162986e5ce790e13e1e2c0b125ebf
Former-commit-id: c7fe6ef3e5ec66fc63e5193e294bfb9d7f469afe
2020-05-12 08:09:33 +03:00
Tibor Nagy 0ae9ef14c3 Fix busy waiting in wait_for_rom() by using a blocking event iterator
Also move the redraw code into a closure to be able to call it from
two places. By the result of this waiting for ROMs no longer consumes
100% of a CPU core.


Former-commit-id: bc86ade197221eb8d357af91a3b59f4eb165adc5
Former-commit-id: 521f361872964d77b88097d7baa6a4b6b713224e
2020-05-12 08:07:13 +03:00
Michel Heily 10bed1087a Add analogue stick support for controllers in SDL2
Former-commit-id: b3ccff53ded59930a0fe997f1bbbf83fd5e356d8
Former-commit-id: c3c286d1fccf6d9fc5478cd9f6b13d6a7d670b4b
2020-05-11 20:26:26 +03:00
Tibor Nagy 59111ee062 Implement controller support for the SDL2 frontend
Former-commit-id: 60c49c399631cda7ff069e47718544ffdc93f9b8
Former-commit-id: abe52243473054ba8042a5874cefcdcfa504974a
2020-05-11 20:26:11 +03:00
Tibor Nagy b2928de614 Use positional keyboard mapping instead of symbolic in the SDL2 frontend
Former-commit-id: 778b79f4afd5d290399e518f9b1a45470c5ad3a9
Former-commit-id: 58b2e0dd75acbe01fe0f4e73c0fa73af8caa88c2
2020-05-04 21:23:33 +03:00
Michel Heily 27a7cb14cf Prettify sdl2 main loop
Former-commit-id: dc925873f8a27bc8f50392659fad3cb07adde82e
Former-commit-id: 50ca19536687bd058c906168b28a86a95c6a42d5
2020-05-01 18:36:41 +03:00
Michel Heily ef3f39defc Refactor rustboyadvance-core crate directory structure
Former-commit-id: 1aad71d283f7ec5a0f0328f9b683f51e459ae56f
Former-commit-id: 42bb30d300c17bace976d106f6da1aca8c0d7643
2020-05-01 18:13:11 +03:00
Michel Heily 3ac1d57e04 Warn if not using the real bios
Also run rustfmt


Former-commit-id: 1c46b90fc6099eed5124a3bd2712883fd0f6d1d2
Former-commit-id: 1236956de08a30e4dd76aa78619290b63b4df24a
2020-05-01 17:58:15 +03:00
Michel Heily a56f515563 sdl2 UI improvements, Auto download Normmatt BIOS
Former-commit-id: 9a8bb7f68ba7638e758b01cef17654b6057b1db3
Former-commit-id: 83dc923063d75a167662474446f9fa7eb0ee836b
2020-05-01 17:56:26 +03:00