Comments (5)
It turns out that this is actually an issue with msys2 and WSL, but NOT with Cygwin. It also might be an issue with no$gba.
In the output asm file with debugging enabled, we can find an ascii line corresponding to the path where pokeemerald is built. Below is the line between WSL, msys2, and Cygwin.
- WSL:
.ascii "/mnt/c/users/user/documents/github/pokeemerald\000"
- msys2:
.ascii "/home/User/documents/github/pokeemerald\000"
- Cygwin:
.ascii "/cygdrive/c/users/user/documents/github/pokeemerald\000"
Another thing which is relevant: The line above is .ascii "src/palette.c\000"
(sample file)
no$gba is able to evaluate the path when pokeemerald is built with Cygwin, but NOT with msys2 and WSL. I modified agbcc to replace /mnt/
with /cygdrive/
, which fixed the issue on WSL. My theory as to how no$gba finds the files is that it'll concatenate the compilation path and the source file path, and look for the file of the resulting path. Somehow, no$gba is able to detect and remove /cygdrive/
. I don't know the decision process for if the file doesn't exist, but apparently it just looks for if the file is in the same directory as the elf file (weirdly enough, it doesn't look using the source file path, e.g. looking for src/palette.c
itself).
This will likely require a combination of fixing agbcc AND passing a flag within the Makefile to agbcc specifying the terminal used so that agbcc will know how to patch the compilation path.
from pokeemerald.
What about if eg. the repo is built on Linux or macOS and then transferred to no$GBA (or if no$GBA is ran under Wine)? I imagine the scenario is similar to the above, anyways, but still worth pointing out.
There's also building with MODERN=1 to take into account.
Perhaps this should be taken up with the dev of No$GBA in my opinion.
from pokeemerald.
What about if eg. the repo is built on Linux or macOS and then transferred to no$GBA (or if no$GBA is ran under Wine)? I imagine the scenario is similar to the above, anyways, but still worth pointing out.
Then I guess you're screwed. I'm actually not sure if no$gba even runs in Wine, and I don't know how no$gba handles filepaths in those instances.
Contacting Korth (no$gba dev) is a possibility, but I seriously doubt that he has the time and/or interest to fix it given that no$gba has far greater usability issues that haven't been fixed. Looking through the backlogs, Normmatt has mentioned that Korth is working on 3DS support so I wouldn't get my hopes up.
from pokeemerald.
Contacting Korth (no$gba dev) is a possibility, but I seriously doubt that he has the time and/or interest to fix it given that no$gba has far greater usability issues that haven't been fixed. Looking through the backlogs, Normmatt has mentioned that Korth is working on 3DS support so I wouldn't get my hopes up.
I doubt there is much to fix. A much better idea would be to ask about the behavior of the debugger, because it's clear that we don't know how it works and how it finds files.
from pokeemerald.
Are there any other debuggers that exhibit similar behavior to no$gba in terms of the source file paths?
from pokeemerald.
Related Issues (20)
- gbafix HOT 1
- No LICENSE/COPYING file. HOT 2
- PNG.h missing on Apple Silicon M1 (Installed everything under Rosetta) HOT 7
- Missing wild encounter constant usage in Match Call HOT 3
- Replace mapjson with templates passed to jsonproc HOT 2
- Issue with tools (msys2) HOT 6
- sha1 link broke HOT 1
- Convert map JSON data to C instead of asm
- Common data in gflib is hard-coded
- Help with compilation issues HOT 3
- Rename ASLR-related types
- compiling issues HOT 1
- Game stops producing sound after declaring a static char array HOT 1
- Is this legal? HOT 4
- I built the rom, but it just sounds off HOT 6
- Build.sh make not found HOT 2
- Fix ribbon bit size hardcode. HOT 1
- Pokemon Highlighting Incorrectly for Moves they Can/Can't Learn HOT 1
- Incorrect FLAG_REMATCH_* constants
- jsonproc improperly handles certain characters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokeemerald.