# HG changeset patch # User Michael Pavone # Date 1390926966 28800 # Node ID cc6030bd04c6936e6fb4ec900973a4dc0c6ed36a # Parent a3b48a57e8470b451b7e8ee93d3e2230606e106e Add 3 wait states to Z80 access to bank area since that seems to be roughly the average in normal usage diff -r a3b48a57e847 -r cc6030bd04c6 zruntime.S --- a/zruntime.S Mon Jan 27 22:12:22 2014 -0800 +++ b/zruntime.S Tue Jan 28 08:36:06 2014 -0800 @@ -107,6 +107,8 @@ 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 @@ 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: