From: Toni Wilen Date: Mon, 24 Oct 2005 15:26:06 +0000 (+0300) Subject: imported winuaesrc1110.zip X-Git-Tag: 2100~296 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=11c992b25e168f2b98a503b2f7eec72c0592d357;p=francis%2Fwinuae.git imported winuaesrc1110.zip --- diff --git a/audio.c b/audio.c index ce2411c2..0e3a7e74 100755 --- a/audio.c +++ b/audio.c @@ -54,6 +54,7 @@ struct audio_channel_data { int len, wlen; uae_u16 dat, dat2; int request_word, request_word_skip; + int vpos; }; int sampleripper_enabled; @@ -696,13 +697,13 @@ static int isirq (int nr) return INTREQR() & (0x80 << nr); } -static void setirq (int nr) +static void setirq (int nr, int debug) { - INTREQ (0x8000 | (0x80 << nr)); #ifdef DEBUG_AUDIO if (debugchannel (nr)) - write_log ("SETIRQ %d %08.8X\n", nr, m68k_getpc()); + write_log ("SETIRQ %d %08.8X (%d)\n", nr, m68k_getpc(), debug); #endif + INTREQ (0x8000 | (0x80 << nr)); } static void newsample (int nr, sample8_t sample) @@ -739,6 +740,13 @@ static void state23 (struct audio_channel_data *cdp) } } +static void zerostate(struct audio_channel_data *cdp) +{ + cdp->state = 0; + cdp->evtime = MAX_EV; + cdp->request_word = 0; +} + static void audio_handler (int nr, int timed) { struct audio_channel_data *cdp = audio_channel + nr; @@ -755,6 +763,7 @@ static void audio_handler (int nr, int timed) cdp->request_word = 0; cdp->request_word_skip = 0; cdp->intreq2 = 0; + cdp->vpos = vpos; if (cdp->dmaen) { cdp->state = 1; cdp->wlen = cdp->len; @@ -770,7 +779,7 @@ static void audio_handler (int nr, int timed) } else if (!cdp->dmaen && cdp->request_word < 0 && !isirq (nr)) { cdp->evtime = 0; cdp->state = 2; - setirq (nr); + setirq (nr, 0); audio_handler (nr, timed); return; } @@ -785,6 +794,8 @@ static void audio_handler (int nr, int timed) if (cdp->wlen != 1) cdp->wlen = (cdp->wlen - 1) & 0xFFFF; cdp->request_word = 2; + /* "mysterious" delay for Mission Elevator */ + //if (cdp->vpos == vpos) if (current_hpos () > maxhpos - 20) cdp->request_word_skip = 1; return; @@ -794,7 +805,7 @@ static void audio_handler (int nr, int timed) cdp->request_word = 2; return; } - setirq (nr); + setirq (nr, 1); if (!cdp->dmaen) { cdp->state = 0; cdp->request_word = 0; @@ -812,9 +823,7 @@ static void audio_handler (int nr, int timed) cdp->per = PERIOD_MAX; if (!cdp->dmaen && isirq (nr) && ((cdp->per <= 30 ) || (evtime == 0 || evtime == MAX_EV || evtime == cdp->per))) { - cdp->state = 0; - cdp->evtime = MAX_EV; - cdp->request_word = 0; + zerostate (cdp); return; } @@ -826,7 +835,7 @@ static void audio_handler (int nr, int timed) /* Period attachment? */ if (audap) { if (cdp->intreq2 && cdp->dmaen) - setirq (nr); + setirq (nr, 2); cdp->intreq2 = 0; cdp->request_word = 1; cdp->dat = cdp->dat2; @@ -854,10 +863,10 @@ static void audio_handler (int nr, int timed) if (napnav) cdp->request_word = 1; if (cdp->intreq2 && napnav) - setirq (nr); + setirq (nr, 3); } else { if (napnav) - setirq (nr); + setirq (nr, 4); } cdp->intreq2 = 0; @@ -1129,7 +1138,7 @@ void AUDxDAT (int nr, uae_u16 v) #ifdef DEBUG_AUDIO if (debugchannel (nr)) - write_log ("AUD%dDAT: %04.4X STATE=%d IRQ=%d %p\n", nr, + write_log ("AUD%dDAT: %04.4X STATE=%d IRQ=%d %08.8X\n", nr, v, cdp->state, isirq(nr) ? 1 : 0, m68k_getpc()); #endif update_audio (); @@ -1150,7 +1159,7 @@ void AUDxLCH (int nr, uae_u16 v) audio_channel[nr].lc = (audio_channel[nr].lc & 0xffff) | ((uae_u32)v << 16); #ifdef DEBUG_AUDIO if (debugchannel (nr)) - write_log ("AUD%dLCH: %04.4X %p\n", nr, v, m68k_getpc()); + write_log ("AUD%dLCH: %04.4X %08.8X\n", nr, v, m68k_getpc()); #endif } @@ -1160,7 +1169,7 @@ void AUDxLCL (int nr, uae_u16 v) audio_channel[nr].lc = (audio_channel[nr].lc & ~0xffff) | (v & 0xFFFE); #ifdef DEBUG_AUDIO if (debugchannel (nr)) - write_log ("AUD%dLCL: %04.4X %p\n", nr, v, m68k_getpc()); + write_log ("AUD%dLCL: %04.4X %08.8X\n", nr, v, m68k_getpc()); #endif } @@ -1186,7 +1195,7 @@ void AUDxPER (int nr, uae_u16 v) audio_channel[nr].per = per; #ifdef DEBUG_AUDIO if (debugchannel (nr)) - write_log ("AUD%dPER: %d %p\n", nr, v, m68k_getpc()); + write_log ("AUD%dPER: %d %08.8X\n", nr, v, m68k_getpc()); #endif } @@ -1196,7 +1205,7 @@ void AUDxLEN (int nr, uae_u16 v) audio_channel[nr].len = v; #ifdef DEBUG_AUDIO if (debugchannel (nr)) - write_log ("AUD%dLEN: %d %p\n", nr, v, m68k_getpc()); + write_log ("AUD%dLEN: %d %08.8X\n", nr, v, m68k_getpc()); #endif } @@ -1210,17 +1219,47 @@ void AUDxVOL (int nr, uae_u16 v) #endif #ifdef DEBUG_AUDIO if (debugchannel (nr)) - write_log ("AUD%dVOL: %d %p\n", nr, v2, m68k_getpc()); + write_log ("AUD%dVOL: %d %08.8X\n", nr, v2, m68k_getpc()); +#endif +} + +void audio_update_irq (uae_u16 v) +{ +#ifdef DEBUG_AUDIO + uae_u16 v2 = intreq, v3 = intreq; + int i; + if (v & 0x8000) + v2 |= v & 0x7FFF; + else + v2 &= ~v; + v2 &= (0x80 | 0x100 | 0x200 | 0x400); + v3 &= (0x80 | 0x100 | 0x200 | 0x400); + for (i = 0; i < 4; i++) { + if ((1 << i) & DEBUG_CHANNEL_MASK) { + uae_u16 mask = 0x80 << i; + if ((v2 & mask) != (v3 & mask)) + write_log("AUD%dINTREQ %d->%d %08.8X\n", i, !!(v3 & mask), !!(v2 & mask), m68k_getpc()); + } + } #endif } -void update_adkmasks (void) +void audio_update_adkmasks (void) { unsigned long t = adkcon | (adkcon >> 4); audio_channel[0].adk_mask = (((t >> 0) & 1) - 1); audio_channel[1].adk_mask = (((t >> 1) & 1) - 1); audio_channel[2].adk_mask = (((t >> 2) & 1) - 1); audio_channel[3].adk_mask = (((t >> 3) & 1) - 1); +#ifdef DEBUG_AUDIO + { + static int prevcon = -1; + if ((prevcon & 0xff) != (adkcon & 0xff)) { + write_log("ADKCON=%02.2x %08.8X\n", adkcon & 0xff, m68k_getpc()); + prevcon = adkcon; + } + } +#endif } int init_audio (void) diff --git a/cia.c b/cia.c index 0a07d834..754be449 100755 --- a/cia.c +++ b/cia.c @@ -681,14 +681,15 @@ static void WriteCIAA (uae_u16 addr,uae_u8 val) #ifdef PARALLEL_PORT if (isprinter() > 0) { doprinter (val); + cia_parallelack (); } else if (isprinter() < 0) { parallel_direct_write_data (val, ciaadrb); + cia_parallelack (); #ifdef ARCADIA } else if (arcadia_rom) { arcadia_parport (1, ciaaprb, ciaadrb); #endif } - cia_parallelack (); #endif break; case 2: diff --git a/custom.c b/custom.c index 6970d4b5..579c90f7 100755 --- a/custom.c +++ b/custom.c @@ -2630,6 +2630,8 @@ STATIC_INLINE void INTENA (uae_u16 v) void INTREQ_0 (uae_u16 v) { + if (v & (0x80|0x100|0x200|0x400)) + audio_update_irq (v); setclr (&intreq,v); doint (); } @@ -2652,7 +2654,7 @@ static void ADKCON (int hpos, uae_u16 v) update_audio (); setclr (&adkcon,v); - update_adkmasks (); + audio_update_adkmasks (); DISK_update (hpos); if ((v >> 11) & 1) serial_uartbreak ((adkcon >> 11) & 1); @@ -4465,7 +4467,7 @@ void customreset (void) /* must be called after audio_reset */ adkcon = 0; serial_uartbreak (0); - update_adkmasks (); + audio_update_adkmasks (); } init_sprites (); @@ -4482,7 +4484,7 @@ void customreset (void) uae_u16 v; uae_u32 vv; - update_adkmasks (); + audio_update_adkmasks (); INTENA (0); INTREQ (0); #if 0 diff --git a/gfxutil.c b/gfxutil.c index d44b6eed..8e7f981d 100755 --- a/gfxutil.c +++ b/gfxutil.c @@ -8,6 +8,7 @@ #include "sysconfig.h" #include "sysdeps.h" +#include "options.h" #include "custom.h" #include "xwin.h" @@ -83,6 +84,26 @@ static unsigned int doAlpha (int alpha, int bits, int shift) return (alpha & ((1 << bits) - 1)) << shift; } +static int greyscale(int v) +{ +#if 0 + double l; + double lum = currprefs.gfx_luminance / 5.0; + double con = currprefs.gfx_contrast / 10.0; + + l = v; + l = l + lum / (256 / 100); + l = (l - con) / (256 - 2 * con) * 256; + if (l < 0) + l = 0; + if (l > 255) + l = 255; + return (int)l; +#else + return v; +#endif +} + #if 0 static void colormodify (int *r, int *g, int *b) { @@ -113,15 +134,17 @@ void alloc_colors64k (int rw, int gw, int bw, int rs, int gs, int bs, int aw, in int r = ((i >> 8) << 4) | (i >> 8); int g = (((i >> 4) & 0xf) << 4) | ((i >> 4) & 0x0f); int b = ((i & 0xf) << 4) | (i & 0x0f); - //colormodify (&r, &g, &b); + r = greyscale (r); + g = greyscale (g); + b = greyscale (b); xcolors[i] = doMask(r, rw, rs) | doMask(g, gw, gs) | doMask(b, bw, bs) | doAlpha (alpha, aw, as); } #ifdef AGA /* create AGA color tables */ for(i = 0; i < 256; i++) { - xredcolors[i] = doColor (i, rw, rs) | doAlpha (alpha, aw, as); - xgreencolors[i] = doColor (i, gw, gs) | doAlpha (alpha, aw, as); - xbluecolors[i] = doColor (i, bw, bs) | doAlpha (alpha, aw, as);; + xredcolors[i] = greyscale (doColor (i, rw, rs)) | doAlpha (alpha, aw, as); + xgreencolors[i] = greyscale (doColor (i, gw, gs)) | doAlpha (alpha, aw, as); + xbluecolors[i] = greyscale (doColor (i, bw, bs)) | doAlpha (alpha, aw, as); } #endif } @@ -140,7 +163,6 @@ void alloc_colors256 (allocfunc_type allocfunc) int nb_cols[3]; /* r,g,b */ int maxcol = newmaxcol == 0 ? 256 : newmaxcol; int i,j,k,l; - xcolnr *map; map = (xcolnr *)malloc (sizeof(xcolnr) * maxcol); diff --git a/include/audio.h b/include/audio.h index 39be9fc1..58ef8ab4 100755 --- a/include/audio.h +++ b/include/audio.h @@ -27,7 +27,8 @@ extern void update_audio (void); extern void schedule_audio (void); extern void audio_evhandler (void); extern void audio_hsync (int); -extern void update_adkmasks (void); +extern void audio_update_adkmasks (void); +extern void audio_update_irq (uae_u16); extern void update_sound (int freq); extern void audio_sampleripper(int); diff --git a/include/xwin.h b/include/xwin.h index 0e9f9d26..f7c67ee1 100755 --- a/include/xwin.h +++ b/include/xwin.h @@ -72,8 +72,6 @@ struct vidbuf_description int maxblocklines; /* Set to 0 if you want calls to flush_line after each drawn line, or the number of * lines that flush_block wants to/can handle (it isn't really useful to use another * value than maxline here). */ - int can_double; /* Set if the high part of each entry in xcolors contains the same value - * as the low part, so that two pixels can be drawn at once. */ }; extern struct vidbuf_description gfxvidinfo; diff --git a/od-win32/WinUAE_Install.nsi b/od-win32/WinUAE_Install.nsi index 19e47bab..cce3ae44 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.1" +!define PRODUCT_VERSION "1.1.1" !define PRODUCT_PUBLISHER "Toni Wilen" !define PRODUCT_WEB_SITE "http://www.winuae.net/" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\winuae.exe" diff --git a/od-win32/resources/winuae_minimal.rc b/od-win32/resources/winuae_minimal.rc index 95bdde27..6d80e60e 100755 --- a/od-win32/resources/winuae_minimal.rc +++ b/od-win32/resources/winuae_minimal.rc @@ -61,13 +61,13 @@ STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN GROUPBOX "Screen",IDC_SCREENRESTEXT,12,0,199,67,BS_LEFT - RTEXT "Fullscreen",IDC_SELECTRESTEXT,22,17,34,15,SS_CENTERIMAGE - COMBOBOX IDC_DISPLAYSELECT,61,10,143,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_RESOLUTION,61,27,77,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + RTEXT "Fullscreen",IDC_SELECTRESTEXT,17,17,34,15,SS_CENTERIMAGE + COMBOBOX IDC_DISPLAYSELECT,57,10,147,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RESOLUTION,57,27,52,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_REFRESHRATE,143,27,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - RTEXT "Windowed",IDC_WINDOWEDTEXT,22,51,35,8 - EDITTEXT IDC_XSIZE,61,48,35,12,ES_NUMBER - EDITTEXT IDC_YSIZE,103,48,35,12,ES_NUMBER + RTEXT "Windowed",IDC_WINDOWEDTEXT,18,51,35,8 + EDITTEXT IDC_XSIZE,57,48,35,12,ES_NUMBER + EDITTEXT IDC_YSIZE,101,48,35,12,ES_NUMBER CONTROL "VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,145,49,54,10 GROUPBOX "Settings",IDC_SETTINGSTEXT,12,77,199,89 CONTROL "Full Screen",IDC_AFULLSCREEN,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,35,89,90,10 @@ -90,6 +90,7 @@ BEGIN LTEXT "FPS Adj.",IDC_REFRESH2TEXT,18,149,28,8 CONTROL "",IDC_FRAMERATE2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,46,144,127,20 EDITTEXT IDC_RATE2TEXT,177,148,26,12,ES_CENTER | ES_READONLY + COMBOBOX IDC_RESOLUTIONDEPTH,110,27,32,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP END IDD_MEMORY DIALOGEX 0, 0, 300, 175 @@ -156,7 +157,7 @@ BEGIN CONTROL "After Picasso96",IDC_TRUST2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,230,155,64,10 END -IDD_FLOPPY DIALOGEX 0, 0, 300, 230 +IDD_FLOPPY DIALOGEX 0, 0, 300, 224 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN @@ -188,13 +189,13 @@ BEGIN CONTROL "",IDC_DF3WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,111,9,15 PUSHBUTTON "Eject",IDC_EJECT3,253,110,30,15 PUSHBUTTON "...",IDC_DF3,287,109,10,15 - GROUPBOX "New disk image",IDC_SETTINGSTEXT,5,147,289,35 - COMBOBOX IDC_FLOPPYTYPE,16,160,51,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Create Standard ""Floppy"" [] Creates standard 880kb ADF disk image.",IDC_CREATE,76,160,97,15 - PUSHBUTTON "Create Custom ""Floppy"" [] Creates ~2Mb low level (MFM) ADF disk image. Useful for programs that use non-AmigaDOS disk format (for example some save disks or MSDOS formatted floppies)",IDC_CREATE_RAW,183,160,101,15 - GROUPBOX "Floppy drive emulation speed",IDC_SETTINGSTEXT2,5,185,289,35 - CONTROL "",IDC_FLOPPYSPD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,32,193,116,20 - EDITTEXT IDC_FLOPPYSPDTEXT,169,196,107,12,ES_CENTER | ES_READONLY + GROUPBOX "New disk image",IDC_SETTINGSTEXT,5,183,289,35 + COMBOBOX IDC_FLOPPYTYPE,16,196,51,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Create Standard ""Floppy"" [] Creates standard 880kb ADF disk image.",IDC_CREATE,76,196,97,15 + PUSHBUTTON "Create Custom ""Floppy"" [] Creates ~2Mb low level (MFM) ADF disk image. Useful for programs that use non-AmigaDOS disk format (for example some save disks or MSDOS formatted floppies)",IDC_CREATE_RAW,183,196,101,15 + GROUPBOX "Floppy drive emulation speed",IDC_SETTINGSTEXT2,5,144,289,35 + CONTROL "",IDC_FLOPPYSPD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,32,152,116,20 + EDITTEXT IDC_FLOPPYSPDTEXT,169,155,107,12,ES_CENTER | ES_READONLY PUSHBUTTON "Delete Saveimage",IDC_SAVEIMAGE0,43,5,70,15,NOT WS_VISIBLE PUSHBUTTON "Delete Saveimage",IDC_SAVEIMAGE1,43,40,70,15,NOT WS_VISIBLE PUSHBUTTON "Delete Saveimage",IDC_SAVEIMAGE2,43,75,70,15,NOT WS_VISIBLE @@ -366,8 +367,8 @@ BEGIN COMBOBOX IDC_KBLED2,22,153,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_KBLED3,22,173,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Logging:",IDC_STATIC,97,120,195,25 - CONTROL "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,130,72,10,0,HIDC_CREATELOGFILE - CONTROL "Illegal mem accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,130,80,10 + CONTROL "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,131,72,10,0,HIDC_CREATELOGFILE + CONTROL "Illegal mem accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,131,80,10 GROUPBOX "State files:",IDC_STATIC,98,146,195,69 PUSHBUTTON "Load state...",IDC_DOLOADSTATE,105,162,49,14 PUSHBUTTON "Save state...",IDC_DOSAVESTATE,106,188,49,14 @@ -765,8 +766,8 @@ IDI_PATHS ICON "paths.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,1,0,0 - PRODUCTVERSION 1,1,0,0 + FILEVERSION 1,1,1,0 + PRODUCTVERSION 1,1,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -782,12 +783,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "WinUAE" - VALUE "FileVersion", "1.1.0" + VALUE "FileVersion", "1.1.1" VALUE "InternalName", "WinUAE" VALUE "LegalCopyright", "© 1996-2005 under the GNU Public License (GPL)" VALUE "OriginalFilename", "WinUAE.exe" VALUE "ProductName", "WinUAE" - VALUE "ProductVersion", "1.1.0" + VALUE "ProductVersion", "1.1.1" END END BLOCK "VarFileInfo" diff --git a/od-win32/win32.c b/od-win32/win32.c index e739ae89..6383d104 100755 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -2014,11 +2014,11 @@ static int checkversion (char *vs) return 1; } -static void WIN32_HandleRegistryStuff( void ) +static void WIN32_HandleRegistryStuff(void) { RGBFTYPE colortype = RGBFB_NONE; DWORD dwType = REG_DWORD; - DWORD dwDisplayInfoSize = sizeof( colortype ); + DWORD dwDisplayInfoSize = sizeof(colortype); DWORD size; DWORD disposition; char path[MAX_DPATH] = ""; @@ -2057,7 +2057,7 @@ static void WIN32_HandleRegistryStuff( void ) KEY_WRITE | KEY_READ, NULL, &hWinUAEKeyLocal, &disposition) == ERROR_SUCCESS)) { /* Set our (default) sub-key to BE the "WinUAE" command for editing a configuration */ - sprintf(path, "%sWinUAE.exe -f \"%%1\" -s use_gui=yes", start_path_data); + sprintf(path, "%sWinUAE.exe -f \"%%1\" -s use_gui=yes", start_path_exe); RegSetValueEx(hWinUAEKeyLocal, "", 0, REG_SZ, (CONST BYTE *)path, strlen(path) + 1); RegCloseKey(hWinUAEKeyLocal); } @@ -2066,7 +2066,7 @@ static void WIN32_HandleRegistryStuff( void ) KEY_WRITE | KEY_READ, NULL, &hWinUAEKeyLocal, &disposition) == ERROR_SUCCESS)) { /* Set our (default) sub-key to BE the "WinUAE" command for launching a configuration */ - sprintf(path, "%sWinUAE.exe -f \"%%1\"", start_path_data); + sprintf(path, "%sWinUAE.exe -f \"%%1\"", start_path_exe); RegSetValueEx(hWinUAEKeyLocal, "", 0, REG_SZ, (CONST BYTE *)path, strlen( path ) + 1); RegCloseKey(hWinUAEKeyLocal); } @@ -2101,6 +2101,8 @@ static void WIN32_HandleRegistryStuff( void ) if (RegQueryValueEx (hWinUAEKey, "Version", 0, &dwType, (LPBYTE)&version, &size) == ERROR_SUCCESS) { if (checkversion (version)) RegSetValueEx (hWinUAEKey, "Version", 0, REG_SZ, (CONST BYTE *)VersionStr, strlen (VersionStr) + 1); + } else { + RegSetValueEx (hWinUAEKey, "Version", 0, REG_SZ, (CONST BYTE *)VersionStr, strlen (VersionStr) + 1); } size = sizeof (version); dwType = REG_SZ; diff --git a/od-win32/win32.h b/od-win32/win32.h index 8fdb8e63..aa9f9b3c 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -21,8 +21,8 @@ extern int manual_painting_needed; extern int manual_palette_refresh_needed; extern int mouseactive, focus; extern int ignore_messages_all; -#define WINUAEBETA 1 -#define WINUAEBETASTR " Beta 2" +#define WINUAEBETA 0 +#define WINUAEBETASTR "" extern char start_path_exe[MAX_DPATH]; extern char start_path_data[MAX_DPATH]; diff --git a/od-win32/win32gfx.c b/od-win32/win32gfx.c index f3111cce..16595406 100755 --- a/od-win32/win32gfx.c +++ b/od-win32/win32gfx.c @@ -1196,7 +1196,6 @@ static int get_color (int r, int g, int b, xcolnr * cnp) void init_colors (void) { - int i; HRESULT ddrval; if (ncols256 == 0) { @@ -1257,23 +1256,6 @@ void init_colors (void) AVIOutput_RGBinfo (red_bits, green_bits, blue_bits, red_shift, green_shift, blue_shift); #endif } - - switch (gfxvidinfo.pixbytes) - { - case 2: - for (i = 0; i < 4096; i++) - xcolors[i] = xcolors[i] * 0x00010001; - gfxvidinfo.can_double = 1; - break; - case 1: - for (i = 0; i < 4096; i++) - xcolors[i] = xcolors[i] * 0x01010101; - gfxvidinfo.can_double = 1; - break; - default: - gfxvidinfo.can_double = 0; - break; - } } #ifdef PICASSO96 diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index 38af8522..159a0c26 100755 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -3412,19 +3412,19 @@ static int *getp_da (void) int *p = 0; switch (da_mode_selected) { - case 0: + case 3: p = &workprefs.gfx_hue; break; - case 1: + case 4: p = &workprefs.gfx_saturation; break; - case 2: + case 0: p = &workprefs.gfx_luminance; break; - case 3: + case 1: p = &workprefs.gfx_contrast; break; - case 4: + case 2: p = &workprefs.gfx_gamma; break; } @@ -3443,26 +3443,30 @@ static void handle_da (HWND hDlg) if (v == *p) return; *p = v; +#if 0 currprefs.gfx_hue = workprefs.gfx_hue; currprefs.gfx_saturation = workprefs.gfx_saturation; + currprefs.gfx_gamma = workprefs.gfx_gamma; +#endif currprefs.gfx_luminance = workprefs.gfx_luminance; currprefs.gfx_contrast = workprefs.gfx_contrast; - currprefs.gfx_gamma = workprefs.gfx_gamma; init_colors (); - reset_drawing (); - redraw_frame (); updatedisplayarea (); + WIN32GFX_WindowMove (); + init_custom(); } void init_da (HWND hDlg) { int *p; SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_RESETCONTENT, 0, 0); - SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)"Hue"); - SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)"Saturation"); SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)"Luminance"); SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)"Contrast"); +#if 0 SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)"Gamma"); + SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)"Hue"); + SendDlgItemMessage(hDlg, IDC_DA_MODE, CB_ADDSTRING, 0, (LPARAM)"Saturation"); +#endif if (da_mode_selected == CB_ERR) da_mode_selected = 0; SendDlgItemMessage (hDlg, IDC_DA_MODE, CB_SETCURSEL, da_mode_selected, 0); @@ -3777,7 +3781,7 @@ static INT_PTR CALLBACK DisplayDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage (hDlg, IDC_FRAMERATE, TBM_SETPAGESIZE, 0, 1); SendDlgItemMessage (hDlg, IDC_FRAMERATE, TBM_SETRANGE, TRUE, MAKELONG (MIN_REFRESH_RATE, MAX_REFRESH_RATE)); SendDlgItemMessage (hDlg, IDC_FRAMERATE2, TBM_SETPAGESIZE, 0, 1); - SendDlgItemMessage (hDlg, IDC_FRAMERATE2, TBM_SETRANGE, TRUE, MAKELONG (5, 99)); + SendDlgItemMessage (hDlg, IDC_FRAMERATE2, TBM_SETRANGE, TRUE, MAKELONG (1, 99)); init_displays_combo (hDlg); init_resolution_combo (hDlg); #if 0 @@ -5987,13 +5991,10 @@ static void addfloppyhistory (HWND hDlg, HKEY fkey, int n, int f_text) SendDlgItemMessage(hDlg, f_text, WM_SETTEXT, 0, (LPARAM)workprefs.df[n]); i = 0; while (s = DISK_history_get (i)) { -#if 1 char tmpname[MAX_DPATH], tmppath[MAX_DPATH], *p, *p2; -#endif i++; if (strlen (s) == 0) continue; -#if 1 strcpy (tmppath, s); p = tmppath + strlen(tmppath) - 1; for (j = 0; archive_extensions[j]; j++) { @@ -6015,7 +6016,6 @@ static void addfloppyhistory (HWND hDlg, HKEY fkey, int n, int f_text) strcat (tmpname, tmppath); strcat (tmpname, " }"); } -#endif if (f_text >= 0) SendDlgItemMessage (hDlg, f_text, CB_ADDSTRING, 0, (LPARAM)tmpname); if (fkey) { @@ -6101,7 +6101,20 @@ static int getfloppybox (HWND hDlg, int f_text, char *out, int maxlen) out[0] = 0; val = SendDlgItemMessage (hDlg, f_text, CB_GETCURSEL, 0, 0L); if (val == CB_ERR) { + char *p1, *p2; + char *tmp; SendDlgItemMessage (hDlg, f_text, WM_GETTEXT, (WPARAM)maxlen, (LPARAM)out); + tmp = xmalloc (maxlen + 1); + strcpy (tmp, out); + p1 = strstr(tmp, " { "); + p2 = strstr(tmp, " }"); + if (p1 && p2 && p2 > p1) { + *p1 = 0; + memset (out, 0, maxlen); + memcpy (out, p1 + 3, p2 - p1 - 3); + strcat (out, tmp); + } + xfree (tmp); } else { char *p = DISK_history_get (val); #if 0