Mercurial > repos > blastem
diff runtime.S @ 137:0e7e1ccc0a81
Implemented HV counter
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 30 Dec 2012 22:39:41 -0800 |
parents | 0a0743a30ca1 |
children | aa3e1bb338c9 |
line wrap: on
line diff
--- a/runtime.S Sun Dec 30 18:40:33 2012 -0800 +++ b/runtime.S Sun Dec 30 22:39:41 2012 -0800 @@ -369,6 +369,8 @@ jbe cart_b cmp $0xE00000, %ecx jae workram_b + cmp $0xC00000, %ecx + jae vdp_psg_b cmp $0xA10000, %ecx jb not_io_b cmp $0xA12000, %ecx @@ -378,6 +380,17 @@ xor %cl, %cl dec %cl ret +vdp_psg_b: + test $0x2700E0, %ecx + jnz crash + and $0x1F, %ecx + bt $0, %ecx + jnc vdp_swap + jmp do_vdp_port_read +vdp_swap: + call do_vdp_port_read + shr $8, %cx + ret workram_b: /* deal with byte swapping */ xor $1, %ecx