mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Any one failure will do.
This commit is contained in:
parent
021ddb3565
commit
668332f6c7
@ -42,7 +42,7 @@ struct Chipset {
|
|||||||
NSArray *const trace = [NSJSONSerialization JSONObjectWithData:traceData options:0 error:nil];
|
NSArray *const trace = [NSJSONSerialization JSONObjectWithData:traceData options:0 error:nil];
|
||||||
|
|
||||||
using TransactionType = Amiga::Blitter<true>::Transaction::Type;
|
using TransactionType = Amiga::Blitter<true>::Transaction::Type;
|
||||||
const auto finish_blit = [&blitter] {
|
const auto finish_blit = [&blitter] () -> bool {
|
||||||
while(blitter.get_status() & 0x4000) {
|
while(blitter.get_status() & 0x4000) {
|
||||||
blitter.advance_dma();
|
blitter.advance_dma();
|
||||||
}
|
}
|
||||||
@ -50,7 +50,9 @@ struct Chipset {
|
|||||||
const auto transactions = blitter.get_and_reset_transactions();
|
const auto transactions = blitter.get_and_reset_transactions();
|
||||||
for(const auto &transaction: transactions) {
|
for(const auto &transaction: transactions) {
|
||||||
XCTAssertTrue(transaction.type == TransactionType::SkippedSlot || transaction.type == TransactionType::WriteFromPipeline);
|
XCTAssertTrue(transaction.type == TransactionType::SkippedSlot || transaction.type == TransactionType::WriteFromPipeline);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
NSUInteger index = -1;
|
NSUInteger index = -1;
|
||||||
@ -62,109 +64,93 @@ struct Chipset {
|
|||||||
//
|
//
|
||||||
// Register writes. Pass straight along.
|
// Register writes. Pass straight along.
|
||||||
//
|
//
|
||||||
|
if(![type isEqualToString:@"cread"] && ![type isEqualToString:@"bread"] && ![type isEqualToString:@"aread"] && ![type isEqualToString:@"write"]) {
|
||||||
|
if(!finish_blit()) return;
|
||||||
|
}
|
||||||
|
|
||||||
if([type isEqualToString:@"bltcon0"]) {
|
if([type isEqualToString:@"bltcon0"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_control(0, param1);
|
blitter.set_control(0, param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltcon1"]) {
|
if([type isEqualToString:@"bltcon1"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_control(1, param1);
|
blitter.set_control(1, param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if([type isEqualToString:@"bltsize"]) {
|
if([type isEqualToString:@"bltsize"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_size(param1);
|
blitter.set_size(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if([type isEqualToString:@"bltafwm"]) {
|
if([type isEqualToString:@"bltafwm"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_first_word_mask(param1);
|
blitter.set_first_word_mask(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltalwm"]) {
|
if([type isEqualToString:@"bltalwm"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_last_word_mask(param1);
|
blitter.set_last_word_mask(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if([type isEqualToString:@"bltadat"]) {
|
if([type isEqualToString:@"bltadat"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_data(0, param1);
|
blitter.set_data(0, param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltbdat"]) {
|
if([type isEqualToString:@"bltbdat"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_data(1, param1);
|
blitter.set_data(1, param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltcdat"]) {
|
if([type isEqualToString:@"bltcdat"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_data(2, param1);
|
blitter.set_data(2, param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if([type isEqualToString:@"bltamod"]) {
|
if([type isEqualToString:@"bltamod"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_modulo<0>(param1);
|
blitter.set_modulo<0>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltbmod"]) {
|
if([type isEqualToString:@"bltbmod"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_modulo<1>(param1);
|
blitter.set_modulo<1>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltcmod"]) {
|
if([type isEqualToString:@"bltcmod"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_modulo<2>(param1);
|
blitter.set_modulo<2>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltdmod"]) {
|
if([type isEqualToString:@"bltdmod"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_modulo<3>(param1);
|
blitter.set_modulo<3>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if([type isEqualToString:@"bltaptl"]) {
|
if([type isEqualToString:@"bltaptl"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<0, 0>(param1);
|
blitter.set_pointer<0, 0>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltbptl"]) {
|
if([type isEqualToString:@"bltbptl"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<1, 0>(param1);
|
blitter.set_pointer<1, 0>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltcptl"]) {
|
if([type isEqualToString:@"bltcptl"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<2, 0>(param1);
|
blitter.set_pointer<2, 0>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltdptl"]) {
|
if([type isEqualToString:@"bltdptl"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<3, 0>(param1);
|
blitter.set_pointer<3, 0>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if([type isEqualToString:@"bltapth"]) {
|
if([type isEqualToString:@"bltapth"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<0, 16>(param1);
|
blitter.set_pointer<0, 16>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltbpth"]) {
|
if([type isEqualToString:@"bltbpth"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<1, 16>(param1);
|
blitter.set_pointer<1, 16>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltcpth"]) {
|
if([type isEqualToString:@"bltcpth"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<2, 16>(param1);
|
blitter.set_pointer<2, 16>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if([type isEqualToString:@"bltdpth"]) {
|
if([type isEqualToString:@"bltdpth"]) {
|
||||||
finish_blit();
|
|
||||||
blitter.set_pointer<3, 16>(param1);
|
blitter.set_pointer<3, 16>(param1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user