Michel Heily
884f39ca8f
Refactor workspace structure
...
Former-commit-id: d6ab90563fa209b431661086f9ec2672bda02a96
2020-04-11 16:06:34 +03:00
Michel Heily
b333ae7f65
rustfmt
...
Former-commit-id: a73535e556d1fb44e30927f0ab1f6238a8df8739
2020-02-21 14:08:08 +02:00
Michel Heily
a585753dc2
fix: Allow writes to DirectSound FIFOs in 8bit granularity
...
This fixes audio in games that directly write to sound FIFO using STRB instructions.
Former-commit-id: 3efb686b28146c414d5fad289f958346a9a5db6e
2020-02-18 22:29:54 +02:00
Michel Heily
b03fe3567e
Fix all warnings during build
...
Ran cargo-fix to automatically fix most of the build warnings,
Cleaned up dead code, and fix the rest manually
Former-commit-id: f35faba46b40eaf9c047efb8ab1e77ffa24d41b6
2020-02-14 14:21:45 +02:00
Michel Heily
451be2036f
feat(logger): Replace various println! with logs
...
Former-commit-id: c2f38f863d65c4564f4d2169e63714a2925a4d3f
2020-01-31 16:15:29 +02:00
Michel Heily
70c19ea343
fix(sound): Fix amplitude and properly emulate sound bias level
...
Former-commit-id: 92dec2c186b9e6f34ae5ce0ee167d6f1fa7730c8
2020-01-21 01:20:28 +02:00
Michel Heily
f4460b2740
feat/savestates: Implement save/load state API for GameBoyAdvance
...
Using serde & bincode encoding
Former-commit-id: f5e4c599497f6bdf3096fa99f8b2d6ce89278ef7
2020-01-16 20:18:32 +02:00
Michel Heily
16142ee99d
core: gba: Move VideoInterface & AudioInterface to GameBoyAdvance
...
In preparation for savestates, this is needed to avoid (de)serializing Rc<RefCell>'s
Former-commit-id: c6dfe189d4f6104fc4b1b567529ec50714a2d74e
2020-01-16 19:56:05 +02:00
Michel Heily
c6feb5d500
core: Optimizing GameBoyAdvance::frame
...
Profiling GameBoyAdvance::frame shows that it spends way too much time idleing
on SoundController::update & Gpu::step waiting for the cycle count to
reach to the next event, Consuming cpu time for the Arm7tdmi core.
This commit changes the implementation of the main loop functions so
that the CPU will run as many cycles as possible and the peripherals
will only be updated when needed.
The is a performance improvement of roughly 50% in fps in some games!
Former-commit-id: 937e097f958423934c70b7face6b6b02926b7a51
2020-01-11 16:12:54 +02:00
Michel Heily
0872ff650a
sound: Comment out spamming printlns for now
...
TODO - replace when decent logging module is in place
Former-commit-id: bfcfe07a0506aa9b4f2fa4e33863afdb74f6783c
2020-01-11 16:12:54 +02:00
Michel Heily
05f1085410
core: sound: sound chip optimization
...
Compute sampling rate and cycles per cycles ahead of time
Former-commit-id: 2959cadd693ff08a69251d642583cc984c040fc2
2020-01-11 16:12:54 +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
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
fefeddbc40
Continue working on DMA sound.
...
Cleanup timer.rs
run cargo fmt
restore debugging continue&frame commands
Fix bug introduced in previous commit causing the bios animation to
hang
Former-commit-id: 188acaa1121503a97f2d3be816f6f57835e17fe1
2019-12-23 01:37:45 +02:00
Michel Heily
70cb99161d
Start working on DMA sound
...
Former-commit-id: 066210a86a7836b6ae1dfd5ce229d050cbe00ca4
2019-12-23 01:37:45 +02:00
Yonatan Goldschmidt
763ee217d8
Add WIP sound controller and backend
...
Former-commit-id: 50e5bb71a620ac138a880872ae1f13f1c0c0604c
2019-12-20 15:11:26 +02:00