mirror of
https://github.com/simonowen/apple1emu.git
synced 2024-10-31 22:05:24 +00:00
Duplicated branch code for i_bra_ex, to avoid fiddle needed to fit EX AF,AF' for bcc/bcs.
This commit is contained in:
parent
b1c8dcedee
commit
0c9415424b
102
opdefs.inc
102
opdefs.inc
@ -98,75 +98,75 @@ op_5e: equ &b35e ; +18
|
||||
op_5f: equ &b95f ; +13
|
||||
op_60: equ &ba60 ; +13
|
||||
op_61: equ &b861 ; +14
|
||||
op_62: equ &bb62 ; +3
|
||||
op_62: equ &bc62 ; +3
|
||||
op_63: equ &b063 ; +3
|
||||
op_64: equ &b764 ; +8
|
||||
op_65: equ &bc65 ; +8
|
||||
op_64: equ &bb64 ; +8
|
||||
op_65: equ &bd65 ; +8
|
||||
op_66: equ &b666 ; +13
|
||||
op_67: equ &b267 ; +9
|
||||
op_68: equ &bb68 ; +8
|
||||
op_67: equ &b767 ; +9
|
||||
op_68: equ &bc68 ; +8
|
||||
op_69: equ &b069 ; +27
|
||||
op_6a: equ &bd6a ; +7
|
||||
op_6a: equ &be6a ; +7
|
||||
op_6b: equ &b16b ; +3
|
||||
op_6c: equ &b56c ; +10
|
||||
op_6d: equ &b76d ; +9
|
||||
op_6d: equ &bb6d ; +9
|
||||
op_6e: equ &b16e ; +14
|
||||
op_6f: equ &b46f ; +13
|
||||
op_70: equ &b870 ; +10
|
||||
op_71: equ &b271 ; +18
|
||||
op_72: equ &b372 ; +16
|
||||
op_73: equ &ba73 ; +3
|
||||
op_74: equ &b974 ; +10
|
||||
op_75: equ &b675 ; +10
|
||||
op_76: equ &b576 ; +15
|
||||
op_6f: equ &b26f ; +13
|
||||
op_70: equ &b970 ; +10
|
||||
op_71: equ &b371 ; +18
|
||||
op_72: equ &b472 ; +16
|
||||
op_73: equ &b673 ; +3
|
||||
op_74: equ &ba74 ; +10
|
||||
op_75: equ &b775 ; +10
|
||||
op_76: equ &b676 ; +15
|
||||
op_77: equ &bc77 ; +9
|
||||
op_78: equ &ba78 ; +6
|
||||
op_79: equ &b779 ; +13
|
||||
op_78: equ &bd78 ; +6
|
||||
op_79: equ &b879 ; +13
|
||||
op_7a: equ &bb7a ; +9
|
||||
op_7b: equ &bd7b ; +3
|
||||
op_7c: equ &b47c ; +15
|
||||
op_7d: equ &b87d ; +13
|
||||
op_7e: equ &b17e ; +18
|
||||
op_7f: equ &b97f ; +13
|
||||
op_80: equ &ba80 ; +10
|
||||
op_81: equ &b681 ; +14
|
||||
op_82: equ &b382 ; +3
|
||||
op_7b: equ &be7b ; +3
|
||||
op_7c: equ &b57c ; +15
|
||||
op_7d: equ &b97d ; +13
|
||||
op_7e: equ &b27e ; +18
|
||||
op_7f: equ &ba7f ; +13
|
||||
op_80: equ &b180 ; +21
|
||||
op_81: equ &b781 ; +14
|
||||
op_82: equ &b482 ; +3
|
||||
op_83: equ &bb83 ; +3
|
||||
op_84: equ &b284 ; +10
|
||||
op_85: equ &b385 ; +8
|
||||
op_84: equ &b384 ; +10
|
||||
op_85: equ &b485 ; +8
|
||||
op_86: equ &b086 ; +10
|
||||
op_87: equ &b787 ; +9
|
||||
op_88: equ &bb88 ; +6
|
||||
op_89: equ &ba89 ; +7
|
||||
op_8a: equ &b88a ; +5
|
||||
op_8b: equ &bc8b ; +3
|
||||
op_8c: equ &b48c ; +12
|
||||
op_8d: equ &b58d ; +10
|
||||
op_8e: equ &b38e ; +12
|
||||
op_8f: equ &b28f ; +13
|
||||
op_87: equ &b887 ; +9
|
||||
op_88: equ &bc88 ; +6
|
||||
op_89: equ &bb89 ; +7
|
||||
op_8a: equ &b98a ; +5
|
||||
op_8b: equ &bd8b ; +3
|
||||
op_8c: equ &b58c ; +12
|
||||
op_8d: equ &b68d ; +10
|
||||
op_8e: equ &b48e ; +12
|
||||
op_8f: equ &b38f ; +13
|
||||
op_90: equ &b990 ; +8
|
||||
op_91: equ &b091 ; +19
|
||||
op_92: equ &b192 ; +17
|
||||
op_92: equ &b292 ; +17
|
||||
op_93: equ &b793 ; +3
|
||||
op_94: equ &b894 ; +12
|
||||
op_95: equ &b695 ; +10
|
||||
op_95: equ &b195 ; +10
|
||||
op_96: equ &b796 ; +12
|
||||
op_97: equ &ba97 ; +9
|
||||
op_98: equ &b498 ; +5
|
||||
op_98: equ &b698 ; +5
|
||||
op_99: equ &b599 ; +14
|
||||
op_9a: equ &bb9a ; +7
|
||||
op_9b: equ &b39b ; +3
|
||||
op_9b: equ &bc9b ; +3
|
||||
op_9c: equ &b99c ; +11
|
||||
op_9d: equ &b49d ; +14
|
||||
op_9e: equ &b39e ; +15
|
||||
op_9f: equ &b69f ; +13
|
||||
op_a0: equ &baa0 ; +7
|
||||
op_a1: equ &b2a1 ; +15
|
||||
op_a1: equ &b1a1 ; +15
|
||||
op_a2: equ &b8a2 ; +7
|
||||
op_a3: equ &b1a3 ; +3
|
||||
op_a3: equ &b7a3 ; +3
|
||||
op_a4: equ &b0a4 ; +10
|
||||
op_a5: equ &b7a5 ; +9
|
||||
op_a6: equ &b1a6 ; +10
|
||||
op_a5: equ &b2a5 ; +9
|
||||
op_a6: equ &b7a6 ; +10
|
||||
op_a7: equ &b5a7 ; +9
|
||||
op_a8: equ &baa8 ; +5
|
||||
op_a9: equ &b8a9 ; +6
|
||||
@ -174,19 +174,19 @@ op_aa: equ &b9aa ; +5
|
||||
op_ab: equ &bbab ; +3
|
||||
op_ac: equ &b4ac ; +12
|
||||
op_ad: equ &b6ad ; +11
|
||||
op_ae: equ &b7ae ; +12
|
||||
op_af: equ &b3af ; +13
|
||||
op_b0: equ &bab0 ; +8
|
||||
op_ae: equ &b3ae ; +12
|
||||
op_af: equ &b2af ; +13
|
||||
op_b0: equ &b7b0 ; +8
|
||||
op_b1: equ &b0b1 ; +20
|
||||
op_b2: equ &b1b2 ; +18
|
||||
op_b3: equ &b5b3 ; +3
|
||||
op_b4: equ &b2b4 ; +12
|
||||
op_b5: equ &b8b5 ; +11
|
||||
op_b4: equ &b8b4 ; +12
|
||||
op_b5: equ &b9b5 ; +11
|
||||
op_b6: equ &b5b6 ; +12
|
||||
op_b7: equ &b9b7 ; +9
|
||||
op_b7: equ &bbb7 ; +9
|
||||
op_b8: equ &b4b8 ; +6
|
||||
op_b9: equ &b6b9 ; +15
|
||||
op_ba: equ &bbba ; +8
|
||||
op_ba: equ &bcba ; +8
|
||||
op_bb: equ &babb ; +3
|
||||
op_bc: equ &b3bc ; +16
|
||||
op_bd: equ &b7bd ; +15
|
||||
|
@ -46,9 +46,6 @@ MSB:
|
||||
my $start = ($msb << 8) | $op;
|
||||
my $end = $start + $len{$op}-1;
|
||||
|
||||
# Special fiddle to allow room for EX AF,AF' before BRA
|
||||
$start-- if $op == 0x80;
|
||||
|
||||
# Check against what we've already positioned
|
||||
foreach (keys %off)
|
||||
{
|
||||
@ -71,9 +68,6 @@ MSB:
|
||||
}
|
||||
}
|
||||
|
||||
# Undo fiddle so BRA is positioned as normal
|
||||
$off{0x80}++;
|
||||
|
||||
# Position base so code finishes just before &c000
|
||||
$base = 0xc000 - (($size + 0xff) & ~0xff);
|
||||
|
||||
|
15
opimpl.inc
15
opimpl.inc
@ -1844,11 +1844,8 @@ op_7f_len: equ $-op_7f
|
||||
|
||||
|
||||
|
||||
org op_80-1
|
||||
org op_80
|
||||
dump $
|
||||
i_bra_ex: ex af,af' ; preseve C before branch
|
||||
; org op_80
|
||||
; dump $
|
||||
i_bra: ld a,(de) ; BRA [65C02]
|
||||
inc de
|
||||
ld l,a ; offset low
|
||||
@ -1858,6 +1855,16 @@ i_bra: ld a,(de) ; BRA [65C02]
|
||||
add hl,de ; PC=PC+e
|
||||
ex de,hl
|
||||
jp (ix) ; main_loop
|
||||
i_bra_ex: ex af,af' ; preseve C before branch
|
||||
ld a,(de)
|
||||
inc de
|
||||
ld l,a ; offset low
|
||||
rla ; set carry with sign
|
||||
sbc a,a ; form high byte for offset
|
||||
ld h,a
|
||||
add hl,de ; PC=PC+e
|
||||
ex de,hl
|
||||
jp (ix) ; main_loop
|
||||
op_80_len: equ $-op_80
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user