table	equ $846
patch1	equ rom+$100C
patch2	equ rom+$688;	memvalid
patch3	equ rom+$FCA;	getbpb
patch4	equ rom+$D62;	_scrdmp
patch5	equ rom+$670;	RTS
patch6	equ rom+$EBA
patch7	equ rom+$7CE;	RTE
patch8	equ rom+$B50
patch9	equ rom+$6DE
patch10	equ rom+$9F66
patch11	equ rom+$7EE
patch12	equ rom+$9AE
patch13	equ rom+$2408;	initmfp
patch14	equ rom+$556
patch15	equ rom+$A9F8
patch16	equ rom+$A96E
patch17	equ rom+$4AF8;	_setup
patch18	equ rom+$4C42
patch19	equ rom+$53C
patch20	equ rom+$E56
patch21	equ rom+$C4A
patch22	equ rom+$538;	NULL
patch23	equ patch22-20;	COMMAND
patch24	equ patch22-32;	PATH
patch25	equ rom+$BAC	_bombs
patch26	equ rom+$312C;	timercint+
patch27	equ rom+$2B5C
_BCONSTAT	equ rom+$984
_BCONIN		equ rom+$98C
_BCONOUT	equ rom+$99C
_BCOSTAT	equ rom+$994
patch28	equ rom+$16E4;	chksum

BIOS	equ rom+table
XBIOS	equ BIOS+2+12*4
ENTRY	macro
	dc.l offset+\1*4
	dc.w \2>>16
	dc.l offset+\1*4+1
	dc.w \2>>8&$ff
	dc.l offset+\1*4+2
	dc.w \2&$ff
	endm

offset	set table+3
	ENTRY 1,BCONSTAT
	ENTRY 2,BCONIN
	ENTRY 3,BCONOUT
	ENTRY 8,BCOSTAT
offset	set table+3+12*4+2
	ENTRY 0,INITMOUSE
	ENTRY 4,GETREZ
	ENTRY 5,SETSCREEN
	ENTRY 8,FLOPRD
	ENTRY 9,FLOPWR
	ENTRY 10,FLOPFMT
	ENTRY 12,DUMMY
	ENTRY 13,DUMMY
	ENTRY 15,DUMMY
	ENTRY 22,SETTIME
	ENTRY 23,GETTIME
	ENTRY 25,DUMMY
	ENTRY 26,DUMMY
	ENTRY 27,DUMMY
	ENTRY 28,GIACCESS
	ENTRY 29,OFFGIBIT
	ENTRY 30,ONGIBIT
	ENTRY 31,DUMMY
	ENTRY 32,DOSOUND
	ENTRY 40,DUMMY
offset	set patch1
	ENTRY 0,FLOPRD
	dc.l 54
	dc.w $00	; 0C
	dc.l 55
	dc.w $00	; B9
	dc.l 56
	dc.w $00	; FA
	dc.l 57
	dc.w $00	; 52
	dc.l 58
	dc.w $00	; 23
	dc.l 59
	dc.w $00	; 5F
	dc.l 134
	dc.w $00	; FF
	dc.l 135
	dc.w io>>16	; FF
	dc.l 178
	dc.w $00	; FF
	dc.l 179
	dc.w io>>16	; FF
	dc.l 184
	dc.w 0		; FF
	dc.l 185
	dc.w io>>16	; FF
	dc.l 1416
	dc.w $00	; FF
	dc.l 1417
	dc.w io>>16	; FF
	dc.l 1422
	dc.w $00	; FF
	dc.l 1423
	dc.w io>>16	; FF
	dc.l 1442
	dc.w $00	; FF
	dc.l 1443
	dc.w io>>16	; FF
	dc.l 1450
	dc.w $00	; FF
	dc.l 1451
	dc.w io>>16	; FF
	dc.l 1458
	dc.w $00	; FF
	dc.l 1459
	dc.w io>>16	; FF
	dc.l 1810	; BNE->BRA
	dc.w $60	; 66
	dc.l 1834	; BEQ->BRA
	dc.w $60	; 67
	dc.l 1883
	dc.w io>>16	; FF
	dc.l 2842
	dc.w 0		; FF
	dc.l 2843
	dc.w io>>16	; FF
	dc.l 3477
	dc.w io>>16	; FF
	dc.l 3612
	dc.w $00	; FF
	dc.l 3613
	dc.w io>>16	; FF
	dc.l 3618
	dc.w $00	; FF
	dc.l 3619
	dc.w io>>16	; FF
	dc.l 3640
	dc.w $00	; FF
	dc.l 3641
	dc.w io>>16	; FF
	dc.l 6064
	dc.w $00	; FF
	dc.l 6065
	dc.w io>>16	; FF
	dc.l 6744
	dc.w $00	; FF
	dc.l 6745
	dc.w io>>16	; FF
	dc.l 6752
	dc.w $00	; FF
	dc.l 6753
	dc.w io>>16	; FF
	dc.l 6760
	dc.w $00	; FF
	dc.l 6761
	dc.w io>>16	; FF
	dc.l 6950
	dc.w $00	; FF
	dc.l 6951
	dc.w io>>16	; FF
	dc.l 6958
	dc.w $00	; FF
	dc.l 6959
	dc.w io>>16	; FF
	dc.l 6966
	dc.w $00	; FF
	dc.l 6967
	dc.w io>>16	; FF
	dc.l 7112
	dc.w $00	; FF
	dc.l 7113
	dc.w io>>16	; FF
	dc.l 7180
	dc.w $00	; FF
	dc.l 7181
	dc.w io>>16	; FF
	dc.l 7252
	dc.w $00	; FF
	dc.l 7253
	dc.w io>>16	; FF
	dc.l 7754
	dc.w $00	; FF
	dc.l 7755
	dc.w io>>16	; FF
	dc.l 7762
	dc.w $00	; FF
	dc.l 7763
	dc.w io>>16	; FF
	dc.l 7770
	dc.w $00	; FF
	dc.l 7771
	dc.w io>>16	; FF
	dc.l 7786
	dc.w $00	; FF
	dc.l 7787
	dc.w io>>16	; FF
	dc.l 7792
	dc.w $00	; FF
	dc.l 7793
	dc.w io>>16	; FF
	dc.l 7806
	dc.w $00	; FF
	dc.l 7807
	dc.w io>>16	; FF
	dc.l 7818
	dc.w $00	; FF
	dc.l 7819
	dc.w io>>16	; FF
	dc.l 7828
	dc.w $00	; FF
	dc.l 7829
	dc.w io>>16	; FF
	dc.l 7838
	dc.w $00	; FF
	dc.l 7839
	dc.w io>>16	; FF
	dc.l 7848
	dc.w $00	; FF
	dc.l 7849
	dc.w io>>16	; FF
	dc.l 8200
	dc.w $00	; FF
	dc.l 8201
	dc.w io>>16	; FF
	dc.l 8220
	dc.w $00	; FF
	dc.l 8221
	dc.w io>>16	; FF
	dc.l 8266
	dc.w $00	; FF
	dc.l 8267
	dc.w io>>16	; FF
	dc.l 8672
	dc.w $00	; FF
	dc.l 8673
	dc.w io>>16	; FF
	dc.l 8692
	dc.w $00	; FF
	dc.l 8693
	dc.w io>>16	; FF
	dc.l 9394
	dc.w $00	; FF
	dc.l 9395
	dc.w io>>16	; FF
	dc.l 9402
	dc.w $00	; FF
	dc.l 9403
	dc.w io>>16	; FF
	dc.l 9494
	dc.w $00	; FF
	dc.l 9495
	dc.w io>>16	; FF
	dc.l 9502
	dc.w $00	; FF
	dc.l 9503
	dc.w io>>16	; FF
	dc.l 10416
	dc.w $00	; FF
	dc.l 10417
	dc.w io>>16	; FF
	dc.l 10446
	dc.w $00	; FF
	dc.l 10447
	dc.w io>>16	; FF
	dc.l 10738
	dc.w $00	; FF
	dc.l 10739
	dc.w io>>16	; FF
	dc.l 10754
	dc.w $00	; FF
	dc.l 10755
	dc.w io>>16	; FF
	dc.l 10770
	dc.w $00	; FF
	dc.l 10771
	dc.w io>>16	; FF
	dc.l 12050
	dc.w $00	; FF
	dc.l 12051
	dc.w io>>16	; FF
	dc.l 12670
	dc.w $00	; FF
	dc.l 12671
	dc.w io>>16	; FF
	dc.l 12675	; RTE->RTS
	dc.w $75	; 73
	dc.l 12710
	dc.w $00	; FF
	dc.l 12711
	dc.w io>>16	; FF
	dc.l 12728
	dc.w $00	; FF
	dc.l 12729
	dc.w io>>16	; FF
	dc.l 12740
	dc.w $00	; FF
	dc.l 12741
	dc.w io>>16	; FF
	dc.l 12748
	dc.w $00	; FF
	dc.l 12749
	dc.w io>>16	; FF
	dc.l 12778
	dc.w $00	; FF
	dc.l 12779
	dc.w io>>16	; FF
	dc.l 12794
	dc.w $00	; FF
	dc.l 12795
	dc.w io>>16	; FF
	dc.l 18459
	dc.w io>>16	; FF
	dc.l 18607
	dc.w io>>16	; FF
	dc.l 18707
	dc.w io>>16	; FF
	dc.l 18835
	dc.w io>>16	; FF
	dc.l 41575
	dc.w io>>16	; FF
	dc.l 42535
	dc.w io>>16	; FF
	dc.l 61127
	dc.w io>>16	; FF
	dc.l 64027
	dc.w io>>16	; FF
	dc.l 64809
	dc.w io>>16	; FF
	dc.l 67281
	dc.w io>>16	; FF
	dc.l 77455
	dc.w io>>16	; FF
	dc.l 77507
	dc.w io>>16	; FF
	dc.l 77633
	dc.w io>>16	; FF
	dc.l 77667
	dc.w io>>16	; FF
	dc.l 126012
	dc.w $60	; 0C
	dc.l 126013
	dc.w $00	; 6E
	dc.l 126015
	dc.w $06	; 02
	dc.l 126016
	dc.w $CE	; FF
	dc.l 126017
	dc.w $BD	; FE
	dc.l 126018
	dc.w $50	; 66
	dc.l 126019
	dc.w $79	; 1A
	dc.l 126020
	dc.w $4E	; 20
	dc.l 126021
	dc.w $71	; 47
	dc.l 126022
	dc.w $4E	; D1
	dc.l 126023
	dc.w $71	; FC
	dc.l 126024
	dc.w $4E	; 00
	dc.l 126025
	dc.w $71	; 00
	dc.l 126026
	dc.w $4E	; 02
	dc.l 126027
	dc.w $71	; 02
	dc.l 126028
	dc.w $4E	; 30
	dc.l 126029
	dc.w $71	; BC
	dc.l 126030
	dc.w $4E	; 00
	dc.l 126031
	dc.w $71	; 08
	dc.l 126032
	dc.w $4E	; 20
	dc.l 126033
	dc.w $71	; 47
	dc.l 126034
	dc.w $4E	; D1
	dc.l 126035
	dc.w $71	; FC
	dc.l 126036
	dc.w $4E	; 00
	dc.l 126037
	dc.w $71	; 00
	dc.l 126038
	dc.w $4E	; 02
	dc.l 126039
	dc.w $71	; 1A
	dc.l 126040
	dc.w $4E	; 30
	dc.l 126041
	dc.w $71	; BC
	dc.l 126042
	dc.w $4E	; 00
	dc.l 126043
	dc.w $71	; 08
	dc.l 126044
	dc.w $4E	; 60
	dc.l 126045
	dc.w $71	; 0C
	dc.l 126046
	dc.w $4E	; 20
	dc.l 126047
	dc.w $71	; 47
	dc.l 126048
	dc.w $4E	; D1
	dc.l 126049
	dc.w $71	; FC
	dc.l 126050
	dc.w $4E	; 00
	dc.l 126051
	dc.w $71	; 00
	dc.l 126052
	dc.w $4E	; 02
	dc.l 126053
	dc.w $71	; 32
	dc.l 126054
	dc.w $4E	; 30
	dc.l 126055
	dc.w $71	; BC
	dc.l 126056
	dc.w $4E	; 00
	dc.l 126057
	dc.w $71	; 08
