Permalink
Browse files

further progress; almost loads ROMs

  • Loading branch information...
1 parent 9dde38c commit a67d1dec6d89310aadec6f61d2091a16f4125ee3 Zach Drayer committed Jan 17, 2013
Showing with 12 additions and 47 deletions.
  1. +4 −5 Makefile
  2. +2 −27 disasm.c
  3. +6 −15 iphone/gpSPhone/src/MainView.m
View
@@ -23,15 +23,14 @@ LDFLAGS = -lobjc \
-dead_strip \
-miphoneos-version-min=5.0 \
-arch armv7 \
- -wl,no_pie \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk \
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks \
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks
-CFLAGS = -DARM_ARCH -DGP2X_BUILD -x objective-c -arch armv7 -miphoneos-version-min=4.0 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -Wno-pointer-sign -Wno-trigraphs -fno-pascal-strings -Os -Wreturn-type -Wparentheses -Wno-format -Wswitch -Wno-unused-parameter -Wunused-value -Wno-shorten-64-to-32 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -gdwarf-2 -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=4.0 -msoft-float -funsigned-char -fno-common -fno-builtin -fomit-frame-pointer -fstrict-aliasing -finline -finline-functions -funroll-loops -DVERSION='"$(VERSION)"' -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks #look in simulator dir as a cheap way to look for IOKit headers
+OBJCFLAGS = -DARM_ARCH -DGP2X_BUILD -x objective-c -arch armv7 -miphoneos-version-min=5.0 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -Wno-pointer-sign -Wno-trigraphs -fno-pascal-strings -Os -Wreturn-type -Wparentheses -Wno-format -Wswitch -Wno-unused-parameter -Wunused-value -Wno-shorten-64-to-32 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -gdwarf-2 -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -msoft-float -funsigned-char -fno-common -fno-builtin -fomit-frame-pointer -fstrict-aliasing -finline -finline-functions -funroll-loops -DVERSION='"$(VERSION)"' -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks #look in simulator dir as a cheap way to look for IOKit headers
-GCC_CFLAGS= -DARM_ARCH -DGP2X_BUILD -x objective-c -arch armv7 -fnested-functions -fmessage-length=0 -Wno-pointer-sign -Wno-trigraphs -fno-pascal-strings -Os -Wreturn-type -Wparentheses -Wno-format -Wswitch -Wno-unused-parameter -Wunused-value -Wno-shorten-64-to-32 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -gdwarf-2 -mthumb -msoft-float -funsigned-char -fno-common -fno-builtin -fomit-frame-pointer -fstrict-aliasing -finline -finline-functions -funroll-loops -DVERSION='"$(VERSION)"' -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks #look in simulator dir as a cheap way to look for IOKit headers
+CFLAGS= -DARM_ARCH -DGP2X_BUILD -x objective-c -arch armv7 -fnested-functions -fmessage-length=0 -Wno-pointer-sign -Wno-trigraphs -fno-pascal-strings -Os -Wreturn-type -Wparentheses -Wno-format -Wswitch -Wno-unused-parameter -Wunused-value -Wno-shorten-64-to-32 -Wno-switch -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -gdwarf-2 -mthumb -msoft-float -funsigned-char -fno-common -fno-builtin -fomit-frame-pointer -fstrict-aliasing -finline -finline-functions -funroll-loops -DVERSION='"$(VERSION)"' -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks #look in simulator dir as a cheap way to look for IOKit headers
all: gpSPhone bundle
@@ -44,10 +43,10 @@ gpSPhone: iphone/gpSPhone/src/ControlCell.o iphone/gpSPhone/src/JoyPad.o iphone/
$(LD) $(LDFLAGS) iphone/gpSPhone/src/ControlCell.o iphone/gpSPhone/src/JoyPad.o iphone/gpSPhone/src/iphone.o iphone/gpSPhone/src/main.o iphone/gpSPhone/src/gpSPhoneApp.o iphone/gpSPhone/src/ControllerView.o iphone/gpSPhone/src/MainView.o iphone/gpSPhone/src/FileBrowser.o iphone/gpSPhone/src/EmulationView.o iphone/gpSPhone/src/ScreenView.o iphone/gpSPhone/src/gpSPhone_iPhone.o iphone/arm_stub_c.o iphone/font.o iphone/display.o cheats.o zip.o gui.o main.o cpu.o sound.o input.o memory.o video.o iphone/arm_asm_stub.o cpu_threaded.o -o gpsPhone
%.o: %.m
- $(CC) ${CFLAGS} -std=gnu99 -c $< -o $@
+ $(CC) ${OBJCFLAGS} -std=gnu99 -c $< -o $@
%.o: %.c
- $(GCC) ${GCC_CFLAGS} -std=gnu89 -c $< -o $@
+ $(CC) ${CFLAGS} -std=gnu89 -c $< -o $@
%.o: %.S
$(GCC) -v -arch armv7 -c $< -o $@
View
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#import "common.h"
#define arm_decode_data_proc_reg() \
u32 rn = (opcode >> 16) & 0x0F; \
@@ -155,30 +156,4 @@ u32 print_disasm_arm_instruction(u32 opcode)
{
u32 condition = opcode >> 28;
- switch((opcode >> 25) & 0x07)
- {
- // Data processing reg, multiply, bx, memory transfer half/byte, swap,
- // PSR reg
- case 0x0:
-
- // Data processing imm, PSR imm
- case 0x1:
-
- // Memory transfer imm
- case 0x2:
-
- // Memory transfer reg, undefined
- case 0x3:
-
- // Block memory transfer
- case 0x4:
-
- // Branch
- case 0x5:
-
- // Coprocessor
- case 0x6:
-
- // Coprocessor, SWI
- case 0x7:
- }
+}
@@ -31,7 +31,6 @@
badROMSheetTag,
saveStateSheetTag,
selectROMSheetTag,
- supportSheetTag
};
char __savefileName[512];
@@ -133,18 +132,9 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
- (void)actionSheet:(UIActionSheet *)sheet clickedButtonAtIndex:(NSInteger)button
{
- if (sheet.tag == supportSheetTag)
- {
- if ( button == 1 )
- {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.zodttd.com"]];
- }
- else if ( button == 2 )
- {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.modmyifone.com/forums/?styleid=3"]];
- }
- }
- else if (sheet.tag == saveStateSheetTag)
+ button++;
+
+ if (sheet.tag == saveStateSheetTag)
{
LOGDEBUG("alertSheet:buttonClicked(): saveStateSheet %d", button);
if (button == 1)
@@ -303,10 +293,12 @@ - (void) navigationBar:(UINavigationBar *)navbar buttonClicked:(int)button
- (void) fileBrowser:(FileBrowser *)browser fileSelected:(NSString *)file
{
- m_currentFile = [ file copy ];
+ m_currentFile = [ [ [ browser path ] stringByAppendingPathComponent: file ] copy ];
BOOL bookmarked = [ self isBookmarked:file ];
UIActionSheet *selectROMSheet = [ [ UIActionSheet alloc ] init ];
+ selectROMSheet.tag = selectROMSheetTag;
+
[ selectROMSheet setTitle:[NSString stringWithFormat:@"%@\n%@", [ file lastPathComponent ], @"Please select an action:" ] ];
if ([ [ file pathExtension ] isEqualToString:@"svs" ])
{
@@ -463,7 +455,6 @@ - (void) load
rename("/tmp/gpSPhone.history", "/var/root/Library/Preferences/gpSPhone.history");
free(t);
}
-
currentView = CUR_EMULATOR;
[ transitionView transition:1 toView:emuView ];
[ self startEmulator ];

0 comments on commit a67d1de

Please sign in to comment.