Previously I did not account for gamepak 32-bit accesses being two 16bit (NSEQ+SEQ or SEQ+SEQ) accesses,
This resulted in less cycles being accounted for, resulting in more wasted CPU cycles per frame and was a huge performance hit.
I re-implemented this with look-up-tables also to speed up the cycle
count routing `SysBus::get_cycles` and also account for 32bit gamepak memory access.
Former-commit-id: fe6a9a570c843d40e38971a2a36e6511df1b8894
I should really pay more attention to the docs..
The previous fix (bb843ea5) was not enough as it caused vblank,hblank
and vcount-match flags to be overwritten when they really should have
just been ignored.
This caused Dragon Ball - Advance Adevnture to fail booting
Former-commit-id: 1810e32692a0abd79f2df385c7c822debf186c79
For some reason, probably typing mistkae, I `or`ed the value being written to DISPSTAT,
causing bits to never actually turn off, affectivly making HBLANK/VBLANK
interrupts linger forever.
This probably has caused some nasty glitches that I don't even know of, but two confirm issues solved
by this are Mariokart and Pacman.
This commit fixes#14 and #13
Former-commit-id: 72ad6efcb9e8f6b582d9279c5daab2603d5a408e
Ran cargo-fix to automatically fix most of the build warnings,
Cleaned up dead code, and fix the rest manually
Former-commit-id: f35faba46b40eaf9c047efb8ab1e77ffa24d41b6
Displaying sbb_aff.gba and rsbin demos correctly.
Problems in mode7:
* Incorrect first scanline in m7_demo.gba
* Mariokart scaling is off
Former-commit-id: 27655a7a3cde0e9cdabd727a6ec9c99270a99b35
1) Decouple SysBus from Gpu
2) Split Gpu rendering function into separate modules
3) Cleanup
Former-commit-id: 0435ad1c9c1de72ed50769fabfea7c5f33b670e0
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
This commit removed the dummy iomem buffer, and the bios busy waits on
REG_SOUNDBIAS in order to proceed.
Former-commit-id: 1fb8e2b621bed22da55781adcaae748aaaf845b9
I have fought very hard against the rust ownership model,
In the end for DMA to play nice with my code, I had to resort to use
unsafe code for now..
The DMA implementation itself is not accurate to say the least, but will
have to do for now.
Tonc's dma_demo.gba plays but with a visual glitch.
Former-commit-id: 3b9cdcb2d09c78701290f2c48b77f9f3487e85c9