summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2012-12-18 22:19:52 -0800
committerMike Pavone <pavone@retrodev.com>2012-12-18 22:19:52 -0800
commit7cad3601cbcb6ea551dc774f17a91fde4c9d71d6 (patch)
tree2512d9cca435c62270f71eddadb5c3db4fdb3127
parente88632e2aee3bb60d5ddf197d5b0fd1c24a0c059 (diff)
Code in runtime for checking for VDP reads was using the wrong register. This is now fixed.
-rw-r--r--runtime.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime.S b/runtime.S
index b9c91a0..5ffa06c 100644
--- a/runtime.S
+++ b/runtime.S
@@ -17,6 +17,7 @@ do_vdp_port_write:
ret
do_vdp_port_read:
+ mov %ecx, %edi
call m68k_save_context
call vdp_port_read
mov %rax, %rsi
@@ -28,7 +29,7 @@ bad_access_msg:
.asciz "Program tried to access illegal 68K address %X\n"
.global m68k_write_word
- .global vdp_psg_w
+ .global try_fifo_write
m68k_write_word:
and $0xFFFFFF, %rdi
cmp $0x400000, %edi
@@ -133,7 +134,7 @@ m68k_read_word_scratch1:
jle cart
cmp $0xE00000, %ecx
jge workram
- cmp $0xC00000, %edi
+ cmp $0xC00000, %ecx
jge vdp_psg
xor %cx, %cx
dec %cx
@@ -143,9 +144,9 @@ workram:
mov (%r9, %rcx), %cx
jmp inccycles
vdp_psg:
- test $0x2700E0, %edi
+ test $0x2700E0, %ecx
jnz crash
- and $0x1F, %edi
+ and $0x1F, %ecx
jmp do_vdp_port_read
cart:
mov (%r8, %rcx), %cx