melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.13k stars 512 forks source link

Almost no titles boot. #752

Open ObscenityIB opened 3 years ago

ObscenityIB commented 3 years ago

Is it common for dsiware or dsi enhanced software to not run at all? both encrypted and decrypted.

image

image

image

image

image

All of the above are what I have on me to try, all of them get the below screen:

image

. . . . .

I'm surprised the 2013 event carts work, I guess they aren't DSi only, despite the generation.

image

RSDuck commented 3 years ago

did you try installing them to the NAND?

ObscenityIB commented 3 years ago

did you try installing them to the NAND?

Cant do that without at least one DSi game that can load an exploit

Half of them use the camera, which melon doesn't have.

ObscenityIB commented 3 years ago

Only DSi game that boots so far is System Flaw, but loading the game kills it immediately when it tries to load the camera. Just hangs there.

RSDuck commented 3 years ago

this is because DSi titles aren't meant to be used like a cartridge. So once the the game tries to load additional data it tries to get it from NAND or SD and fails.

Though the DSi enhanced games should work.

RSDuck commented 3 years ago

this is weird. Pokemon Black version 2 seems not to boot, but White version 2 does

ObscenityIB commented 3 years ago

Though the DSi enhanced games should work.

this is weird. Pokemon Black version 2 seems not to boot, but White version 2 does

Well for records sake, and for anyone who comes looking, here's a list.

Tested "Enhanced" cart-based games (ticked means working):

:x: Mario vs. Donkey Kong - Mini-Land Mayhem! (USA) :heavy_check_mark: Mario vs. Donkey Kong - Mini-Land Mayhem! (Europe) :x: Mario vs. Donkey Kong - Totsugeki! Mini-Land (Japan) :x: Pokemon - Black Version (USA, Europe) :x: Pokemon - White Version (USA, Europe) :x: Pokemon - Black Version 2 (USA, Europe) :x: Pokemon - Black Version 2 (USA, Europe) :heavy_check_mark: Pokemon - Version Blanche (France) :x: Pokemon - Version Blanche 2 (France) :heavy_check_mark: Pokemon - Version Noire (France) :x: Pokemon - Version Noire 2 (France) :x: Pokemon - Schwarze Edition (Germany) :x: Pokemon - Schwarze Edition 2 (Germany) :x: Pokemon - Weisse Edition (Germany) :x: Pokemon - Weisse Edition 2 (Germany) :x: Pokemon - Versione Bianca (Italy) :x: Pokemon - Versione Bianca2 (Italy) :x: Pokemon - Versione Nera (Italy) :x: Pokemon - Versione Nera 2 (Italy) :heavy_check_mark: Pocket Monsters - Black (Japan) :x: Pocket Monsters - Black 2 (Japan) (Rev 1) :x: Pokemon Plus - Nobunaga no Yabou (Japan) :heavy_check_mark: Pocket Monsters - White (Japan) :x: Pocket Monsters - Black (Korea) :x: Pocket Monsters - Black 2 (Korea) :x: Pocket Monsters - White (Korea) :x: Pokemon - Edicion Blanca (Spain) :x: Pokemon - Edicion Blanca 2 (Spain) :x: Pokemon - Edicion Negra (Spain) :x: Pokemon - Edicion Negra 2 (Spain) :x: Pokemon Conquest (USA, Australia)

ObscenityIB commented 3 years ago

crap, they can be un-ticked

thats not good

ObscenityIB commented 3 years ago

fixed the marks

RSDuck commented 3 years ago

some of them like german White edition work for me

ObscenityIB commented 3 years ago

some of them like german White edition work for me

SHA256:935F5D5DC264EC0235FFB82BC87F0A1E5E00E6AB096DF5863FCDEDB7B620E414

Same hash?

RSDuck commented 3 years ago

mine is different (2F295BDC0A1DFCD1FE54330AA77DE8F7257ECD3A080E03FCCC6E0E62EDD0176C), though I can't say how good the dump is

ghost commented 3 years ago

How can you add more games to your NAND without a DSi ? Is it even possible?

Arisotura commented 3 years ago

also, there are several bad dumps of DSi games floating around

ObscenityIB commented 3 years ago

also, there are several bad dumps of DSi games floating around

i use no-intro dumps, and if i cant find one i usually get a parasite dump

Ryunam commented 3 years ago

Could it be something related to the region lock that's enforced for DSi titles? I seem to recall back in the day that a few versions of Pokémon Black / White actually did work on some out-of-region DSi systems for some reason, while some other versions definitely didn't.

Black and White 2 definitely required a DSi of the same region to boot. I have both a European / Italian cart and a Japanese one and the latter doesn't work on my European DSi XL.

ObscenityIB commented 3 years ago

Could it be something related to the region lock that's enforced for DSi titles?

perhaps, but as I'm using US firmware, why do the USA ones not work, and only a few of the EUR ones and JPN ones do? its all over the place

v1993 commented 3 years ago

From my tests it seems that many titles work very well from NAND, including Four Swords AE that were never released on physical medium.

Curiously, booting game from external cartridge if it is also installed into NAND works too.

pitrako commented 3 years ago

I tried ninfs for mounting a modified dsi nand but even allowing writing It tells me there's no space for doing anything.

RSDuck commented 3 years ago

can you retest this with the latest commit?

Arisotura commented 3 years ago

Could it be something related to the region lock that's enforced for DSi titles? I seem to recall back in the day that a few versions of Pokémon Black / White actually did work on some out-of-region DSi systems for some reason, while some other versions definitely didn't.

Black and White 2 definitely required a DSi of the same region to boot. I have both a European / Italian cart and a Japanese one and the latter doesn't work on my European DSi XL.

melonDS has a hack to bypass region locking, so I doubt it would be that...

ObscenityIB commented 3 years ago

I have yet to go back to testing again.

I was going to dump a bios myself, and that way I can also have a few things installed to the nand already, especially when it comes to camera exploits, which is almost all of them.

ElectricGeorge commented 3 years ago

I've found after a bit of testing (20 or so) that any title, DSi enhanced or not, will not boot in DSi mode if the ROM is over 64MB in size. I only tested US roms though and I don't know why Pokemon white Japan and others are working. I can't imagine they are only 64MB

DesperateProgrammer commented 3 years ago

It fails verifying the signature of the DSi7 and DSi9 Block immediately after loading them. It happens when the file has Offset 0x1C0 to 0x1DF in the header set regardless of the size of the image.

It is either a problem with the DSi Base +0x0000 to +0x6000 (Transfered uniquely vs all other data) or checking the signature itself.

ElectricGeorge commented 3 years ago

What's strange is that it doesn't matter if the title has DSi code or not. I compared the hex dump of Pokemon Diamond and Pokemon Platinum and both have no DSi blocks and have empty extended DSi headers (thus the offsets don't apply and are 0x0). Diamond works while Platinum fails to boot, so I don't know if the offset has to do with it or this is an unrelated issue.

An issue with the signature check sounds plausible as Platinum and the DSi were released around the same time. I haven't looked into it much but Platinum might be one of the first ROMs to contain signatures. If this is the case, it would make sense. Diamond works because its in the cartridge whitelist but Platinum fails because the signature check fails. The 64 MB observation would also be a reasonable coincidence as newer ROMs tend to be bigger.

DesperateProgrammer commented 3 years ago

Can you chec the Platinum file? I have seen some defects in images of Platinum (i.e. a stray 40h byte at around Offset 190-1B0 dont remember correctly eactly. Probably one or two more errors throughout the image.

ElectricGeorge commented 3 years ago

So after some digging it turns out most of the ROMs I tested were bad, according to DAT-o-MATIC. The exception being Diamond and Pearl and a few other games. It never occurred to me to check. After finding a good image it boots. I was also able to get Pokemon Black 2 (US, Europe) (CRC32 D4427FD1) to work by finding a good image. I don't want to get too ahead of myself again but its possible that all of the ones in the above list that didn't work are bad images as well. If you need to verify your images, use datomatic.nointro.org. They have a database of known good ROM hashes and other information.

ObscenityIB commented 3 years ago

@ElectricGeorge bad? or just trimmed, i think most people get trimmed versions since its faster to download.

DesperateProgrammer commented 3 years ago

Trimmed Images (as in cutting away 0xff after the end of th data) should not result in errors, as that data is not included int the RSA signature or covered by CRC.

:edit: The suspected possible error that i had here is caught and corrected in the loading step just infront of it. Making sure the buffer of the loaded om is always a power of 2.

I think the best solution would be verifying the image (and inform the user in case of corruption) and extending the image to the correct romsize via empy (0xff) bytes.

ElectricGeorge commented 3 years ago

@ObscenityIB I don't have any trimmed images. All of the ROMs I have are full size dumps in zip archives and they all just happened to be corrupted. It actually took me 3 downloads from different sources to find a good ROM dump, so I would not be surprised if most dumps out there are bad.

@DesperateProgrammer are you suggesting a separate RSA check performed by the emulator before the firmware or cartridge boots? Sounds like a good solution to me. If I'm understanding correctly, a DS whitelist check would also need to be implemented for older games.

ObscenityIB commented 3 years ago

@ElectricGeorge well i started using romcentre and the scene decrypted dat and it shorthand tells me some of these teams just never dumped any game correctly for long periods of time, and gives me the team names that do have clean dumps.

So imma hunt for those and check them too.

So far this is my list: image

emir4169 commented 1 year ago

did you try installing them to the NAND?

Cant do that without at least one DSi game that can load an exploit

Half of them use the camera, which melon doesn't have.

i would like to introduce. the camera app and the fact that it doesnt crash melonDS when used! its just a black camera for the camera app (or what you set it to be) and theres a exploit for that