From: Toni Wilen Date: Sun, 25 Jul 2004 16:07:47 +0000 (+0300) Subject: imported winuaesrc0990rc1.zip X-Git-Tag: 2100~333 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=0a2250a547026f133fc671e1a36c60069ce9e7e1;p=francis%2Fwinuae.git imported winuaesrc0990rc1.zip --- diff --git a/blitter.c b/blitter.c index d6b48541..373c9b8f 100755 --- a/blitter.c +++ b/blitter.c @@ -999,6 +999,8 @@ void blitter_slowdown (int ddfstrt, int ddfstop, int totalcycles, int freecycles static int oddfstrt, oddfstop, ototal, ofree; static int slow; + if (!totalcycles) + return; if (ddfstrt != oddfstrt || ddfstop != oddfstop || totalcycles != ototal || ofree != freecycles) { int linecycles = ((ddfstop - ddfstrt + totalcycles - 1) / totalcycles) * totalcycles; int freelinecycles = ((ddfstop - ddfstrt + totalcycles - 1) / totalcycles) * freecycles; diff --git a/cfgfile.c b/cfgfile.c index 923b7213..ec7c8251 100755 --- a/cfgfile.c +++ b/cfgfile.c @@ -290,12 +290,15 @@ void save_options (FILE *f, struct uae_prefs *p, int type) for (i = 0; i < 2; i++) { int v = i == 0 ? p->jport0 : p->jport1; char tmp1[100], tmp2[50]; - if (v < JSEM_JOYS) + if (v < JSEM_JOYS) { sprintf (tmp2, "kbd%d", v + 1); - else if (v < JSEM_MICE) - sprintf (tmp2, "joy%d", v - JSEM_JOYS + 1); - else - sprintf (tmp2, "mouse%d", v - JSEM_MICE + 1); + } else if (v < JSEM_MICE) { + sprintf (tmp2, "joy%d", v - JSEM_JOYS); + } else { + strcpy (tmp2, "mouse"); + if (v - JSEM_MICE > 0) + sprintf (tmp2, "mouse%d", v - JSEM_MICE); + } sprintf (tmp1, "joyport%d=%s\n", i, tmp2); cfgfile_write (f, tmp1); } @@ -730,13 +733,16 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value) } if (pp) { int v = atol (pp); - if (start >= 0 && v > 0) { - v--; - start += v; - if (port) - p->jport1 = start; - else - p->jport0 = start; + if (start >= 0) { + if (start == JSEM_KBDLAYOUT) + v--; + if (v >= 0) { + start += v; + if (port) + p->jport1 = start; + else + p->jport0 = start; + } } } return 1; diff --git a/memory.c b/memory.c index 15d6d1ae..5c14fb98 100755 --- a/memory.c +++ b/memory.c @@ -373,7 +373,7 @@ uae_u32 REGPARAM2 dummy_lget (uaecptr addr) if (currprefs.illegal_mem) { if (illegal_count < MAX_ILG) { illegal_count++; - write_log ("Illegal lget at %08lx\n", addr); + write_log ("Illegal lget at %08lx PC=%x\n", addr, m68k_getpc()); } } if (currprefs.cpu_level >= 2) @@ -389,7 +389,7 @@ uae_u32 REGPARAM2 dummy_wget (uaecptr addr) if (currprefs.illegal_mem) { if (illegal_count < MAX_ILG) { illegal_count++; - write_log ("Illegal wget at %08lx\n", addr); + write_log ("Illegal wget at %08lx PC=%x\n", addr, m68k_getpc()); } } if (currprefs.cpu_level >= 2) @@ -405,7 +405,7 @@ uae_u32 REGPARAM2 dummy_bget (uaecptr addr) if (currprefs.illegal_mem) { if (illegal_count < MAX_ILG) { illegal_count++; - write_log ("Illegal bget at %08lx\n", addr); + write_log ("Illegal bget at %08lx PC=%x\n", addr, m68k_getpc()); } } if (currprefs.cpu_level >= 2) @@ -421,7 +421,7 @@ void REGPARAM2 dummy_lput (uaecptr addr, uae_u32 l) if (currprefs.illegal_mem) { if (illegal_count < MAX_ILG) { illegal_count++; - write_log ("Illegal lput at %08lx\n", addr); + write_log ("Illegal lput at %08lx PC=%x\n", addr, m68k_getpc()); } } } @@ -433,7 +433,7 @@ void REGPARAM2 dummy_wput (uaecptr addr, uae_u32 w) if (currprefs.illegal_mem) { if (illegal_count < MAX_ILG) { illegal_count++; - write_log ("Illegal wput at %08lx\n", addr); + write_log ("Illegal wput at %08lx PC=%x\n", addr, m68k_getpc()); } } } @@ -445,7 +445,7 @@ void REGPARAM2 dummy_bput (uaecptr addr, uae_u32 b) if (currprefs.illegal_mem) { if (illegal_count < MAX_ILG) { illegal_count++; - write_log ("Illegal bput at %08lx\n", addr); + write_log ("Illegal bput at %08lx PC=%x\n", addr, m68k_getpc()); } } } @@ -458,7 +458,7 @@ int REGPARAM2 dummy_check (uaecptr addr, uae_u32 size) if (currprefs.illegal_mem) { if (illegal_count < MAX_ILG) { illegal_count++; - write_log ("Illegal check at %08lx\n", addr); + write_log ("Illegal check at %08lx PC=%x\n", addr, m68k_getpc()); } } diff --git a/od-win32/dinput.c b/od-win32/dinput.c index 950a17b4..9861b377 100755 --- a/od-win32/dinput.c +++ b/od-win32/dinput.c @@ -1258,7 +1258,7 @@ static int keyhack (int scancode,int pressed, int num) return -1; } - if (!keyboard_german) + if (!keyboard_german || currprefs.input_selected_setting > 0) return scancode; //This code look so ugly because there is no Directinput @@ -1477,10 +1477,12 @@ static void unacquire_kb (int num) } release_keys (); - if (currprefs.keyboard_leds_in_use && oldusedleds >= 0) { - if (!usbledmode) - set_leds (oldleds); - oldusedleds = oldleds; + if (currprefs.keyboard_leds_in_use) { + if (oldusedleds >= 0) { + if (!usbledmode) + set_leds (oldleds); + oldusedleds = oldleds; + } #ifdef WINDDK if (kbhandle != INVALID_HANDLE_VALUE) { CloseHandle(kbhandle); @@ -1557,18 +1559,6 @@ static void read_joystick (void) if (currprefs.input_selected_setting == 0) { if (jsem_isjoy (0, &currprefs) != i && jsem_isjoy (1, &currprefs) != i) continue; -#if 0 - if (i >= 2) - break; - if (isjoy (i, 0)) { - if (JSEM_ISNUMPAD (0, &currprefs) || JSEM_ISCURSOR (0, &currprefs) || JSEM_ISSOMEWHEREELSE (0, &currprefs)) - continue; - } else if (isjoy (i, 1)) { - if (JSEM_ISNUMPAD (1, &currprefs) || JSEM_ISCURSOR (1, &currprefs) || JSEM_ISSOMEWHEREELSE (1, &currprefs)) - continue; - } else - continue; -#endif } elements = DI_BUFFER; hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof (DIDEVICEOBJECTDATA), didod, &elements, 0); diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index a6887a17..0a1491f4 100755 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -277,6 +277,7 @@ #define IDC_CLOANTOHOME 1075 #define IDC_THEROOTS 1076 #define IDC_CAPS 1077 +#define IDC_ABIME 1078 #define IDC_RICHEDIT1 1091 #define IDC_RICHEDIT2 1092 #define IDC_CONTRIBUTORS 1124 @@ -753,7 +754,6 @@ #define IDC_DF1Q 1679 #define IDC_QUICKSTART_HOSTCONFIG 1679 #define IDC_DF1QQ 1680 -#define IDC_DF1QQ2 1681 #define IDC_QUICKSTART_SETCONFIG 1681 #define IDC_CONFIGAUTO 1682 #define IDC_DF0TEXTQ 1683 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index eb81970d..1d4ff62c 100755 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -495,11 +495,14 @@ BEGIN TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,120, 80,15 CONTROL "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | - TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,33,143, - 110,15 + TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,145, + 80,15 CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | - TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,150,143, - 110,15 + TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,145, + 80,15 + CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | + TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,145, + 80,15 END IDD_MISC1 DIALOGEX 0, 0, 300, 223 diff --git a/od-win32/sounddep/sound.c b/od-win32/sounddep/sound.c index 6d56809f..833fa9e5 100755 --- a/od-win32/sounddep/sound.c +++ b/od-win32/sounddep/sound.c @@ -322,6 +322,7 @@ static int open_audio_ds (int size) wavfmt.wBitsPerSample = 16; wavfmt.nBlockAlign = 16 / 8 * wavfmt.nChannels; wavfmt.nAvgBytesPerSec = wavfmt.nBlockAlign * freq; + wavfmt.cbSize = 0; max_sndbufsize = size * 3; if (max_sndbufsize > SND_MAX_BUFFER2) diff --git a/od-win32/win32.h b/od-win32/win32.h index d203e675..e62410bc 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -21,7 +21,7 @@ extern int manual_painting_needed; extern int manual_palette_refresh_needed; extern int mouseactive, focus; #define WINUAEBETA 1 -#define WINUAEBETASTR " Beta 13" +#define WINUAEBETASTR " RC1" extern void my_kbd_handler (int, int, int); extern void clearallkeys(void); diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index 81a6c720..526b0c47 100755 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -2152,7 +2152,6 @@ static void DisplayContributors (HWND hDlg) DialogBox( hUIDLL ? hUIDLL : hInst, MAKEINTRESOURCE (IDD_CONTRIBUTORS), hDlg, ContributorsProc); } -#define NUM_URLS 8 typedef struct url_info { int id; @@ -2161,7 +2160,7 @@ typedef struct url_info char *url; } urlinfo; -static urlinfo urls[NUM_URLS] = +static urlinfo urls[] = { {IDC_CLOANTOHOME, FALSE, "Cloanto's Amiga Forever", "http://www.amigaforever.com/"}, {IDC_AMIGAHOME, FALSE, "Amiga Inc.", "http://www.amiga.com"}, @@ -2169,8 +2168,10 @@ static urlinfo urls[NUM_URLS] = {IDC_UAEHOME, FALSE, "UAE Home Page", "http://www.freiburg.linux.de/~uae/"}, {IDC_WINUAEHOME, FALSE, "WinUAE Home Page", "http://www.winuae.net/"}, {IDC_AIABHOME, FALSE, "AIAB", "http://aiab.emuunlim.com/"}, - {IDC_THEROOTS, FALSE, "Back To The Roots", "http://back2roots.emuunlim.com/"}, - {IDC_CAPS, FALSE, "CAPS", "http://caps-project.org/"} + {IDC_THEROOTS, FALSE, "Back To The Roots", "http://www.back2roots.org/"}, + {IDC_ABIME, FALSE, "abime.net", "http://www.abime.net/"}, + {IDC_CAPS, FALSE, "CAPS", "http://caps-project.org/"}, + { -1, FALSE, NULL, NULL } }; static void SetupRichText( HWND hDlg, urlinfo *url ) @@ -2200,7 +2201,7 @@ static void url_handler(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) point.x = LOWORD (lParam); point.y = HIWORD (lParam); - for (i = 0; i < NUM_URLS; i++) + for (i = 0; urls[i].id >= 0; i++) { RECT rect; GetWindowRect( GetDlgItem( hDlg, urls[i].id), &rect ); @@ -2417,7 +2418,7 @@ static struct amigamodels amodels[] = { { 4, IDS_QS_MODEL_A500P }, // "Amiga 500+" { 4, IDS_QS_MODEL_A600 }, // "Amiga 600" { 4, IDS_QS_MODEL_A1000 }, // "Amiga 1000" - { 3, IDS_QS_MODEL_A1200 }, // "Amiga 1200", + { 3, IDS_QS_MODEL_A1200 }, // "Amiga 1200" { 3, IDS_QS_MODEL_CD32 }, // "CD32" { 4, IDS_QS_MODEL_CDTV }, // "CDTV" { 0, 0 }, @@ -2825,7 +2826,7 @@ static void init_aboutdlg (HWND hDlg) SendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat); SendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE)); - for( i = 0; i < NUM_URLS; i++ ) + for( i = 0; urls[i].id >= 0; i++ ) { SetupRichText( hDlg, &urls[i] ); } @@ -5900,10 +5901,17 @@ static void updatejoyport (HWND hDlg) SendDlgItemMessage (hDlg, id1, CB_ADDSTRING, 0, (LPARAM)inputdevice_get_device_name(IDTYPE_JOYSTICK, j)); for (j = 0; j < inputdevice_get_device_total (IDTYPE_MOUSE); j++, total++) SendDlgItemMessage (hDlg, id1, CB_ADDSTRING, 0, (LPARAM)inputdevice_get_device_name(IDTYPE_MOUSE, j)); - if (v >= JSEM_MICE) - idx = inputdevice_get_device_total (IDTYPE_JOYSTICK) + (v - JSEM_MICE) + 1; - else if (v >= JSEM_JOYS) + if (v >= JSEM_MICE) { + idx = (v - JSEM_MICE) + 1; + if (idx > inputdevice_get_device_total (IDTYPE_MOUSE)) + idx = 0; + else + idx += inputdevice_get_device_total (IDTYPE_JOYSTICK); + }else if (v >= JSEM_JOYS) { idx = v - JSEM_JOYS + 1; + if (idx > inputdevice_get_device_total (IDTYPE_JOYSTICK)) + idx = 0; + } if (idx >= total) idx = 0; SendDlgItemMessage (hDlg, id1, CB_SETCURSEL, idx, 0);