From efcdc09b1c58be04a53fa84ea34981d4231c1a78 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 28 Jan 2014 08:36:06 -0800 Subject: Add 3 wait states to Z80 access to bank area since that seems to be roughly the average in normal usage --- zruntime.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zruntime.S b/zruntime.S index a4a53ef..122f058 100644 --- a/zruntime.S +++ b/zruntime.S @@ -107,6 +107,8 @@ z80_read_ram: mov (%r11, %r13), %r13b ret z80_read_bank: + /* approximation of wait states for 68K bus access */ + add $3, %ebp and $0x7FFF, %r13 cmp $0, %r12 je slow_bank_read @@ -158,6 +160,8 @@ not_code: ret z80_write_bank: slow_bank_write: + /* approximation of wait states for 68K bus access */ + add $3, %ebp /* TODO: Call into C to implement this */ ret z80_write_ym2612: -- cgit v1.2.3