Homebrew WIP melonDS for Switch

resetes12

Well-Known Member
Newcomer
Joined
Apr 11, 2017
Messages
82
Trophies
0
Age
25
XP
315
Country
I've seen this game have save problems with emulators on multiple occasions. After running into the issue with my own emulator, I found that it was using an uncommon save command to write its data (page program as opposed to page write, which is what most games use). I can't imagine melonDS not having this implemented though... Have you tried on the desktop version of melonDS? If it doesn't work there either, it might be worth making an issue report on GitHub.

That's interesting. I'm gonna try it out later, I will report. I will also try a new save.

where does this save file come from?

iirc it was from my old R4 Silver or something like that. As I said, it loads but it doesn't let me save again.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
719
Trophies
1
XP
3,905
Country
Germany
Yeah, but considering they were able to load the save it's safe to assume that the save type was detected correctly.
the command sets aren't completely different
So if we have issues with the file saving or the save of the game, it could be caused due to the ROM being trimmed?
no it's only a question of the save file
 
  • Like
Reactions: ShadowOne333

Hydr8gon

Dragon Trainer
OP
Developer
Joined
Dec 15, 2014
Messages
316
Trophies
1
Website
hydr8gon.github.io
XP
2,580
Country
Canada
the command sets aren't completely different

no it's only a question of the save file
I just found this issue which is relevant. Apparently the game uses a 128KB EEPROM save type, which I didn't even know existed! I guess 128KB EEPROM has a 3-byte address width, so it's actually somewhat compatible with the FLASH protocol. I guess I also misunderstood what the page program command does on FLASH. :wacko: @resetes12 if your save came from an R4, it might be in a 512KB raw format. If you can trim the file down to 128KB it should work; there's probably a save converter somewhere that can help with that.
 

resetes12

Well-Known Member
Newcomer
Joined
Apr 11, 2017
Messages
82
Trophies
0
Age
25
XP
315
Country
I just found this issue which is relevant. Apparently the game uses a 128KB EEPROM save type, which I didn't even know existed! I guess 128KB EEPROM has a 3-byte address width, so it's actually somewhat compatible with the FLASH protocol. I guess I also misunderstood what the page program command does on FLASH. :wacko: @resetes12 if your save came from an R4, it might be in a 512KB raw format. If you can trim the file down to 128KB it should work; there's probably a save converter somewhere that can help with that.


That actually worked! Using this save converter and changing R4 to RAW 128KB did the trick in both melonds on windows and Switch. Now it saves.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,177
Trophies
2
XP
33,601
Country
Mexico
That actually worked! Using this save converter and changing R4 to RAW 128KB did the trick in both melonds on windows and Switch. Now it saves.
Thanks for that link.
I'll start converting all my NDS saves from my R4 cart with it for MelonDS.
Iirc I only had troubles with a handful of games, like the Castlevanias, NSMB and a couple others.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,177
Trophies
2
XP
33,601
Country
Mexico
I just found this issue which is relevant. Apparently the game uses a 128KB EEPROM save type, which I didn't even know existed! I guess 128KB EEPROM has a 3-byte address width, so it's actually somewhat compatible with the FLASH protocol. I guess I also misunderstood what the page program command does on FLASH. :wacko: @resetes12 if your save came from an R4, it might be in a 512KB raw format. If you can trim the file down to 128KB it should work; there's probably a save converter somewhere that can help with that.
That actually worked! Using this save converter and changing R4 to RAW 128KB did the trick in both melonds on windows and Switch. Now it saves.
Sadly that didn't work for me. I noticed the original saves from the R4 were around 500KB or so in size.
The games that I'm having troubles with loading my R4 saves are:
  • Castlevania: Dawn of Sorrow
  • Castlevania: Order of Ecclesia
  • Castlevania: Portrait of Ruin
  • Kirby Super Star Ultra
  • New Super Mario Bros.
  • Resident Evil: Deadly Silence
  • Super Mario 64 DS
This is the R4 flashcart I was using for the games:
images
 

Hydr8gon

Dragon Trainer
OP
Developer
Joined
Dec 15, 2014
Messages
316
Trophies
1
Website
hydr8gon.github.io
XP
2,580
Country
Canada
Sadly that didn't work for me. I noticed the original saves from the R4 were around 500KB or so in size.
The games that I'm having troubles with loading my R4 saves are:
  • Castlevania: Dawn of Sorrow
  • Castlevania: Order of Ecclesia
  • Castlevania: Portrait of Ruin
  • Kirby Super Star Ultra
  • New Super Mario Bros.
  • Resident Evil: Deadly Silence
  • Super Mario 64 DS
You'll have to convert them to the correct file sizes. 128KB EEPROM is rare, so those games probably don't use it. I know that New Super Mario Bros. and Super Mario 64 DS both use 8KB EEPROM, but for the others you'll have to check by making a new save with melonDS and seeing what size the resulting file is.
 
  • Like
Reactions: ShadowOne333

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,177
Trophies
2
XP
33,601
Country
Mexico
You'll have to convert them to the correct file sizes. 128KB EEPROM is rare, so those games probably don't use it. I know that New Super Mario Bros. and Super Mario 64 DS both use 8KB EEPROM, but for the others you'll have to check by making a new save with melonDS and seeing what size the resulting file is.
Interesting.
Here are my findings so far:
  • Castlevania: Dawn of Sorrow - 8kB
  • Castlevania: Order of Ecclesia - 8kB
  • Castlevania: Portrait of Ruin - 64kB
  • Kirby Super Star Ultra - 64kB
  • New Super Mario Bros. - 8kB
  • Resident Evil: Deadly Silence - 8kB
  • Super Mario 64 DS - 8kB
I'll try converting the saves again tomorrow and see if melonDS recognizes them then
 
Last edited by ShadowOne333,

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,177
Trophies
2
XP
33,601
Country
Mexico
You'll have to convert them to the correct file sizes. 128KB EEPROM is rare, so those games probably don't use it. I know that New Super Mario Bros. and Super Mario 64 DS both use 8KB EEPROM, but for the others you'll have to check by making a new save with melonDS and seeing what size the resulting file is.
Interesting.
Here are my findings so far:
  • Castlevania: Dawn of Sorrow - 8kB
  • Castlevania: Order of Ecclesia - 8kB
  • Castlevania: Portrait of Ruin - 64kB
  • Kirby Super Star Ultra - 64kB
  • New Super Mario Bros. - 8kB
  • Resident Evil: Deadly Silence - 8kB
  • Super Mario 64 DS - 8kB
I'll try converting the saves again tomorrow and see if melonDS recognizes them then
Can confirm that this indeed worked out great!
I converted all the files that were not working with melonDS using the NDS Save Converter to the appropriate sizes I listed yesterday, and they worked without any issues after converting them :)

I'll upload the converter here in case anyone needs it.
Thanks for the help!

Also, would it be possible to implement a way for melonDS to automatically convert whatever save file size it detects for a game into the correct size, and load it up accordingly once it converts it?
 

Attachments

  • NDSSaveConverter.zip
    326.6 KB · Views: 189

LonksManager

New Member
Newbie
Joined
Apr 30, 2020
Messages
2
Trophies
0
Age
22
XP
52
Country
Germany
Could someone tell me how to change the emulator's console region? I read something about booting in bios, but that doesn't seem to work really. Using the latest alpha version.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
719
Trophies
1
XP
3,905
Country
Germany
Also, would it be possible to implement a way for melonDS to automatically convert whatever save file size it detects for a game into the correct size, and load it up accordingly once it converts it?
The reason this behaviour was choosen was as a workaround if the saveformat database has a false entry or a romhack changes the save format. Though this caused a lot of confusion, we're thinking of a better solution for this.

Could someone tell me how to change the emulator's console region? I read something about booting in bios, but that doesn't seem to work really. Using the latest alpha version.
the DS consoles are region free. Uncheck boot directly and start a game, then the firmware menu starts where you can change the language.
 
  • Like
Reactions: ShadowOne333

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,177
Trophies
2
XP
33,601
Country
Mexico
The reason this behaviour was choosen was as a workaround if the saveformat database has a false entry or a romhack changes the save format. Though this caused a lot of confusion, we're thinking of a better solution for this.
Oh I see.
Really interesting, can't wait to see what method you guys settle as a solution :)
 

LonksManager

New Member
Newbie
Joined
Apr 30, 2020
Messages
2
Trophies
0
Age
22
XP
52
Country
Germany
The reason this behaviour was choosen was as a workaround if the saveformat database has a false entry or a romhack changes the save format. Though this caused a lot of confusion, we're thinking of a better solution for this.


the DS consoles are region free. Uncheck boot directly and start a game, then the firmware menu starts where you can change the language.
I already did that, but i saw no firmware menu where i could change the language. The only thing it did was freezing my game until i pressed reset.

--------------------- MERGED ---------------------------

I already did that, but i saw no firmware menu where i could change the language. The only thing it did was freezing my game until i pressed reset.
Nevermind, i figured it out, something was wrong with my firmware.bin file. Thanks for helping:).
 

The Official GMan

Well-Known Member
Newcomer
Joined
Jan 16, 2016
Messages
48
Trophies
0
XP
339
Country
United States
Not sure if this is the right place to go. I’m having trouble building melonds generic-jit on the switch under l4t ubuntu. Compilation has errors when it reaches ARM_InstrInfo
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: i like the dlc tbh, i'd like a new game more