Commit graph

15 commits

Author SHA1 Message Date
Michel Heily 884f39ca8f Refactor workspace structure
Former-commit-id: d6ab90563fa209b431661086f9ec2672bda02a96
2020-04-11 16:06:34 +03:00
Michel Heily c4c8163b0e optimize/timers: Get rid of the while loop in Timer::update.
Profiling with 'perf' I discovered that too much time was spent inside
Timer::update when the prescalar was 0 (frequency of 1 cycle).
This was due to the while loop I used. I optimized this loop out and
there is an appearent performance increase.

Former-commit-id: d228450625fad003f054e3161f6eeee888245cac
2020-04-04 13:43:57 +03: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 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 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 cc4f328691 timers: Fix wrong irq number
Timers were triggering DMA interrupts, wonder why.. ><


Former-commit-id: 4fd2781a4bf71d0c0ebc1badae003d76a781ee75
2019-12-28 17:03:59 +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
Michel Heily bb08b2f48e Improve timers
Former-commit-id: 02985b13aec6ac4ce52952b9bc505e48ebbb94e6
2019-11-20 05:20:46 +02:00
Michel Heily 3a1d5c10ce Fix many bugs, refactor many things..
Passing: Armwrestler, cpu_test by Dead_Body

Former-commit-id: 80d815d110c5341515dd01c476a0d7e25ecb66a8
2019-11-09 01:06:24 +02:00
Michel Heily 441482516e Get rid of timer.rs spam
Former-commit-id: 2d2ce31ad77840e4a8685257a77f824da21992ba
2019-09-09 20:07:45 +03:00
Michel Heily 639993edd7 Add blending and mosaic SFX, and cleanup code.
Former-commit-id: b9f0ccaf1820da61f49ebeb2af5beff5cccd722f
2019-08-13 22:15:36 +03:00
Michel Heily fe071bf1ec Fix timer bugs
Former-commit-id: 9839368895dca306b66a095ab0b9386c77bd2c12
2019-08-07 09:45:10 +03:00
Michel Heily c72bbb96fd [WIP] Timers
Seems to work, but the cycle's are not accurate so they run slowly


Former-commit-id: a0b80acb4b68ed64caa535a0ec9f75a081d3aed4
2019-08-05 09:53:41 +03:00