? .DS_Store
? build
? config_old.h
? conflicts
? hatari-080912.patch
? hatari-081004.patch
? q
? Hatari.xcodeproj/giz.mode1
? Hatari.xcodeproj/giz.mode1v3
? Hatari.xcodeproj/giz.pbxuser
? src/.DS_Store
? src/gemdos.c_
? src/gui-osx/PrefsController.m_
? src/includes/configuration.h_
? src/uae-cpu/build68k.dSYM
? src/uae-cpu/newcpu.c_
Index: Hatari.xcodeproj/project.pbxproj
===================================================================
RCS file: /cvsroot/hatari/hatari/Hatari.xcodeproj/project.pbxproj,v
retrieving revision 1.12
diff -r1.12 project.pbxproj
6c6
< 	objectVersion = 42;
---
> 	objectVersion = 44;
18c18,21
< 		961322D80B5BCDB900007C3E /* config-default.h in Headers */ = {isa = PBXBuildFile; fileRef = 961322D30B5BCDB900007C3E /* config-default.h */; };
---
> 		637694150E72DD1700AFC63A /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 637694140E72DD1700AFC63A /* utils.c */; };
> 		6376941A0E72DDB400AFC63A /* dsp_core.c in Sources */ = {isa = PBXBuildFile; fileRef = 637694180E72DDB400AFC63A /* dsp_core.c */; };
> 		6376941B0E72DDB400AFC63A /* dsp_core.h in Headers */ = {isa = PBXBuildFile; fileRef = 637694190E72DDB400AFC63A /* dsp_core.h */; };
> 		63E840130E745FDC00578D4F /* ym2149_fixed_vol.h in Headers */ = {isa = PBXBuildFile; fileRef = 63E840120E745FDC00578D4F /* ym2149_fixed_vol.h */; };
198d200
< 		E9D75D5A0E8C1BB1000E76DE /* ym2149_fixed_vol.h in Headers */ = {isa = PBXBuildFile; fileRef = E9D75D590E8C1BB1000E76DE /* ym2149_fixed_vol.h */; };
253c255,259
< 		961322D30B5BCDB900007C3E /* config-default.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "config-default.h"; sourceTree = "<group>"; };
---
> 		636E057F0E29C43D008DF96D /* utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = utils.c; path = src/utils.c; sourceTree = "<group>"; };
> 		637694140E72DD1700AFC63A /* utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = utils.c; path = src/utils.c; sourceTree = "<group>"; };
> 		637694180E72DDB400AFC63A /* dsp_core.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dsp_core.c; path = src/falcon/dsp_core.c; sourceTree = "<group>"; };
> 		637694190E72DDB400AFC63A /* dsp_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dsp_core.h; path = src/falcon/dsp_core.h; sourceTree = "<group>"; };
> 		63E840120E745FDC00578D4F /* ym2149_fixed_vol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ym2149_fixed_vol.h; path = src/includes/ym2149_fixed_vol.h; sourceTree = "<group>"; };
483d488
< 				961322D30B5BCDB900007C3E /* config-default.h */,
496a502
> 				63E840120E745FDC00578D4F /* ym2149_fixed_vol.h */,
531a538,539
> 				637694180E72DDB400AFC63A /* dsp_core.c */,
> 				637694190E72DDB400AFC63A /* dsp_core.h */,
567a576
> 				636E057F0E29C43D008DF96D /* utils.c */,
591a601
> 				637694140E72DD1700AFC63A /* utils.c */,
834d843
< 				961322D80B5BCDB900007C3E /* config-default.h in Headers */,
852c861,862
< 				E9D75D5A0E8C1BB1000E76DE /* ym2149_fixed_vol.h in Headers */,
---
> 				6376941B0E72DDB400AFC63A /* dsp_core.h in Headers */,
> 				63E840130E745FDC00578D4F /* ym2149_fixed_vol.h in Headers */,
903c913
< 			compatibilityVersion = "Xcode 2.4";
---
> 			compatibilityVersion = "Xcode 3.0";
1027a1038,1039
> 				637694150E72DD1700AFC63A /* utils.c in Sources */,
> 				6376941A0E72DDB400AFC63A /* dsp_core.c in Sources */,
1057a1070
> 				ENABLE_DSP_EMU = 1;
1078c1091,1094
< 				OTHER_CFLAGS = "-Wno-unused";
---
> 				OTHER_CFLAGS = (
> 					"-Wno-unused",
> 					"-DENABLE_DSP_EMU",
> 				);
1095a1112
> 				ENABLE_DSP_EMU = 1;
1114c1131,1134
< 				OTHER_CFLAGS = "-Wno-unused";
---
> 				OTHER_CFLAGS = (
> 					"-Wno-unused",
> 					"-DENABLE_DSP_EMU",
> 				);
1173c1193,1196
< 				MACOSX_DEPLOYMENT_TARGET = 10.3;
---
> 				DEPLOYMENT_POSTPROCESSING = NO;
> 				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
> 				HEADER_SEARCH_PATHS = "";
> 				MACOSX_DEPLOYMENT_TARGET = 10.5;
1176c1199,1201
< 				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
---
> 				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
> 				SEPARATE_STRIP = YES;
> 				USER_HEADER_SEARCH_PATHS = "";
1186a1212,1213
> 				DEPLOYMENT_POSTPROCESSING = NO;
> 				ENABLE_DSP_EMU = 1;
1191c1218
< 				MACOSX_DEPLOYMENT_TARGET = 10.3;
---
> 				MACOSX_DEPLOYMENT_TARGET = 10.5;
1195c1222,1223
< 				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
---
> 				SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
> 				SEPARATE_STRIP = YES;
Index: src/debugui.c
===================================================================
RCS file: /cvsroot/hatari/hatari/src/debugui.c,v
retrieving revision 1.25
diff -r1.25 debugui.c
41a42,43
> bool bDebugStep=FALSE;		/* Are we single stepping the CPU? */
> 
48,49d49
< 
< 
572a573
> 		" i - step one instruction\n"
686a688,692
> 	case 'i':
> 		//DebugUI_Step();
> 		retval = DEBUG_STEP;
> 		break;
> 			
731a738
> 	int cmd;
735c742,750
< 	fprintf(stderr, "\nYou have entered debug mode. Type c to continue emulation, h for help."
---
> 	if(bDebugStep)
> 	{
> 		uaecptr disasm_addr = M68000_GetPC();
> 		uaecptr nextpc;
> 		m68k_disasm(debugOutput, (uaecptr)disasm_addr, &nextpc, 1);		
> 	}
> 	else
> 	{
> 		fprintf(stderr, "\nYou have entered debug mode. Type c to continue emulation, h for help."
737,738c752,763
< 	while (DebugUI_GetCommand() != DEBUG_QUIT)
< 		;
---
> 	}
> 	
> 	while ( (cmd=DebugUI_GetCommand()) != DEBUG_QUIT)
> 	{
> 		if(cmd == DEBUG_STEP)
> 		{
> 			fprintf(stderr,"Stepping...\n");
> 			bDebugStep=TRUE;
> 			return;
> 		}
> 	}
> 	bDebugStep=FALSE;
Index: src/main.c
===================================================================
RCS file: /cvsroot/hatari/hatari/src/main.c,v
retrieving revision 1.143
diff -r1.143 main.c
55c55
< bool bEnableDebug = FALSE;                /* Enable debug UI? */
---
> bool bEnableDebug = TRUE;                /* Enable debug UI? */
Index: src/options.c
===================================================================
RCS file: /cvsroot/hatari/hatari/src/options.c,v
retrieving revision 1.72
diff -r1.72 options.c
46d45
< 
49,50c48
< bool bBiosIntercept;       /* whether UAE should intercept Bios & XBios calls */
< 
---
> bool bBiosIntercept=TRUE;  /* whether UAE should intercept Bios & XBios calls */
Index: src/rs232.c
===================================================================
RCS file: /cvsroot/hatari/hatari/src/rs232.c,v
retrieving revision 1.33
diff -r1.33 rs232.c
57c57
< static inline void cfmakeraw(struct termios *termios_p)
---
> void cfmakeraw(struct termios *termios_p)
Index: src/xbios.c
===================================================================
RCS file: /cvsroot/hatari/hatari/src/xbios.c,v
retrieving revision 1.17
diff -r1.17 xbios.c
23c23
< 
---
> #include "debugui.h"
176a177,316
> /*----------------------------------------------------------------------- */
> /**
>  * XBIOS Change Emulator Speed
>  * Call 255
>  */
> static bool XBios_HatariSpeed(Uint32 Params)
> {
>   Params = STMemory_ReadWord(Params+4);
>   fprintf(stderr, "Intercepted XBIOS HatariSpeed(): ");
> 		       
>   /* Min speed? */
>   if(Params == 1)
>   {
>     ConfigureParams.System.bFastForward = false;
>     //ConfigureParams.System.nMinMaxSpeed = MINMAXSPEED_MIN;
>     /* Reset the sound emulation variables: */
>     Sound_ResetBufferIndex();
>     fprintf(stderr, "Normal speed\n");
>     Regs[REG_D0] = 0;
>   }
>   else if(Params == 2)
>   {
>     ConfigureParams.System.bFastForward = true;
>     //ConfigureParams.System.nMinMaxSpeed = MINMAXSPEED_MAX;
>     fprintf(stderr, "Maximum speed!\n");
>     Regs[REG_D0] = 0;
>   }
>   else
>   {
>     fprintf(stderr, "Unknown argument (%d)\n",Params);
>     Regs[REG_D0] = -1;
>   }
> 
>   return(TRUE);
> }
> 
> /*----------------------------------------------------------------------- */
> /**
>  * XBIOS Debug output to console
>  * Call 254
>  * Parameters: memptr at -2(sp) and numbytes at -6(sp)
>  */
> static bool XBios_Debug(Uint32 Params)
> {
>   int i;
>   Uint32 memptr = STMemory_ReadLong(Params+2);
>   Uint32 length = STMemory_ReadLong(Params+6);
>   
>   fprintf(stderr, "Memory dump at 0x%08x (%d bytes): ", memptr, length);
>   if(length>256)
>   {
>     length = 256;
>     fprintf(stderr,"length truncated to 256 bytes! ");
>   }
>   for(i=0;i<length;i++)
>   {
>     if( (i%16) == 0) fprintf(stderr,"\n");
>     fprintf(stderr,"%02x ",STMemory_ReadByte(memptr+i));
>   }
>   fprintf(stderr,"\n");
>   
>   return(TRUE);
> }
> 
> /**
>  * XBIOS Dump all registers to console
>  * Call 251
>  * Parameters: none
>  */
> static bool XBios_Registers(Uint32 Params)
> {
> //	Uint32 memptr = STMemory_ReadLong(Params+2);
> //	Uint32 length = STMemory_ReadLong(Params+6);
> 	
> 	fprintf(stderr, "Registers: \n");
> 	fprintf(stderr,"d/a0     d/a1     d/a2     d/a3      d/a4     d/a5     d/a6     d/a7 \n");
> 	fprintf(stderr,"%08x %08x %08x %08x %08x %08x %08x %08x \n",
> 		Regs[REG_D0], Regs[REG_D1], Regs[REG_D2], Regs[REG_D3],
> 		Regs[REG_D4], Regs[REG_D5], Regs[REG_D6], Regs[REG_D7] );
> 	fprintf(stderr,"%08x %08x %08x %08x %08x %08x %08x %08x \n",
> 		Regs[REG_A0], Regs[REG_A1], Regs[REG_A2], Regs[REG_A3],
> 		Regs[REG_A4], Regs[REG_A5], Regs[REG_A6], Regs[REG_A7] );
> 	
> 	return(TRUE);
> }
> 
> static Uint32 sCycleCounter[256];
> extern int nScanlinesPerFrame;                   /* Number of scan lines per frame */
> extern int nCyclesPerLine;                       /* Cycles per horizontal line scan */
> 
> /**
>  * XBIOS Start or restart a cycle counter
>  * Call 253
>  * Parameters: counter no at -2(sp)
>  */
> static bool XBios_CounterStart(Uint32 Params)
> {
>   Params = STMemory_ReadWord(Params+2);
>   Params &= 0xFF;  /* we only use 255 cycle counters */
>   sCycleCounter[Params] = Cycles_GetCounter(CYCLES_COUNTER_VIDEO);
> /*  fprintf(stderr,"XBios cycle counter #%d started at %d\n",Params,sCycleCounter[Params]); */
>   return(TRUE);
> }
> 
> /**
>  * XBIOS Stop a cycle counter
>  * Call 252
>  * Parameters: counter no at -2(sp)
>  */
> static bool XBios_CounterRead(Uint32 Params)
> {
>   Uint32 cycles,curr_cycles;
>   Params = STMemory_ReadWord(Params+2);
>   Params &= 0xFF;  /* we only use 255 cycle counters */
> /*  sCycleCounter[Params] = nCycleMainCounter - sCycleCounter[Params]; */
> 
>   cycles = Cycles_GetCounter(CYCLES_COUNTER_VIDEO);
> 
>   /* has the frame refreshed? */
>   if(cycles < sCycleCounter[Params])
>   {  /* extend the frame... */
>     cycles += nScanlinesPerFrame*nCyclesPerLine;;
>   }
> 
>   curr_cycles = cycles-sCycleCounter[Params];
>   fprintf(stderr,"Cnt #%d at %d : %d cycles (%d frames + %d cycles)\n",
>     Params,cycles,curr_cycles,curr_cycles/nCyclesPerLine,curr_cycles%nCyclesPerLine);
>   return(TRUE);
> }
> 
> /**
>  * XBIOS Enter Hatari debug UI
>  * Call 251
>  * Parameters: none
>  */
> static bool XBios_DebugUI(Uint32 Params)
> {
> 	DebugUI();
> 	return(TRUE);
> }
186d325
< 
190c329
< 
---
> 	Log_Printf(LOG_DEBUG, "XBIOS %d\n",XBiosCall);
208a348,367
> 	/* DHS specific debug patches */
> 	case 250:
> 		HATARI_TRACE ( HATARI_TRACE_OS_XBIOS, "XBIOS DHS Registers()\n" );
> 		return(XBios_Registers(Params));
> 	case 251:
> 		HATARI_TRACE ( HATARI_TRACE_OS_XBIOS, "XBIOS DHS DebugUI()\n" );
> 		return(XBios_DebugUI(Params));
> 	case 252:
> 		HATARI_TRACE ( HATARI_TRACE_OS_XBIOS, "XBIOS DHS CounterRead()\n" );
> 		return(XBios_CounterRead(Params));
> 	case 253:
> 		HATARI_TRACE ( HATARI_TRACE_OS_XBIOS, "XBIOS DHS CounterStart()\n" );
> 		return(XBios_CounterStart(Params));
> 	case 254:
> 		HATARI_TRACE ( HATARI_TRACE_OS_XBIOS, "XBIOS DHS Debug()\n" );
> 		return(XBios_Debug(Params));
> 	case 255:
> 		HATARI_TRACE ( HATARI_TRACE_OS_XBIOS, "XBIOS DHS HatariSpeed()\n" );
> 		return(XBios_HatariSpeed(Params));
> 			
Index: src/includes/debugui.h
===================================================================
RCS file: /cvsroot/hatari/hatari/src/includes/debugui.h,v
retrieving revision 1.3
diff -r1.3 debugui.h
14c14,15
< 	DEBUG_CMD
---
> 	DEBUG_CMD,
> 	DEBUG_STEP
19a21,22
> extern bool bDebugStep;
> 
Index: src/uae-cpu/newcpu.c
===================================================================
RCS file: /cvsroot/hatari/hatari/src/uae-cpu/newcpu.c,v
retrieving revision 1.57
diff -r1.57 newcpu.c
891c891,900
< 	      DebugUI();
---
> 	      if(currpc == 0xe00406 ||
> 		 currpc == 0xe0041e ||
> 		 currpc == 0xe004c4 ||
> 		 currpc == 0xe0058a ||
> 		 currpc == 0xe029bc ||
> 		 currpc == 0xe0290c ||
> 		 currpc == 0x02f354)
> 	         fprintf(stderr,"Ignoring: probably in TOS boot sequence!\n");
> 	      else
> 	        DebugUI();
1489a1499,1500
> 	if(bDebugStep) DebugUI();
> 
1557a1569,1570
> 	if(bDebugStep) DebugUI();
> 
