Mercurial > repos > blastem
comparison zruntime.S @ 507:cc6030bd04c6
Add 3 wait states to Z80 access to bank area since that seems to be roughly the average in normal usage
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 28 Jan 2014 08:36:06 -0800 |
parents | b7c3b2d22858 |
children | b976c6d6e5fb |
comparison
equal
deleted
inserted
replaced
506:a3b48a57e847 | 507:cc6030bd04c6 |
---|---|
105 z80_read_ram: | 105 z80_read_ram: |
106 and $0x1FFF, %r13 | 106 and $0x1FFF, %r13 |
107 mov (%r11, %r13), %r13b | 107 mov (%r11, %r13), %r13b |
108 ret | 108 ret |
109 z80_read_bank: | 109 z80_read_bank: |
110 /* approximation of wait states for 68K bus access */ | |
111 add $3, %ebp | |
110 and $0x7FFF, %r13 | 112 and $0x7FFF, %r13 |
111 cmp $0, %r12 | 113 cmp $0, %r12 |
112 je slow_bank_read | 114 je slow_bank_read |
113 /* 68K memory is byte swapped */ | 115 /* 68K memory is byte swapped */ |
114 xor $1, %r13 | 116 xor $1, %r13 |
156 call z80_load_context | 158 call z80_load_context |
157 not_code: | 159 not_code: |
158 ret | 160 ret |
159 z80_write_bank: | 161 z80_write_bank: |
160 slow_bank_write: | 162 slow_bank_write: |
163 /* approximation of wait states for 68K bus access */ | |
164 add $3, %ebp | |
161 /* TODO: Call into C to implement this */ | 165 /* TODO: Call into C to implement this */ |
162 ret | 166 ret |
163 z80_write_ym2612: | 167 z80_write_ym2612: |
164 and $0x3, %r14w | 168 and $0x3, %r14w |
165 call z80_save_context | 169 call z80_save_context |