]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc2000b16.zip
authorToni Wilen <twilen@winuae.net>
Sun, 27 Sep 2009 16:13:43 +0000 (19:13 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:48:51 +0000 (21:48 +0200)
12 files changed:
blitter.c
custom.c
drawing.c
hardfile.c
include/drawing.h
od-win32/dinput.c
od-win32/resources/winuae.rc
od-win32/win32.c
od-win32/win32.h
od-win32/win32gui.c
od-win32/winuaechangelog.txt
scsiemul.c

index c15ef9c100347732506b6c61bfabfb4be850be2d..9e9126493e576f2a874a7e2f623aac94cabb7f48 100644 (file)
--- a/blitter.c
+++ b/blitter.c
@@ -646,10 +646,9 @@ static void decide_blitter_line (int hsync, int hpos)
        for (;;) {
            int v = canblit (last_blitter_hpos);
 
-           blitter_nasty++;
-
            if (!v) {
                blit_misscyclecounter++;
+               blitter_nasty++;
                break;
            }
 
index b60514260455e907f16ad81e4a7e2f7cd98797a6..859ef530ca4e432798782086451844305c0f6e6e 100644 (file)
--- a/custom.c
+++ b/custom.c
@@ -234,7 +234,7 @@ int bpl_off[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
 
 static struct color_entry current_colors;
 static unsigned int bplcon0, bplcon1, bplcon2, bplcon3, bplcon4;
-static unsigned int bplcon0d, bplcon0_res, bplcon0_planes, bplcon0_planes_limit;
+static unsigned int bplcon0d, bplcon0dd, bplcon0_res, bplcon0_planes, bplcon0_planes_limit;
 static unsigned int diwstrt, diwstop, diwhigh;
 static int diwhigh_written;
 static unsigned int ddfstrt, ddfstop, ddfstrt_old_hpos, ddfstrt_old_vpos;
@@ -826,7 +826,9 @@ STATIC_INLINE void compute_delay_offset (void)
 
 static void record_color_change2 (int hpos, int regno, unsigned long value)
 {
-    curr_color_changes[next_color_change].linepos = hpos;
+    curr_color_changes[next_color_change].linepos = hpos * 2;
+    // hpos >= 0xe0, add 2 lores pixels (PAL 0.5 extra cycle, should be in copper emul..)
+    curr_color_changes[next_color_change].linepos += (hpos >= maxhpos - 3) ? 2 : 0;
     curr_color_changes[next_color_change].regno = regno;
     curr_color_changes[next_color_change++].value = value;
     curr_color_changes[next_color_change].regno = -1;
@@ -873,7 +875,10 @@ STATIC_INLINE int is_bitplane_dma_inline (int hpos)
 static void update_denise (int hpos)
 {
     toscr_res = GET_RES_DENISE (bplcon0d);
-    record_color_change2 (hpos, 0x100 + 0x1000, bplcon0d);
+    if (bplcon0dd != bplcon0d) {
+       record_color_change2 (hpos, 0x100 + 0x1000, bplcon0d);
+       bplcon0dd = bplcon0d;
+    }
     toscr_nr_planes = GET_PLANES (bplcon0d);
     if (isocs7planes ()) {
        if (toscr_nr_planes2 < 6)
@@ -1885,7 +1890,7 @@ static void record_color_change (int hpos, int regno, unsigned long value)
        return;
     }
 #endif
-    if (regno < 0x1000 && hpos < HBLANK_OFFSET && !(beamcon0 & 0x80) && prev_lineno >= 0) {
+    if  (regno < 0x1000 && hpos < HBLANK_OFFSET && !(beamcon0 & 0x80) && prev_lineno >= 0) {
        struct draw_info *pdip = curr_drawinfo + prev_lineno;
        int idx = pdip->last_color_change;
        /* Move color changes in horizontal cycles 0 to HBLANK_OFFSET to end of previous line.
@@ -1893,7 +1898,7 @@ static void record_color_change (int hpos, int regno, unsigned long value)
         */
         pdip->last_color_change++;
         pdip->nr_color_changes++;
-        curr_color_changes[idx].linepos = hpos + maxhpos + 1;
+        curr_color_changes[idx].linepos = (hpos + maxhpos) * 2;
         curr_color_changes[idx].regno = regno;
         curr_color_changes[idx].value = value;
        curr_color_changes[idx + 1].regno = -1;
@@ -3297,6 +3302,7 @@ static void BPLCON0_Denise (int hpos, uae_u16 v)
     if (bplcon0d == v)
        return;
 
+    bplcon0dd = -1;
     // fake unused 0x0080 bit as an EHB bit (see below)
     if (isehb (bplcon0d, bplcon2))
        v |= 0x80;
index 4f5dbae25b12e51681ffa21f0a96fc57061b660c..8965c11eac26340ee6904b0a543bd453f17ff2fe 100644 (file)
--- a/drawing.c
+++ b/drawing.c
@@ -543,6 +543,8 @@ void record_diw_line (int plfstrt, int first, int last)
    PLAYFIELD_START and PLAYFIELD_END are in window coordinates.  */
 static int playfield_start, playfield_end;
 static int real_playfield_start, real_playfield_end;
+static int linetoscr_diw_start, linetoscr_diw_end;
+static int native_ddf_left, native_ddf_right;
 
 static int pixels_offset;
 static int src_pixel, ham_src_pixel;
@@ -558,12 +560,13 @@ static void pfield_init_linetoscr (void)
     /* First, get data fetch start/stop in DIW coordinates.  */
     int ddf_left = dp_for_drawing->plfleft * 2 + DIW_DDF_OFFSET;
     int ddf_right = dp_for_drawing->plfright * 2 + DIW_DDF_OFFSET;
+
     /* Compute datafetch start/stop in pixels; native display coordinates.  */
-    int native_ddf_left = coord_hw_to_window_x (ddf_left);
-    int native_ddf_right = coord_hw_to_window_x (ddf_right);
+    native_ddf_left = coord_hw_to_window_x (ddf_left);
+    native_ddf_right = coord_hw_to_window_x (ddf_right);
 
-    int linetoscr_diw_start = dp_for_drawing->diwfirstword;
-    int linetoscr_diw_end = dp_for_drawing->diwlastword;
+    linetoscr_diw_start = dp_for_drawing->diwfirstword;
+    linetoscr_diw_end = dp_for_drawing->diwlastword;
 
     res_shift = lores_shift - bplres;
 
@@ -1930,15 +1933,17 @@ STATIC_INLINE void do_color_changes (line_draw_func worker_border, line_draw_fun
     int i;
     int lastpos = visible_left_border;
     int endpos = visible_left_border + gfxvidinfo.width;
+    int diff = 1 << lores_shift;
 
     for (i = dip_for_drawing->first_color_change; i <= dip_for_drawing->last_color_change; i++) {
        int regno = curr_color_changes[i].regno;
        unsigned int value = curr_color_changes[i].value;
        int nextpos, nextpos_in_range;
+
        if (i == dip_for_drawing->last_color_change)
            nextpos = endpos;
        else
-           nextpos = coord_hw_to_window_x (curr_color_changes[i].linepos * 2);
+           nextpos = coord_hw_to_window_x (curr_color_changes[i].linepos);
 
        nextpos_in_range = nextpos;
        if (nextpos > endpos)
index d50b80ec9fdb5953fa43bd26d22461e6b813f0f0..d2d9b92af46bf8ae3106fd7fb3b87215351a2cd3 100644 (file)
@@ -60,6 +60,7 @@ struct hardfileprivdata {
     uae_sem_t sync_sem;
     uaecptr base;
     int changenum;
+    uaecptr changeint;
 };
 
 #define VHD_DYNAMIC 3
@@ -1341,6 +1342,8 @@ void hardfile_do_disk_change (struct uaedev_config_info *uci, int insert)
        }
        j++;
     }
+    if (hardfpd[fsid].changeint)
+       uae_Cause (hardfpd[fsid].changeint);
     uae_sem_post (&change_sem);
 }
 
@@ -1680,6 +1683,7 @@ static uae_u32 hardfile_do_io (struct hardfiledata *hfd, struct hardfileprivdata
        break;
 
        case CMD_REMOVE:
+           hfpd->changeint = get_long (request + 40);
        break;
 
        case CMD_CHANGENUM:
index 55f44947d3be32f6c51f0af41e2d9c3565832a00..a701894a568a513116ec6a6a64fea700fac02716 100644 (file)
@@ -27,7 +27,7 @@
 #else
 /* According to the HRM, pixel data spends a couple of cycles somewhere in the chips
    before it appears on-screen. (TW: display emulation now does this automatically)  */
-#define DIW_DDF_OFFSET 0
+#define DIW_DDF_OFFSET 1
 /* this many cycles starting from hpos=0 are visible on right border */
 #define HBLANK_OFFSET 9
 /* We ignore that many lores pixels at the start of the display. These are
index 24c84df9691654504faa25a2991ea9d4c7b6736c..38530acdae2a477b84c57d8b4b4d60924b7668f1 100644 (file)
@@ -2087,7 +2087,7 @@ static int refresh_kb (LPDIRECTINPUTDEVICE8 lpdi, int num)
            else
                kc[i] = 0;
            if (kc[i] != di_keycodes[num][i]) {
-               write_log (L"%02X -> %d\n", i, kc[i]);
+               write_log (L"%d: %02X -> %d\n", num, i, kc[i]);
                di_keycodes[num][i] = kc[i];
                my_kbd_handler (num, i, kc[i]);
            }
index 1d780f6b989e9b7436cc099feea6211642af9bc5..775fe286d0ae6e3bb5baba3276b8a6a11cc237f2 100644 (file)
@@ -174,7 +174,7 @@ BEGIN
     RTEXT           "Motherboard Fast RAM:",-1,40,100,129,10,SS_CENTERIMAGE\r
     CONTROL         "",IDC_MBMEM1,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,181,96,59,20\r
     EDITTEXT        IDC_MBRAM1,244,99,34,12,ES_CENTER | ES_READONLY\r
-    RTEXT           "Prosessor Slot Fast RAM:",-1,40,123,129,10,SS_CENTERIMAGE\r
+    RTEXT           "Processor Slot Fast RAM:",-1,40,123,129,10,SS_CENTERIMAGE\r
     CONTROL         "",IDC_MBMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,181,119,59,20\r
     EDITTEXT        IDC_MBRAM2,244,122,34,12,ES_CENTER | ES_READONLY\r
 END\r
@@ -486,6 +486,8 @@ BEGIN
     RTEXT           "DirectDraw display buffer:",IDC_STATIC,195,50,92,10,SS_CENTERIMAGE\r
     RTEXT           "SCSI and CD/DVD access method:",IDC_STATIC,151,12,126,10,SS_CENTERIMAGE\r
     CONTROL         "Synchronize clock",IDC_CLOCKSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,109,111,10\r
+    CONTROL         "Faster RTG [] Enables less accurate custom chipset emulation mode when Picasso96 is enabled.",IDC_FASTERRTG,\r
+                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,19,122,100,10\r
 END\r
 \r
 IDD_HARDFILE DIALOGEX 0, 0, 299, 249\r
@@ -603,8 +605,6 @@ BEGIN
     CONTROL         "Emulated, 100% accurate",IDC_CS_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,205,95,10\r
     CONTROL         "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK,\r
                     "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,59,100,10\r
-    CONTROL         "Faster RTG [] Enables less accurate custom chipset emulation mode when Picasso96 is enabled.",IDC_FASTERRTG,\r
-                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,179,72,100,10\r
     COMBOBOX        IDC_CS_EXT,100,80,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
     RTEXT           "Chipset Extra",IDC_STATIC,25,79,52,15,SS_CENTERIMAGE\r
 END\r
index e74b982c578db1f026d74529ba8829878d770d1b..7e1a0ef03a04d926e9d059ec7282cd852332c603 100644 (file)
@@ -2076,7 +2076,7 @@ uae_u8 *target_load_keyfile (struct uae_prefs *p, TCHAR *path, int *sizep, TCHAR
        *sizep = size;
        //write_log (L"size: %d\n", size);
        if (size > 0) {
-           int gotsize, i;
+           int gotsize;
            keybuf = xmalloc (size);
            gotsize = pfnGetKey (keybuf, size);
            //write_log (L"gotsize: %d\n", gotsize);
index 59a947b4f912cd058e6120300d4cd6fab2859a48..f2cd03ce91dcffd7b513a7f56326cdc19fe0e82d 100644 (file)
@@ -17,8 +17,8 @@
 
 #define WINUAEPUBLICBETA 1
 
-#define WINUAEBETA L"15"
-#define WINUAEDATE MAKEBD(2009, 9, 25)
+#define WINUAEBETA L"16"
+#define WINUAEDATE MAKEBD(2009, 9, 27)
 #define WINUAEEXTRA L""
 #define WINUAEREV L""
 
index 4ee7e68bf119afc649e777a72fa92dffa7a3fc86..71e98f4a03f6586af5de9a7c9dae7aaf04a44afb 100644 (file)
@@ -5182,7 +5182,6 @@ static void values_to_chipsetdlg (HWND hDlg)
     CheckDlgButton (hDlg, IDC_NTSC, workprefs.ntscmode);
     CheckDlgButton (hDlg, IDC_GENLOCK, workprefs.genlock);
     CheckDlgButton (hDlg, IDC_BLITIMM, workprefs.immediate_blits);
-    CheckDlgButton (hDlg, IDC_FASTERRTG, workprefs.picasso96_nocustom);
     CheckRadioButton (hDlg, IDC_COLLISION0, IDC_COLLISION3, IDC_COLLISION0 + workprefs.collision_level);
     CheckDlgButton (hDlg, IDC_CYCLEEXACT, workprefs.cpu_cycle_exact);
     switch (workprefs.produce_sound) {
@@ -5216,7 +5215,6 @@ static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
 
     workprefs.genlock = IsDlgButtonChecked (hDlg, IDC_GENLOCK);
     workprefs.immediate_blits = IsDlgButtonChecked (hDlg, IDC_BLITIMM);
-    workprefs.picasso96_nocustom = IsDlgButtonChecked (hDlg, IDC_FASTERRTG);
     n = IsDlgButtonChecked (hDlg, IDC_CYCLEEXACT) ? 1 : 0;
     if (workprefs.cpu_cycle_exact != n) {
        workprefs.cpu_cycle_exact = workprefs.blitter_cycle_exact = n;
@@ -5836,24 +5834,18 @@ static void expansion_net (HWND hDlg)
 
 static void enable_for_expansiondlg (HWND hDlg)
 {
-    int cw;
+    int cw, en;
 
+    en = !!full_property_sheet;
     cw = catweasel_detect ();
-    ew (hDlg, IDC_CATWEASEL, cw);
-    if (!full_property_sheet) {
-       ew (hDlg, IDC_SOCKETS, FALSE);
-       ew (hDlg, IDC_SCSIDEVICE, FALSE);
-       ew (hDlg, IDC_CATWEASEL, FALSE);
-       ew (hDlg, IDC_NETDEVICE, FALSE);
-    } else {
-#if !defined (BSDSOCKET)
-       ew (hDlg, IDC_SOCKETS, FALSE);
-#endif
-#if !defined (SCSIEMU)
-       ew (hDlg, IDC_SCSIDEVICE, FALSE);
-#endif
-       ew (hDlg, IDC_NETDEVICE, workprefs.a2065name[0]);
-    }
+    ew (hDlg, IDC_CATWEASEL, cw && en);
+    ew (hDlg, IDC_SOCKETS, en);
+    ew (hDlg, IDC_SCSIDEVICE, en);
+    ew (hDlg, IDC_CATWEASEL, en);
+    ew (hDlg, IDC_NETDEVICE, en);
+    ew (hDlg, IDC_SANA2, en);
+    ew (hDlg, IDC_A2065, en);
+    ew (hDlg, IDC_NETDEVICE, en && workprefs.a2065name[0]);
 }
 
 static void values_to_expansiondlg (HWND hDlg)
@@ -5971,6 +5963,9 @@ static INT_PTR CALLBACK ExpansionDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
 //                 workprefs.leds_on_screen |= STATUSLINE_RTG;
 //             break;
 
+               case IDC_SOCKETS:
+               workprefs.socket_emu = IsDlgButtonChecked (hDlg, IDC_SOCKETS);
+               break;
                case IDC_SCSIDEVICE:
                workprefs.scsi = IsDlgButtonChecked (hDlg, IDC_SCSIDEVICE) ? 1 : 0;
                enable_for_expansiondlg (hDlg);
@@ -6553,6 +6548,7 @@ static void values_to_miscdlg (HWND hDlg)
        CheckDlgButton (hDlg, IDC_CLOCKSYNC, workprefs.tod_hack);
        CheckDlgButton (hDlg, IDC_POWERSAVE, workprefs.win32_powersavedisabled);
        CheckDlgButton (hDlg, IDC_STATE_CAPTURE, workprefs.statecapture);
+       CheckDlgButton (hDlg, IDC_FASTERRTG, workprefs.picasso96_nocustom);
 
        misc_kbled (hDlg, IDC_KBLED1, workprefs.keyboard_leds[0]);
        misc_kbled (hDlg, IDC_KBLED2, workprefs.keyboard_leds[1]);
@@ -6726,9 +6722,6 @@ static INT_PTR MiscDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
            workprefs.statecapture = IsDlgButtonChecked (hDlg, IDC_STATE_CAPTURE);
            enable_for_miscdlg (hDlg);
            break;
-       case IDC_SOCKETS:
-           workprefs.socket_emu = IsDlgButtonChecked (hDlg, IDC_SOCKETS);
-           break;
        case IDC_ILLEGAL:
            workprefs.illegal_mem = IsDlgButtonChecked (hDlg, IDC_ILLEGAL);
            break;
@@ -6783,6 +6776,9 @@ static INT_PTR MiscDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
        case IDC_KBLED_USB:
            workprefs.win32_kbledmode = IsDlgButtonChecked (hDlg, IDC_KBLED_USB) ? 1 : 0;
            break;
+       case IDC_FASTERRTG:
+           workprefs.picasso96_nocustom = IsDlgButtonChecked (hDlg, IDC_FASTERRTG);
+           break;
        }
        recursive--;
        return TRUE;
index 6746c2c27fb8ea5affa6a824badf254dc6f89f12..0d52eff849ae60739e4ebf5a0ab84cc005b9e02b 100644 (file)
@@ -1,4 +1,16 @@
 
+Beta 16:
+
+- Faster RTG moved to misc panel
+- TD_REMOVE implemented in uaescsi.device (BabelCDRomFS media changes
+  work under KS 1.3) and in uaehf.device
+- bsdsocket GUI checkbox didn't work
+- delay copper writes by 2 lores pixels if hpos >= 0xe0 (I am not sure
+  100% why but I guess extra 0.5 cycle in PAL 227.5 color clock
+  horizontal timing causes this) Fixes Leander "border", can fix other
+  similar border problems. Previous fix in b15 was wrong.
+- CE linemode blitter non-nasty broke in b14
+
 Beta 15:
 
 - automatically enable ini-mode if registry initialization fails
index ee3d7cce6f6379432ac812256d9f84c2e784d0b9..a604954b91b512fb9da34d50369ad516474d3fab 100644 (file)
@@ -54,6 +54,7 @@ struct devstruct {
     volatile int d_request_type[MAX_ASYNC_REQUESTS];
     volatile uae_u32 d_request_data[MAX_ASYNC_REQUESTS];
     struct device_info di;
+    uaecptr changeint;
 
     smp_comm_pipe requests;
     int thread_running;
@@ -283,6 +284,8 @@ void scsi_do_disk_change (int device_id, int insert)
                }
                j++;
            }
+           if (dev->changeint)
+               uae_Cause (dev->changeint);
        }
     }
     uae_sem_post (&change_sem);
@@ -371,6 +374,7 @@ static int command_read (int mode, struct devstruct *dev, uaecptr data, uae_u64
     }
     return 0;
 }
+
 static int command_write (int mode, struct devstruct *dev, uaecptr data, uae_u64 offset, uae_u32 length, uae_u32 *io_actual)
 {
     uae_u32 blocksize = dev->di.bytespersector;
@@ -537,6 +541,7 @@ static int dev_do_io (struct devstruct *dev, uaecptr request)
        io_actual = 0;
        break;
        case CMD_REMOVE:
+       dev->changeint = io_data;
        io_actual = 0;
        break;
        case CMD_CHANGENUM: