Skip to content

Commit 8561cc3

Browse files
authored
Merge pull request #35 from Sonic-Amiga/TOS6
cpu6: Implement operations for TOS6
2 parents 8c7d2cb + db2c975 commit 8561cc3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cpu6.c

+13-2
Original file line numberDiff line numberDiff line change
@@ -1581,8 +1581,10 @@ static int branch_op(void)
15811581
case 13: /* BS4 */
15821582
t = (switches & BS4);
15831583
break;
1584-
case 14: /* BTM - branch on teletype mark - CPU4 only ? */
1585-
t = 0;
1584+
case 14:
1585+
/* Branch if interrupts enabled.
1586+
* Was BTM - branch on teletype mark - on CPU4 */
1587+
t = int_enable;
15861588
break;
15871589
case 15: /* B?? - branch of IL1 AH bit 0 set (see B6/C6) */
15881590
t = cpu_sram[0x10] & 0x01;
@@ -1881,6 +1883,13 @@ static int jump_op(void)
18811883
return 0;
18821884
}
18831885

1886+
static int stcc(void)
1887+
{
1888+
uint16_t addr = fetch16();
1889+
mmu_mem_write8(addr, alu_out);
1890+
return 0;
1891+
}
1892+
18841893
/*
18851894
* This appears to work like the other loads and not affect C
18861895
*/
@@ -2490,6 +2499,8 @@ unsigned cpu6_execute_one(unsigned trace)
24902499
return alu5x_op();
24912500
if (op == 0x67)
24922501
return block_op(0x67, trace);
2502+
if (op == 0x6f)
2503+
return stcc();
24932504
if (op < 0x70)
24942505
return x_op();
24952506
if (op == 0x77 || op == 0x78)

0 commit comments

Comments
 (0)