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

CPU dropdown gets huge on "8MHz RAM" models (A3000 or lesser) - only #41

Open
IJeffray opened this issue Jan 19, 2024 · 3 comments
Open

Comments

@IJeffray
Copy link
Contributor

image

For A3000 or 'lesser' models, selecting a CPU type causes the box to embiggen and stay that way until the window is closed.

Repeated with Arculator 2.2 on Windows 10.

@Sophira
Copy link
Contributor

Sophira commented Jan 19, 2024

I've been able to also reproduce this on Windows 10 with Arculator 2.2. It does not occur on Linux with Arculator 2.2, or on Arculator 2.1 on either OS.

Steps I used to reproduce:

  1. Start Arculator.
  2. Create a machine, name it "Test" (probably doesn't matter).
  3. Choose "Archimedes 440/1", click OK.
  4. Click on the CPU dropdown, and select anything other than "ARM2" (the default).
  5. The CPU dropdown gets huge, as per the image in the original post.

Notably, this does not happen if you just use the keyboard to select a CPU by tabbing to the dropdown and using the up/down keys to select a CPU; you have to actually expand the dropdown to show all the choices. (Though using the keyboard to select a choice after expanding it will still trigger the glitch.)

@Sophira
Copy link
Contributor

Sophira commented Jan 21, 2024

So I've been spending some time bisecting this - which took longer than expected as many of the commits I needed to test did not build under Windows and I had to search out the correct patches from the rest of the code, so apologies for the delay! But with these problems patched out, it turns out that the problem first started appearing in commit 10bb3bb, which added options for more overclocked ARM3s.

As far as I can tell, though, all this commit seems to do is just that - add more options! Which likely means that the problem was actually always there and it just didn't manifest itself when there weren't as many options in the CPU dropdown.

For anybody who wants to try to debug this further, the patches I needed to apply in order to get this commit to compile and run on Windows (using autotools, since I don't know what the other method of compiling at the time would have been) were:

  • aa1ee20: ui: Add stdint.h to wx-hd_new.cc and wx-joystick-config.cc
  • 93d9128: build: Add Windows support to Makefile.am
  • 85e0735: build: Fix podules on Windows when building with autotools (note: There will be a conflict when applying this as the commit touches files which didn't exist at the time of the ARM3 expansion commit; if using git cherry-pick, simply git rm the conflicting files and do git cherry-pick --continue to proceed)
  • d3c565b: build: Install arculator.exe on Windows when using autotools
  • 2af6c93: build: Fix autotools makefiles for AKA10 and Morley User/Analogue Port podules
  • 9dc8921: Auto-generate missing morley_uap Makefile
  • 6b3420d: win: 64-bit _findfirst fixes (note: applying this commit will also result in conflicts, but this time you need to edit the files yourself. Simply make sure that both affected files use the new commit's code.)

@Sophira
Copy link
Contributor

Sophira commented Jan 22, 2024

I've been looking further into this. The problem seems to specifically occur on the ninth cbox->Append call (src/wx-config.cc:637). If I change the for loop to go to nr_elems(cpu_names) - 1 instead, the problem doesn't occur - but then of course the last choice doesn't show up, either.

This makes it very clear as to why the problem only occurs with some machine types - the newer machines don't have an "ARM2" option available, so there's one less option in the CPU dropdown. Since the issue only seems to occur on the ninth Append call, it turns out this is enough to stop the problem from occurring when configuring those machines.

While I haven't yet managed to solve this issue, I did stumble into another bug while attempting to debug this further. (Which I had actually already fixed a while ago locally while working on #26 but hadn't yet submitted into a non-draft pull request.) It seems that wx-resources.cc is not regenerated on compile due to a typo in the Makefile.am file. I'll make a pull request [edit: #42] that fixes the typo and removes wx-resources.cc from the distribution, but unfortunately it doesn't automatically fix this bug like I was hoping it would do.

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

No branches or pull requests

2 participants