From b12a988b85bd19693fdedd249a8e4b687bb96919 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 16 Jun 2008 17:21:16 +0300 Subject: [PATCH] imported winuaesrc1500b25.zip --- include/custom.h | 2 +- od-win32/WinUAE_Install.nsi | 4 +- od-win32/dxwrap.c | 14 +- od-win32/picasso96_win.c | 5 +- od-win32/wcc.sh | 266 ----------------------------------- od-win32/win32.c | 17 ++- od-win32/win32.h | 40 +++--- od-win32/winuaechangelog.txt | 9 +- od-win32/wrc.sh | 75 ---------- 9 files changed, 51 insertions(+), 381 deletions(-) delete mode 100755 od-win32/wcc.sh delete mode 100755 od-win32/wrc.sh diff --git a/include/custom.h b/include/custom.h index 20bc605c..b0f90a5b 100755 --- a/include/custom.h +++ b/include/custom.h @@ -186,5 +186,5 @@ struct customhack { }; void customhack_put (struct customhack *ch, uae_u16 v, int hpos); uae_u16 customhack_get (struct customhack *ch, int hpos); -extern void alloc_cycle_ext(int, int); +extern void alloc_cycle_ext (int, int); diff --git a/od-win32/WinUAE_Install.nsi b/od-win32/WinUAE_Install.nsi index 8045755a..2993ee18 100755 --- a/od-win32/WinUAE_Install.nsi +++ b/od-win32/WinUAE_Install.nsi @@ -1,5 +1,5 @@ !define PRODUCT_NAME "WinUAE" -!define PRODUCT_VERSION "1.4.6" +!define PRODUCT_VERSION "1.5.0" !define PRODUCT_PUBLISHER "Arabuusimiehet" !define PRODUCT_WEB_SITE "http://www.winuae.net/" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\winuae.exe" @@ -145,8 +145,6 @@ SubSection "Additional files" secAdditionalFiles File "${DISTPATH}\Amiga Programs\timehack" File "${DISTPATH}\Amiga Programs\rtg.library" File "${DISTPATH}\Amiga Programs\p96refresh" - File "${DISTPATH}\Amiga Programs\p96_uae_tweak" - File "${DISTPATH}\Amiga Programs\mousehack" File "${DISTPATH}\Amiga Programs\german_KeyMap_new.zip" File "${DISTPATH}\Amiga Programs\amigaprog.txt" File "${DISTPATH}\Amiga Programs\ahidriver.zip" diff --git a/od-win32/dxwrap.c b/od-win32/dxwrap.c index 5d6f768d..4c6d290e 100755 --- a/od-win32/dxwrap.c +++ b/od-win32/dxwrap.c @@ -335,8 +335,10 @@ HRESULT DirectDraw_CreateMainSurface (int width, int height) ddrval = IDirectDrawSurface7_GetSurfaceDesc (dxdata.primary, &dxdata.native); if (FAILED (ddrval)) write_log ("IDirectDrawSurface7_GetSurfaceDesc: %s\n", DXError (ddrval)); - if (dxdata.fsmodeset) + if (dxdata.fsmodeset) { clearsurf (dxdata.primary); + dxdata.fsmodeset = 1; + } dxdata.backbuffers = desc.dwBackBufferCount; clearsurf (dxdata.flipping[0]); clearsurf (dxdata.flipping[1]); @@ -369,7 +371,7 @@ HRESULT DirectDraw_SetDisplayMode (int width, int height, int bits, int freq) if (FAILED (ddrval)) { write_log ("IDirectDraw7_SetDisplayMode: %s\n", DXError (ddrval)); } else { - dxdata.fsmodeset = 1; + dxdata.fsmodeset = -1; dxdata.width = width; dxdata.height = height; dxdata.depth = bits; @@ -406,7 +408,7 @@ HRESULT DirectDraw_CreateClipper (void) return ddrval; } -HRESULT DirectDraw_SetClipper(HWND hWnd) +HRESULT DirectDraw_SetClipper (HWND hWnd) { HRESULT ddrval; @@ -796,6 +798,8 @@ static void flip (void) int DirectDraw_Flip (int doflip) { + if (dxdata.primary == NULL) + return 0; if (getlocksurface () != dxdata.secondary) { if (doflip) { flip (); @@ -819,7 +823,7 @@ HRESULT DirectDraw_SetPaletteEntries (int start, int count, PALETTEENTRY *palett HRESULT DirectDraw_SetPalette (int remove) { HRESULT ddrval; - if (!dxdata.fsmodeset || (!dxdata.palette && !remove)) + if (dxdata.fsmodeset <= 0 || (!dxdata.palette && !remove)) return DD_FALSE; ddrval = IDirectDrawSurface7_SetPalette (dxdata.primary, remove ? NULL : dxdata.palette); if (FAILED (ddrval)) @@ -919,7 +923,7 @@ int dx_islost (void) void dx_check (void) { dxdata.islost = 0; - if (dxdata.fsmodeset == 0) + if (dxdata.fsmodeset <= 0) return; if (IDirectDrawSurface7_IsLost (dxdata.primary) != DDERR_SURFACELOST) return; diff --git a/od-win32/picasso96_win.c b/od-win32/picasso96_win.c index 00741e81..b20c3bb2 100755 --- a/od-win32/picasso96_win.c +++ b/od-win32/picasso96_win.c @@ -1795,7 +1795,7 @@ static int AssignModeID (int w, int h, int *unkcnt) } (*unkcnt)++; write_log ("P96: Non-unique mode %dx%d\n", w, h); - return 0x51000000 - (*unkcnt) * 0x10000; + return 0x51001000 - (*unkcnt) * 0x10000; } static uaecptr picasso96_amem, picasso96_amemend; @@ -1909,7 +1909,7 @@ void picasso96_alloc (TrapContext *ctx) if (missmodes[misscnt * 2] >= 0) { int w = DisplayModes[i].res.width; int h = DisplayModes[i].res.height; - if (w > missmodes[misscnt * 2 + 0] || h > missmodes[misscnt * 2 + 1]) { + if (w > missmodes[misscnt * 2 + 0] || (w == missmodes[misscnt * 2 + 0] && h > missmodes[misscnt * 2 + 1])) { struct PicassoResolution *pr = &newmodes[cnt]; memcpy (pr, &DisplayModes[i], sizeof (struct PicassoResolution)); pr->res.width = missmodes[misscnt * 2 + 0]; @@ -3704,6 +3704,7 @@ static void flushpixels (void) if (!picasso_vidinfo.extra_mem || !gwwbuf || src_start >= src_end) return; + (*((uae_u8*)0)) = 0; if (full_refresh) full_refresh = -1; diff --git a/od-win32/wcc.sh b/od-win32/wcc.sh deleted file mode 100755 index db622a00..00000000 --- a/od-win32/wcc.sh +++ /dev/null @@ -1,266 +0,0 @@ -#! /bin/sh -# -# Somewhat horrible shell script to convert GCC style options into Watcom -# style. -# -# I put this into the public domain - if you think you can use it for -# anything, use it. -# -# Written 1998 Bernd Schmidt - -realdirname () { - tmp_save_dir=`pwd` - cd $@ - result=`pwd -P` - cd $tmp_save_dir - result=`echo $result |sed 's,/,\\\\,g'` -} - -realfilename () { - case $@ in - */*) - tmp_save_dir=`pwd` - cd `echo $@ | sed 's,/[^/]*$,,'` - result=`pwd -P`/`basename $@` - cd $tmp_save_dir - ;; - *) - result=$@ - ;; - esac - result=`echo $result |sed 's,/,\\\\,g'` -} - -gcc_wsysinc1=`echo $INCLUDE | sed 's,;, ,g' | sed 's,.:,;\\0,g' |sed -e 's,;,//,g' -e 's,:,/,g' -e 's,\\\\,/,g'` -for foo in $gcc_wsysinc1; do - gcc_wsysinc2="$gcc_wsysinc2 -I$foo" -done -gcc_spcdefs="-undef -U__GNUC__ -U__GNUC_MINOR__ -D_WIN32 -D__WATCOMC__ -D_STDCALL_SUPPORTED=1 -D__X86__ -D__386__=1 -DM_I386=1 -D_M_I386 -D_M_IX86=500 -D__NT__=1" - -mode=link -options= -srcfiles= -asmfiles= -objfiles= -resfiles= -outputfile= -libraries= -gnudefines= -wccdefines= -includes= -gnuincludes= - -next_is_output=no -next_is_include=no - -for arg in $@; do - -if test $next_is_output = yes; then - outputfile=$arg - next_is_output=no -else if test $next_is_include = yes; then - includes="$includes $arg" - gnuincludes="$gnuincludes -I$arg" - next_is_include=no -else - case $arg in -# Passing /xxx options directly may be too risky - they could be confused for -# file names - so use this escape. - --/--*) - options="$options `echo $arg |sed s,^--/--,/,`" - ;; - - -I) next_is_include=yes - ;; - - -I*) - includes="$includes `echo $arg | sed 's,^-I,,'`" - gnuincludes="$gnuincludes $arg" - ;; - - -D*=*) - gnudefines="$gnudefines $arg" - wccdefines="$wccdefines `echo $arg |sed 's,^-D,/d,'`" - ;; - - -D*) - gnudefines="$gnudefines $arg" - wccdefines="$wccdefines `echo $arg |sed 's,^-D,/d,'`=" - ;; - - -c) if [ "$mode" != "link" ]; then - echo "Bad argument" - exit 10 - fi - mode=compile - ;; - - -S) if [ "$mode" != "link" ]; then - echo "Bad argument" - exit 10 - fi - mode=assemble - ;; - - -E) if [ "$mode" != "link" ]; then - echo "Bad argument" - exit 10 - fi - mode=preprocess - ;; - - -g) options="$options /d2" - ;; - - -o) next_is_output=yes - if [ "x$outputfile" != "x" ]; then - echo "Multiple output files!" - exit 10 - fi - ;; - - -l*) libraries="$libraries `echo $arg | sed 's,^-l,,'`" - ;; - - *.c) - srcfiles="$srcfiles $arg" - ;; - - *.S) - asmfiles="$asmfiles $arg" - ;; - - *.res) - realfilename $arg - resfiles="$resfiles $result" - ;; - - *.o) - realfilename $arg - objfiles="$objfiles $result" - ;; - - *) echo "Bad argument: $arg" - ;; - esac -fi -fi -done - -#echo "Source files: $srcfiles" -#echo "Object files: $objfiles" -#echo "Output files: $outputfile" -#echo "Libraries: $libraries" -echo "Mode: $mode" -#echo "Options: $options" - -if [ "$mode" != "link" -a "x$libraries" != "x" ]; then - echo "Libraries specified in non-link mode!" - exit 10 -fi - -prefiles= -srccount=0 -for foo in $srcfiles; do - bar=wccsh-tmppre$srccount.i - prefiles="$prefiles $bar" - echo "gcc -E -nostdinc $gnuincludes $gcc_wsysinc2 $gcc_spcdefs $gnudefines $foo -o $bar" - if gcc -E -nostdinc $gnuincludes $gcc_wsysinc2 $gcc_spcdefs $gnudefines $foo -o $bar; then - - else - exit 10 - fi - if [ ! -f $bar ]; then - exit 10 - fi - srccount=`expr $srccount + 1` -done - -tmpobjs= -if test $mode = compile -o $mode = link; then - tmpcnt=0 - for foo in $asmfiles; do - bar=wccsh-tmpobj$tmpcnt.o - tmpcnt=`expr $tmpcnt + 1` - tmpobjs="$tmpobjs $bar" - echo "gcc -c $foo -o $bar" - gcc -c $foo -o $bar - srccount=`expr $srccount + 1` - done - for foo in $prefiles; do - bar=wccsh-tmpobj$tmpcnt.o - tmpcnt=`expr $tmpcnt + 1` - tmpobjs="$tmpobjs $bar" - sed -e '/^# [0123456789]*/s,^# ,#line ,' -e '/^#line/s,"[^"]*$,",' <$foo> wccsh_tmpsrc.c - echo "wcc386 $foo $options /fo=$bar" - wcc386 wccsh_tmpsrc.c $options /fo=wcc_tmp.o >&2 - mv -f wcc_tmp.o $bar - if [ ! -f $bar ]; then - rm -f $prefiles $tmpobjs - exit 10 - fi - done -fi - -case $mode in - preprocess) - for foo in $prefiles; do - if [ "x$outputfile" = "x" ]; then - cat $foo - else - mv -f $foo $outputfile - fi - done - ;; - - compile) - if [ "$srccount" != "1" -a "x$outputfile" != "x" ]; then - echo "cannot specify -o and -c with multiple compilations" >&2 - exit 10 - fi - if [ "x$outputfile" != "x" ]; then - echo Moving "'" $tmpobjs "'" to "'" $outputfile "'" - if mv $tmpobjs $outputfile 2>/dev/null; then - fi - fi - ;; - - assemble) - ;; - - link) - if [ "x$outputfile" = "x" ]; then - outputfile=a.out - fi - FILES= - for foo in $objfiles $tmpobjs; do - if [ "x$FILES" = "x" ]; then - FILES=$foo - else - FILES="$FILES,$foo" - fi - done - for foo in $resfiles; do - FILES="$FILES op resource=$foo" - done - for foo in $libraries; do - FILES="$FILES LIB $foo" - done -# echo Files: $FILES -# echo "wlink SYSTEM nt FIL $FILES NAME $outputfile" - wlink SYSTEM nt FIL $FILES NAME $outputfile >wccsh-linkerror.log - if grep "cannot open.*No such file or" wccsh-linkerror.log; then -# rm wccsh-linkerror.log - rm $outputfile - exit 10 - fi -# rm wccsh-linkerror.log - if [ ! -f $outputfile ]; then - rm -f $prefiles $tmpobjs - exit 10 - fi - ;; -esac - -rm -f $prefiles $tmpobjs -exit 0 diff --git a/od-win32/win32.c b/od-win32/win32.c index 094b0d51..bc6aae8b 100755 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -1732,7 +1732,7 @@ void logging_cleanup (void) uae_u8 *save_log (int bootlog, int *len) { FILE *f; - uae_u8 *dst; + uae_u8 *dst = NULL; int size; if (!logging_started) @@ -1745,11 +1745,13 @@ uae_u8 *save_log (int bootlog, int *len) fseek (f, 0, SEEK_SET); if (size > 30000) size = 30000; - dst = xcalloc (1, size + 1); - if (dst) - fread (dst, 1, size, f); - fclose (f); - *len = size + 1; + if (size > 0) { + dst = xcalloc (1, size + 1); + if (dst) + fread (dst, 1, size, f); + fclose (f); + *len = size + 1; + } return dst; } @@ -3281,6 +3283,7 @@ static void savedump (MINIDUMPWRITEDUMP dump, HANDLE f, struct _EXCEPTION_POINTE log = save_log (FALSE, &loglen); if (log) { musi.UserStreamCount++; + musp = &mus[1]; musp->Type = LastReservedStream + 2; musp->Buffer = log; musp->BufferSize = loglen; @@ -3342,7 +3345,7 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer if (os_winnt && GetModuleFileName (NULL, path, MAX_DPATH)) { char *slash = strrchr (path, '\\'); - _time64(&now); + _time64 (&now); when = *_localtime64 (&now); strcpy (path2, path); if (slash) { diff --git a/od-win32/win32.h b/od-win32/win32.h index 5d751568..7ac6888e 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,10 +15,10 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEBETA 24 +#define WINUAEBETA 25 #define WINUAEPUBLICBETA 1 -#define WINUAEDATE MAKEBD(2008, 6, 15) -#define WINUAEEXTRA "" +#define WINUAEDATE MAKEBD(2008, 6, 16) +#define WINUAEEXTRA "RC1" #define WINUAEREV "" #define IHF_WINDOWHIDDEN 6 @@ -37,16 +37,16 @@ extern char start_path_exe[MAX_DPATH]; extern char start_path_data[MAX_DPATH]; extern void my_kbd_handler (int, int, int); -extern void clearallkeys(void); +extern void clearallkeys (void); extern int getcapslock (void); void releasecapture (void); -int WIN32_RegisterClasses(void); -int WIN32_InitHtmlHelp(void); -int WIN32_InitLibraries(void); -int WIN32_CleanupLibraries(void); -void WIN32_MouseDefaults(int, int); -void WIN32_HandleRegistryStuff(void); +int WIN32_RegisterClasses (void); +int WIN32_InitHtmlHelp (void); +int WIN32_InitLibraries (void); +int WIN32_CleanupLibraries (void); +void WIN32_MouseDefaults (int, int); +void WIN32_HandleRegistryStuff (void); extern void setup_brkhandler (void); extern void remove_brkhandler (void); extern void disablecapture (void); @@ -54,10 +54,10 @@ extern void fullscreentoggle (void); extern void setmouseactive (int active); extern void minimizewindow (void); -extern uae_u32 OSDEP_minimize_uae(void); +extern uae_u32 OSDEP_minimize_uae (void); -extern void resumepaused(void); -extern void setpaused(void); +extern void resumepaused (void); +extern void setpaused (void); void finishjob (void); void updatedisplayarea (void); @@ -111,7 +111,7 @@ extern void dinput_window (void); void addnotifications (HWND hwnd, int remove); int win32_hardfile_media_change (const char *drvname, int inserted); -extern int CheckRM(char *DriveName); +extern int CheckRM (char *DriveName); void systray (HWND hwnd, int remove); void systraymenu (HWND hwnd); void exit_gui (int); @@ -122,8 +122,8 @@ void read_rom_list (void); #define WIN32_PLUGINDIR "plugins\\" HMODULE WIN32_LoadLibrary (const char *); -extern int screenshot_prepare(void); -extern void screenshot_free(void); +extern int screenshot_prepare (void); +extern void screenshot_free (void); struct winuae_lang { @@ -131,11 +131,11 @@ struct winuae_lang char *name; }; extern struct winuae_lang langs[]; -extern HMODULE language_load(WORD language); +extern HMODULE language_load (WORD language); -extern void logging_open(int,int); -extern void logging_cleanup(void); +extern void logging_open (int,int); +extern void logging_cleanup (void); -extern LONG WINAPI WIN32_ExceptionFilter(struct _EXCEPTION_POINTERS *pExceptionPointers, DWORD ec); +extern LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointers, DWORD ec); #endif diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 17f95d39..17e58a1d 100755 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,9 @@ +Beta 25: RC1 + +- "non-standard" Picasso96 resolutions are available again +- fixed unusable huge crash dumps if logging was enabled + Beta 24: - real PCMCIA SRAM card removal should really really work now @@ -6,8 +11,8 @@ Beta 24: could have been sent to wrong device unit if multiple harddisk devices were configured (including hardfiles) - direct3d and opengl fullscreen fixed -- direct3d<>Picasso96 switching fixed (always need full display reset) -- NTSC vblank end fixed (top of display was cut in overscan modes) +- direct3d/ogl<>Picasso96 switching fixed (instant switch not possible) +- NTSC vblank end vpos fixed (top of display was cut in overscan modes) Beta 23: diff --git a/od-win32/wrc.sh b/od-win32/wrc.sh deleted file mode 100755 index ec632686..00000000 --- a/od-win32/wrc.sh +++ /dev/null @@ -1,75 +0,0 @@ -#! /bin/sh -# - -realdirname () { - tmp_save_dir=`pwd` - cd $@ - result=`pwd -P` - cd $tmp_save_dir - result=`echo $result |sed 's,/,\\\\,g'` -} - -realfilename () { - case $@ in - */*) - tmp_save_dir=`pwd` - cd `echo $@ | sed 's,/[^/]*$,,'` - result=`pwd -P`/`basename $@` - cd $tmp_save_dir - ;; - *) - result=$@ - ;; - esac - result=`echo $result |sed 's,/,\\\\,g'` -} - -next_is_include=no -resfiles= -srcfiles= -exefile= - -for arg in $@; do - -if test $next_is_include = yes; then - realdirname $arg - includes="$includes /i=$result" - next_is_include=no -else - case $arg in - -I) next_is_include=yes - ;; - - -I*) - foo=`echo $arg | sed 's,^-I,,'` - realdirname $foo - includes="$includes /i=$result" - ;; - - *.rc) - realfilename $arg - srcfiles="$srcfiles $result" - ;; - - *.res) - realfilename $arg - resfiles="$resfiles $result" - ;; - - *.exe) - realfilename $arg - exefile=$result - ;; - - *) echo "Bad argument: $arg" - ;; - esac -fi -done - -echo "wrc /bt=nt /dWIN32 /d_WIN32 /d__NT__ /r $includes $srcfiles" -if test -z "$exefile"; then - wrc /bt=nt /dWIN32 /d_WIN32 /d__NT__ /r $includes $srcfiles -else - wrc $resfiles $exefile -fi -- 2.47.3