Tuesday, February 28, 2017

--load-type=1

It seems like I finally figured out why I had so much trouble with desmume on my new Linux. It's nice from desmume developers to warn me that DLDI would not work. Maybe it would have been nicer if using --cflash-path had automatically modified the load-type so that the tryPatch wouldn't segv while trying to operate on a NULL pointer...

Now, I'm ready to resume checking whether my mode-switching code is worth a push.


Bien ... il suffisait donc d'ajouter --load-type=1 sur la ligne de commande pour pouvoir utiliser l'émulation de carte mémoire avec desmume. Je suppose que j'aurais dû pouvoir le trouver sans faire de back-tracking à partir d'un émulateur en train de planter, mais c'est mon côté guru: plus à l'aise dans les sources que dans la doc.

1 comment:

patchME said...

--- src/commandline.cpp 2015-02-14 16:05:26.000000000 +0100
+++ /home/pype/DS/desmume64/desmume-0.9.11/src/commandline.cpp 2017-02-28 23:46:22.222819821 +0100
@@ -156,10 +156,18 @@
if(_load_to_memory != -1) CommonSettings.loadToMemory = (_load_to_memory == 1)?true:false;
if(_play_movie_file) play_movie_file = _play_movie_file;
if(_record_movie_file) record_movie_file = _record_movie_file;
- if(_cflash_image) cflash_image = _cflash_image;
- if(_cflash_path) cflash_path = _cflash_path;
- if(_gbaslot_rom) gbaslot_rom = _gbaslot_rom;
-
+ if(_cflash_image) {
+ cflash_image = _cflash_image;
+ CommonSettings.loadToMemory = 1;
+ }
+ if(_cflash_path) {
+ cflash_path = _cflash_path;
+ CommonSettings.loadToMemory = 1;
+ }
+ if(_gbaslot_rom) {
+ gbaslot_rom = _gbaslot_rom;
+ CommonSettings.loadToMemory = 1;
+ }
if(_num_cores != -1) CommonSettings.num_cores = _num_cores;
if(_rigorous_timing) CommonSettings.rigorous_timing = true;
if(_advanced_timing != -1) CommonSettings.advanced_timing = _advanced_timing==1;