From 9f26b036aadf4fa3856586935f105868a93a189f Mon Sep 17 00:00:00 2001 From: Duncan Smith Date: Mon, 13 Sep 2010 16:49:18 -0700 Subject: Endianness fixes, I don't know how correct these are ... --- main.asm | 1 - opcodes.asm | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main.asm b/main.asm index 51f91a5..9d4dfbc 100644 --- a/main.asm +++ b/main.asm @@ -92,7 +92,6 @@ emu_teardown: ;; Take a virtual address in d1 and dereference it. Returns the ;; host address in a0. Destroys a0, d0. deref: - rol.w #8,d1 move.w d1,d0 andi.w #$3FFF,d0 movea.w d0,a0 diff --git a/opcodes.asm b/opcodes.asm index 06badd7..f2b5256 100644 --- a/opcodes.asm +++ b/opcodes.asm @@ -275,7 +275,9 @@ emu_op_0a: ; S4 T14 ;; LD A,(BC) ;; A <- (BC) ;; No flags - FETCHB ebc,eaf + move.w ebc,d1 + rol.w #8,d1 + FETCHB d1,eaf DONE START @@ -349,7 +351,9 @@ emu_op_11: ; S emu_op_12: ;; LD (DE),A ;; No flags - FETCHB ede,eaf + move.w ede,d0 + rol.w #8,d0 + FETCHB d0,eaf DONE START @@ -617,6 +621,7 @@ emu_op_32: ;; LD (immed.w),A ;; store indirect FETCHWI d1 + rol.w #8,d1 PUTB eaf,d1 DONE -- cgit v1.2.3