From: Toni Wilen Date: Sun, 18 Mar 2007 10:35:04 +0000 (+0200) Subject: imported winuaesrc1410.zip X-Git-Tag: 2100~236 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=62977a0a3f6ee90673058544a67591e58e1e1c25;p=francis%2Fwinuae.git imported winuaesrc1410.zip --- diff --git a/expansion.c b/expansion.c index d98e78ce..53bacf82 100755 --- a/expansion.c +++ b/expansion.c @@ -1120,6 +1120,7 @@ void expamem_reset (void) } z3fastmem_start = currprefs.z3fastmem_start; + p96ram_start = currprefs.z3fastmem_start + ((currprefs.z3fastmem_size + 0xffffff) & ~0xffffff); (*card_init[0]) (); } diff --git a/filesys.c b/filesys.c index 6ccf9697..50538ed6 100755 --- a/filesys.c +++ b/filesys.c @@ -456,6 +456,7 @@ struct hardfiledata *get_hardfile_data (int nr) #define dp_Arg2 24 #define dp_Arg3 28 #define dp_Arg4 32 +#define dp_Arg5 36 /* result codes */ #define DOS_TRUE ((unsigned long)-1L) @@ -603,6 +604,7 @@ typedef uae_u8 *dpacket; #define GET_PCK_ARG2(p) ((uae_s32)(do_get_mem_long ((uae_u32 *)((p) + dp_Arg2)))) #define GET_PCK_ARG3(p) ((uae_s32)(do_get_mem_long ((uae_u32 *)((p) + dp_Arg3)))) #define GET_PCK_ARG4(p) ((uae_s32)(do_get_mem_long ((uae_u32 *)((p) + dp_Arg4)))) +#define GET_PCK_ARG5(p) ((uae_s32)(do_get_mem_long ((uae_u32 *)((p) + dp_Arg5)))) static char *char1 (uaecptr addr) { @@ -2063,6 +2065,18 @@ int get_native_path(uae_u32 lock, char *out) return -1; } +static int action_examine_all (Unit *unit, dpacket packet) +{ + uaecptr lock = GET_PCK_ARG1 (packet) << 2; + uaecptr exalldata = GET_PCK_ARG2 (packet); + uae_u32 exalldatasize = GET_PCK_ARG3 (packet); + uae_u32 type = GET_PCK_ARG4 (packet); + uaecptr control = GET_PCK_ARG5 (packet); + + return 0; +} + + static void action_examine_object (Unit *unit, dpacket packet) { uaecptr lock = GET_PCK_ARG1 (packet) << 2; @@ -3454,10 +3468,14 @@ static int handle_packet (Unit *unit, dpacket pck) case ACTION_ADD_NOTIFY: action_add_notify (unit, pck); break; case ACTION_REMOVE_NOTIFY: action_remove_notify (unit, pck); break; - /* unsupported packets */ + case ACTION_EXAMINE_ALL: + if (!action_examine_all (unit, pck)) + return 0; /* not yet supported */ + break; + + /* unsupported packets */ case ACTION_LOCK_RECORD: case ACTION_FREE_RECORD: - case ACTION_EXAMINE_ALL: case ACTION_MAKE_LINK: case ACTION_READ_LINK: case ACTION_FORMAT: diff --git a/od-win32/WinUAE_Install.nsi b/od-win32/WinUAE_Install.nsi index 1c58d16c..ee2afd7a 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.0" +!define PRODUCT_VERSION "1.4.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/ioport.c b/od-win32/ioport.c index 4c6de0c1..54ed666b 100755 --- a/od-win32/ioport.c +++ b/od-win32/ioport.c @@ -223,6 +223,7 @@ int paraport_init (void) int paraport_open (char *port) { static char oldport[10]; + PARAPORT_CYCLE c[1]; if (!para) return 0; @@ -236,18 +237,24 @@ int paraport_open (char *port) } strcpy (oldport, port); write_log("PARAPORT: port '%s' opened\n", port); + memset (c, 0, sizeof (PARAPORT_CYCLE)); + c[0].MaskControl = PARAPORT_MASK_CONTROL | PARAPORT_MASK_CONTROL_DIRECTION; + c[0].Control = PARAPORT_MASK_CONTROL_INIT | PARAPORT_MASK_CONTROL_DIRECTION; + if (!pp_executecycle (pport, c, 1)) { + write_log ("PARAPORT: init executeCycle failed\n"); + } return 1; } int parallel_direct_write_status (uae_u8 v, uae_u8 dir) { - PARAPORT_CYCLE c[2]; + PARAPORT_CYCLE c[1]; int ok = 1; if (!pport) return 0; - memset (c + 0, 0, sizeof (PARAPORT_CYCLE)); + memset (c, 0, sizeof (PARAPORT_CYCLE)); c[0].MaskControl = PARAPORT_MASK_CONTROL_SELECTIN; if ((dir & 1)) { write_log ("PARAPORT: BUSY can't be output\n"); @@ -259,7 +266,7 @@ int parallel_direct_write_status (uae_u8 v, uae_u8 dir) } if ((dir & 4) && !(v & 4)) c[0].Control |= PARAPORT_MASK_CONTROL_SELECTIN; - if (!pp_executecycle (pport, c, 2)) { + if (!pp_executecycle (pport, c, 1)) { write_log ("PARAPORT: write executeCycle failed, CTL=%02.2X DIR=%02.2X\n", v & 7, dir & 7); return 0; } @@ -345,7 +352,6 @@ int parallel_direct_read_data (uae_u8 *v) c[0].Control = PARAPORT_MASK_CONTROL_DIRECTION | PARAPORT_MASK_CONTROL_STROBE; c[0].RepeatFactor = 1; c[1].MaskControl = PARAPORT_MASK_CONTROL_STROBE; - c[1].MaskData = 0; if (!pp_executecycle (pport, c, 2)) { write_log ("PARAPORT: DATA read executeCycle failed\n"); return 0; diff --git a/od-win32/picasso96_win.c b/od-win32/picasso96_win.c index d74e276c..5faef01f 100755 --- a/od-win32/picasso96_win.c +++ b/od-win32/picasso96_win.c @@ -2947,7 +2947,8 @@ void picasso_handle_hsync (void) p96hsync--; } if (p96hsync <= 0) { - rtarea[get_long (RTAREA_BASE + 36) + 12 - 1]++; + if (uae_boot_rom) + rtarea[get_long (RTAREA_BASE + 36) + 12 - 1]++; p96hsync = p96syncrate; } } diff --git a/od-win32/win32.h b/od-win32/win32.h index 4107d57f..de9d0918 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,9 +15,9 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEBETA 3 -#define WINUAEPUBLICBETA 1 -#define WINUAEDATE MAKEBD(2007, 3, 10) +#define WINUAEBETA 0 +#define WINUAEPUBLICBETA 0 +#define WINUAEDATE MAKEBD(2007, 3, 18) #define IHF_WINDOWHIDDEN 6 #define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU) diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index 35696a98..eaa7f90e 100755 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -484,7 +484,22 @@ static int scan_rom (char *path, HKEY fkey) { struct romscandata rsd = { fkey, 0 }; struct romdata *rd; - int cnt = 0; + int cnt = 0, i; + char *ext = strrchr (path, '.'); + + if (!ext) + return 0; + ext++; + for (i = 0; uae_archive_extensions[i]; i++) { + if (!stricmp (ext, uae_archive_extensions[i])) + break; + } + if (!uae_archive_extensions[i]) { + if (stricmp (ext, "rom") && stricmp (ext, "adf") && stricmp (ext, "key")) { + write_log("ROMSCAN: skipping file '%s', unknown extension\n", path); + return 0; + } + } for (;;) { char tmp[MAX_DPATH]; @@ -668,8 +683,10 @@ static int scan_roms_2 (char *pathp) char tmppath[MAX_DPATH]; strcpy (tmppath, path); strcat (tmppath, find_data.cFileName); - if (find_data.nFileSizeLow < 10000000 && scan_rom (tmppath, fkey)) - ret = 1; + if (!(find_data.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY |FILE_ATTRIBUTE_SYSTEM)) && find_data.nFileSizeLow < 10000000) { + if (scan_rom (tmppath, fkey)) + ret = 1; + } if (FindNextFile (handle, &find_data) == 0) { FindClose (handle); break; @@ -1018,57 +1035,57 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs switch (flag) { case 0: - WIN32GUI_LoadUIString( IDS_SELECTADF, szTitle, MAX_DPATH ); - WIN32GUI_LoadUIString( IDS_ADF, szFormat, MAX_DPATH ); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), DISK_FORMAT_STRING, sizeof(DISK_FORMAT_STRING) + 1); + WIN32GUI_LoadUIString(IDS_SELECTADF, szTitle, MAX_DPATH); + WIN32GUI_LoadUIString(IDS_ADF, szFormat, MAX_DPATH); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), DISK_FORMAT_STRING, sizeof(DISK_FORMAT_STRING) + 1); openFileName.lpstrDefExt = "ADF"; openFileName.lpstrFilter = szFilter; break; case 1: - WIN32GUI_LoadUIString( IDS_CHOOSEBLANK, szTitle, MAX_DPATH ); - WIN32GUI_LoadUIString( IDS_ADF, szFormat, MAX_DPATH ); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), "(*.adf)\0*.adf\0", 15 ); + WIN32GUI_LoadUIString(IDS_CHOOSEBLANK, szTitle, MAX_DPATH); + WIN32GUI_LoadUIString(IDS_ADF, szFormat, MAX_DPATH); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), "(*.adf)\0*.adf\0", 15); openFileName.lpstrDefExt = "ADF"; openFileName.lpstrFilter = szFilter; break; case 2: case 3: - WIN32GUI_LoadUIString( IDS_SELECTHDF, szTitle, MAX_DPATH ); - WIN32GUI_LoadUIString( IDS_HDF, szFormat, MAX_DPATH ); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), HDF_FORMAT_STRING, sizeof (HDF_FORMAT_STRING) + 1); + WIN32GUI_LoadUIString(IDS_SELECTHDF, szTitle, MAX_DPATH); + WIN32GUI_LoadUIString(IDS_HDF, szFormat, MAX_DPATH); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), HDF_FORMAT_STRING, sizeof (HDF_FORMAT_STRING) + 1); openFileName.lpstrDefExt = "HDF"; openFileName.lpstrFilter = szFilter; break; case 4: case 5: - WIN32GUI_LoadUIString( IDS_SELECTUAE, szTitle, MAX_DPATH ); - WIN32GUI_LoadUIString( IDS_UAE, szFormat, MAX_DPATH ); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), "(*.uae)\0*.uae\0", 15 ); + WIN32GUI_LoadUIString(IDS_SELECTUAE, szTitle, MAX_DPATH); + WIN32GUI_LoadUIString(IDS_UAE, szFormat, MAX_DPATH ); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), "(*.uae)\0*.uae\0", 15); openFileName.lpstrDefExt = "UAE"; openFileName.lpstrFilter = szFilter; break; case 6: - WIN32GUI_LoadUIString( IDS_SELECTROM, szTitle, MAX_DPATH ); - WIN32GUI_LoadUIString( IDS_ROM, szFormat, MAX_DPATH ); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), ROM_FORMAT_STRING, sizeof (ROM_FORMAT_STRING) + 1); + WIN32GUI_LoadUIString( IDS_SELECTROM, szTitle, MAX_DPATH); + WIN32GUI_LoadUIString( IDS_ROM, szFormat, MAX_DPATH); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), ROM_FORMAT_STRING, sizeof (ROM_FORMAT_STRING) + 1); openFileName.lpstrDefExt = "ROM"; openFileName.lpstrFilter = szFilter; break; case 7: - WIN32GUI_LoadUIString( IDS_SELECTKEY, szTitle, MAX_DPATH ); - WIN32GUI_LoadUIString( IDS_KEY, szFormat, MAX_DPATH ); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), "(*.key)\0*.key\0", 15 ); + WIN32GUI_LoadUIString(IDS_SELECTKEY, szTitle, MAX_DPATH); + WIN32GUI_LoadUIString(IDS_KEY, szFormat, MAX_DPATH); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), "(*.key)\0*.key\0", 15); openFileName.lpstrDefExt = "KEY"; openFileName.lpstrFilter = szFilter; @@ -1077,8 +1094,8 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs case 16: WIN32GUI_LoadUIString(flag == 15 ? IDS_RESTOREINP : IDS_SAVEINP, szTitle, MAX_DPATH); WIN32GUI_LoadUIString(IDS_INP, szFormat, MAX_DPATH); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), INP_FORMAT_STRING, sizeof (INP_FORMAT_STRING) + 1); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), INP_FORMAT_STRING, sizeof (INP_FORMAT_STRING) + 1); openFileName.lpstrDefExt = "INP"; openFileName.lpstrFilter = szFilter; @@ -1087,7 +1104,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs case 10: WIN32GUI_LoadUIString(flag == 10 ? IDS_RESTOREUSS : IDS_SAVEUSS, szTitle, MAX_DPATH); WIN32GUI_LoadUIString(IDS_USS, szFormat, MAX_DPATH); - sprintf( szFilter, "%s ", szFormat ); + sprintf(szFilter, "%s ", szFormat); if (flag == 10) { memcpy(szFilter + strlen(szFilter), USS_FORMAT_STRING_RESTORE, sizeof (USS_FORMAT_STRING_RESTORE) + 1); all = 1; @@ -1123,30 +1140,30 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs openFileName.lpstrFilter = szFilter; break; case 11: - WIN32GUI_LoadUIString( IDS_SELECTFLASH, szTitle, MAX_DPATH ); - WIN32GUI_LoadUIString( IDS_FLASH, szFormat, MAX_DPATH ); - sprintf( szFilter, "%s ", szFormat ); - memcpy( szFilter + strlen( szFilter ), "(*.nvr)\0*.nvr\0", 15 ); + WIN32GUI_LoadUIString(IDS_SELECTFLASH, szTitle, MAX_DPATH); + WIN32GUI_LoadUIString(IDS_FLASH, szFormat, MAX_DPATH ); + sprintf(szFilter, "%s ", szFormat); + memcpy(szFilter + strlen(szFilter), "(*.nvr)\0*.nvr\0", 15); openFileName.lpstrDefExt = "NVR"; openFileName.lpstrFilter = szFilter; break; case 8: default: - WIN32GUI_LoadUIString( IDS_SELECTINFO, szTitle, MAX_DPATH ); + WIN32GUI_LoadUIString(IDS_SELECTINFO, szTitle, MAX_DPATH); openFileName.lpstrFilter = NULL; openFileName.lpstrDefExt = NULL; break; case 12: - WIN32GUI_LoadUIString( IDS_SELECTFS, szTitle, MAX_DPATH ); + WIN32GUI_LoadUIString(IDS_SELECTFS, szTitle, MAX_DPATH); openFileName.lpstrFilter = NULL; openFileName.lpstrDefExt = NULL; openFileName.lpstrInitialDir = path_out; break; case 13: - WIN32GUI_LoadUIString( IDS_SELECTINFO, szTitle, MAX_DPATH ); + WIN32GUI_LoadUIString(IDS_SELECTINFO, szTitle, MAX_DPATH); openFileName.lpstrFilter = NULL; openFileName.lpstrDefExt = NULL; @@ -1155,7 +1172,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs } if (all) { p = szFilter; - while (p[0] != 0 || p[1] !=0 ) p++; + while (p[0] != 0 || p[1] !=0) p++; p++; strcpy (p, "All files (*.*)"); p += strlen(p) + 1; @@ -9364,12 +9381,13 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP return FALSE; case TVN_SELCHANGED: { - int cp; + int cp, cf; LPNMTREEVIEW tv = (LPNMTREEVIEW)lParam; cp = (int)(tv->itemNew.lParam & 0xffff); - if (cp != currentpage) { + cf = (int)(tv->itemNew.lParam >> 16); + if (cp != currentpage || cf != configtype) { currentpage = cp; - configtypepanel = configtype = (int)(tv->itemNew.lParam >> 16); + configtypepanel = configtype = cf; updatePanel (hDlg, currentpage); } return TRUE; diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 705a5a48..3aaa8549 100755 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,12 @@ +Beta 4: + +- skip unknown extensions (or files without extension) when scanning + for known ROMs (faster scan if non-ROM files in ROM directory) +- Picasso96 RAM was incorrectly mapped in non-JIT modes +- paraport parallel port support sets INIT (pin 16) to inactive state + (called RESET in Amiga parallel port) + Beta 3: - map POV Hat to joystick up/down and left/right by default diff --git a/uaelib.c b/uaelib.c index 51335479..a5c6595a 100755 --- a/uaelib.c +++ b/uaelib.c @@ -437,10 +437,7 @@ static uae_u32 REGPARAM2 uaelib_demux (TrapContext *context) case 68: return emulib_Minimize (); case 69: return emulib_ExecuteNativeCode (&context->regs); - case 70: - if (valid_address(ARG1, 1)) - write_log("DBG: %s\n", get_real_address(ARG1)); - return 1; + case 70: return 0; /* RESERVED. Something uses this.. */ case 80: return currprefs.maprom ? currprefs.maprom : 0xffffffff; case 81: return cfgfile_uaelib (ARG1, ARG2, ARG3, ARG4); @@ -450,6 +447,10 @@ static uae_u32 REGPARAM2 uaelib_demux (TrapContext *context) case 84: return mmu_init (ARG1, ARG2, ARG3); #endif case 85: return native_dos_op (ARG1, ARG2, ARG3, ARG4); + case 86: + if (valid_address(ARG1, 1)) + write_log("DBG: %s\n", get_real_address(ARG1)); + return 1; } return 0; }