]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2500b26
authorToni Wilen <twilen@winuae.net>
Sun, 18 Nov 2012 12:41:03 +0000 (14:41 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 18 Nov 2012 12:41:03 +0000 (14:41 +0200)
17 files changed:
akiko.cpp
audio.cpp
cfgfile.cpp
include/options.h
inputdevice.cpp
od-win32/dinput.cpp
od-win32/hardfile_win32.cpp
od-win32/picasso96_win.cpp
od-win32/resources/winuae.rc [changed mode: 0755->0644]
od-win32/rp.cpp
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
od-win32/win32gui_extra.cpp
od-win32/winuaechangelog.txt
statusline.cpp

index 291dae46d649209619acd6d8bb9483395e0bce39..8a227012a945fe1150d85a07c5c09d05f9ea6499 100644 (file)
--- a/akiko.cpp
+++ b/akiko.cpp
@@ -567,7 +567,7 @@ static int statusfunc (int status)
        if (status == -1)
                return 0;
        if (status == -2)
-               return 150;
+               return 10;
 #if 1
        if (cdrom_audiostatus != status) {
                if (status == AUDIO_STATUS_IN_PROGRESS) {
index fb59a377c8b02dbbeccfc572ae4cb333a9cc0344..29e31de9cf737633ce87b9bcbdcfa3c2ccb58ea9 100644 (file)
--- a/audio.cpp
+++ b/audio.cpp
@@ -45,6 +45,7 @@
 
 #define MAX_EV ~0u
 #define DEBUG_AUDIO 0
+#define DEBUG_AUDIO_HACK 0
 #define DEBUG_CHANNEL_MASK 15
 #define TEST_AUDIO 0
 
@@ -58,7 +59,7 @@ STATIC_INLINE bool isaudio (void)
        return currprefs.produce_sound != 0;
 }
 
-#if DEBUG_AUDIO > 0
+#if DEBUG_AUDIO > 0 || DEBUG_AUDIO_HACK > 0
 static bool debugchannel (int ch)
 {
        return ((1 << ch) & DEBUG_CHANNEL_MASK) != 0;
@@ -326,9 +327,7 @@ STATIC_INLINE int FINISH_DATA (int data, int bits)
                data >>=  bits - 16;
        } else {
                int shift = 16 - bits;
-               int right = data & ((1 << shift) - 1);
                data <<= shift;
-               data |= right;
        }
        return data;
 }
@@ -1267,7 +1266,7 @@ static void audio_state_channel2 (int nr, bool perfin)
        if ((cdp->state == 2 || cdp->state == 3) && usehacks1 () && !chan_ena && old_dma) {
                // DMA switched off, state=2/3 and "too fast CPU": kill DMA instantly
                // or CPU timed DMA wait routines in common tracker players will lose notes
-#if DEBUG_AUDIO > 0
+#if DEBUG_AUDIO_HACK > 0
                if (debugchannel (nr))
                        write_log (_T("%d: INSTADMAOFF\n"), nr, M68K_GETPC);
 #endif
@@ -1442,7 +1441,7 @@ static void audio_state_channel (int nr, bool perfin)
 {
        struct audio_channel_data *cdp = audio_channel + nr;
        audio_state_channel2 (nr, perfin);
-       cdp->dat_written = 0;
+       cdp->dat_written = false;
 }
 
 void audio_state_machine (void)
@@ -1451,7 +1450,7 @@ void audio_state_machine (void)
        for (int nr = 0; nr < 4; nr++) {
                struct audio_channel_data *cdp = audio_channel + nr;
                audio_state_channel2 (nr, false);
-               cdp->dat_written = 0;
+               cdp->dat_written = false;
        }
        schedule_audio ();
        events_schedule ();
@@ -1862,13 +1861,17 @@ void AUDxLCH (int nr, uae_u16 v)
        if (usehacks1 () && ((cdp->ptx_tofetch && cdp->state == 1) || cdp->ptx_written)) {
                cdp->ptx = cdp->lc;
                cdp->ptx_written = true;
+#if DEBUG_AUDIO_HACK > 0
+               if (debugchannel (nr))
+                       write_log (_T("AUD%dLCH HACK: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+#endif
        } else {
                cdp->lc = (cdp->lc & 0xffff) | ((uae_u32)v << 16);
-       }
 #if DEBUG_AUDIO > 0
-       if (debugchannel (nr))
-               write_log (_T("AUD%dLCH: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+               if (debugchannel (nr))
+                       write_log (_T("AUD%dLCH: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
 #endif
+       }
 }
 
 void AUDxLCL (int nr, uae_u16 v)
@@ -1879,13 +1882,17 @@ void AUDxLCL (int nr, uae_u16 v)
        if (usehacks1 () && ((cdp->ptx_tofetch && cdp->state == 1) || cdp->ptx_written)) {
                cdp->ptx = cdp->lc;
                cdp->ptx_written = true;
+#if DEBUG_AUDIO_HACK > 0
+               if (debugchannel (nr))
+                       write_log (_T("AUD%dLCL HACK: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+#endif
        } else {
                cdp->lc = (cdp->lc & ~0xffff) | (v & 0xFFFE);
-       }
 #if DEBUG_AUDIO > 0
-       if (debugchannel (nr))
-               write_log (_T("AUD%dLCL: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
+               if (debugchannel (nr))
+                       write_log (_T("AUD%dLCL: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx);
 #endif
+       }
 }
 
 void AUDxPER (int nr, uae_u16 v)
@@ -1904,8 +1911,10 @@ void AUDxPER (int nr, uae_u16 v)
                /* smaller values would cause extremely high cpu usage */
                per = PERIOD_MIN * CYCLE_UNIT;
        }
-       if (per < PERIOD_MIN_NONCE * CYCLE_UNIT && !currprefs.cpu_cycle_exact && (cdp->dmaenstore || cdp->state == 0)) {
-               /* DMAL emulation and low period can cause very very high cpu usage on slow performance PCs */
+       if (per < PERIOD_MIN_NONCE * CYCLE_UNIT && !currprefs.cpu_cycle_exact && cdp->dmaenstore) {
+               /* DMAL emulation and low period can cause very very high cpu usage on slow performance PCs
+                * Only do this hack if audio DMA is active.
+                */
                per = PERIOD_MIN_NONCE * CYCLE_UNIT;
        }
 
index 0d3e2a230f038fc8c553f77fcf87e95496def59c..2d0cae966034f37c7fd6e1833f6b032987b0d151 100644 (file)
@@ -190,6 +190,8 @@ static const TCHAR *specialmonitors[] = { _T("none"), _T("autodetect"), _T("a202
 static const TCHAR *rtgtype[] = { _T("ZorroII"), _T("ZorroIII"), 0 };
 static const TCHAR *waitblits[] = { _T("disabled"), _T("automatic"), _T("noidleonly"), _T("always"), 0 };
 static const TCHAR *autoext2[] = { _T("disabled"), _T("copy"), _T("replace"), 0 };
+static const TCHAR *leds[] = { _T("power"), _T("df0"), _T("df1"), _T("df2"), _T("df3"), _T("hd"), _T("cd"), _T("fps"), _T("cpu"), _T("snd"), _T("md"), 0 };
+static int leds_order[] = { 3, 6, 7, 8, 9, 4, 5, 2, 1, 0, 9 };
 
 static const TCHAR *obsolete[] = {
        _T("accuracy"), _T("gfx_opengl"), _T("gfx_32bit_blits"), _T("32bit_blits"),
@@ -576,6 +578,30 @@ static void write_compatibility_cpu (struct zfile *f, struct uae_prefs *p)
        cfgfile_write (f, _T("cpu_type"), tmp);
 }
 
+static void write_leds (struct zfile *f, const TCHAR *name, int mask)
+{
+       TCHAR tmp[MAX_DPATH];
+       tmp[0] = 0;
+       for (int i = 0; leds[i]; i++) {
+               bool got = false;
+               for (int j = 0; leds[j]; j++) {
+                       if (leds_order[j] == i) {
+                               if (mask & (1 << j)) {
+                                       if (got)
+                                               _tcscat (tmp, _T(":"));
+                                       _tcscat (tmp, leds[j]);
+                                       got = true;
+                               }
+                       }
+               }
+               if (leds[i + 1] && got)
+                       _tcscat (tmp, _T(","));
+       }
+       while (tmp[0] && tmp[_tcslen (tmp) - 1] == ',')
+               tmp[_tcslen (tmp) - 1] = 0;
+       cfgfile_dwrite_str (f, name, tmp);
+}
+
 void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
 {
        struct strlist *sl;
@@ -930,13 +956,17 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
        cfgfile_write_bool (f, _T("ntsc"), p->ntscmode);
        cfgfile_write_bool (f, _T("genlock"), p->genlock);
        cfgfile_dwrite_str (f, _T("monitoremu"), specialmonitors[p->monitoremu]);
+
        cfgfile_dwrite_bool (f, _T("show_leds"), !!(p->leds_on_screen & STATUSLINE_CHIPSET));
+       cfgfile_dwrite_bool (f, _T("show_leds_rtg"), !!(p->leds_on_screen & STATUSLINE_RTG));
+       write_leds(f, _T("show_leds_enabled"), p->leds_on_screen_mask[0]);
+       write_leds(f, _T("show_leds_enabled_rtg"), p->leds_on_screen_mask[1]);
+
        if (p->osd_pos.y || p->osd_pos.x) {
                cfgfile_dwrite (f, _T("osd_position"), _T("%.1f%s:%.1f%s"),
                        p->osd_pos.x >= 20000 ? (p->osd_pos.x - 30000) / 10.0 : (float)p->osd_pos.x, p->osd_pos.x >= 20000 ? _T("%") : _T(""),
                        p->osd_pos.y >= 20000 ? (p->osd_pos.y - 30000) / 10.0 : (float)p->osd_pos.y, p->osd_pos.y >= 20000 ? _T("%") : _T(""));
        }
-       cfgfile_dwrite_bool (f, _T("show_leds_rtg"), !!(p->leds_on_screen & STATUSLINE_RTG));
        cfgfile_dwrite (f, _T("keyboard_leds"), _T("numlock:%s,capslock:%s,scrolllock:%s"),
                kbleds[p->keyboard_leds[0]], kbleds[p->keyboard_leds[1]], kbleds[p->keyboard_leds[2]]);
        if (p->chipset_mask & CSMASK_AGA)
@@ -1047,6 +1077,10 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
        cfgfile_write_bool (f, _T("gfxcard_hardware_sprite"), p->rtg_hardwaresprite);
        cfgfile_write (f, _T("chipmem_size"), _T("%d"), p->chipmem_size == 0x20000 ? -1 : (p->chipmem_size == 0x40000 ? 0 : p->chipmem_size / 0x80000));
        cfgfile_dwrite (f, _T("megachipmem_size"), _T("%d"), p->z3chipmem_size / 0x100000);
+       if (p->custom_memory_sizes[0])
+               cfgfile_write (f, _T("addmem1"), _T("0x%x,0x%x"), p->custom_memory_addrs[0], p->custom_memory_sizes[0]);
+       if (p->custom_memory_sizes[1])
+               cfgfile_write (f, _T("addmem2"), _T("0x%x,0x%x"), p->custom_memory_addrs[1], p->custom_memory_sizes[1]);
 
        if (p->m68k_speed > 0) {
                cfgfile_write (f, _T("finegrain_cpu_speed"), _T("%d"), p->m68k_speed);
@@ -1548,6 +1582,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                || cfgfile_string (option, value, _T("gfx_filter_mask"), p->gfx_filtermask, sizeof p->gfx_filtermask / sizeof (TCHAR))
                || cfgfile_intval (option, value, _T("filesys_max_size"), &p->filesys_limit, 1)
 
+               || cfgfile_intval (option, value, _T("rtg_vert_zoom_mult"), &p->rtg_vert_zoom_mult, 1)
+               || cfgfile_intval (option, value, _T("rtg_horiz_zoom_mult"), &p->rtg_horiz_zoom_mult, 1)
 #endif
                || cfgfile_intval (option, value, _T("floppy0sound"), &p->floppyslots[0].dfxclick, 1)
                || cfgfile_intval (option, value, _T("floppy1sound"), &p->floppyslots[1].dfxclick, 1)
@@ -1690,6 +1726,31 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                        p->leds_on_screen &= ~STATUSLINE_RTG;
                return 1;
        }
+       if (_tcscmp (option, _T("show_leds_enabled")) == 0 || _tcscmp (option, _T("show_leds_enabled_rtg")) == 0) {
+               TCHAR tmp[MAX_DPATH];
+               int idx = _tcscmp (option, _T("show_leds_enabled")) == 0 ? 0 : 1;
+               p->leds_on_screen_mask[idx] = 0;
+               _tcscpy (tmp, value);
+               _tcscat (tmp, _T(","));
+               TCHAR *s = tmp;
+               for (;;) {
+                       TCHAR *s2 = s;
+                       TCHAR *s3 = _tcschr (s, ':');
+                       s = _tcschr (s, ',');
+                       if (!s)
+                               break;
+                       if (s3 && s3 < s)
+                               s = s3;
+                       *s = 0;
+                       for (int i = 0; leds[i]; i++) {
+                               if (!_tcsicmp (s2, leds[i])) {
+                                       p->leds_on_screen_mask[idx] |= 1 << i;
+                               }
+                       }
+                       s++;
+               }
+               return 1;
+       }
 
        if (!_tcscmp (option, _T("osd_position"))) {
                TCHAR *s = value;
@@ -4245,6 +4306,7 @@ void default_prefs (struct uae_prefs *p, int type)
        p->waiting_blits = 0;
        p->collision_level = 2;
        p->leds_on_screen = 0;
+       p->leds_on_screen_mask[0] = p->leds_on_screen_mask[1] = (1 << LED_MAX) - 1;
        p->keyboard_leds_in_use = 0;
        p->keyboard_leds[0] = p->keyboard_leds[1] = p->keyboard_leds[2] = 0;
        p->scsi = 0;
@@ -4299,6 +4361,9 @@ void default_prefs (struct uae_prefs *p, int type)
        p->gfx_filter_keep_autoscale_aspect = false;
        p->gfx_filteroverlay_overscan = 0;
 
+       p->rtg_horiz_zoom_mult = 1000;
+       p->rtg_vert_zoom_mult = 1000;
+
        _tcscpy (p->floppyslots[0].df, _T("df0.adf"));
        _tcscpy (p->floppyslots[1].df, _T("df1.adf"));
        _tcscpy (p->floppyslots[2].df, _T("df2.adf"));
index 7ca2b163b3b7f9340c7df2b8fb192e20fe12cf22..e68f7ba51910619670577cfd5a79784e96d45c22 100644 (file)
@@ -304,6 +304,9 @@ struct uae_prefs {
        int gfx_filter_autoscale;
        int gfx_filter_keep_autoscale_aspect;
 
+       int rtg_horiz_zoom_mult;
+       int rtg_vert_zoom_mult;
+
        bool immediate_blits;
        int waiting_blits;
        unsigned int chipset_mask;
@@ -315,6 +318,7 @@ struct uae_prefs {
        int cr_selected;
        int collision_level;
        int leds_on_screen;
+       int leds_on_screen_mask[2];
        struct wh osd_pos;
        int keyboard_leds[3];
        bool keyboard_leds_in_use;
index e46f6672a795414e3b8d96589a3ad65e05dd745a..d7cf61c959b827ce94cdf3b309446456b4eb5678 100644 (file)
@@ -6181,7 +6181,7 @@ void inputdevice_testrecord (int type, int num, int wtype, int wnum, int state,
                                j++;
                        }
                        if (j >= MAX_INPUT_DEVICE_EVENTS || na->extra[j] < 0)
-                               type = -1;
+                               return;
                }
        }
        // wait until previous event is released before accepting new ones
@@ -6254,7 +6254,10 @@ int inputdevice_testread (int *devnum, int *wtype, int *state, bool doread)
                testmode_count--;
                struct teststore *ts = &testmode_data[testmode_count];
                *devnum = getdevnum (ts->testmode_type, ts->testmode_num);
-               *wtype = idev[ts->testmode_type].get_widget_first (ts->testmode_num, ts->testmode_wtype) + ts->testmode_wnum;
+               if (ts->testmode_wnum >= 0 && ts->testmode_wnum < MAX_INPUT_DEVICE_EVENTS)
+                       *wtype = idev[ts->testmode_type].get_widget_first (ts->testmode_num, ts->testmode_wtype) + ts->testmode_wnum;
+               else
+                       *wtype = ts->testmode_wnum;
                *state = ts->testmode_state;
                if (ts->testmode_state)
                        memcpy (&testmode_wait[testmode_count], ts, sizeof (struct teststore));
index c061df958638185cafaedd38c0747e6eeb90e665..39ebb8a452439e9a0fc788cdaef1b4ea18d58465 100644 (file)
@@ -2191,6 +2191,7 @@ static void handle_rawinput_2 (RAWINPUT *raw)
                }
                if (num == num_keyboard) {
                        for (num = 0; num < num_keyboard; num++) {
+                               did = &di_keyboard[num];
                                if (did->connection == DIDC_RAW && did->acquired && did->rawinput == NULL)
                                        break;
                        }
index e76f93754322969012532cb70b28e5fdb84595c7..3aa9edbeb247b35fadb2af5b889fe3f3ef40603e 100644 (file)
@@ -1203,6 +1203,8 @@ static BOOL GetDevicePropertyFromName(const TCHAR *DevicePath, DWORD Index, DWOR
                write_log (_T("IOCTL_DISK_GET_LENGTH_INFO failed with error code %d.\n"), GetLastError());
                if (!nosp)
                        write_log (_T("IOCTL_DISK_GET_LENGTH_INFO not supported, detected disk size may not be correct.\n"));
+       } else {
+               write_log (_T("IOCTL_DISK_GET_LENGTH_INFO returned size: %I64d (0x%I64x)\n"), gli.Length.QuadPart, gli.Length.QuadPart);
        }
        if (geom_ok == 0 && gli_ok == 0) {
                write_log (_T("Can't detect size of device\n"));
@@ -1231,8 +1233,13 @@ static BOOL GetDevicePropertyFromName(const TCHAR *DevicePath, DWORD Index, DWOR
                udi->sectors = dg.SectorsPerTrack;
                udi->heads = dg.TracksPerCylinder;
        }
-       if (gli_ok)
+       if (gli_ok && gli.Length.QuadPart)
                udi->size = gli.Length.QuadPart;
+       if (udi->size == 0) {
+               write_log (_T("device size is zero!\n"));
+               ret = 1;
+               goto end;
+       }
        write_log (_T("device size %I64d (0x%I64x) bytes\n"), udi->size, udi->size);
        trim (orgname);
 
index 010f3338786d9aa12f713aa590f14ba69e90b889..b26f9c3768ecb8af0713fe6232908543435ab565 100644 (file)
@@ -4102,7 +4102,8 @@ static bool flushpixels (void)
                                lock = 1;
                }
                if (dst) {
-                       statusline (dst);
+                       if (!(currprefs.leds_on_screen & STATUSLINE_TARGET))
+                               statusline (dst);
                        maxy = picasso_vidinfo.height;
                        if (miny > picasso_vidinfo.height - TD_TOTAL_HEIGHT)
                                miny = picasso_vidinfo.height - TD_TOTAL_HEIGHT;
old mode 100755 (executable)
new mode 100644 (file)
index 702bcc9..d2f3b30
@@ -479,7 +479,7 @@ STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
 FONT 8, "MS Sans Serif", 0, 0, 0x0\r
 BEGIN\r
     CONTROL         "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,65,10,210,35\r
-    CONTROL         "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,43,59,260,20\r
+    CONTROL         "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,1,58,343,28\r
     PUSHBUTTON      "Contributors",IDC_CONTRIBUTORS,132,100,80,15\r
     CONTROL         "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,196,112,24\r
     CONTROL         "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | NOT WS_VISIBLE | WS_DISABLED,211,131,112,24\r
@@ -516,16 +516,16 @@ BEGIN
     PUSHBUTTON      "Set default",IDC_GUI_DEFAULT,272,204,54,14\r
     COMBOBOX        IDC_GUI_SIZE,333,205,54,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
     CONTROL         "Resizeable GUI",IDC_GUI_RESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,273,222,114,11\r
-    GROUPBOX        "State Files",IDC_STATIC,1,244,393,38\r
-    EDITTEXT        IDC_STATENAME,8,259,231,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP\r
+    GROUPBOX        "State Files",IDC_STATIC,1,242,393,38\r
+    EDITTEXT        IDC_STATENAME,8,257,231,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP\r
     CONTROL         "",IDC_STATECLEAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,244,261,9,10\r
-    PUSHBUTTON      "Load state...",IDC_DOLOADSTATE,257,259,65,14\r
-    PUSHBUTTON      "Save state...",IDC_DOSAVESTATE,325,259,65,14\r
-    GROUPBOX        "Keyboard LEDs",IDC_STATIC,1,284,393,34\r
-    COMBOBOX        IDC_KBLED1,10,297,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_KBLED2,97,297,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    COMBOBOX        IDC_KBLED3,184,297,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,298,64,11\r
+    PUSHBUTTON      "Load state...",IDC_DOLOADSTATE,257,257,65,14\r
+    PUSHBUTTON      "Save state...",IDC_DOSAVESTATE,325,257,65,14\r
+    GROUPBOX        "Keyboard LEDs",IDC_STATIC,1,282,393,34\r
+    COMBOBOX        IDC_KBLED1,10,295,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_KBLED2,97,295,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_KBLED3,184,295,64,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+    CONTROL         "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,296,64,11\r
 END\r
 \r
 IDD_HARDFILE DIALOGEX 0, 0, 396, 263\r
index 77f86f1bc132cfd23340d7554e7ffc944a1a842f..da4a566ffb5715314aa525d6b70d0d74f0cd1525 100644 (file)
@@ -553,6 +553,7 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
        int totalhdbl = -1, totalvdbl = -1;
        int hmult, vmult;
        bool half;
+       bool rtg;
 
        hres = p->gfx_resolution;
        vres = p->gfx_vresolution;
@@ -565,14 +566,23 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
 
        if (WIN32GFX_IsPicassoScreen ()) {
 
+               rtg = true;
                full = p->gfx_apmode[1].gfx_fullscreen;
                sm->lClipTop = -1;
                sm->lClipLeft = -1;
                sm->lClipWidth = -1;//picasso96_state.Width;
                sm->lClipHeight = -1;//picasso96_state.Height;
 
+               if (p->rtg_horiz_zoom_mult < 333 || p->rtg_vert_zoom_mult < 333)
+                       m |= RP_SCREENMODE_SCALE_4X;
+               else if (p->rtg_horiz_zoom_mult < 500 || p->rtg_vert_zoom_mult < 500)
+                       m |= RP_SCREENMODE_SCALE_3X;
+               else if (p->rtg_horiz_zoom_mult < 1000 || p->rtg_vert_zoom_mult < 1000)
+                       m |= RP_SCREENMODE_SCALE_2X;
+
        } else {
 
+               rtg = false;
                full = p->gfx_apmode[0].gfx_fullscreen;
 
                totalhdbl = hres;
@@ -618,7 +628,7 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
        }
        if (full) {
                m &= ~RP_SCREENMODE_DISPLAYMASK;
-               m |= p->gfx_apmode[APMODE_NATIVE].gfx_display << 8;
+               m |= p->gfx_apmode[rtg ? APMODE_RTG : APMODE_NATIVE].gfx_display << 8;
        }
        if (full > 1)
                m |= RP_SCREENMODE_FULLSCREEN_SHARED;
@@ -769,85 +779,102 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
 
        p->gfx_apmode[1].gfx_fullscreen = fs;
        p->gfx_apmode[0].gfx_fullscreen = fs;
-       p->win32_rtgscaleifsmall = fs == 2;
        p->gfx_xcenter_pos = sm->lClipLeft;
        p->gfx_ycenter_pos = sm->lClipTop;
        p->gfx_xcenter_size = -1;
        p->gfx_ycenter_size = -1;
 
-       if (stretch) {
-               hmult = vmult = 0;
-       } else if (integerscale) {
-               hmult = vmult = 1;
-               p->gfx_filter_autoscale = AUTOSCALE_INTEGER;
-               if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
-                       p->gfx_xcenter_pos = -1;
-                       p->gfx_ycenter_pos = -1;
-                       p->gfx_xcenter_size = -1;
-                       p->gfx_ycenter_size = -1;
+       if (WIN32GFX_IsPicassoScreen ()) {
+
+               int m = 1;
+               p->win32_rtgscaleifsmall = fs == 2 || (smm >= RP_SCREENMODE_SCALE_2X  && smm <= RP_SCREENMODE_SCALE_4X);
+               p->rtg_horiz_zoom_mult = p->rtg_vert_zoom_mult = 1000;
+               if (smm == RP_SCREENMODE_SCALE_2X) {
+                       m = 2;
+               } else if (smm == RP_SCREENMODE_SCALE_3X) {
+                       m = 3;
+               } else if (smm == RP_SCREENMODE_SCALE_4X) {
+                       m = 4;
+               }
+               p->rtg_horiz_zoom_mult = p->rtg_vert_zoom_mult = 1000 / m;
+               p->gfx_size_win.width = picasso_vidinfo.width * m;
+               p->gfx_size_win.height = picasso_vidinfo.height * m;
+
+       } else {
+               if (stretch) {
+                       hmult = vmult = 0;
+               } else if (integerscale) {
+                       hmult = vmult = 1;
+                       p->gfx_filter_autoscale = AUTOSCALE_INTEGER;
+                       if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
+                               p->gfx_xcenter_pos = -1;
+                               p->gfx_ycenter_pos = -1;
+                               p->gfx_xcenter_size = -1;
+                               p->gfx_ycenter_size = -1;
+                       } else {
+                               if (sm->lClipWidth > 0)
+                                       p->gfx_xcenter_size = sm->lClipWidth;
+                               if (sm->lClipHeight > 0)
+                                       p->gfx_ycenter_size = sm->lClipHeight;
+                       }
+               }
+
+               if (keepaspect) {
+                       p->gfx_filter_aspect = -1;
+                       p->gfx_filter_keep_aspect = 1;
                } else {
+                       p->gfx_filter_aspect = 0;
+                       p->gfx_filter_keep_aspect = 0;
+               }
+
+               if (!integerscale) {
+                       if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
+                               if (!forcesize)
+                                       p->gfx_filter_autoscale = AUTOSCALE_RESIZE;
+                               else
+                                       p->gfx_filter_autoscale = AUTOSCALE_NORMAL;
+                               p->gfx_xcenter_pos = -1;
+                               p->gfx_ycenter_pos = -1;
+                               p->gfx_xcenter_size = -1;
+                               p->gfx_ycenter_size = -1;
+                       } else if (sm->dwClipFlags & RP_CLIPFLAGS_NOCLIP) {
+                               p->gfx_filter_autoscale = AUTOSCALE_STATIC_MAX;
+                               p->gfx_xcenter_pos = -1;
+                               p->gfx_ycenter_pos = -1;
+                               p->gfx_xcenter_size = -1;
+                               p->gfx_ycenter_size = -1;
+                               if (!forcesize) {
+                                       p->gfx_size_win.width = AMIGA_WIDTH_MAX << currprefs.gfx_resolution;
+                                       p->gfx_size_win.height = AMIGA_HEIGHT_MAX << currprefs.gfx_vresolution;;
+                               }
+                       }
+
                        if (sm->lClipWidth > 0)
                                p->gfx_xcenter_size = sm->lClipWidth;
                        if (sm->lClipHeight > 0)
                                p->gfx_ycenter_size = sm->lClipHeight;
-               }
-       }
 
-       if (keepaspect) {
-               p->gfx_filter_aspect = -1;
-               p->gfx_filter_keep_aspect = 1;
-       } else {
-               p->gfx_filter_aspect = 0;
-               p->gfx_filter_keep_aspect = 0;
-       }
-
-       if (log_rp & 2)
-               write_log(_T("%dx%d %dx%d %dx%d %08x HM=%.1f VM=%.1f\n"),
-                       sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight, sm->lTargetWidth, sm->lTargetHeight, sm->dwClipFlags, hmult, vmult);
-
-       if (!integerscale) {
-               if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) {
-                       if (!forcesize)
-                               p->gfx_filter_autoscale = AUTOSCALE_RESIZE;
-                       else
-                               p->gfx_filter_autoscale = AUTOSCALE_NORMAL;
-                       p->gfx_xcenter_pos = -1;
-                       p->gfx_ycenter_pos = -1;
-                       p->gfx_xcenter_size = -1;
-                       p->gfx_ycenter_size = -1;
-               } else if (sm->dwClipFlags & RP_CLIPFLAGS_NOCLIP) {
-                       p->gfx_filter_autoscale = AUTOSCALE_STATIC_MAX;
-                       p->gfx_xcenter_pos = -1;
-                       p->gfx_ycenter_pos = -1;
-                       p->gfx_xcenter_size = -1;
-                       p->gfx_ycenter_size = -1;
-                       if (!forcesize) {
-                               p->gfx_size_win.width = AMIGA_WIDTH_MAX << currprefs.gfx_resolution;
-                               p->gfx_size_win.height = AMIGA_HEIGHT_MAX << currprefs.gfx_vresolution;;
+                       if ((p->gfx_xcenter_pos >= 0 && p->gfx_ycenter_pos >= 0) || (p->gfx_xcenter_size > 0 && p->gfx_ycenter_size > 0)) {
+                               p->gfx_filter_autoscale = AUTOSCALE_MANUAL;
                        }
                }
 
-               if (sm->lClipWidth > 0)
-                       p->gfx_xcenter_size = sm->lClipWidth;
-               if (sm->lClipHeight > 0)
-                       p->gfx_ycenter_size = sm->lClipHeight;
+               p->gfx_filter_horiz_zoom_mult = hmult > 0 ? (int)(1000.0 / hmult) : (int)hmult;
+               p->gfx_filter_vert_zoom_mult = vmult > 0 ? (int)(1000.0 / vmult) : (int)vmult;
 
-               if ((p->gfx_xcenter_pos >= 0 && p->gfx_ycenter_pos >= 0) || (p->gfx_xcenter_size > 0 && p->gfx_ycenter_size > 0)) {
-                       p->gfx_filter_autoscale = AUTOSCALE_MANUAL;
+               p->gfx_filter_scanlines = 0;
+               p->gfx_scanlines = 0;
+               if (sm->dwScreenMode & RP_SCREENMODE_SCANLINES) {
+                       p->gfx_scanlines = 1;
+                       p->gfx_filter_scanlines = 8;
+                       p->gfx_filter_scanlinelevel = 8;
+                       p->gfx_filter_scanlineratio = (1 << 4) | 1;
                }
        }
 
-       p->gfx_filter_horiz_zoom_mult = hmult > 0 ? (int)(1000.0 / hmult) : (int)hmult;
-       p->gfx_filter_vert_zoom_mult = vmult > 0 ? (int)(1000.0 / vmult) : (int)vmult;
-
-       p->gfx_filter_scanlines = 0;
-       p->gfx_scanlines = 0;
-       if (sm->dwScreenMode & RP_SCREENMODE_SCANLINES) {
-               p->gfx_scanlines = 1;
-               p->gfx_filter_scanlines = 8;
-               p->gfx_filter_scanlinelevel = 8;
-               p->gfx_filter_scanlineratio = (1 << 4) | 1;
-       }
+       if (log_rp & 2)
+               write_log(_T("%dx%d %dx%d %dx%d %08x HM=%.1f VM=%.1f\n"),
+                       sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight, sm->lTargetWidth, sm->lTargetHeight, sm->dwClipFlags, hmult, vmult);
 
        if (log_rp & 2)
                write_log (_T("WW=%d WH=%d FW=%d FH=%d HM=%d VM=%d XP=%d YP=%d XS=%d YS=%d AS=%d AR=%d,%d\n"),
@@ -1167,10 +1194,14 @@ static void sendfeatures (void)
 
        feat = RP_FEATURE_POWERLED | RP_FEATURE_SCREEN1X | RP_FEATURE_FULLSCREEN;
        feat |= RP_FEATURE_PAUSE | RP_FEATURE_TURBO_CPU | RP_FEATURE_TURBO_FLOPPY | RP_FEATURE_VOLUME | RP_FEATURE_SCREENCAPTURE;
-       feat |= RP_FEATURE_STATE | RP_FEATURE_SCANLINES | RP_FEATURE_DEVICEREADWRITE;
-       feat |= RP_FEATURE_SCALING_SUBPIXEL | RP_FEATURE_SCALING_STRETCH;
-       if (!WIN32GFX_IsPicassoScreen ())
+       feat |= RP_FEATURE_STATE | RP_FEATURE_DEVICEREADWRITE;
+       if (WIN32GFX_IsPicassoScreen ()) {
+               if (currprefs.gfx_api)
+                       feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN3X | RP_FEATURE_SCREEN4X;
+       } else {
                feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN3X | RP_FEATURE_SCREEN4X;
+               feat |= RP_FEATURE_SCALING_SUBPIXEL | RP_FEATURE_SCALING_STRETCH | RP_FEATURE_SCANLINES;
+       }
        feat |= RP_FEATURE_INPUTDEVICE_MOUSE;
        feat |= RP_FEATURE_INPUTDEVICE_JOYSTICK;
        feat |= RP_FEATURE_INPUTDEVICE_GAMEPAD;
index 61c2df5c8301508cd2799e8465e883bebdb7e9fe..1e9aae6cb58bb86d5d4c08f327a499f63f5bd395 100644 (file)
@@ -3259,11 +3259,11 @@ int target_parse_option (struct uae_prefs *p, const TCHAR *option, const TCHAR *
                if (s) {
                        v2 = _tstol (s + 1);
                        if (v1 < 0 || v2 < 0)
-                               p->gfx_filter_aspect = -1;
+                               p->win32_rtgscaleaspectratio = -1;
                        else if (v1 == 0 || v2 == 0)
-                               p->gfx_filter_aspect = 0;
+                               p->win32_rtgscaleaspectratio = 0;
                        else
-                               p->gfx_filter_aspect = (v1 << 8) | v2;
+                               p->win32_rtgscaleaspectratio = (v1 << 8) | v2;
                }
                return 1;
        }
index 0186ba9870218f96756f4c336f32ab95980630ae..fdae29d3fcb553fe6f7b6998a3ecfeaac0a987b3 100644 (file)
@@ -19,9 +19,9 @@
 #define LANG_DLL 1
 
 //#define WINUAEBETA _T("")
-#define WINUAEBETA _T("25")
-#define WINUAEDATE MAKEBD(2012, 11, 10)
-#define WINUAEEXTRA _T(" RC1")
+#define WINUAEBETA _T("26")
+#define WINUAEDATE MAKEBD(2012, 11, 18)
+#define WINUAEEXTRA _T(" RC2")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 #define WINUAEREV _T("")
 
index da75c5d5e2411974721f0e85cb2338ec6bd76eec..3e51f3716b82ab57e36d0f354c71acd18800f1b4 100644 (file)
@@ -1421,8 +1421,8 @@ static void update_gfxparams (void)
 #ifdef PICASSO96
        currentmode->vsync = 0;
        if (screen_is_picasso) {
-               currentmode->current_width = picasso96_state.Width;
-               currentmode->current_height = picasso96_state.Height;
+               currentmode->current_width = picasso96_state.Width * (1000 / currprefs.rtg_horiz_zoom_mult);
+               currentmode->current_height = picasso96_state.Height * (1000 / currprefs.rtg_vert_zoom_mult);
                currprefs.gfx_apmode[1].gfx_interlaced = false;
                if (currprefs.win32_rtgvblankrate == 0) {
                        currprefs.gfx_apmode[1].gfx_refreshrate = currprefs.gfx_apmode[0].gfx_refreshrate;
@@ -3963,7 +3963,7 @@ bool target_graphics_buffer_update (void)
        } else {
                DirectDraw_ClearSurface (NULL);
        }
-       if (currentmode->flags & DM_SWSCALE) {
+       if ((currentmode->flags & DM_SWSCALE) && !screen_is_picasso) {
                S2X_init (currentmode->native_width, currentmode->native_height, currentmode->native_depth);
        }
        return true;
index 94225570386d2fbc086db289faba2dce9f680d0a..ad5e428b145865a0e0d9bdc6db90dfa328df54d3 100644 (file)
@@ -7916,10 +7916,15 @@ static void misc_lang (HWND hDlg)
 
        SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_RESETCONTENT, 0, 0);
        SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("Select"));
+       SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("140%"));
+       SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("130%"));
+       SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("120%"));
        SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("110%"));
        SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T("100%"));
        SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 90%"));
        SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 80%"));
+       SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 70%"));
+       SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_ADDSTRING, 0, (LPARAM)_T(" 60%"));
        SendDlgItemMessage (hDlg, IDC_GUI_SIZE, CB_SETCURSEL, 0, 0);
 }
 
@@ -8180,11 +8185,15 @@ static INT_PTR MiscDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
                                        v = GUI_SCALE_DEFAULT;
                                } else {
                                        v--;
-                                       v = 110 - v * 10;
+                                       v = 140 - v * 10;
+                               }
+                               double m = scaleresource_getdpimult ();
+                               gui_width = (int)(GUI_INTERNAL_WIDTH * m * v / 100);
+                               gui_height = (int)(GUI_INTERNAL_HEIGHT * m * v / 100);
+                               if (gui_width < MIN_GUI_INTERNAL_WIDTH || gui_height < MIN_GUI_INTERNAL_HEIGHT) {
+                                       gui_width = MIN_GUI_INTERNAL_WIDTH;
+                                       gui_height = MIN_GUI_INTERNAL_HEIGHT;
                                }
-                               //double m = scaleresource_getdpimult ();
-                               gui_width = (int)(GUI_INTERNAL_WIDTH * v / 100);
-                               gui_height = (int)(GUI_INTERNAL_HEIGHT * v / 100);
                                scaleresource_setmult (guiDlg, gui_width, gui_height);
                                gui_size_changed = 1;
                        }
@@ -15632,7 +15641,7 @@ static int GetSettings (int all_options, HWND hwnd)
                        write_log (_T("GUI default size\n"));
                        regsetint (NULL, _T("GUIResize"), 0);
                } else {
-                       if (gui_width < 100 || gui_width > 4096 || gui_height < 100 || gui_height > 4096) {
+                       if (gui_width < MIN_GUI_INTERNAL_WIDTH || gui_width > 4096 || gui_height < MIN_GUI_INTERNAL_HEIGHT || gui_height > 4096) {
                                scaleresource_setdefaults ();
                                setdefaultguisize ();
                                fmultx = 0;
index 07608e5ce787862e021fcc5697cb18b437e1056f..9594e4e2a6df0900220bcd5c8a78eaf5eea8bcff 100644 (file)
@@ -437,14 +437,14 @@ static void getbaseunits (void)
        
        nr = getresource (IDD_PANEL);
        if (!nr) {
-               write_log (_T("getbaseunits fail\n"));
+               write_log (_T("getbaseunits fail!\n"));
                abort();
        }
        multx = multy = 100;
        nr2 = scaleresource (nr, NULL, -1);
        hwnd = CreateDialogIndirect (nr2->inst, nr2->resource, NULL, TestProc);
        if (hwnd) {
-               DestroyWindow(hwnd);
+               DestroyWindow (hwnd);
        } else {
                baserect.left = baserect.top = 0;
                baserect.right = 800;
@@ -461,6 +461,8 @@ static void getbaseunits (void)
        baseclientheight = baseclientrect.bottom - baseclientrect.top;
        baseborderwidth = basewidth - baseclientwidth;
        baseborderheight = baseheight - baseclientheight;
+
+       write_log (_T("GUIBase %dx%d (%dx%d)\n"), basewidth, baseheight, baseunitx, baseunity);
 }
 
 void scaleresource_init (const TCHAR *prefix)
@@ -510,6 +512,11 @@ static void sizefont (HWND hDlg, const TCHAR *name, int size, int style, int wei
 }
 #endif
 
+double scaleresource_getdpimult (void)
+{
+       return (double)baseheight / GUI_INTERNAL_HEIGHT;
+}
+
 void scaleresource_setmult (HWND hDlg, int w, int h)
 {
        if (w < 0) {
index bf1435b1cbb071fac9c4eeac14946268adc2fc7f..6c9ecd5fdd16238710df335b2f35bb84609deb3f 100644 (file)
@@ -1,6 +1,18 @@
 
 - restore only single input target to default.
 
+Beta 26 RC2:
+
+- RTG aspect ratio setting was loaded to wrong variable from config file (filter panel aspect ratio, not RTG)
+- CD32 CD audio play delay timing fixed. (Was originally timed using bad Liberation CD image)
+- RTG on screen leds was rendered twice in D3D mode (D3D sprite and software method).
+- Audio 14bit to 16bit scaling introduced extra low level noise.
+- Only enable AUDxPER limit hack (to reduce CPU usage with weird programs) if audio DMA is active. Manual AUDxDAT audio software may use higher periods.
+- Fixed rare crash in input/gameports panel test/remap support.
+- Added on screen leds per-led enable/disable config file support, for example show_leds_enabled/show_leds_enabled_rtg=power,df0,df1.
+  In future versions order of led names are also supported and gaps in place of disabled leds will be gone.
+- DPI GUI size compensation disappeared (b25).
+
 Beta 25 RC1:
 
 - Switching to interlaced mode and autoscale enabled: don't calculate new size until 2 frames have been drawn to prevent multiple display size changes.
index 413b18a30f096a9e322bf03ee462f1835a4baf2e..05f64b3ec9e8015ac5fe3a40e3f5e525195e609c 100644 (file)
@@ -95,6 +95,9 @@ void draw_status_line_single (uae_u8 *buf, int bpp, int y, int totalwidth, uae_u
                xcolnr on_rgb, on_rgb2, off_rgb, pen_rgb;
                int half = 0;
 
+               if (!(currprefs.leds_on_screen_mask[picasso_on ? 1 : 0] & (1 << led)))
+                       continue;
+
                pen_rgb = c1;
                if (led >= LED_DF0 && led <= LED_DF3) {
                        int pled = led - LED_DF0;