Final updates for 0.8 version, also fixed input on big endian systems in the cocoa port

This commit is contained in:
gecko_reverse 2008-04-19 09:08:12 +00:00
parent f30980da73
commit b2be4b6089
3 changed files with 222 additions and 53 deletions

View File

@ -1,4 +1,4 @@
0.7.3 -> ??
0.7.3 -> 0.8
Cocoa:
- Save State As function now works. [Jeff B]
- Recent Items menu now works. [Jeff B]

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@ -32,11 +32,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.7.4alpha</string>
<string>0.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.7.4alpha</string>
<string>0.8</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>

View File

@ -468,224 +468,392 @@ struct NDS_fw_config_data firmware;
- (void)pressStart
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFF7;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFF7;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xF7FF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xF7FF;
#endif
}
- (void)liftStart
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x8;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x8;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0008;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0008;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0800;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0800;
#endif
}
- (BOOL)start
{
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x8) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x0008) == 0)
#else
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x0800) == 0)
#endif
return YES;
return NO;
}
- (void)pressSelect
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFFB;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFFB;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFBFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFBFF;
#endif
}
- (void)liftSelect
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x4;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x4;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0004;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0004;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0400;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0400;
#endif
}
- (BOOL)select
{
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x4) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x0004) == 0)
#else
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x0400) == 0)
#endif
return YES;
return NO;
}
- (void)pressLeft
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFDF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFDF;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xDFFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xDFFF;
#endif
}
- (void)liftLeft
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x20;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x20;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0020;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0020;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x2000;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x2000;
#endif
}
- (BOOL)left
{
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x20) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0020) == 0)
#else
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x2000) == 0)
#endif
return YES;
return NO;
}
- (void)pressRight
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFEF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFEF;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xEFFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xEFFF;
#endif
}
- (void)liftRight
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x10;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x10;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0010;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0010;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x1000;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x1000;
#endif
}
- (BOOL)right
{
if((((u16*)ARM9Mem.ARM9_REG)[0x130>>1] & 0x10) == 0)
#ifndef __BIG_ENDIAN__
if((((u16*)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0010) == 0)
#else
if((((u16*)ARM9Mem.ARM9_REG)[0x130>>1] & 0x1000) == 0)
#endif
return YES;
return NO;
}
- (void)pressUp
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFBF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFBF;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xBFFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xBFFF;
#endif
}
- (void)liftUp
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x40;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x40;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0040;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0040;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x4000;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x4000;
#endif
}
- (BOOL)up
{
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x40) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0040) == 0)
#else
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x4000) == 0)
#endif
return YES;
return NO;
}
- (void)pressDown
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFF7F;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFF7F;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0x7FFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0x7FFF;
#endif
}
- (void)liftDown
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x80;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x80;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0080;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0080;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x8000;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x8000;
#endif
}
- (BOOL)down
{
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x80) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0080) == 0)
#else
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x8000) == 0)
#endif
return YES;
return NO;
}
- (void)pressA
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFFE;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFFE;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFEFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFEFF;
#endif
}
- (void)liftA
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x1;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x1;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0001;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0001;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0100;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0100;
#endif
}
- (BOOL)A
{
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x1) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0001) == 0)
#else
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0100) == 0)
#endif
return YES;
return NO;
}
- (void)pressB
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFFD;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFFD;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFDFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFDFF;
#endif
}
- (void)liftB
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x2;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x2;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0002;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0002;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0200;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0200;
#endif
}
- (BOOL)B
{
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x2) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0002) == 0)
#else
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0200) == 0)
#endif
return YES;
return NO;
}
- (void)pressX
{
#ifndef __BIG_ENDIAN__
((u16 *)MMU.ARM7_REG)[0x136>>1] &= 0xFFFE;
#else
((u16 *)MMU.ARM7_REG)[0x136>>1] &= 0xFEFF;
#endif
}
- (void)liftX
{
((u16 *)MMU.ARM7_REG)[0x136>>1] |= 0x1;
#ifndef __BIG_ENDIAN__
((u16 *)MMU.ARM7_REG)[0x136>>1] |= 0x0001;
#else
((u16 *)MMU.ARM7_REG)[0x136>>1] |= 0x0100;
#endif
}
- (BOOL)X
{
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x1) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0001) == 0)
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0001) == 0)
#else
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0100) == 0)
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0100) == 0)
#endif
return YES;
return NO;
}
- (void)pressY
{
#ifndef __BIG_ENDIAN__
((u16 *)MMU.ARM7_REG)[0x136>>1] &= 0xFFFD;
#else
((u16 *)MMU.ARM7_REG)[0x136>>1] &= 0xFDFF;
#endif
}
- (void)liftY
{
((u16 *)MMU.ARM7_REG)[0x136>>1] |= 0x2;
#ifndef __BIG_ENDIAN__
((u16 *)MMU.ARM7_REG)[0x136>>1] |= 0x0002;
#else
((u16 *)MMU.ARM7_REG)[0x136>>1] |= 0x0200;
#endif
}
- (BOOL)Y
{
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x2) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0002) == 0)
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0002) == 0)
#else
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0200) == 0)
if((((u16 *)MMU.ARM7_REG)[0x136>>1] & 0x0200) == 0)
#endif
return YES;
return NO;
}
- (void)pressL
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFDFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFDFF;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFFD;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFFD;
#endif
}
- (void)liftL
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x200;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x200;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0200;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0200;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0002;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0002;
#endif
}
- (BOOL)L
{
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x200) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0200) == 0)
#else
if((((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] & 0x0002) == 0)
#endif
return YES;
return NO;
}
- (void)pressR
{
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFEFF;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFEFF;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] &= 0xFFFE;
((u16 *)MMU.ARM7_REG)[0x130>>1] &= 0xFFFE;
#endif
}
- (void)liftR
{
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x100;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x100;
#ifndef __BIG_ENDIAN__
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0100;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0100;
#else
((u16 *)ARM9Mem.ARM9_REG)[0x130>>1] |= 0x0001;
((u16 *)MMU.ARM7_REG)[0x130>>1] |= 0x0001;
#endif
}
- (BOOL)R
{
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x100) == 0)
#ifndef __BIG_ENDIAN__
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x0100) == 0)
#else
if((((u16 *)MMU.ARM7_REG)[0x130>>1] & 0x0001) == 0)
#endif
return YES;
return NO;
}
@ -970,6 +1138,7 @@ struct NDS_fw_config_data firmware;
//run the emulator
while(run)
{
paused = false;
Microseconds((struct UnsignedWide*)&frame_start_time);