From 2342e459c18ce49680ad651de17b58cba1086fcc Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 11 Oct 2008 15:38:12 +0300 Subject: [PATCH] imported winuaesrc1530b3.zip --- custom.c | 46 ++++++++++++++++-------------------- inputdevice.c | 8 ++++--- od-win32/win32.h | 4 ++-- od-win32/winuaechangelog.txt | 5 ++++ 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/custom.c b/custom.c index 6c8d91f6..2387f3d0 100755 --- a/custom.c +++ b/custom.c @@ -922,16 +922,10 @@ STATIC_INLINE void maybe_first_bpl1dat (int hpos) } } -STATIC_INLINE void fetch (int nr, int fm) +STATIC_INLINE void fetch (int nr, int fm, int aga) { - if (nr >= t_bplcon0_planes_limit && nr < toscr_nr_planes) { + if (!aga && nr >= t_bplcon0_planes_limit && nr < toscr_nr_planes) { fetched[nr] = 0; -#ifdef AGA - if (fm >= 1) - fetched_aga0[nr] = 0; - if (fm == 2) - fetched_aga1[nr] = 0; -#endif } else if (nr < toscr_nr_planes) { uaecptr p = bplpt[nr]; switch (fm) @@ -1428,7 +1422,7 @@ static void finish_final_fetch (int pos, int fm) finish_playfield_line (); } -STATIC_INLINE int one_fetch_cycle_0 (int pos, int ddfstop_to_test, int dma, int fm) +STATIC_INLINE int one_fetch_cycle_0 (int pos, int ddfstop_to_test, int dma, int fm, int aga) { if (plfstate < plf_passed_stop && pos == ddfstop_to_test) plfstate = plf_passed_stop; @@ -1450,28 +1444,28 @@ STATIC_INLINE int one_fetch_cycle_0 (int pos, int ddfstop_to_test, int dma, int switch (f_fm_maxplane) { case 8: switch (cycle_start) { - case 0: fetch (7, fm); break; - case 1: fetch (3, fm); break; - case 2: fetch (5, fm); break; - case 3: fetch (1, fm); break; - case 4: fetch (6, fm); break; - case 5: fetch (2, fm); break; - case 6: fetch (4, fm); break; - case 7: fetch (0, fm); break; + case 0: fetch (7, fm, aga); break; + case 1: fetch (3, fm, aga); break; + case 2: fetch (5, fm, aga); break; + case 3: fetch (1, fm, aga); break; + case 4: fetch (6, fm, aga); break; + case 5: fetch (2, fm, aga); break; + case 6: fetch (4, fm, aga); break; + case 7: fetch (0, fm, aga); break; } break; case 4: switch (cycle_start) { - case 0: fetch (3, fm); break; - case 1: fetch (1, fm); break; - case 2: fetch (2, fm); break; - case 3: fetch (0, fm); break; + case 0: fetch (3, fm, aga); break; + case 1: fetch (1, fm, aga); break; + case 2: fetch (2, fm, aga); break; + case 3: fetch (0, fm, aga); break; } break; case 2: switch (cycle_start) { - case 0: fetch (1, fm); break; - case 1: fetch (0, fm); break; + case 0: fetch (1, fm, aga); break; + case 1: fetch (0, fm, aga); break; } break; } @@ -1489,9 +1483,9 @@ STATIC_INLINE int one_fetch_cycle_0 (int pos, int ddfstop_to_test, int dma, int return 0; } -static int one_fetch_cycle_fm0 (int pos, int ddfstop_to_test, int dma) { return one_fetch_cycle_0 (pos, ddfstop_to_test, dma, 0); } -static int one_fetch_cycle_fm1 (int pos, int ddfstop_to_test, int dma) { return one_fetch_cycle_0 (pos, ddfstop_to_test, dma, 1); } -static int one_fetch_cycle_fm2 (int pos, int ddfstop_to_test, int dma) { return one_fetch_cycle_0 (pos, ddfstop_to_test, dma, 2); } +static int one_fetch_cycle_fm0 (int pos, int ddfstop_to_test, int dma) { return one_fetch_cycle_0 (pos, ddfstop_to_test, dma, 0, (currprefs.chipset_mask & CSMASK_AGA) ? 1 : 0); } +static int one_fetch_cycle_fm1 (int pos, int ddfstop_to_test, int dma) { return one_fetch_cycle_0 (pos, ddfstop_to_test, dma, 1, 1); } +static int one_fetch_cycle_fm2 (int pos, int ddfstop_to_test, int dma) { return one_fetch_cycle_0 (pos, ddfstop_to_test, dma, 2, 1); } STATIC_INLINE int one_fetch_cycle (int pos, int ddfstop_to_test, int dma, int fm) { diff --git a/inputdevice.c b/inputdevice.c index 5dda6dde..d8251ce6 100755 --- a/inputdevice.c +++ b/inputdevice.c @@ -1366,7 +1366,7 @@ void inputdevice_hsync (void) if (analog_port[joy][i] && pot_cap[joy][i] < joydirpot[joy][i]) charge = 1; // slow charge via pot variable resistor - if (digital_port[joy][i]) + if ((digital_port[joy][i] || mouse_port[joy])) charge = 1; // slow charge via pull-up resistor if (!(potgo_value & pdir)) { // input? if (pot_dat_act[joy][i]) @@ -1382,14 +1382,16 @@ void inputdevice_hsync (void) } if (analog_port[joy][i] && pot_dat_act[joy][i] == 2 && pot_cap[joy][i] >= joydirpot[joy][i]) pot_dat_act[joy][i] = 0; - if (digital_port[joy][i] && pot_dat_act[joy][i] == 2) { + if ((digital_port[joy][i] || mouse_port[joy]) && pot_dat_act[joy][i] == 2) { if (pot_cap[joy][i] >= 10 && !isbutton) pot_dat_act[joy][i] = 0; } } else { // output? charge = (potgo_value & pdat) ? 2 : -2; /* fast (dis)charge if output */ - if ((potgo_value & pdat) && (potgo_value & pdir)) + if (potgo_value & pdat) pot_dat_act[joy][i] = 0; // instant stop if output+high + if (isbutton) + pot_dat[joy][i]++; // "free running" if output+low } if (isbutton) diff --git a/od-win32/win32.h b/od-win32/win32.h index d394b24d..4ff16829 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -17,8 +17,8 @@ #define WINUAEPUBLICBETA 1 -#define WINUAEBETA "2" -#define WINUAEDATE MAKEBD(2008, 10, 10) +#define WINUAEBETA "3" +#define WINUAEDATE MAKEBD(2008, 10, 11) #define WINUAEEXTRA "" #define WINUAEREV "" diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 78749c42..abb5570e 100755 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,9 @@ +Beta 3: + +- AGA display corruption +- POTxDAT behavior in output mode fixed + Beta 2: - RTG hardware cursor was still visible if switching from hardware -- 2.47.3