comparison m68k.cpu @ 2464:f9d5c137c74b

Implement neg and not instructions in new 68K core
author Michael Pavone <pavone@retrodev.com>
date Fri, 23 Feb 2024 23:09:20 -0800
parents 72d0eac49507
children 0ca78837e4d2
comparison
equal deleted inserted replaced
2463:679c31768013 2464:f9d5c137c74b
1254 invalid M 7 R 6 1254 invalid M 7 R 6
1255 invalid M 7 R 7 1255 invalid M 7 R 7
1256 m68k_fetch_dst_ea M R Z 1256 m68k_fetch_dst_ea M R Z
1257 sbc dst 0 dst Z 1257 sbc dst 0 dst Z
1258 update_flags XNZVC 1258 update_flags XNZVC
1259 if Z = 2
1260 if M = 0
1261 cycles 2
1262 end
1263 end
1259 m68k_save_dst Z 1264 m68k_save_dst Z
1260 m68k_prefetch 1265 m68k_prefetch
1261 1266
1262 01000010ZZMMMRRR clr 1267 01000010ZZMMMRRR clr
1263 invalid M 1 1268 invalid M 1
1661 scratch2 += 2 1666 scratch2 += 2
1662 scratch1 = dregs.D 1667 scratch1 = dregs.D
1663 ocall write_8 1668 ocall write_8
1664 m68k_prefetch 1669 m68k_prefetch
1665 1670
1671 01000100ZZMMMRRR neg
1672 invalid Z 3
1673 invalid M 1
1674 invalid M 7 R 2
1675 invalid M 7 R 3
1676 invalid M 7 R 4
1677 invalid M 7 R 5
1678 invalid M 7 R 6
1679 invalid M 7 R 7
1680
1681 m68k_fetch_dst_ea M R Z
1682 dst:Z = -dst
1683 update_flags XNZVC
1684 if Z = 2
1685 if M = 0
1686 cycles 2
1687 end
1688 end
1689 m68k_save_dst Z
1690 m68k_prefetch
1691
1692 01000110ZZMMMRRR not
1693 invalid Z 3
1694 invalid M 1
1695 invalid M 7 R 2
1696 invalid M 7 R 3
1697 invalid M 7 R 4
1698 invalid M 7 R 5
1699 invalid M 7 R 6
1700 invalid M 7 R 7
1701
1702 m68k_fetch_dst_ea M R Z
1703 dst:Z = ~dst
1704 update_flags NZV0C0
1705 if Z = 2
1706 if M = 0
1707 cycles 2
1708 end
1709 end
1710 m68k_save_dst Z
1711 m68k_prefetch
1712
1666 0100111001110000 reset 1713 0100111001110000 reset
1667 if reset_handler 1714 if reset_handler
1668 pcall reset_handler m68k_reset_handler context 1715 pcall reset_handler m68k_reset_handler context
1669 end 1716 end
1670 cycles 128 1717 cycles 128