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

Pitfall 2 not working #661

Closed
sa666666 opened this issue Jun 10, 2020 · 4 comments
Closed

Pitfall 2 not working #661

sa666666 opened this issue Jun 10, 2020 · 4 comments
Assignees
Labels
Milestone

Comments

@sa666666
Copy link
Member

Pitfall 2 stopped working in the latest release. Original report at https://atariage.com/forums/topic/307760-stella-62-released/page/2/?tab=comments#comment-4560509.

@sa666666 sa666666 added the bug label Jun 10, 2020
@sa666666 sa666666 added this to the Prio 1 milestone Jun 10, 2020
@sa666666
Copy link
Member Author

@thrust26, since DPC inherits from F8 (and eventually CartEnhanced), I would guess this is related to the recent cart refactoring.

@sa666666
Copy link
Member Author

OK, bug found. I'm going to refactor some more, to stop these issues from happening again.

@thrust26
Copy link
Member

@sa666666 What exactly was the problem? I suppose it was related to the last minute rounding issue?

@sa666666
Copy link
Member Author

Well, it was related to a last-minute issue, but not the rounding one. It was my fault 😞 I added code to pass in the desired bankswitch size. However, we ran into the issue of 3E and 3E+ having different sizing requirements. So I added a delegating c'tor to 3E. However, the real issue was with inheritance, and a base class and derived class having different desired sizes. 3E/3E+ was only one instance. I missed F8/DPC, and upon further inspection FA/FA2 as well.

My new solution is to pass in the desired size for all cart classes that eventually inherit from CartEnhanced. I made it a default parameter, so that the rest of the code isn't affected. But it also solves this problem for good, since each derived class is now responsible for passing in its desired size.

So long story short; F8 defaulted to 8_KB size, but DPC inherited from it and needed 10_KB. But the 10_KB wasn't being passed to the base class, so the image was essentially truncated. In fact, it's a wonder it worked at all, since there was a pointer to memory we didn't even have??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants