mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-07 23:29:06 +00:00
Clarify test.
This commit is contained in:
parent
4c90a4ec93
commit
892580c183
@ -21,10 +21,12 @@ using namespace Amiga;
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
bool satisfies_raster(uint16_t position, uint16_t blitter_status, uint16_t *instruction) {
|
bool satisfies_raster(uint16_t position, uint16_t blitter_status, uint16_t *instruction) {
|
||||||
|
// Return immediately if: (i) wait-for-Blitter is not disabled; and (ii) the Blitter is busy.
|
||||||
|
if(!(instruction[1] & 0x8000) && (blitter_status & 0x4000)) return false;
|
||||||
|
|
||||||
|
// Otherwise, test the raster position against the instruction's value and mask.
|
||||||
const uint16_t mask = 0x8000 | (instruction[1] & 0x7ffe);
|
const uint16_t mask = 0x8000 | (instruction[1] & 0x7ffe);
|
||||||
return
|
return (position & mask) >= (instruction[0] & mask);
|
||||||
(position & mask) >= (instruction[0] & mask) &&
|
|
||||||
(!(blitter_status & 0x4000) || (instruction[1] & 0x8000));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user