diff --git a/desmume/src/cocoa/DefaultUserPrefs.plist b/desmume/src/cocoa/DefaultUserPrefs.plist index 621e91e09..d43034771 100644 Binary files a/desmume/src/cocoa/DefaultUserPrefs.plist and b/desmume/src/cocoa/DefaultUserPrefs.plist differ diff --git a/desmume/src/cocoa/cocoa_file.mm b/desmume/src/cocoa/cocoa_file.mm index de4f0d94a..edc07663a 100644 --- a/desmume/src/cocoa/cocoa_file.mm +++ b/desmume/src/cocoa/cocoa_file.mm @@ -180,7 +180,7 @@ static NSMutableDictionary *_gURLDictionary = nil; } const char *romPath = [[romURL path] cStringUsingEncoding:NSUTF8StringEncoding]; - NSInteger resultCode = NDS_LoadROM(romPath, nil); + NSInteger resultCode = NDS_LoadROM(romPath, NULL, NULL); if (resultCode > 0) { result = YES; diff --git a/desmume/src/cocoa/cocoa_rom.h b/desmume/src/cocoa/cocoa_rom.h index aa37fcb4a..4865fab34 100644 --- a/desmume/src/cocoa/cocoa_rom.h +++ b/desmume/src/cocoa/cocoa_rom.h @@ -39,11 +39,13 @@ @property (readonly) NSMutableDictionary *header; @property (readonly) NSMutableDictionary *bindings; @property (readonly) NSURL *fileURL; +@property (assign) BOOL willStreamLoadData; @property (readonly) BOOL isDataLoaded; @property (assign) NSInteger saveType; - (id) initWithURL:(NSURL *)theURL; - (id) initWithURL:(NSURL *)theURL saveType:(NSInteger)saveTypeID; +- (id) initWithURL:(NSURL *)theURL saveType:(NSInteger)saveTypeID streamLoadData:(BOOL)willStreamLoad; - (void) initHeader; - (BOOL) loadData:(NSURL *)theURL; - (void) loadDataOnThread:(id)object; diff --git a/desmume/src/cocoa/cocoa_rom.mm b/desmume/src/cocoa/cocoa_rom.mm index a25d9e000..5dc93054f 100644 --- a/desmume/src/cocoa/cocoa_rom.mm +++ b/desmume/src/cocoa/cocoa_rom.mm @@ -32,6 +32,7 @@ @synthesize header; @synthesize bindings; @synthesize fileURL; +@dynamic willStreamLoadData; @dynamic isDataLoaded; @synthesize saveType; @@ -48,6 +49,11 @@ static NSMutableDictionary *saveTypeValues = nil; } - (id) initWithURL:(NSURL *)theURL saveType:(NSInteger)saveTypeID +{ + return [self initWithURL:theURL saveType:ROMSAVETYPE_AUTOMATIC streamLoadData:NO]; +} + +- (id) initWithURL:(NSURL *)theURL saveType:(NSInteger)saveTypeID streamLoadData:(BOOL)willStreamLoad { self = [super init]; if (self == nil) @@ -94,6 +100,8 @@ static NSMutableDictionary *saveTypeValues = nil; xmlElementStack = [[NSMutableArray alloc] initWithCapacity:32]; xmlCharacterStack = [[NSMutableArray alloc] initWithCapacity:32]; + [self setWillStreamLoadData:willStreamLoad]; + if (theURL != nil) { [self loadData:theURL]; @@ -118,9 +126,19 @@ static NSMutableDictionary *saveTypeValues = nil; [super dealloc]; } +- (void) setWillStreamLoadData:(BOOL)theState +{ + CommonSettings.loadToMemory = (theState) ? false : true; +} + +- (BOOL) willStreamLoadData +{ + return (CommonSettings.loadToMemory ? NO : YES); +} + - (BOOL) isDataLoaded { - return (MMU.CART_ROM != MMU.UNUSED_RAM); + return (gameInfo.romdata != NULL); } - (void) initHeader @@ -171,7 +189,7 @@ static NSMutableDictionary *saveTypeValues = nil; [self.header setValue:[NSNumber numberWithInteger:ndsRomHeader->FATOff] forKey:@"fatOffset"]; [self.header setValue:[NSNumber numberWithInteger:ndsRomHeader->FATSize] forKey:@"fatSize"]; [self.header setValue:[NSNumber numberWithInteger:ndsRomHeader->IconOff] forKey:@"iconOffset"]; - [self.header setValue:[NSNumber numberWithInteger:ndsRomHeader->ROMSize] forKey:@"usedRomSize"]; + [self.header setValue:[NSNumber numberWithInteger:ndsRomHeader->endROMoffset] forKey:@"usedRomSize"]; [self.bindings setValue:[self.header objectForKey:@"gameTitle"] forKey:@"gameTitle"]; [self.bindings setValue:[self.header objectForKey:@"gameCode"] forKey:@"gameCode"]; @@ -572,8 +590,7 @@ static NSMutableDictionary *saveTypeValues = nil; ********************************************************************************************/ void RomIconToRGBA8888(uint32_t *bitmapData) { - const NDS_header *ndsRomHeader = NDS_getROMHeader(); // Contains the memory addresses we need to get our read pointer locations. - int iconOffset; // Memory location offset for the ROM icon data. + const RomBanner &ndsRomBanner = gameInfo.getRomBanner(); // Contains the memory addresses we need to get our read pointer locations. const uint16_t *iconClutPtr; // Read pointer for the icon's CLUT. const uint32_t *iconPixPtr; // Read pointer for the icon's pixel data. @@ -591,16 +608,15 @@ void RomIconToRGBA8888(uint32_t *bitmapData) return; } - if (ndsRomHeader == NULL) + if (&ndsRomBanner == NULL) { memset(bitmapData, 0, 4096); // 4096 bytes = 32px * 32px * sizeof(uint32_t) return; } - // Set all of our pointers relative to iconOffset. - iconOffset = ndsRomHeader->IconOff; - iconClutPtr = (uint16_t *)&MMU.CART_ROM[iconOffset + 0x220] + 1; - iconPixPtr = (uint32_t *)&MMU.CART_ROM[iconOffset + 0x20]; + // Set all of our icon read pointers. + iconClutPtr = (uint16_t *)ndsRomBanner.palette + 1; + iconPixPtr = (uint32_t *)ndsRomBanner.bitmap; // Setup the 4-bit CLUT. // diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.strings b/desmume/src/cocoa/translations/English.lproj/MainMenu.strings index 9d8d4a398..9135f1166 100644 Binary files a/desmume/src/cocoa/translations/English.lproj/MainMenu.strings and b/desmume/src/cocoa/translations/English.lproj/MainMenu.strings differ diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.xib b/desmume/src/cocoa/translations/English.lproj/MainMenu.xib index a39b6d363..18ebc091a 100644 --- a/desmume/src/cocoa/translations/English.lproj/MainMenu.xib +++ b/desmume/src/cocoa/translations/English.lproj/MainMenu.xib @@ -12,7 +12,7 @@ YES - + YES @@ -2710,7 +2710,6 @@ 268 {{175, 50}, {199, 21}} - YES 613417024 @@ -2729,7 +2728,6 @@ 268 {{376, 43}, {96, 32}} - YES 67108864 @@ -2751,7 +2749,6 @@ 268 {{15, 53}, {155, 17}} - YES 68157504 @@ -2769,7 +2766,6 @@ 268 {{15, 14}, {454, 28}} - YES 69206017 @@ -2786,12 +2782,10 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {484, 81}} - {{17, 16}, {486, 97}} - {0, 0} 67108864 @@ -2830,7 +2824,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{148, 14}, {226, 21}} - YES 613417024 @@ -2849,7 +2842,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{376, 7}, {96, 32}} - YES 67108864 @@ -2871,7 +2863,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{15, 17}, {128, 17}} - YES 68157504 @@ -2887,12 +2878,10 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {484, 45}} - {{17, 117}, {486, 61}} - {0, 0} 67108864 @@ -2926,7 +2915,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{92, 12}, {314, 18}} - YES 67108864 @@ -2955,7 +2943,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{141, 33}, {217, 32}} - YES 67108864 @@ -2975,12 +2962,10 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {484, 75}} - {{17, 182}, {486, 91}} - {0, 0} 67108864 @@ -3014,7 +2999,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{16, 40}, {366, 18}} - YES -2080374784 @@ -3036,9 +3020,8 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{16, 62}, {247, 18}} + {{16, 84}, {247, 18}} - YES -2080374784 @@ -3062,7 +3045,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{273, 10}, {196, 26}} - YES -2076180416 @@ -3158,7 +3140,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{15, 16}, {256, 17}} - _NS:4068 YES @@ -3173,15 +3154,38 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA NO + + + 268 + {{16, 62}, {216, 18}} + + _NS:682 + YES + + -2080374784 + 0 + Only load ROM data as needed + + _NS:682 + + 1211912448 + 2 + + + + + 200 + 25 + + NO + - {{1, 1}, {484, 88}} + {{1, 1}, {484, 109}} - - {{17, 277}, {486, 104}} + {{17, 277}, {486, 125}} - {0, 0} 67108864 @@ -3201,13 +3205,12 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXANO - {520, 401} + {520, 422} - NSView - + 268 YES @@ -3216,6 +3219,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{97, 463}, {96, 17}} + YES 68157504 @@ -3233,6 +3237,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{195, 457}, {265, 26}} + YES -2076180416 @@ -3293,6 +3298,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{462, 457}, {116, 26}} + YES -2076180416 @@ -3436,6 +3442,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA256 {640, 394} + YES NO YES @@ -3444,6 +3451,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA256 {640, 17} + @@ -3451,6 +3459,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA-2147483392 {{584, 0}, {16, 17}} + YES @@ -3641,6 +3650,8 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 17}, {640, 394}} + + 4 @@ -3650,6 +3661,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA-2147483392 {{584, 17}, {15, 102}} + NO _doScroller: @@ -3660,6 +3672,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA-2147483392 {{1, 420}, {624, 15}} + NO 1 @@ -3675,6 +3688,8 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 0}, {640, 17}} + + 4 @@ -3683,6 +3698,8 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{-1, 37}, {642, 412}} + + 133682 @@ -3698,6 +3715,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{197, 12}, {247, 17}} + YES 605028416 @@ -3716,6 +3734,8 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {640, 495} + + InputPrefsView @@ -3728,6 +3748,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA12 {{13, 10}, {463, 401}} + YES @@ -3752,7 +3773,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{72, 44}, {84, 17}} - + YES 68157504 @@ -3770,7 +3791,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{44, 16}, {112, 17}} - + YES 68157504 @@ -3788,7 +3809,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 38}, {126, 26}} - + YES -2076180416 @@ -3881,7 +3902,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{289, 14}, {72, 22}} - + YES -1804599231 @@ -3973,7 +3994,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{63, 72}, {93, 17}} - + YES 68157504 @@ -3991,7 +4012,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 66}, {126, 26}} - + YES -2076180416 @@ -4060,7 +4081,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 11}, {126, 26}} - + YES -2076180416 @@ -4162,12 +4183,12 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {429, 100}} - + {{6, 206}, {431, 116}} - + {0, 0} 67108864 @@ -4211,7 +4232,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{18, 14}, {100, 38}} - + YES NO 2 @@ -4405,12 +4426,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {194, 62}} - + {{15, 53}, {196, 78}} - + {0, 0} 67108864 @@ -4444,7 +4465,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{18, 14}, {150, 38}} - + YES NO 2 @@ -4636,12 +4657,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {194, 62}} - + {{218, 53}, {196, 78}} - + {0, 0} 67108864 @@ -4665,7 +4686,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{15, 18}, {126, 17}} - + YES 68157504 @@ -4683,7 +4704,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{339, 16}, {72, 22}} - + YES -1804599231 @@ -4766,7 +4787,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{144, 12}, {189, 26}} - + YES -2080112384 @@ -4789,7 +4810,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{305, 38}, {38, 11}} - + YES 68157504 @@ -4811,7 +4832,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{263, 38}, {38, 11}} - + YES 68157504 @@ -4829,7 +4850,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{220, 38}, {38, 11}} - + YES 68157504 @@ -4847,7 +4868,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{178, 38}, {38, 11}} - + YES 68157504 @@ -4865,7 +4886,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{137, 38}, {38, 11}} - + YES 68157504 @@ -4881,12 +4902,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {429, 141}} - + {{6, 45}, {431, 157}} - + {0, 0} 67108864 @@ -4908,7 +4929,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{10, 33}, {443, 355}} - + Display Views @@ -5911,11 +5932,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {489, 425} - + NSView - + 268 YES @@ -5924,7 +5945,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{163, 329}, {220, 26}} - YES -2076180416 @@ -5983,7 +6003,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{17, 335}, {144, 17}} - YES 68157504 @@ -6011,7 +6030,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 12}, {148, 18}} - YES -2080374784 @@ -6033,12 +6051,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {364, 38}} - {{17, 209}, {366, 54}} - {0, 0} 67108864 @@ -6072,7 +6088,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{18, 15}, {180, 46}} - YES NO 2 @@ -6267,7 +6282,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{145, 10}, {204, 26}} - YES -2076180416 @@ -6336,12 +6350,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {364, 71}} - {{17, 16}, {366, 87}} - {0, 0} 67108864 @@ -6375,7 +6387,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{18, 14}, {328, 58}} - YES NO 3 @@ -6581,12 +6592,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {364, 82}} - {{17, 107}, {366, 98}} - {0, 0} 67108864 @@ -6620,7 +6629,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{44, 13}, {246, 21}} - YES 67371264 @@ -6643,7 +6651,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{293, 17}, {56, 17}} - YES 68157504 @@ -6735,7 +6742,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{18, 14}, {20, 20}} - YES 134217728 @@ -6755,12 +6761,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {364, 44}} - {{17, 267}, {366, 60}} - {0, 0} 67108864 @@ -6781,12 +6785,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {400, 373} - - NSView - + 268 YES @@ -6795,6 +6797,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 12 {{13, 10}, {528, 349}} + YES @@ -6819,6 +6822,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 32}, {197, 18}} + YES -2080374784 @@ -6842,6 +6846,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 12}, {217, 18}} + YES 67108864 @@ -6863,10 +6868,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 58}} + {{6, 229}, {496, 74}} + {0, 0} 67108864 @@ -6900,6 +6907,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{18, 14}, {165, 38}} + YES NO 2 @@ -7093,6 +7101,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{243, 15}, {72, 17}} + YES 68157504 @@ -7110,6 +7119,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{320, 13}, {50, 22}} + YES -1804599231 @@ -7186,6 +7196,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{371, 10}, {19, 27}} + YES 67895328 @@ -7203,10 +7214,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 62}} + {{6, 147}, {496, 78}} + {0, 0} 67108864 @@ -7240,6 +7253,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 32}, {145, 18}} + YES 67108864 @@ -7263,6 +7277,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 12}, {118, 18}} + YES 67108864 @@ -7284,10 +7299,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 58}} + {{6, 69}, {496, 74}} + {0, 0} 67108864 @@ -7321,6 +7338,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 12}, {462, 18}} + YES -2080374784 @@ -7342,10 +7360,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 38}} + {{6, 11}, {496, 54}} + {0, 0} 67108864 @@ -7367,6 +7387,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{10, 33}, {508, 303}} + General Settings @@ -7776,6 +7797,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {554, 373} + + NSView @@ -23176,6 +23199,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES + + YES + General_LoadROMCompletelyInRAM + General_LoadROMCompletelyIntoRAM + General_StreamLoadRomFile + General_StreamLoadRomData + YES @@ -32892,6 +32922,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 8320 + + + value: values.General_StreamLoadRomData + + + + + + value: values.General_StreamLoadRomData + value + values.General_StreamLoadRomData + 2 + + + 8328 + @@ -34545,10 +34591,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES - + General Preferences View @@ -34562,6 +34608,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + @@ -44776,6 +44823,20 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + 8322 + + + YES + + + + + + 8323 + + + @@ -46553,6 +46614,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 8310.IBPluginDependency 8316.IBPluginDependency 832.IBPluginDependency + 8322.IBAttributePlaceholdersKey + 8322.IBPluginDependency + 8322.IBViewBoundsToFrameTransform + 8323.IBPluginDependency 833.IBPluginDependency 834.IBPluginDependency 835.IBPluginDependency @@ -46711,7 +46776,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{781, 755}, {520, 401}} + {{629, 734}, {520, 422}} com.apple.InterfaceBuilder.CocoaPlugin YES @@ -46722,7 +46787,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABBgAAAwv4AAA + P4AAAL+AAABBgAAAwmgAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -46772,7 +46837,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABDiIAAwtIAAA + P4AAAL+AAABDiIAAwhAAAA com.apple.InterfaceBuilder.CocoaPlugin {{1061, 976}, {196, 93}} @@ -49378,13 +49443,26 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABBcAAAwswAAA + P4AAAL+AAABBcAAAwgQAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + When checked, the ROM data is only loaded as needed. When unchecked, all of the ROM data is completely preloaded into RAM before use. + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBgAAAwpwAAA + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -49516,7 +49594,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - 8321 + 8328 diff --git a/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm b/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm index 2039798fe..3d6049712 100644 --- a/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm +++ b/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm @@ -1408,6 +1408,7 @@ [self setIsRomLoading:YES]; [romURL retain]; [newRom setSaveType:selectedRomSaveTypeID]; + [newRom setWillStreamLoadData:[[NSUserDefaults standardUserDefaults] boolForKey:@"General_StreamLoadRomData"]]; [NSThread detachNewThreadSelector:@selector(loadDataOnThread:) toTarget:newRom withObject:romURL]; [romURL release]; } @@ -1423,7 +1424,7 @@ NSDictionary *userInfo = [aNotification userInfo]; const BOOL didLoad = [(NSNumber *)[userInfo valueForKey:@"DidLoad"] boolValue]; - if (theRom == nil || ![theRom isDataLoaded] || !didLoad) + if ( theRom == nil || !didLoad || (![theRom willStreamLoadData] && ![theRom isDataLoaded]) ) { // If ROM loading fails, restore the core state, but only if a ROM is already loaded. if([self currentRom] != nil)