Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.2.0 #102

Merged
merged 83 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
b86b940
Full screen now hides the cursor
alloncm Dec 17, 2021
55b8ffe
Basic POC for gpio joypad
alloncm Dec 17, 2021
69ae578
Add most of the gpio buttons
alloncm Jan 14, 2022
46d2f40
Fixed the gpio input
alloncm Jan 14, 2022
c900802
Better gfx error handling
alloncm Jan 15, 2022
1a59103
Some fixes to compile
alloncm Jan 15, 2022
0b73f37
Rearange the filetree, in order to add target
alloncm Jan 15, 2022
c76c68a
add
alloncm Jan 15, 2022
fc9dd2d
starting to implement linux framebuffer gfx device
alloncm Jan 15, 2022
7af4d85
Add quit with escape key
alloncm Jan 21, 2022
1aafcfe
Change the pixel format from argb to rgb
alloncm Jan 31, 2022
421d9f9
Update dependencies
alloncm Jan 31, 2022
8db5fcf
Remove traces of linuxfb
alloncm Jan 31, 2022
0697917
More refactoring
alloncm Jan 31, 2022
992b9fd
Move to cfg-if the joypad controller main code
alloncm Jan 31, 2022
0b8e9fe
Fix using in the gpio feature
alloncm Feb 26, 2022
bc4d62e
Add support for start and select gpio buttons
alloncm Mar 24, 2022
d880b47
Merge remote-tracking branch 'origin/dev' into feature/rpi_spi_lcd
alloncm Apr 22, 2022
be6cf1b
Remove the use of option in the gpio joypad
alloncm Apr 22, 2022
2b88bef
Fix the gpio feature
alloncm Apr 23, 2022
25d52fc
Merge branch 'dev' of https://GitHub.com/alloncm/MagenBoy into featur…
alloncm Apr 23, 2022
91f847d
Update the gpio button mapper
alloncm Apr 23, 2022
4ae6d16
Bump tokio from 1.12.0 to 1.16.1
dependabot[bot] Jun 6, 2022
e2643f1
Bump regex from 1.5.4 to 1.5.6
dependabot[bot] Jun 6, 2022
2cb0af2
Bump crossbeam-utils from 0.8.5 to 0.8.8
dependabot[bot] Jun 10, 2022
a35ca0a
Merge pull request #87 from alloncm/dependabot/cargo/tokio-1.16.1
alloncm Jun 10, 2022
df95e26
Merge pull request #88 from alloncm/dependabot/cargo/regex-1.5.6
alloncm Jun 10, 2022
bcbb35e
Merge pull request #92 from alloncm/dependabot/cargo/crossbeam-utils-…
alloncm Jun 10, 2022
78ee94f
Delete the old Cargo.toml in gb folder
alloncm Jun 10, 2022
d484cd3
Merge pull request #93 from alloncm/fix/remove_gblock
alloncm Jun 10, 2022
262dd45
Add experimental ili9341 gfx device
alloncm May 4, 2022
b62f764
Add blilinear scaling for the ili9341 screen
alloncm May 6, 2022
8bb38f2
Bug fixes in the ili9341 implementation
alloncm May 6, 2022
65bba8c
Add fps measurement to the ili9341 gfx device
alloncm May 7, 2022
94620bc
Add mmio spi interface
alloncm May 13, 2022
b8b3c37
Add DMA
alloncm May 20, 2022
688d079
Trying to optimize the DMA
alloncm May 28, 2022
d848c5a
Try to optimize the sacling
alloncm May 31, 2022
c73d0b6
It is running 60 fps on the rpi4.
alloncm Jun 4, 2022
d8c6564
Split the code to other modules
alloncm Jun 4, 2022
5e45a08
Now freeing the resources on exit
alloncm Jun 4, 2022
0d1c2f4
Sleeping in order to decrease the busy waiting without damaging the p…
alloncm Jun 4, 2022
d8a7400
Move the bcm to another crate
alloncm Jun 4, 2022
2bc6837
Implemented option for compact-pixel
alloncm Jun 5, 2022
67e46d2
Made dma code readble
alloncm Jun 5, 2022
a2aa8b7
Fix compilation errors
alloncm Jun 10, 2022
02a1dfe
Merge pull request #86 from alloncm/spi_controller
alloncm Jun 10, 2022
3872729
Fix the conditional compilation of the bcm_host
alloncm Jun 11, 2022
0b5fdf7
Add the new features to the README.md
alloncm Jun 11, 2022
4e98550
Add fps limiter to the ili9341 gfx device
alloncm Jun 11, 2022
a55729a
Remove exit by escape
alloncm Jun 11, 2022
1dfa466
Use cfg_if in the bcm_host lib
alloncm Jun 11, 2022
f8fc98b
Merge pull request #73 from alloncm/feature/rpi_spi_lcd
alloncm Jun 11, 2022
f9ebec2
Improve joypad_handler performace
alloncm Jun 17, 2022
b319f0b
Fix interrupts priority
alloncm Jun 17, 2022
54691c0
Improve performance of the interrupt handler
alloncm Jun 17, 2022
61e9457
Minor improve to the ppu performance
alloncm Jun 17, 2022
eefd05e
Remove the ppu lcd push buffer vector for perf
alloncm Jun 25, 2022
16253d8
Fix the gameboy programming manual link
alloncm Jun 25, 2022
5056670
Fix the mem error bug
alloncm Jun 25, 2022
ccbc014
Improve performance in the ppu state machine
alloncm Jun 25, 2022
c8b449c
The ppu mostly ticks my m_cycles and not t_cycles
alloncm Jul 8, 2022
7afbd4f
Merge pull request #95 from alloncm/fix/pull_audio_mem
alloncm Jul 8, 2022
b8654b1
Minor refactoring that may help perf
alloncm Jul 9, 2022
8bc5b9e
Remove the Option<T> in the fetchers state
alloncm Jul 9, 2022
a98b2f4
Fix some error in the t vs m cycle in the ppu
alloncm Jul 9, 2022
4330d06
Add a cycles to wait for the PixelTransfer state
alloncm Jul 9, 2022
817094c
Add fill fucntion to the fifo
alloncm Jul 15, 2022
4dd41dd
Merge pull request #94 from alloncm/optimize
alloncm Jul 15, 2022
278e73c
Fix some bugs causing the program to panic
alloncm Aug 13, 2022
cbdd53c
Fix bug - window wasnt offsetted by `wx % 8 != 0`
alloncm Aug 13, 2022
60603d5
Fix memory corruption bugs
alloncm Aug 20, 2022
b0d3d54
Merge pull request #99 from alloncm/fix/window_crashes
alloncm Aug 29, 2022
48f68b4
Improve the PPU accuracy
alloncm Sep 17, 2022
2362e4e
Add some of mooneye tests to the integration tests
alloncm Sep 17, 2022
76a76f9
Add more resources and tests to the README
alloncm Sep 17, 2022
d4cd240
Merge pull request #101 from alloncm/fix/fifo_accuracy
alloncm Sep 17, 2022
c492f59
Improve RPI detection in bcm host lib
alloncm Sep 26, 2022
f4139f1
Add apu and sdl features and graceful exit on rpi
alloncm Sep 26, 2022
ab42753
Fix dma and mmio and gracefull shutdown
alloncm Sep 26, 2022
05305ee
Add RPI docs to the readme
alloncm Sep 26, 2022
af4c768
Merge pull request #96 from alloncm/feature/zero
alloncm Sep 26, 2022
981bf77
Up versions to 2.2.0
alloncm Sep 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor improve to the ppu performance
  • Loading branch information
alloncm committed Jun 17, 2022
commit 61e94570b18e51cb2b1b9ad5542507d2cbb717eb
34 changes: 32 additions & 2 deletions lib_gb/benches/lib_gb_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use lib_gb::{apu::{
audio_device::*, channel::Channel,
gb_apu::*, sound_terminal::SoundTerminal,
square_sample_producer::SquareSampleProducer
}, keypad::{joypad::Joypad, joypad_provider::JoypadProvider, joypad_handler::JoypadHandler}, mmu::interrupts_handler::InterruptsHandler};
}, keypad::{joypad::Joypad, joypad_provider::JoypadProvider, joypad_handler::JoypadHandler}, mmu::interrupts_handler::InterruptsHandler, ppu::{gb_ppu::GbPpu, gfx_device::GfxDevice}};

pub fn criterion_bench(c: &mut Criterion){
struct StubApu;
Expand Down Expand Up @@ -103,5 +103,35 @@ pub fn mmu_interrupt_handler_early(c:&mut Criterion){
irh.handle_interrupts(false, 0);
}));
}
criterion_group!(benches, criterion_bench, apu_sweep_tone_channel, apu_sound_terminal, keypad_joypad_handler, mmu_interrupt_handler_irq, mmu_interrupt_handler_unhalt, mmu_interrupt_handler_early);

pub fn ppu_gb_ppu(c:&mut Criterion){
struct StubGfxDevice;
impl GfxDevice for StubGfxDevice{
fn swap_buffer(&mut self, _:&[lib_gb::ppu::gfx_device::Pixel; lib_gb::ppu::gb_ppu::SCREEN_HEIGHT * lib_gb::ppu::gb_ppu::SCREEN_WIDTH]) {}
}

let mut ppu = GbPpu::new(StubGfxDevice{});
ppu.lcd_control = 0xFF;
ppu.stat_register = 0b111_1000;
for i in 0..4{
let y = 16 * (i + 1);
for j in 0..10{
let x = 8 * (j + 1);
ppu.oam[(i*j)] = y as u8;
ppu.oam[(i*j) + 1] = x as u8;
ppu.oam[(i*j) + 2] = 0;
ppu.oam[(i*j) + 3] = 0b111_0000;

}
}

c.bench_function("Ppu", |b|b.iter(||{
let mut if_register = 0;
for _ in 0..100{
ppu.cycle(10, &mut if_register);
}
}));

}
criterion_group!(benches, criterion_bench, apu_sweep_tone_channel, apu_sound_terminal, keypad_joypad_handler, mmu_interrupt_handler_irq, mmu_interrupt_handler_unhalt, mmu_interrupt_handler_early, ppu_gb_ppu);
criterion_main!(benches);
1 change: 1 addition & 0 deletions lib_gb/src/ppu/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl PartialEq for Color{
}

impl From<Color> for Pixel{
#[inline]
fn from(color: Color) -> Self {
#[cfg(not(feature = "u16pixel"))]
{
Expand Down