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

Fix/window crashes #99

Merged
merged 3 commits into from
Aug 29, 2022
Merged

Fix/window crashes #99

merged 3 commits into from
Aug 29, 2022

Conversation

alloncm
Copy link
Owner

@alloncm alloncm commented Aug 13, 2022

No description provided.

mbc1 - casting to u16 when the program length
in mbc1 carts can be greater than u16.
read or write to the ram
when there is not ram read or writes are ignored
Add support for ignoring and not crashing

gb_ppu - when calculating the next ppu state
change did not count the vblank state when the
counter get greater than 114 m_cycles.
Now Im using modolu of 114 on the cycles to handle this

sprite_fetcher - a bug where the flipx calculation
was off by the amount of pixels needs to skip
causing panic.
It seems to be unecessary so I reomved it.
@alloncm alloncm force-pushed the fix/window_crashes branch from 77a5fe8 to cbdd53c Compare August 13, 2022 17:02
Fixed 2 bugs:
sdl_pull_audio_device - aside from naming, fixed a bug
where memseting outside of bounds cause heap corruption

fixed_size_queue - aside from naming, fixed a bug
where index and index_mut caused accessing memory outside of bounds.
Funny thing is that when allocating with vec![] and with with_capacity,
the corruption did not happen, my guess is that since
vec![] macro simply allocates a bigger buffer and the
out of bounds writes did not corrupt anything.
@alloncm
Copy link
Owner Author

alloncm commented Aug 29, 2022

https://mgba-emu.github.io/gbdoc/ a good docs about the ppu

@alloncm alloncm force-pushed the fix/window_crashes branch from ebf5559 to 60603d5 Compare August 29, 2022 19:27
@alloncm alloncm merged commit b0d3d54 into dev Aug 29, 2022
@alloncm alloncm deleted the fix/window_crashes branch August 29, 2022 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant