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

Error when creating any NDS cheats #3535

Open
webbedspace opened this issue Jan 24, 2023 · 5 comments
Open

Error when creating any NDS cheats #3535

webbedspace opened this issue Jan 24, 2023 · 5 comments
Labels
Core: melonDS Nintendo DS core Repro: Affects 2.8 Reproducible bug Should only be added to issues with a `Repro: Affects` label.

Comments

@webbedspace
Copy link

webbedspace commented Jan 24, 2023

An error is preventing me from creating any Nintendo DS cheats.

Repro

  1. Load Nintendo DS rom
  2. open Cheats
  3. Add a name to the blank cheat box, leaving Address and Value as is, and press Add

Output

System.NullReferenceException: Object reference not set to an instance of an object.
   at BizHawk.Client.EmuHawk.CheatEdit.GetCheat()
   at BizHawk.Client.EmuHawk.Cheats.AddCheat()
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Host env.

BizHawk dev build at b11bb4f; Win10;

@YoshiRulz
Copy link
Member

YoshiRulz commented Jan 24, 2023

Did this work in 2.8? And is it also broken with other cores? Based on the stacktrace I'd expect it to be.

@YoshiRulz YoshiRulz added App: EmuHawk Relating to EmuHawk frontend Repro: Affects 2.9 dev labels Jan 24, 2023
@webbedspace
Copy link
Author

No, doesn't work in 2.8.

@webbedspace
Copy link
Author

OK, the cheat entry works with at least the SNES cores, so I believe it's NDS specific.

@webbedspace webbedspace changed the title MelonDS: Error when creating any NDS cheats Error when creating any NDS cheats Jan 24, 2023
@YoshiRulz YoshiRulz added the Core: melonDS Nintendo DS core label Jan 24, 2023
@YoshiRulz YoshiRulz self-assigned this Jan 24, 2023
@YoshiRulz YoshiRulz added the Reproducible bug Should only be added to issues with a `Repro: Affects` label. label Jan 24, 2023
@YoshiRulz
Copy link
Member

YoshiRulz commented Jan 24, 2023

Invariant broken here @CasualPokePlayer. (In your defence, it wasn't documented that MainMemory/SystemBus must be in the collection.)
2023-01-25T01:49:39

((MemoryDomainList)this.AsMemoryDomains()).SystemBus = new NDSSystemBus(this.AsMemoryDomains()["ARM9 System Bus"], this.AsMemoryDomains()["ARM7 System Bus"]);

@YoshiRulz YoshiRulz removed their assignment Jan 24, 2023
@YoshiRulz YoshiRulz removed the App: EmuHawk Relating to EmuHawk frontend label Jan 24, 2023
@CasualPokePlayer
Copy link
Member

I believe this was a specific hack intended to make the debugger happy and be able to switch between ARM7 and ARM9 System Buses depending on current CPU selected for the disassembler iirc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: melonDS Nintendo DS core Repro: Affects 2.8 Reproducible bug Should only be added to issues with a `Repro: Affects` label.
Projects
None yet
Development

No branches or pull requests

3 participants