Commit graph

13 commits

Author SHA1 Message Date
Michel Heily e50f82d496 plat: sdl2: optimization: Create texture ahead of time instead per frame
Former-commit-id: b3673b49f60713474af76efbe316a30133e12dec
2020-01-11 16:12:54 +02:00
Michel Heily 467cd9728a plat: sdl2: Keep the video subsystem in the main scope
Former-commit-id: 36b7c3478f4396b7d6dc2e234a0790ae3b3eba45
2019-12-29 23:44:34 +02:00
Michel Heily 3687161b98 Make the debugger into an optional build option.
This module is written purely and always breaks when changes are being
made into the 'core' module, so as long as I don't use it, I don't feel
like maintaining it.


Former-commit-id: f5b18ba54a27d22e8a195dd0912ec9c8f29fa830
2019-12-29 23:44:34 +02:00
Michel Heily d8545dd8cd sdl2: Use callbacks with ring buffer instead of audio queue.
Better latencies, and also fast-forward (aka Turbo mode) sounds normal
this way.


Former-commit-id: d1075087e847c765a871157a7973c897575ef4d7
2019-12-28 17:03:59 +02:00
Michel Heily b026ad4ed3 Add simple resampling using cosine interpolation, seems to work~ish.
Still have clicks & delays in my audio output.


Former-commit-id: 46707fc773d8083fbba1ec614e3e0a3e53866b98
2019-12-23 01:37:45 +02:00
Michel Heily 10d0934f82 GameBoyAdvance: Use dyn traits instead of generic types
"Performance hit" is not significient


Former-commit-id: 809dea4cdbf9579d8e9d18de95b3c9a05723c68f
2019-12-23 01:37:45 +02:00
Michel Heily 398e66b723 More work. DMA sound seems to work, but sounds very crappy.
Former-commit-id: cc9f2877f9ccc1b05163af3fd35ff07efa8e3067
2019-12-23 01:37:45 +02:00
Michel Heily 38e504515b rba-sdl2: Trying spin_sleep crate
Former-commit-id: 1c6a36a1a61be3949080a8c86915235aaf25d0e5
2019-12-20 19:02:33 +02:00
Michel Heily 31eb12cb6a Add "press SPACE to turbo" to sdl2 binary, like in old-school emulators :P
Former-commit-id: 95dfddfac193ac846f179ec607a8f7c3fc0e21a4
2019-12-20 18:11:14 +02:00
Michel Heily cb630ffb8e Optimise SDL2 rendering code
Former-commit-id: 4a0e4f57a97c98bc8a930901bd1ba2125d96138b
2019-12-20 17:48:24 +02:00
Michel Heily 385016f24a Use Rc<RefCell<T>> to have the GameboyAdvance struct hold references to platform video,audio,input combo
Former-commit-id: bfe233a333790fe1bad1038bd553a3fe244e57fa
2019-12-20 15:11:26 +02:00
Michel Heily aee86d85c8 Start Sdl2AudioPlayer
Former-commit-id: 905b846d751db577bc213f1ca38a4c0e72558cfa
2019-12-20 15:11:26 +02:00
Michel Heily 04d2edfc01 Refactor "backend" concept
See plat/sdl2


Former-commit-id: 5f7c9625467003d5b73307959095eb5365db523e
2019-12-20 15:11:26 +02:00