TASEmulators / TASEmulators/desmume

some AR codes thrash the JIT and maybe the JIT breaks on SMC

Open
#69 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug jit
Dominant language
C++
Stars
3.6k
Forks
646
PR merge metrics
No merged PRs in 30d

Description

http://forums.desmume.org/viewtopic.php?id=11013

MKDS (US)
02072720 E3A0045F
02039988 EAFF1D88
E2000FB0 00000030
E92D0600 E59F9018
E59FA018 E589A000
E2899E0C E59FA010
E589A008 E8BD0600
E12FFF1E 01FFAE98
E350045F C3A0E45F

This code causes the JIT to reset each frame, since it's fighting with the game. Ideally only the affected jit blocks would be reset, but I only know how to reset the entire JIT.

I TRIED to reset only the affected blocks, but it didnt work; so maybe all self-modifying code is actually broken? Or maybe I did it wrong.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked forum report and trace the JIT invalidation path for the supplied MKDS AR codes. Investigate whether resetting only affected JIT blocks works and whether self-modifying code is handled correctly. Done means the codes no longer reset the entire JIT every frame and affected code continues to execute correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.