	include	macro.inc
	include	mdc5.inc
	
autochange	equ	0

;通常
	org	$73c5
 if autochange == 0
	jsr	mdc5_diskchange_input_read
 else
	nopw	$73cc
 endif
	
	org	$73d3
 if autochange == 0
	lda	mdc5_sidechange_status
 else
	nopw	$73da
 endif
	
	org	$73e0
 if autochange == 0
;status bufferを消しておかないと save 時にディスクが取り替えたままになる
	lda	#0
	sta	mdc5_sidechange_status
	nopw	$73e7
 else
	jsr	mdc5_diskside_change
 endif

;save
	org	$859a
 if autochange == 0
	jsr	mdc5_diskchange_input_read
 else
	nopw	$85a1
 endif
	
	org	$85a9
 if autochange == 0
	lda	mdc5_sidechange_status
 else
	nopw	$85b0
 endif
	
	org	$85b3
 if autochange == 0
	lda	#0
	sta	mdc5_sidechange_status
	nopw	$85ba
 else
	jsr	mdc5_diskside_change
 endif
