Skip to content

Commit

Permalink
Minor fast copper improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Mar 22, 2021
1 parent 18617e8 commit ea45865
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/akiko.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ static void nvram_read (void)
if (!cd32_nvram || cd32_nvram_size != maxlen) {
xfree(cd32_nvram);
cd32_nvram = xmalloc(uae_u8, maxlen);
cd32_nvram_size = maxlen;
}
memset(cd32_nvram, 0, maxlen);
//if (is_board_enabled(&currprefs, ROMTYPE_CUBO, 0)) {
Expand Down
2 changes: 1 addition & 1 deletion src/cfgfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7407,7 +7407,7 @@ int cfgfile_searchconfig(const TCHAR *in, int index, TCHAR *out, int outsize)
goto end;
}
if (b == '\n') {
if (!_tcsncmp (tmp, in, inlen) && ((inlen > 0 && _tcslen (tmp) > inlen && tmp[inlen] == '=') || (joker))) {
if (inlen >= 0 && !_tcsncmp (tmp, in, inlen) && ((inlen > 0 && _tcslen (tmp) > inlen && tmp[inlen] == '=') || (joker))) {
if (index <= 0) {
TCHAR *p;
if (joker)
Expand Down
20 changes: 15 additions & 5 deletions src/custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7189,8 +7189,8 @@ static void predict_copper(void)
int until_hpos = maxhpos - 3;
int force_exit = 0;

w1 = cop_state.i1;
w2 = cop_state.i2;
w1 = cop_state.saved_i1;
w2 = cop_state.saved_i2;

switch (state) {
case COP_stop:
Expand All @@ -7200,6 +7200,11 @@ static void predict_copper(void)
case COP_skip1:
return;

case COP_read1:
case COP_read2:
w1 = cop_state.i1;
break;

case COP_wait:
if ((w2 & 0x8000) == 0)
return; // wait for blitter
Expand Down Expand Up @@ -7433,6 +7438,9 @@ static void update_copper (int until_hpos)
if (until_hpos > (maxhpos & ~1))
until_hpos = maxhpos & ~1;

bool never_blocked = currprefs.fast_copper &&
((toscr_nr_planes2 < 5 && toscr_res == RES_LORES) || (toscr_nr_planes2 < 3 && toscr_res != RES_LORES));

for (;;) {
int old_hpos = c_hpos;
int hp;
Expand All @@ -7441,10 +7449,12 @@ static void update_copper (int until_hpos)
break;


if (!never_blocked) { // copper never blocked by bitplane dma
/* So we know about the fetch state. */
decide_line (c_hpos);
// bitplane only, don't want blitter to steal our cycles.
decide_fetch (c_hpos);
decide_line(c_hpos);
// bitplane only, don't want blitter to steal our cycles.
decide_fetch(c_hpos);
}

if (cop_state.movedelay > 0) {
cop_state.movedelay--;
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#include <sys/ioctl.h>
#include "keyboard.h"

static const char __ver[40] = "$VER: Amiberry 4.0 BETA (2021-03-18)";
static const char __ver[40] = "$VER: Amiberry 4.0 BETA (2021-03-22)";
long int version = 256 * 65536L * UAEMAJOR + 65536L * UAEMINOR + UAESUBREV;

struct uae_prefs currprefs, changed_prefs;
Expand Down
4 changes: 2 additions & 2 deletions src/osdep/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#define GETBDM(x) (((x) - (((x) / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)

#define AMIBERRYVERSION _T("Amiberry v4.0 BETA (2021-03-18)")
#define AMIBERRYDATE MAKEBD(2021, 3, 18)
#define AMIBERRYVERSION _T("Amiberry v4.0 BETA (2021-03-22)")
#define AMIBERRYDATE MAKEBD(2021, 3, 22)

#define IHF_WINDOWHIDDEN 6

Expand Down

0 comments on commit ea45865

Please sign in to comment.