	OPT c+,l-,o+

*********************
*                   *
*    NTSC 1.0       *
*                   *
*  by Nico François *
*********************

	incdir "INCLUDE:"
	include "exec/types.i"
	include "exec/execbase.i"
	include "exec/memory.i"
	include "exec/resident.i"
	include "exec/exec_lib.i"
	include "graphics/gfxbase.i"
	include "graphics/graphics_lib.i"
	include "libraries/dos_lib.i"

	move.l ($4).w,a6
	lea DosName(PC),a1
	jsr _LVOOldOpenLibrary(a6)				; open DOS
	move.l d0,a6
	jsr _LVOOutput(a6)
	move.l d0,d7
	move.l d0,d1
	lea header.txt(PC),a0
	move.l a0,d2
	move.l #header.len,d3
	jsr _LVOWrite(a6)

	move.w $DFF004,d0							; check for new 1Mb Agnus
	and.w #$2000,d0
	bne.s ok1MbAgnus
	lea oldagnus.txt(PC),a0					; if not available print
	move.l a0,d2
	move.l #oldagnus.len,d3					; message
	move.l d7,d1
	jsr _LVOWrite(a6)
	move.l a6,a1
	move.l ($4).w,a6
	jsr _LVOCloseLibrary(a6)
	bra.s exit

ok1MbAgnus:
	move.l a6,a1
	move.l ($4).w,a6
	jsr _LVOCloseLibrary(a6)
	lea GfxName(PC),a1
	jsr _LVOOldOpenLibrary(a6)				; open graphics.library
	move.l d0,a1
	move.w gb_DisplayFlags(a1),d0
	and.b #%11111011,d0						; clear PAL flag
	or.b  #%00000001,d0						; set NTSC flag
	move.w d0,gb_DisplayFlags(a1)
	move.w #200,gb_NormalDisplayRows(a1)	; WorkBench 200 pixels high
	or.b #LIBF_CHANGED,LIB_FLAGS(a1)
	move.l a1,a2
	jsr _LVOSumLibrary(a6)					; recalculate checksum
	move.l a2,a1
	jsr _LVOCloseLibrary(a6)
	move.b #60,VBlankFrequency(a6)		; chang000 has got
the new ECS 1Mb Agnus installed.  As most of you will know the main advantages
of this chip is that it can access 1Mb of CHIP memory and that it can blit
larger memory blocks (32Kx32K).  But there is one other difference with the
old agnus:  the new agnus is the same in the PAL and NTSC machines.  A
question that leaps to mind is 'Can you switch between PAL and NTSC ???'.  The
answer is YES !!!  At least, from PAL to NTSC is possible, the other way
around I've not b