mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Fix LINK A7.
This commit is contained in:
parent
98325325b1
commit
a87f6a28c9
@ -156,7 +156,7 @@ struct TestProcessor: public CPU::MC68000Mk2::BusHandler {
|
||||
|
||||
// To limit tests run to a subset of files and/or of tests, uncomment and fill in below.
|
||||
// _fileSet = [NSSet setWithArray:@[@"abcd_sbcd.json"]];
|
||||
// _testSet = [NSSet setWithArray:@[@"UNLK 0007"]];
|
||||
// _testSet = [NSSet setWithArray:@[@"LINK.w 0007"]];
|
||||
}
|
||||
|
||||
- (void)testAll {
|
||||
|
@ -2120,8 +2120,20 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
//
|
||||
BeginState(LINK):
|
||||
Prefetch();
|
||||
Push(registers_[8 + instruction_.reg(0)]);
|
||||
registers_[8 + instruction_.reg(0)].l = registers_[15].l + uint32_t(int16_t(prefetch_.high.w));
|
||||
|
||||
// Ensure that the stack pointer is [seemingly] captured after
|
||||
// having been decremented by four, if it's what should be captured.
|
||||
registers_[15].l -= 4;
|
||||
temporary_address_ = registers_[8 + instruction_.reg(0)];
|
||||
registers_[15].l += 4;
|
||||
|
||||
// Push will actually decrement the stack pointer.
|
||||
Push(temporary_address_);
|
||||
|
||||
// Make the exchange.
|
||||
registers_[8 + instruction_.reg(0)].l = registers_[15].l;
|
||||
registers_[15].l += uint32_t(int16_t(prefetch_.high.w));
|
||||
|
||||
Prefetch();
|
||||
MoveToStateSpecific(Decode);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user