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(cart): made destructor virtual to be overridden by subclasses #39

Merged
merged 10 commits into from
Dec 1, 2023

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Nov 27, 2023

Description

  • Fixed Cart base class so that destructor is virtual and can be overridden by derived classes and derived destructors will be properly called (so that memory will not be leaked)
  • Updated how emulators are selected / configured (in cmakelists) and use selected emulator config in cart subclasses for clarity
  • Updated readme for new roadmap of emulators to port
  • Removed invalid config settings from sdkconfig.defaults
  • Added rom info enums for other systems
  • Cleaned up gameboy code to make static everything that can be
  • Cleaned up nes code to move FPS counting to nes.cpp and remove old timeofday based code from the nes implementation so that they are both consistent and measure the same way
  • Fixed nes code to not re-emulate after loading a save state until the next time the emulation is run. Removes chance of screen showing and decreases load time for it.
  • Updated sdkconfig defaults to better control memory / allocaiton

Motivation and Context

We need to make sure the destructor is called for the carts to ensure the emulation state is properly cleaned up between runs of the emulators.

We also would like an easy way of configuring emulators and such which still shows the carts available and compiles but which doesn't compile in the emulator code (in the case that it's not possible to have all for FLASH / RAM reasons).

How has this been tested?

Building and running on ESP32-S3-BOX

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Fixed Cart base class so that destructor is virtual and can be overridden by derived classes and derived destructors will be properly called (so that memory will not be leaked)
* Updated how emulators are selected / configured (in cmakelists) and use selected emulator config in cart subclasses for clarity
* Updated readme for new roadmap of emulators to port
* Removed invalid config settings from sdkconfig.defaults
* Added rom info enums for other systems
* Cleaned up gameboy code to make static everything that can be
* Cleaned up nes code to move FPS counting to nes.cpp and remove old timeofday based code from the nes implementation so that they are both consistent and measure the same way
* Fixed nes code to not re-emulate after loading a save state until the next time the emulation is run. Removes chance of screen showing and decreases load time for it.
* Updated sdkconfig defaults to better control memory / allocaiton
@finger563 finger563 changed the title fix(cart): made destructor virtual to be overrided by subclasses fix(cart): made destructor virtual to be overridden by subclasses Nov 28, 2023
…ines and remove the no longer necessary sleeps when changing from lvgl to rom
* Make transfer callbacks IRAM_ATTR
* Make lcd_write function use queued transactions instead of polling transactions so that all lcd comms is using the same mechanisms
* Change the max transfer size to be more representative of what is actually being sent
@finger563 finger563 merged commit 7fcd95b into main Dec 1, 2023
@finger563 finger563 deleted the fix/cart-destructor branch December 1, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant