Nds-bootstrap: Semicolon in ROM name causes a failure to load

Created on 19 Aug 2019  路  13Comments  路  Source: DS-Homebrew/nds-bootstrap

Your console

Tell us which console you are using:

  • [ ] DS Phat/Lite
  • [ ] DSi (XL)
  • [ ] Old 3DS/2DS (XL)
  • [x] New 3DS/2DS (XL)

CFW and configuration

Tell us which CFW do you have:

3DS/2DS:

  • [x] Luma3DS
  • [ ] Rei-Six
  • [ ] Other/Older CFW [specify]

nds-bootstrap version

Tell us which versions you are using:

  • [x] Release v0.22.0
  • [ ] Nightly _[insert here commit hash]_

Your device

Tell us which card you are using:

  • [x] SD Card
  • [ ] (Slot-1) Flashcard

Expected behaviour

Guess.

Actual behaviour

The game fails to load, resulting in a black top screen and white bottom screen.

Steps to reproduce

  1. Put a semicolon in the filename of a ROM
  2. Load that ROM in nds-bootstrap
Bug

All 13 comments

The game may not be patched. Say, I try to load Kirby Mass Atttack without being patched and I get the same result. That, or the semicolon, depending if the same game never had the problem before.

When testing I tried the exact same ROM with and without a semicolon. It runs fine without a semicolon in the filename.

I think this is actually related to the way we read ini data. In ini format, a semicolon is a comment, so it stops reading the file name. I was actually going to rewrite my ini library at some point but I鈥檓 on a vacation right now, but I鈥檒l add support for quoted strings which should fix this.

@arraystock Just out of curiosity, why did you pick .ini files over .conf, .txt or even .json ones? Apart from the latter, they're roughly the same, as far as I can tell.

Actually, they are all different from each other, JSON being the most different. Ini is a very simple format that I figured would be the easiest to implement, and I never really thought about conf, but that would also be more complex than what we need. With ini, you only have sections and data keys within those sections, which is all you really need for something like nds-bootstrap.

Also, I originally wrote my ini library as an exercise in improving my programming skills, and thought it would be fun to see if it would work with nds-bootstrap ;)

So I was going to rewrite my library in C++, which afaik isn鈥檛 supported on non-3ds modes, and changing it to use quoted inputs would be a hassle because then TWiLight would need to write the nds-bootstrap.ini using quoted strings, so the easiest method would be to disable comments support, which really should be fine considering 99% of the time nds-bootstrap.ini is generated by TWiLight and won鈥檛 have comments in it anyways.

@arraystock Sounds like I forgot a part of my comment, heh. I know how .json is a key:value format, and I think it might be more dependable than a .ini or .conf, since its format is always the same.

Apparently, there's no standard among .conf files: I'm not sure whether you're familiar with *nix utilities, but it seems that many of them roll their own configuration format, and simply dump it in a plaintext .conf file.

That said, how about developing a .json lib as a side project that can be used here, if you have time and curiosity to spare?

Yeah, I suppose I could give it a shot.

@arraystock Why not port easykey to TWiLightMenu++?

The disable comment solution is fine for me, we have no use for them. Thanks for your fix @arraystock.

Commit has been reverted, due to it making every game not boot.

Not sure how tough this would be to do or not, but I propose we allow comments in the ini, but ONLY if a line starts with a ; instead of if it contains it?

@dubbz82 That shouldn鈥檛 be hard at all.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomudo picture tomudo  路  3Comments

gingerbeardman picture gingerbeardman  路  7Comments

Kalanyr picture Kalanyr  路  4Comments

irod14 picture irod14  路  3Comments

wad11656 picture wad11656  路  10Comments