bpl_autoscale();
}
-static int coppercomp(int hpos)
+static int coppercomp(void)
{
- int hpos_cmp = hpos;
+ int hpos_cmp = agnus_hpos;
int vpos_cmp = vpos;
int vp = vpos_cmp & (((cop_state.ir[1] >> 8) & 0x7F) | 0x80);
static void process_copper(struct rgabuf *r)
{
- int hp = agnus_hpos;
-
#ifdef DEBUGGER
uae_u16 reg = r->reg;
if (debug_dma) {
#ifdef DEBUGGER
if (debug_copper && cop_state.irload2) {
- record_copper(cop_state.ip - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], hp, vpos);
+ record_copper(cop_state.ip - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
}
#endif
}
cop_state.strobe = 0;
#ifdef DEBUGGER
if (debug_copper) {
- record_copper(previp - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], hp, vpos);
+ record_copper(previp - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
}
#endif
} else {
#ifdef DEBUGGER
if (debug_copper && cop_state.irload2) {
- record_copper(cop_state.ip - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], hp, vpos);
+ record_copper(cop_state.ip - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
}
}
#endif
static void generate_copper(void)
{
- int hp = agnus_hpos;
bool bus_allocated = !check_rga_free_slot_in();
bool dma = is_copper_dma(true);
- bool ena_odd = !bus_allocated && (hp & 1) == COPPER_CYCLE_POLARITY && dma;
- bool act_even = (hp & 1) != COPPER_CYCLE_POLARITY && dma;
+ bool ena_odd = !bus_allocated && (agnus_hpos & 1) == COPPER_CYCLE_POLARITY && dma;
+ bool act_even = (agnus_hpos & 1) != COPPER_CYCLE_POLARITY && dma;
bool idle = !cop_state.irload1 && !cop_state.irload2 && !cop_state.start;
bool allocated = false;
// WAIT copper restart condition
if (cop_state.inst == COP_INS_WAIT && idle) {
- int comp = coppercomp(hp);
+ int comp = coppercomp();
if (comp < 0) {
if (!cop_state.strobe && !cop_state.startstrobe) {
copper_enabled_thisline = 0;
// If SKIP: latch current comparison state
if (cop_state.inst == COP_INS_SKIP) {
- cop_state.skiplatch = coppercomp(hp) == 0;
+ cop_state.skiplatch = coppercomp() == 0;
}
#ifdef DEBUGGER