move.w #$FF80,d0
bsr.w getrtbase
jsr (a0) ; d1 = size, a1 = start address
- beq.s FSIN_fchip_done
move.l a1,a0
move.l d1,d0
+ beq.s FSIN_fchip_done
move.l d4,d1
moveq #-5,d2
lea fchipname(pc),a1
db(0x22); db(0x4e); db(0x20); db(0x08); db(0x30); db(0x7c); db(0xff); db(0xb8);
db(0x4e); db(0xae); db(0xfe); db(0x5c); db(0x61); db(0x00); db(0x11); db(0xfe);
db(0x61); db(0x00); db(0x15); db(0xb0); db(0x4c); db(0xdf); db(0x7e); db(0xff);
- db(0x4e); db(0x75); db(0x4e); db(0xae); db(0x08); db(0x00); db(0x00); db(0x02);
+ db(0x4e); db(0x75); db(0x00); db(0x00); db(0x08); db(0x00); db(0x00); db(0x02);
db(0x67); db(0x06); db(0x4e); db(0xb9); db(0x00); db(0xf0); db(0x00); db(0x00);
- db(0x4e); db(0xf9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x28); db(0x40);
+ db(0x4e); db(0xf9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x00); db(0x00);
db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x2c); db(0x78); db(0x00); db(0x04);
db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x0b); db(0xaa);
db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x16); db(0xf3); db(0x70); db(0x24);
db(0x00); db(0x20); db(0x00); db(0x00); db(0x90); db(0x88); db(0x65); db(0x08);
db(0x67); db(0x06); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfd); db(0x96);
db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0a); db(0xea);
- db(0x4e); db(0x90); db(0x67); db(0x10); db(0x20); db(0x49); db(0x20); db(0x01);
+ db(0x4e); db(0x90); db(0x20); db(0x49); db(0x20); db(0x01); db(0x67); db(0x0c);
db(0x22); db(0x04); db(0x74); db(0xfb); db(0x43); db(0xfa); db(0x16); db(0x4f);
db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x15); db(0xc6);
db(0x43); db(0xfa); db(0x00); db(0x54); db(0x70); db(0x0a); db(0x61); db(0x00);
if (!memcmp (&did->iguid, &GUID_SysKeyboard, sizeof (GUID)) || !memcmp (&did->iguid, &GUID_SysMouse, sizeof (GUID))) {
did->priority = 2;
did->superdevice = 1;
- _tcscat (did->name, L" *");
}
return DIENUM_CONTINUE;
}
#if defined (D3D) && defined (GFXFILTER)
#define EFFECT_VERSION 2
-#define D3DX9DLL L"d3dx9_43.dll"
+#define D3DX9DLL1 L"d3dx9_42.dll"
+#define D3DX9DLL2 L"d3dx9_43.dll"
#include "options.h"
#include "xwin.h"
if (d3d_yesno > 0)
return 1;
d3d_yesno = -1;
- h = LoadLibrary (D3DX9DLL);
+ h = LoadLibrary (D3DX9DLL1);
if (h != NULL) {
FreeLibrary (h);
d3dx = Direct3DCreate9 (D3D_SDK_VERSION);
return errmsg;
}
- d3dx = LoadLibrary (D3DX9DLL);
+ d3dx = LoadLibrary (os_vista ? D3DX9DLL2 : D3DX9DLL1);
if (d3dx == NULL) {
- _tcscpy (errmsg, L"Direct3D: June 2010 or newer DirectX Runtime required.\n\nhttp://go.microsoft.com/fwlink/?linkid=56513");
+ _tcscpy (errmsg, L"Direct3D: Newer DirectX Runtime required.\n\nhttp://go.microsoft.com/fwlink/?linkid=56513");
if (isfullscreen () <= 0)
ShellExecute(NULL, L"open", L"http://go.microsoft.com/fwlink/?linkid=56513", NULL, NULL, SW_SHOWNORMAL);
return errmsg;
SendMessage (hwndprogress, PBM_SETPOS, (WPARAM)pct, 0);
_stprintf (tmp, L"%dM / %dM (%d%%)", (int)(written >> 20), (int)(size >> 20), pct);
SendMessage (hwndprogresstxt, WM_SETTEXT, 0, (LPARAM)tmp);
- while (PeekMessage (&msg, 0, 0, 0, PM_REMOVE)) {
- TranslateMessage (&msg);
- DispatchMessage (&msg);
+ while (PeekMessage (&msg, hwnd, 0, 0, PM_REMOVE)) {
+ if (!IsDialogMessage (hwnd, &msg)) {
+ TranslateMessage (&msg);
+ DispatchMessage (&msg);
+ }
}
cnt = 0;
}
#define IDS_PRINTER_POSTSCRIPT_EMULATION 354
#define IDD_INPUTMAP 354
#define IDS_PRINTER_PASSTHROUGH 355
+#define IDD_INFOBOX 355
#define IDS_RES_LORES 356
#define IDS_RES_HIRES 357
#define IDS_RES_SUPERHIRES 358
#define IDC_MBRAM1 1050
#define IDC_MBRAM2 1051
#define IDC_Z3CHIPMEM 1052
-#define IDC_Z3FASTRAM2 1053
#define IDC_Z3CHIPRAM 1053
#define IDC_UAEHOME 1070
#define IDC_PICASSOHOME 1071
#define IDC_PORT0_REMAP 1799
#define IDC_PORT2_REMAP 1800
#define IDC_PORT3_REMAP 1801
-#define IDC_EDIT1 1801
#define IDC_INPUTMAPOUT 1801
+#define IDC_INFOBOX_TEXT2 1802
+#define IDC_INFOBOX_TEXT1 1803
+#define IDC_INFOBOX_TEXT3 1804
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 355
+#define _APS_NEXT_RESOURCE_VALUE 356
#define _APS_NEXT_COMMAND_VALUE 40045
-#define _APS_NEXT_CONTROL_VALUE 1802
+#define _APS_NEXT_CONTROL_VALUE 1803
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
EDITTEXT IDC_INPUTMAPOUT,0,222,299,14,ES_AUTOHSCROLL | WS_DISABLED\r
END\r
\r
+IDD_INFOBOX DIALOGEX 0, 0, 420, 68\r
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
+CAPTION "Scanning ROM image files..."\r
+FONT 8, "MS Sans Serif", 0, 0, 0x0\r
+BEGIN\r
+ DEFPUSHBUTTON "OK",IDOK,123,50,50,14,NOT WS_VISIBLE\r
+ PUSHBUTTON "Cancel",IDCANCEL,182,50,50,14\r
+ CTEXT "",IDC_INFOBOX_TEXT2,6,21,412,11,SS_CENTERIMAGE | SS_SUNKEN | WS_TABSTOP\r
+ CTEXT "",IDC_INFOBOX_TEXT1,6,7,412,11,SS_CENTERIMAGE | SS_SUNKEN | WS_TABSTOP\r
+ CTEXT "",IDC_INFOBOX_TEXT3,5,35,412,11,SS_CENTERIMAGE | SS_SUNKEN | WS_TABSTOP\r
+END\r
+\r
\r
/////////////////////////////////////////////////////////////////////////////\r
//\r
BEGIN\r
END\r
\r
+ IDD_PROGRESSBAR, DIALOG\r
+ BEGIN\r
+ END\r
+\r
IDD_STRINGBOX, DIALOG\r
BEGIN\r
END\r
BEGIN\r
TOPMARGIN, 1\r
END\r
+\r
+ IDD_INFOBOX, DIALOG\r
+ BEGIN\r
+ END\r
END\r
#endif // APSTUDIO_INVOKED\r
\r
fixtrailing (out);
}
-int get_rom_path(TCHAR *out, int mode)
+int get_rom_path (TCHAR *out, int mode)
{
TCHAR tmp[MAX_DPATH];
romlist_add (path, rd);
}
-extern int scan_roms (int);
+extern int scan_roms (HWND, int);
void read_rom_list (void)
{
TCHAR tmp2[1000];
return;
if (!exists || forceroms) {
load_keyring (NULL, NULL);
- scan_roms (forceroms ? 0 : 1);
+ scan_roms (NULL, forceroms ? 0 : 1);
}
forceroms = 0;
idx = 0;
#define LANG_DLL 1
#define WINUAEBETA L"8"
-#define WINUAEDATE MAKEBD(2010, 6, 9)
+#define WINUAEDATE MAKEBD(2010, 6, 11)
#define WINUAEEXTRA L""
#define WINUAEREV L""
SetCursorPos (x + w / 2, y + h / 2);
addnotifications (hAmigaWnd, FALSE, FALSE);
if (hMainWnd != hAmigaWnd) {
- if (!currprefs.headless)
+ if (!currprefs.headless && !rp_isactive ())
ShowWindow (hMainWnd, firstwindow ? SW_SHOWDEFAULT : SW_SHOWNORMAL);
UpdateWindow (hMainWnd);
}
- if (!currprefs.headless)
+ if (!currprefs.headless && !rp_isactive ())
ShowWindow (hAmigaWnd, firstwindow ? SW_SHOWDEFAULT : SW_SHOWNORMAL);
UpdateWindow (hAmigaWnd);
firstwindow = 0;
return 0;
}
+static bool infoboxdialogstate;
+static HWND infoboxhwnd;
+static INT_PTR CALLBACK InfoBoxDialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg)
+ {
+ case WM_DESTROY:
+ PostQuitMessage (0);
+ infoboxdialogstate = false;
+ return TRUE;
+ case WM_CLOSE:
+ DestroyWindow (hDlg);
+ infoboxdialogstate = false;
+ return TRUE;
+ case WM_INITDIALOG:
+ {
+ HWND owner = GetParent (hDlg);
+ if (!owner) {
+ owner = GetDesktopWindow ();
+ RECT ownerrc, merc;
+ GetWindowRect (owner, &ownerrc);
+ GetWindowRect (hDlg, &merc);
+ SetWindowPos (hDlg, NULL,
+ ownerrc.left + ((ownerrc.right - ownerrc.left) - (merc.right - merc.left)) /2,
+ ownerrc.top + ((ownerrc.bottom - ownerrc.top) - (merc.bottom - merc.top)) / 2,
+ 0, 0,
+ SWP_NOSIZE);
+ }
+ return TRUE;
+ }
+ case WM_COMMAND:
+ switch (LOWORD (wParam))
+ {
+ case IDCANCEL:
+ infoboxdialogstate = false;
+ DestroyWindow (hDlg);
+ return TRUE;
+ }
+ break;
+ }
+ return FALSE;
+}
+static bool scan_rom_hook (const TCHAR *name, int line)
+{
+ MSG msg;
+ if (!infoboxhwnd)
+ return true;
+ if (name != NULL) {
+ const TCHAR *s = NULL;
+ if (line == 2) {
+ s = _tcsrchr (name, '/');
+ if (!s)
+ s = _tcsrchr (name, '\\');
+ if (s)
+ s++;
+ }
+ SetWindowText (GetDlgItem (infoboxhwnd, line == 1 ? IDC_INFOBOX_TEXT1 : (line == 2 ? IDC_INFOBOX_TEXT2 : IDC_INFOBOX_TEXT3)), s ? s : name);
+ }
+ while (PeekMessage (&msg, infoboxhwnd, 0, 0, PM_REMOVE)) {
+ if (!IsDialogMessage (infoboxhwnd, &msg)) {
+ TranslateMessage (&msg);
+ DispatchMessage (&msg);
+ }
+ }
+ return infoboxdialogstate;
+}
+
static int scan_rom_2 (struct zfile *f, void *vrsd)
{
struct romscandata *rsd = (struct romscandata*)vrsd;
TCHAR *path = zfile_getname(f);
struct romdata *rd;
- if (!isromext(path))
+ scan_rom_hook (NULL, 0);
+ if (!isromext (path))
return 0;
rd = scan_single_rom_2 (f);
if (rd) {
+ TCHAR name[MAX_DPATH];
+ getromname (rd, name);
+ scan_rom_hook (name, 3);
addrom (rsd->fkey, rd, path);
rsd->got = 1;
}
//write_log("ROMSCAN: skipping file '%s', unknown extension\n", path);
return 0;
}
+ scan_rom_hook (path, 2);
for (;;) {
TCHAR tmp[MAX_DPATH];
_tcscpy (tmp, path);
handle = FindFirstFile (buf, &find_data);
if (handle == INVALID_HANDLE_VALUE)
return 0;
+ scan_rom_hook (path, 1);
for (;;) {
TCHAR tmppath[MAX_DPATH];
_tcscpy (tmppath, path);
if (scan_rom (tmppath, fkey))
ret = 1;
}
- if (FindNextFile (handle, &find_data) == 0) {
+ if (!scan_rom_hook (NULL, 0) || FindNextFile (handle, &find_data) == 0) {
FindClose (handle);
break;
}
#define MAX_ROM_PATHS 10
-static int scan_roms_3(UAEREG *fkey, TCHAR **paths, TCHAR *path)
+static int scan_roms_3 (UAEREG *fkey, TCHAR **paths, TCHAR *path)
{
int i, ret;
TCHAR pathp[MAX_DPATH];
ret = 0;
+ scan_rom_hook (NULL, 0);
GetFullPathName (path, MAX_DPATH, pathp, NULL);
for (i = 0; i < MAX_ROM_PATHS; i++) {
if (paths[i] && !_tcsicmp (paths[i], pathp))
return ret;
}
-extern int get_rom_path(TCHAR *out, int mode);
+extern int get_rom_path (TCHAR *out, int mode);
-int scan_roms (int show)
+int scan_roms (HWND hDlg, int show)
{
TCHAR path[MAX_DPATH];
static int recursive;
int id, i, ret, keys, cnt;
UAEREG *fkey, *fkey2;
TCHAR *paths[MAX_ROM_PATHS];
+ HWND hwnd = 0;
+ MSG msg;
if (recursive)
return 0;
if (fkey == NULL)
goto end;
+ infoboxdialogstate = true;
+ hwnd = CreateDialog (hUIDLL ? hUIDLL : hInst, MAKEINTRESOURCE (IDD_INFOBOX), hDlg, InfoBoxDialogProc);
+ if (!hwnd)
+ goto end;
+ infoboxhwnd = hwnd;
+
cnt = 0;
ret = 0;
for (i = 0; i < MAX_ROM_PATHS; i++)
paths[i] = NULL;
- for (;;) {
+ scan_rom_hook (NULL, 0);
+ while (scan_rom_hook (NULL, 0)) {
keys = get_keyring ();
fetch_path (L"KickstartPath", path, sizeof path / sizeof (TCHAR));
cnt += scan_roms_3 (fkey, paths, path);
}
end:
+ infoboxhwnd = NULL;
+ if (hwnd) {
+ DestroyWindow (hwnd);
+ while (PeekMessage (&msg, 0, 0, 0, PM_REMOVE)) {
+ TranslateMessage (&msg);
+ DispatchMessage (&msg);
+ }
+ }
read_rom_list ();
if (show)
show_rom_list ();
if (DirectorySelection (hDlg, &pathsguid, tmp)) {
load_keyring (&workprefs, NULL);
set_path (L"KickstartPath", tmp);
- if (!scan_roms (1))
+ if (!scan_roms (hDlg, 1))
gui_message_id (IDS_ROMSCANNOROMS);
values_to_pathsdialog (hDlg);
}
}
break;
case IDC_ROM_RESCAN:
- scan_roms (1);
+ scan_roms (hDlg, 1);
break;
case IDC_RESETREGISTRY:
resetregistry ();
ew (hDlg, IDC_FLASHCHOOSER), FALSE);
#endif
if (!regexiststree (NULL , L"DetectedROMs"))
- scan_roms (1);
+ scan_roms (NULL, 1);
}
static void kickstartfilebuttons (HWND hDlg, WPARAM wParam, TCHAR *path)
while (stringboxdialogactive == 1) {
MSG msg;
int ret;
- WaitMessage();
+ WaitMessage ();
while ((ret = GetMessage (&msg, NULL, 0, 0))) {
if (ret == -1)
break;
}
if (ok == 0) {
while (i < j) {
- struct romlist *rl = romlist_getrl (&roms[i]);
- if (rl) {
- int cnt = romlist_cnt - i - 1;
- write_log (L"%s '%s' removed from romlist\n", roms[k].name, rl->path);
- xfree (rl->path);
+ struct romlist *rl2 = romlist_getrl (&roms[i]);
+ if (rl2) {
+ int cnt = romlist_cnt - (rl2 - rl) - 1;
+ write_log (L"%s '%s' removed from romlist\n", roms[k].name, rl2->path);
+ xfree (rl2->path);
if (cnt > 0)
- memmove (rl, rl + 1, cnt * sizeof (struct romlist));
+ memmove (rl2, rl2 + 1, cnt * sizeof (struct romlist));
romlist_cnt--;
}
i++;
TCHAR sep[] = { FSDB_DIR_SEPARATOR, 0 };
struct uae_prefs currprefs;
-static int debug = 1;
+static int debug = 0;
static int amigatest;
#define WRITE_LOG_BUF_SIZE 4096
ok = 1;
}
if (!ok) {
- _tprintf (L"UAE unpacker uaeunp 0.8b by Toni Wilen (c)2010\n");
+ _tprintf (L"UAE unpacker uaeunp 0.8c by Toni Wilen (c)2010\n");
_tprintf (L"\n");
_tprintf (L"List: \"uaeunp (-l) <path>\"\n");
_tprintf (L"List all recursively: \"uaeunp -l <path> **\"\n");
{
struct zfile *zf = NULL;
struct zvolume *zvnew = NULL;
-// int i;
int done = 0;
#ifdef ZFILE_DEBUG
goto end;
zvnew = zfile_fopen_archive_ext (zv->parentz, zf);
if (!zvnew) {
+#if 1
+ zvnew = archive_directory_plain (zf);
+ zfile_fopen_archive_recurse (zvnew);
+ done = 1;
+#else
int rc;
int index;
struct zfile *zf2, *zf3;
}
} else {
zfile_fclose (zf3);
- if (rc == 0)
+ if (rc <= 0)
break;
}
index++;
- break;
+ break; // TODO
}
+#endif
} else {
zvnew->parent = zv->parent;
zfile_fopen_archive_recurse (zvnew);
zai.size = zfile_ftell (zf2);
zfile_fseek (zf2, 0, SEEK_SET);
zn = zvolume_addfile_abs (zv, &zai);
- if (zn)
- zn->offset = index + 1;
- zfile_fclose (zf2);
+ zn->f = zf2;
+// if (zn)
+// zn->offset = index + 1;
+// zfile_fclose (zf2);
} else {
if (rc == 0) {
zfile_fclose (zf);