changeset 2456:72d0eac49507

Implement movep in new 68K core
author Michael Pavone <pavone@retrodev.com>
date Wed, 21 Feb 2024 20:09:11 -0800
parents 4aef84fbe2e2
children 9da3de58410d
files m68k.cpu
diffstat 1 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/m68k.cpu	Mon Feb 19 23:00:49 2024 -0800
+++ b/m68k.cpu	Wed Feb 21 20:09:11 2024 -0800
@@ -1623,6 +1623,46 @@
 	m68k_save_dst size
 	m68k_prefetch
 
+0000DDD10Z001AAA movep_ay_dx
+	local address 32
+	m68k_prefetch
+	scratch1 += aregs.A
+	address = scratch1 + 2
+	ocall read_8
+	dregs.D:1 = scratch1 << 8
+	scratch1 = address
+	ocall read_8
+	dregs.D:0 = scratch1
+	if Z
+		address += 2
+		scratch1 = address
+		dregs.D <<= 16
+		ocall read_8
+		dregs.D:1 = scratch1 << 8
+		scratch1 = address + 2
+		ocall read_8
+		dregs.D:0 = scratch1
+	end
+	m68k_prefetch
+
+0000DDD11Z001AAA movep_dx_ay
+	m68k_prefetch
+	scratch2 = scratch1 + aregs.A
+	if Z
+		scratch1 = dregs.D >> 24
+		ocall write_8
+		scratch2 += 2
+		scratch1 = dregs.D >> 16
+		ocall write_8
+		scratch2 += 2
+	end
+	scratch1 = dregs.D >> 8
+	ocall write_8
+	scratch2 += 2
+	scratch1 = dregs.D
+	ocall write_8
+	m68k_prefetch
+
 0100111001110000 reset
 	if reset_handler
 	pcall reset_handler m68k_reset_handler context