blocksds / sdk

Main BlocksDS SDK repository
https://blocksds.github.io/docs/
164 stars 11 forks source link

`nocashWrite` strips newlines for melonDS and DeSMuME #203

Closed jonko0493 closed 2 months ago

jonko0493 commented 2 months ago

In commit https://github.com/blocksds/libnds/commit/cba49ffdbbe6da84f98b3688f887edcff19da453:

Every time that nocashWrite() is called, no$gba adds a newline character after the string.

It's true that no$gba does this, but melonDS and DeSMuME do not. Because the current implementation relies on no$ to auto-insert newlines, the other two emulators just get their debug messages all smashed together.

Imo, the solution here is to append a newline to the nocash buffer. In no$gba itself this will result in double newlines for each entry, but I personally think this is a fine trade off and doesn't reduce usability substantially in the way not having newlines in the other emulator consoles does.

Sample as seen in the DeSMuME console: image

AntonioND commented 2 months ago

melonDS now should do this, but you aren't building it from source, which includes this commit: https://github.com/melonDS-emu/melonDS/pull/2119

I don't agree that two newlines is fine, particularly in the console of no$gba, which isn't super nice to read...

jonko0493 commented 2 months ago

Valid and fair enough; if it's fixed upstream in melonDS I don't have an issue. Closing.

AntonioND commented 2 months ago

What I didn't know is that desmume also supports this way to print debug messages, it may be a good idea to uniformize the behaviour there as well.