Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e92cf384b9 | |||
| a6bcfbebb4 | |||
| f79b958cc9 | |||
| f2081e4abd | |||
| c0a1c05db7 | |||
| be33129c08 | |||
| 1a5f5f01d9 | |||
| 6830f21631 | |||
| ed303db6fe | |||
| 1df666842f | |||
| 5ad07bfca1 | |||
| 0a92d0e120 | |||
| 6c18fff3a3 | |||
| 5113296815 | |||
| 18916bf0e2 |
Binary file not shown.
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.18</string>
|
<string>1.18.1</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>OEGameCoreController</string>
|
<string>OEGameCoreController</string>
|
||||||
<key>OEGameCoreClass</key>
|
<key>OEGameCoreClass</key>
|
||||||
|
|||||||
@@ -86,13 +86,13 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
089C167EFE841241C02AAC07 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||||
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||||
8D5B49B6048680CD000E48DA /* O2EM.oecoreplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = O2EM.oecoreplugin; sourceTree = BUILT_PRODUCTS_DIR; };
|
8D5B49B6048680CD000E48DA /* O2EM.oecoreplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = O2EM.oecoreplugin; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
9415A9C519B10FFE0063758C /* OEOdyssey2SystemResponderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OEOdyssey2SystemResponderClient.h; path = ../OpenEmu/Odyssey2/OEOdyssey2SystemResponderClient.h; sourceTree = "<group>"; };
|
9415A9C519B10FFE0063758C /* OEOdyssey2SystemResponderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OEOdyssey2SystemResponderClient.h; path = ../OpenEmu/SystemPlugins/Odyssey2/OEOdyssey2SystemResponderClient.h; sourceTree = "<group>"; };
|
||||||
941DFB2615B6425200C6552F /* OdysseyGameCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OdysseyGameCore.m; sourceTree = "<group>"; };
|
941DFB2615B6425200C6552F /* OdysseyGameCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OdysseyGameCore.m; sourceTree = "<group>"; };
|
||||||
94AD8A37199AD89200E6520F /* wrapalleg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wrapalleg.c; sourceTree = "<group>"; };
|
94AD8A37199AD89200E6520F /* wrapalleg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wrapalleg.c; sourceTree = "<group>"; };
|
||||||
94AD8A38199AD89200E6520F /* wrapalleg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrapalleg.h; sourceTree = "<group>"; };
|
94AD8A38199AD89200E6520F /* wrapalleg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrapalleg.h; sourceTree = "<group>"; };
|
||||||
@@ -129,9 +129,9 @@
|
|||||||
94AD8A73199AD89200E6520F /* vpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vpp.h; sourceTree = "<group>"; };
|
94AD8A73199AD89200E6520F /* vpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vpp.h; sourceTree = "<group>"; };
|
||||||
94AD8A74199AD89200E6520F /* vpp_cset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vpp_cset.c; sourceTree = "<group>"; };
|
94AD8A74199AD89200E6520F /* vpp_cset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vpp_cset.c; sourceTree = "<group>"; };
|
||||||
94AD8A75199AD89200E6520F /* vpp_cset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vpp_cset.h; sourceTree = "<group>"; };
|
94AD8A75199AD89200E6520F /* vpp_cset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vpp_cset.h; sourceTree = "<group>"; };
|
||||||
94AE2EF917B0C1330018DFBB /* OpenEmuBase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenEmuBase.framework; path = "../../../Library/Developer/Xcode/DerivedData/OpenEmu-dsehantrxgyfywdpbneyslftzzvv/Build/Products/Debug/OpenEmuBase.framework"; sourceTree = "<group>"; };
|
94AE2EF917B0C1330018DFBB /* OpenEmuBase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OpenEmuBase.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
B5008DAD0E8BFB3E005AECAF /* OdysseyGameCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OdysseyGameCore.h; sourceTree = "<group>"; };
|
B5008DAD0E8BFB3E005AECAF /* OdysseyGameCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OdysseyGameCore.h; sourceTree = "<group>"; };
|
||||||
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -153,19 +153,20 @@
|
|||||||
94A9E27F157D637B0083A7DC /* Core */,
|
94A9E27F157D637B0083A7DC /* Core */,
|
||||||
08FB77AFFE84173DC02AAC07 /* Classes */,
|
08FB77AFFE84173DC02AAC07 /* Classes */,
|
||||||
089C167CFE841241C02AAC07 /* Resources */,
|
089C167CFE841241C02AAC07 /* Resources */,
|
||||||
089C1671FE841209C02AAC07 /* Frameworks and Libraries */,
|
089C1671FE841209C02AAC07 /* Frameworks */,
|
||||||
19C28FB8FE9D52D311CA2CBB /* Products */,
|
19C28FB8FE9D52D311CA2CBB /* Products */,
|
||||||
);
|
);
|
||||||
name = VisualBoyAdvance;
|
name = VisualBoyAdvance;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
usesTabs = 0;
|
||||||
};
|
};
|
||||||
089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = {
|
089C1671FE841209C02AAC07 /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */,
|
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */,
|
||||||
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */,
|
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */,
|
||||||
);
|
);
|
||||||
name = "Frameworks and Libraries";
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||||
@@ -220,7 +221,7 @@
|
|||||||
94AD8A36199AD89200E6520F /* allegrowrapper */,
|
94AD8A36199AD89200E6520F /* allegrowrapper */,
|
||||||
94AD8A46199AD89200E6520F /* src */,
|
94AD8A46199AD89200E6520F /* src */,
|
||||||
);
|
);
|
||||||
path = Core;
|
name = Core;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
94AD8A36199AD89200E6520F /* allegrowrapper */ = {
|
94AD8A36199AD89200E6520F /* allegrowrapper */ = {
|
||||||
@@ -299,12 +300,11 @@
|
|||||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
BuildIndependentTargetsInParallel = YES;
|
|
||||||
LastUpgradeCheck = 0700;
|
LastUpgradeCheck = 0700;
|
||||||
};
|
};
|
||||||
buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "O2EM" */;
|
buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "O2EM" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
developmentRegion = English;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 1;
|
hasScannedForEncodings = 1;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
089C167EFE841241C02AAC07 /* English */,
|
089C167EFE841241C02AAC07 /* en */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -419,14 +419,16 @@
|
|||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
EXPORTED_SYMBOLS_FILE = "";
|
EXPORTED_SYMBOLS_FILE = "";
|
||||||
FRAMEWORK_SEARCH_PATHS = "";
|
FRAMEWORK_SEARCH_PATHS = "";
|
||||||
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/src\"";
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"\"$(SRCROOT)/src\"",
|
||||||
|
"\"$(SRCROOT)/allegrowrapper\"",
|
||||||
|
);
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
||||||
OTHER_CFLAGS = "-D__LIBRETRO__";
|
OTHER_CFLAGS = "-D__LIBRETRO__";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:rfc1034identifier}";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:rfc1034identifier}";
|
||||||
PRODUCT_NAME = O2EM;
|
PRODUCT_NAME = O2EM;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
VALID_ARCHS = x86_64;
|
|
||||||
WRAPPER_EXTENSION = oecoreplugin;
|
WRAPPER_EXTENSION = oecoreplugin;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -439,14 +441,16 @@
|
|||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
EXPORTED_SYMBOLS_FILE = "";
|
EXPORTED_SYMBOLS_FILE = "";
|
||||||
FRAMEWORK_SEARCH_PATHS = "";
|
FRAMEWORK_SEARCH_PATHS = "";
|
||||||
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/src\"";
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"\"$(SRCROOT)/src\"",
|
||||||
|
"\"$(SRCROOT)/allegrowrapper\"",
|
||||||
|
);
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
INSTALL_PATH = "\"$(USER_LIBRARY_DIR)/Application Support/OpenEmu/Cores\"";
|
||||||
OTHER_CFLAGS = "-D__LIBRETRO__";
|
OTHER_CFLAGS = "-D__LIBRETRO__";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:rfc1034identifier}";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:rfc1034identifier}";
|
||||||
PRODUCT_NAME = O2EM;
|
PRODUCT_NAME = O2EM;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
VALID_ARCHS = x86_64;
|
|
||||||
WRAPPER_EXTENSION = oecoreplugin;
|
WRAPPER_EXTENSION = oecoreplugin;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
@@ -484,7 +488,6 @@
|
|||||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
VALID_ARCHS = x86_64;
|
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -520,7 +523,6 @@
|
|||||||
HEADER_SEARCH_PATHS = "";
|
HEADER_SEARCH_PATHS = "";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
VALID_ARCHS = x86_64;
|
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|||||||
+38
-37
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
//uint16_t mbmp[EMUWIDTH * EMUHEIGHT];
|
//uint16_t mbmp[EMUWIDTH * EMUHEIGHT];
|
||||||
//unsigned short int mbmp[TEX_WIDTH * TEX_HEIGHT];
|
//unsigned short int mbmp[TEX_WIDTH * TEX_HEIGHT];
|
||||||
uint16_t mbmp[TEX_WIDTH * TEX_HEIGHT];
|
uint16_t *mbmp;
|
||||||
//short signed int SNDBUF[1024*2];
|
//short signed int SNDBUF[1024*2];
|
||||||
uint8_t soundBuffer[1056];
|
uint8_t soundBuffer[1056];
|
||||||
int SND;
|
int SND;
|
||||||
@@ -76,6 +76,8 @@ biosdir[MAXC], arkivo[MAXC][MAXC], biossux[MAXC], romssux[MAXC],
|
|||||||
odyssey2[MAXC], g7400[MAXC], c52[MAXC], jopac[MAXC], file_l[MAXC], bios_l[MAXC],
|
odyssey2[MAXC], g7400[MAXC], c52[MAXC], jopac[MAXC], file_l[MAXC], bios_l[MAXC],
|
||||||
file_v[MAXC],scorefile[MAXC], statefile[MAXC], path2[MAXC];
|
file_v[MAXC],scorefile[MAXC], statefile[MAXC], path2[MAXC];
|
||||||
|
|
||||||
|
extern void retro_destroybmp(void);
|
||||||
|
|
||||||
static long filesize(FILE *stream){
|
static long filesize(FILE *stream){
|
||||||
long curpos, length;
|
long curpos, length;
|
||||||
curpos = ftell(stream);
|
curpos = ftell(stream);
|
||||||
@@ -388,13 +390,16 @@ OdysseyGameCore *current;
|
|||||||
close_voice();
|
close_voice();
|
||||||
close_display();
|
close_display();
|
||||||
retro_destroybmp();
|
retro_destroybmp();
|
||||||
|
if(mbmp)
|
||||||
|
{
|
||||||
|
free(mbmp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark Execution
|
#pragma mark Execution
|
||||||
|
|
||||||
- (BOOL)loadFileAtPath:(NSString *)path
|
- (BOOL)loadFileAtPath:(NSString *)path
|
||||||
{
|
{
|
||||||
memset(mbmp, 0, sizeof(mbmp));
|
|
||||||
RLOOP=1;
|
RLOOP=1;
|
||||||
|
|
||||||
static char file[MAXC], attr[MAXC], val[MAXC], *p, *binver;
|
static char file[MAXC], attr[MAXC], val[MAXC], *p, *binver;
|
||||||
@@ -443,7 +448,7 @@ OdysseyGameCore *current;
|
|||||||
|
|
||||||
init_audio();
|
init_audio();
|
||||||
|
|
||||||
app_data.crc = crc32_file([path UTF8String]);
|
app_data.crc = crc32_file([path fileSystemRepresentation]);
|
||||||
|
|
||||||
//suck_bios();
|
//suck_bios();
|
||||||
o2flag = 1;
|
o2flag = 1;
|
||||||
@@ -452,9 +457,9 @@ OdysseyGameCore *current;
|
|||||||
//suck_roms();
|
//suck_roms();
|
||||||
|
|
||||||
NSString *biosROM = [[self biosDirectoryPath] stringByAppendingPathComponent:@"o2rom.bin"];
|
NSString *biosROM = [[self biosDirectoryPath] stringByAppendingPathComponent:@"o2rom.bin"];
|
||||||
load_bios([biosROM UTF8String]);
|
load_bios([biosROM fileSystemRepresentation]);
|
||||||
|
|
||||||
load_cart([path UTF8String]);
|
load_cart([path fileSystemRepresentation]);
|
||||||
//if (app_data.voice) load_voice_samples(path2);
|
//if (app_data.voice) load_voice_samples(path2);
|
||||||
|
|
||||||
init_display();
|
init_display();
|
||||||
@@ -472,33 +477,17 @@ OdysseyGameCore *current;
|
|||||||
{
|
{
|
||||||
//run();
|
//run();
|
||||||
cpu_exec();
|
cpu_exec();
|
||||||
|
|
||||||
int len = evblclk == EVBLCLK_NTSC ? 44100/60 : 44100/50;
|
int len = evblclk == EVBLCLK_NTSC ? 44100/60 : 44100/50;
|
||||||
//for(int x=0; x<len; x++)
|
|
||||||
//[[current ringBufferAtIndex:0] write:soundBuffer maxLength:len];
|
|
||||||
// signed short int *p=(signed short int *)SNDBUF;
|
|
||||||
// for(int x=0; x<len; x++)
|
|
||||||
// {
|
|
||||||
// //[[current ringBufferAtIndex:0] write:p maxLength:len*4];
|
|
||||||
// [[current ringBufferAtIndex:0] write:p[0] maxLength:2];
|
|
||||||
// [[current ringBufferAtIndex:0] write:p[1] maxLength:2];
|
|
||||||
// }
|
|
||||||
|
|
||||||
//audio_cb(*p, *p++);
|
|
||||||
|
|
||||||
// Convert 8u to 16s
|
// Convert 8u to 16s
|
||||||
for(int i = 0; i != len; i ++)
|
for(int i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
int16_t sample16 = (soundBuffer[i] << 8) - 32768;
|
int16_t sample16 = (soundBuffer[i] - 128 ) << 8;
|
||||||
int16_t frame[2] = {sample16, sample16};
|
|
||||||
//audio_cb(frame[0], frame[1]);
|
[[current audioBufferAtIndex:0] write:&sample16 maxLength:2];
|
||||||
//[[current ringBufferAtIndex:0] write:frame maxLength:2];
|
|
||||||
//[[current ringBufferAtIndex:0] write:frame[1] maxLength:2];
|
|
||||||
|
|
||||||
[[current ringBufferAtIndex:0] write:&frame[0] maxLength:2];
|
|
||||||
[[current ringBufferAtIndex:0] write:&frame[1] maxLength:2];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RLOOP=1;
|
RLOOP=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -512,6 +501,11 @@ OdysseyGameCore *current;
|
|||||||
|
|
||||||
#pragma mark Video
|
#pragma mark Video
|
||||||
|
|
||||||
|
- (OEIntSize)aspectSize
|
||||||
|
{
|
||||||
|
return OEIntSizeMake(EMUWIDTH, EMUHEIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
- (OEIntRect)screenRect
|
- (OEIntRect)screenRect
|
||||||
{
|
{
|
||||||
return OEIntRectMake(0, 0, EMUWIDTH, EMUHEIGHT);
|
return OEIntRectMake(0, 0, EMUWIDTH, EMUHEIGHT);
|
||||||
@@ -522,8 +516,20 @@ OdysseyGameCore *current;
|
|||||||
return OEIntSizeMake(TEX_WIDTH, TEX_HEIGHT);
|
return OEIntSizeMake(TEX_WIDTH, TEX_HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (const void *)videoBuffer
|
- (const void *)getVideoBufferWithHint:(void *)hint
|
||||||
{
|
{
|
||||||
|
if(!hint)
|
||||||
|
{
|
||||||
|
if(!mbmp)
|
||||||
|
{
|
||||||
|
hint = mbmp = (uint16_t*)malloc(TEX_WIDTH * TEX_HEIGHT * sizeof(uint16_t));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mbmp = hint;
|
||||||
|
}
|
||||||
|
|
||||||
return mbmp;
|
return mbmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,11 +543,6 @@ OdysseyGameCore *current;
|
|||||||
return GL_UNSIGNED_SHORT_5_6_5;
|
return GL_UNSIGNED_SHORT_5_6_5;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (GLenum)internalPixelFormat
|
|
||||||
{
|
|
||||||
return GL_RGB5;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSTimeInterval)frameInterval
|
- (NSTimeInterval)frameInterval
|
||||||
{
|
{
|
||||||
return 60;
|
return 60;
|
||||||
@@ -551,7 +552,7 @@ OdysseyGameCore *current;
|
|||||||
|
|
||||||
- (NSUInteger)channelCount
|
- (NSUInteger)channelCount
|
||||||
{
|
{
|
||||||
return 2;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (double)audioSampleRate
|
- (double)audioSampleRate
|
||||||
@@ -568,7 +569,7 @@ OdysseyGameCore *current;
|
|||||||
|
|
||||||
- (void)keyDown:(unsigned short)keyCode
|
- (void)keyDown:(unsigned short)keyCode
|
||||||
{
|
{
|
||||||
NSNumber *virtualCode = [virtualPhysicalKeyMap objectForKey:[NSNumber numberWithInt:keyCode]];
|
NSNumber *virtualCode = [virtualPhysicalKeyMap objectForKey:@(keyCode)];
|
||||||
|
|
||||||
if(virtualCode)
|
if(virtualCode)
|
||||||
key[[virtualCode intValue]] = 1;
|
key[[virtualCode intValue]] = 1;
|
||||||
@@ -576,7 +577,7 @@ OdysseyGameCore *current;
|
|||||||
|
|
||||||
- (void)keyUp:(unsigned short)keyCode
|
- (void)keyUp:(unsigned short)keyCode
|
||||||
{
|
{
|
||||||
NSNumber *virtualCode = [virtualPhysicalKeyMap objectForKey:[NSNumber numberWithInt:keyCode]];
|
NSNumber *virtualCode = [virtualPhysicalKeyMap objectForKey:@(keyCode)];
|
||||||
|
|
||||||
if(virtualCode)
|
if(virtualCode)
|
||||||
key[[virtualCode intValue]] = 0;
|
key[[virtualCode intValue]] = 0;
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/* Localized versions of Info.plist keys */
|
||||||
|
|
||||||
@@ -340,7 +340,7 @@ static void draw_grid(void){
|
|||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
|
|
||||||
//extern unsigned short int mbmp[TEX_WIDTH * TEX_HEIGHT];
|
//extern unsigned short int mbmp[TEX_WIDTH * TEX_HEIGHT];
|
||||||
extern uint16_t mbmp[TEX_WIDTH * TEX_HEIGHT];
|
extern uint16_t *mbmp;
|
||||||
|
|
||||||
void retro_blit(){
|
void retro_blit(){
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user