<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matahari</id>
		<title>CPCWiki - THE Amstrad CPC encyclopedia! - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matahari"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php/Special:Contributions/Matahari"/>
		<updated>2026-08-28T09:04:28Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=User:Matahari&amp;diff=89715</id>
		<title>User:Matahari</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=User:Matahari&amp;diff=89715"/>
				<updated>2014-04-08T12:33:45Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;aka Mert Börü&lt;br /&gt;
&lt;br /&gt;
http://mertboru.com/&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71900</id>
		<title>256 byte Overscan MEGATEXT Intro - (features 50Hz fullscreen scroll)</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71900"/>
				<updated>2011-12-31T11:57:53Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
	;	256 byte Overscan MegaText Intro v1.1b&lt;br /&gt;
	;	(7DX Demo Party 2011 Release)&lt;br /&gt;
	;&lt;br /&gt;
	;	for Amstrad 464/664/6128 computers&lt;br /&gt;
	;&lt;br /&gt;
	;	by matahari - (Dec 24, 2011)&lt;br /&gt;
	;&lt;br /&gt;
	;	Featuring;&lt;br /&gt;
	;	 - Greetings message via 50Hz hardware scroll&lt;br /&gt;
	;	 - 100% overscan (full) screen size&lt;br /&gt;
	;	 - Complete Amstrad palette (27 colours) on screen at once&lt;br /&gt;
	;	 - And, all in 256 bytes!&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		LET ADDR_Start 		= &amp;amp;400&lt;br /&gt;
		LET ADDR_TextMap		= ADDR_Start + 256&lt;br /&gt;
&lt;br /&gt;
		LET CONST_TotalRasterLines	= 269&lt;br /&gt;
&lt;br /&gt;
		LET VAR_BgrndColour		= ADDR_Start - 1&lt;br /&gt;
		LET VAR_FlipFlop		= VAR_BgrndColour - 1&lt;br /&gt;
		LET VAR_LineSkipMinus		= CONST_TotalRasterLines * -9&lt;br /&gt;
		LET VAR_LineSkipPlus		= CONST_TotalRasterLines * 9&lt;br /&gt;
&lt;br /&gt;
		VAR_XOR			equ 1 xor 0&lt;br /&gt;
&lt;br /&gt;
		run start&lt;br /&gt;
		org ADDR_Start&lt;br /&gt;
&lt;br /&gt;
start:	;---------	Generate a dummy interrupt handler ---------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,&amp;amp;c9fb&lt;br /&gt;
		ld	(&amp;amp;0038),hl&lt;br /&gt;
&lt;br /&gt;
	;---------	Set CRTC Registers -------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,CRTC_Data&lt;br /&gt;
loopCRTC:		ld	a,(hl)&lt;br /&gt;
		ld	b,&amp;amp;bc + 1&lt;br /&gt;
		outi&lt;br /&gt;
		ld	b,&amp;amp;bd + 1&lt;br /&gt;
		outi&lt;br /&gt;
		inc	a&lt;br /&gt;
		jr	nz,loopCRTC&lt;br /&gt;
&lt;br /&gt;
	;---------	Display text message -----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,ADDR_TextMap &lt;br /&gt;
		ld	de,Message&lt;br /&gt;
&lt;br /&gt;
loopText:		push	de&lt;br /&gt;
		push	hl&lt;br /&gt;
		ld	a,2&lt;br /&gt;
		call	&amp;amp;bc0e&lt;br /&gt;
		pop	hl&lt;br /&gt;
		pop	de&lt;br /&gt;
&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
		cp	255&lt;br /&gt;
		jr	z,loopExec&lt;br /&gt;
&lt;br /&gt;
		call	&amp;amp;bb5a&lt;br /&gt;
&lt;br /&gt;
		inc	de&lt;br /&gt;
		push	de&lt;br /&gt;
&lt;br /&gt;
	;---------	Grab pixels of displayed char --------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,&amp;amp;c000&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		ld	c,&amp;amp;40&lt;br /&gt;
outer:		ex	af,af'&lt;br /&gt;
		ld	iy,vangelis + 1&lt;br /&gt;
		ld	(iy),%10000000&lt;br /&gt;
		call	Proc_FlipFlop&lt;br /&gt;
inner:		call	Proc_FlipFlop&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,bitBckgrndA&lt;br /&gt;
		ld	a,&amp;amp;55&lt;br /&gt;
		jr	bitBckgrndB&lt;br /&gt;
bitBckgrndA:	ld	a,&amp;amp;57&lt;br /&gt;
bitBckgrndB:	ld	(VAR_BgrndColour),a&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
vangelis:		and	0&lt;br /&gt;
		jr	z,blit&lt;br /&gt;
		ld	a,c&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
blit:		push	hl&lt;br /&gt;
		push	de&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	de,9&lt;br /&gt;
		ld	b,26&lt;br /&gt;
blitText:		add	hl,de&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,blitBckgrnd&lt;br /&gt;
		ld	(hl),c&lt;br /&gt;
		inc	c&lt;br /&gt;
		jr	blitSkip&lt;br /&gt;
&lt;br /&gt;
blitBckgrnd:	push	af&lt;br /&gt;
		ld	a,(VAR_BgrndColour)&lt;br /&gt;
		ld	(hl),a&lt;br /&gt;
		pop	af&lt;br /&gt;
&lt;br /&gt;
blitSkip:		djnz	blitText&lt;br /&gt;
		pop	bc&lt;br /&gt;
		pop	de&lt;br /&gt;
		pop	hl&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		rr	(iy)&lt;br /&gt;
		jr	nc,inner&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		add	a,d&lt;br /&gt;
		ld	d,a&lt;br /&gt;
&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	bc,25*9&lt;br /&gt;
		add	hl,bc&lt;br /&gt;
		pop	bc&lt;br /&gt;
&lt;br /&gt;
		ex	af,af'&lt;br /&gt;
		dec	a&lt;br /&gt;
		jr	nz,outer&lt;br /&gt;
&lt;br /&gt;
		pop	de&lt;br /&gt;
		jr	loopText&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - INITIALIZE!&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopExec:		ld	hl,ADDR_TextMap + VAR_LineSkipPlus&lt;br /&gt;
&lt;br /&gt;
					; Checking VBlanking only for once!&lt;br /&gt;
					; Rest of the code will be manually synced&lt;br /&gt;
					; via precise t-state calculations.&lt;br /&gt;
		ld	b,&amp;amp;f5&lt;br /&gt;
waitVBlanking:	in	a,(c)&lt;br /&gt;
		rra&lt;br /&gt;
		jr	nc,waitVBlanking&lt;br /&gt;
&lt;br /&gt;
		halt&lt;br /&gt;
		di&lt;br /&gt;
&lt;br /&gt;
	;---------	X-Pos Alignment ----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time! =&amp;gt; 7 cycles&lt;br /&gt;
					; Aligns perfect on WinApe.&lt;br /&gt;
&lt;br /&gt;
					; If you need precise&lt;br /&gt;
					; alignment on an original Amstrad,&lt;br /&gt;
					; you need to comment out this line&lt;br /&gt;
					; OR replace it with a NOP!&lt;br /&gt;
&lt;br /&gt;
					; No worries, intro size will not&lt;br /&gt;
					; exceed 256 bytes either way ;-)&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - BEGIN&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopBegin:		ld	de,VAR_LineSkipMinus + 9&lt;br /&gt;
		add	hl,de&lt;br /&gt;
&lt;br /&gt;
	;---------	Wait for perfect sync! ---------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	b,203		; waste time!&lt;br /&gt;
waste1:		nop			; waste time!&lt;br /&gt;
		add	ix,ix		; waste time!&lt;br /&gt;
		djnz	waste1		; waste time!&lt;br /&gt;
&lt;br /&gt;
	;---------	Start Gate Array code ----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,CONST_TotalRasterLines&lt;br /&gt;
		ld	bc,&amp;amp;7f00&lt;br /&gt;
		out	(c),c&lt;br /&gt;
&lt;br /&gt;
crash:		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time!&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
&lt;br /&gt;
		dec	de&lt;br /&gt;
		ld	a,d&lt;br /&gt;
		or	e&lt;br /&gt;
		jr	nz,crash&lt;br /&gt;
&lt;br /&gt;
	;---------	Raster colour = Black ----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,&amp;amp;54&lt;br /&gt;
		out	(c),a&lt;br /&gt;
&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
		ld	b,(hl)		; waste time!&lt;br /&gt;
		ld	b,224		; waste time!&lt;br /&gt;
waste2:		djnz	waste2		; waste time!&lt;br /&gt;
&lt;br /&gt;
loopEnd:		jr	loopBegin&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - END&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	;---------	Procedure for Flip/Flop --------------------------------------&lt;br /&gt;
&lt;br /&gt;
Proc_FlipFlop:	ld	a,(VAR_FlipFlop)&lt;br /&gt;
		xor	VAR_XOR&lt;br /&gt;
		ld	(VAR_FlipFlop),a&lt;br /&gt;
		ret&lt;br /&gt;
&lt;br /&gt;
	;---------	CRTC Data ----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
CRTC_Data:		db	1,54		; set display width&lt;br /&gt;
		db	2,50		; set horizontal sync&lt;br /&gt;
		db	6,34		; set display height&lt;br /&gt;
		db	7,35		; set vertical sync&lt;br /&gt;
		db	255		; =&amp;gt; EXIT LOOP&lt;br /&gt;
&lt;br /&gt;
Message:		db	'  WELCOME TO 7DX2011 ',255&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71899</id>
		<title>256 byte Overscan MEGATEXT Intro - (features 50Hz fullscreen scroll)</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71899"/>
				<updated>2011-12-31T11:51:20Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
	;	256 byte Overscan MegaText Intro v1.1b&lt;br /&gt;
	;	(7DX Demo Party 2011 Release)&lt;br /&gt;
	;&lt;br /&gt;
	;	for Amstrad 464/664/6128 computers&lt;br /&gt;
	;&lt;br /&gt;
	;	by matahari - (Dec 24, 2011)&lt;br /&gt;
	;&lt;br /&gt;
	;	Featuring;&lt;br /&gt;
	;	 - Greetings message via 50Hz hardware scroll&lt;br /&gt;
	;	 - 100% overscan (full) screen size&lt;br /&gt;
	;	 - Complete Amstrad palette (27 colours) on screen at once&lt;br /&gt;
	;	 - And, all in 256 bytes!&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		LET ADDR_Start 		= &amp;amp;400&lt;br /&gt;
		LET ADDR_TextMap		= ADDR_Start + 256&lt;br /&gt;
&lt;br /&gt;
		LET CONST_TotalRasterLines	= 269&lt;br /&gt;
&lt;br /&gt;
		LET VAR_BgrndColour		= ADDR_Start - 1&lt;br /&gt;
		LET VAR_FlipFlop		= VAR_BgrndColour - 1&lt;br /&gt;
		LET VAR_LineSkipMinus		= CONST_TotalRasterLines * -9&lt;br /&gt;
		LET VAR_LineSkipPlus		= CONST_TotalRasterLines * 9&lt;br /&gt;
&lt;br /&gt;
		VAR_XOR			equ 1 xor 0&lt;br /&gt;
&lt;br /&gt;
		run start&lt;br /&gt;
		org ADDR_Start&lt;br /&gt;
&lt;br /&gt;
start:	;---------	Generate a dummy interrupt handler ---------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,&amp;amp;c9fb&lt;br /&gt;
		ld	(&amp;amp;0038),hl&lt;br /&gt;
&lt;br /&gt;
	;---------	Set CRTC Registers -------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,CRTC_Data&lt;br /&gt;
loopCRTC:		ld	a,(hl)&lt;br /&gt;
		ld	b,&amp;amp;bc + 1&lt;br /&gt;
		outi&lt;br /&gt;
		ld	b,&amp;amp;bd + 1&lt;br /&gt;
		outi&lt;br /&gt;
		inc	a&lt;br /&gt;
		jr	nz,loopCRTC&lt;br /&gt;
&lt;br /&gt;
	;---------	Display text message -----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,ADDR_TextMap &lt;br /&gt;
		ld	de,Message&lt;br /&gt;
&lt;br /&gt;
loopText:		push	de&lt;br /&gt;
		push	hl&lt;br /&gt;
		ld	a,2&lt;br /&gt;
		call	&amp;amp;bc0e&lt;br /&gt;
		pop	hl&lt;br /&gt;
		pop	de&lt;br /&gt;
&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
		cp	255&lt;br /&gt;
		jr	z,loopExec&lt;br /&gt;
&lt;br /&gt;
		call	&amp;amp;bb5a&lt;br /&gt;
&lt;br /&gt;
		inc	de&lt;br /&gt;
		push	de&lt;br /&gt;
&lt;br /&gt;
	;---------	Grab pixels of displayed char --------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,&amp;amp;c000&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		ld	c,&amp;amp;40&lt;br /&gt;
outer:		ex	af,af'&lt;br /&gt;
		ld	iy,vangelis + 1&lt;br /&gt;
		ld	(iy),%10000000&lt;br /&gt;
		call	Proc_FlipFlop&lt;br /&gt;
inner:		call	Proc_FlipFlop&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,bitBckgrndA&lt;br /&gt;
		ld	a,&amp;amp;55&lt;br /&gt;
		jr	bitBckgrndB&lt;br /&gt;
bitBckgrndA:	ld	a,&amp;amp;57&lt;br /&gt;
bitBckgrndB:	ld	(VAR_BgrndColour),a&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
vangelis:		and	0&lt;br /&gt;
		jr	z,blit&lt;br /&gt;
		ld	a,c&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
blit:		push	hl&lt;br /&gt;
		push	de&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	de,9&lt;br /&gt;
		ld	b,26&lt;br /&gt;
blitText:		add	hl,de&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,blitBckgrnd&lt;br /&gt;
		ld	(hl),c&lt;br /&gt;
		inc	c&lt;br /&gt;
		jr	blitSkip&lt;br /&gt;
&lt;br /&gt;
blitBckgrnd:	push	af&lt;br /&gt;
		ld	a,(VAR_BgrndColour)&lt;br /&gt;
		ld	(hl),a&lt;br /&gt;
		pop	af&lt;br /&gt;
&lt;br /&gt;
blitSkip:		djnz	blitText&lt;br /&gt;
		pop	bc&lt;br /&gt;
		pop	de&lt;br /&gt;
		pop	hl&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		rr	(iy)&lt;br /&gt;
		jr	nc,inner&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		add	a,d&lt;br /&gt;
		ld	d,a&lt;br /&gt;
&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	bc,25*9&lt;br /&gt;
		add	hl,bc&lt;br /&gt;
		pop	bc&lt;br /&gt;
&lt;br /&gt;
		ex	af,af'&lt;br /&gt;
		dec	a&lt;br /&gt;
		jr	nz,outer&lt;br /&gt;
&lt;br /&gt;
		pop	de&lt;br /&gt;
		jr	loopText&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - INITIALIZE!&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopExec:		ld	hl,ADDR_TextMap + VAR_LineSkipPlus&lt;br /&gt;
&lt;br /&gt;
					; Checking VBlanking only for once!&lt;br /&gt;
					; Rest of the code will be manually synced&lt;br /&gt;
					; via precise t-state calculations.&lt;br /&gt;
		ld	b,&amp;amp;f5&lt;br /&gt;
waitVBlanking:	in	a,(c)&lt;br /&gt;
		rra&lt;br /&gt;
		jr	nc,waitVBlanking&lt;br /&gt;
&lt;br /&gt;
		halt&lt;br /&gt;
		di&lt;br /&gt;
&lt;br /&gt;
	;---------	X-Pos Alignment ----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time! =&amp;gt; 7 cycles&lt;br /&gt;
					; Aligns perfect on WinApe.&lt;br /&gt;
&lt;br /&gt;
					; If you need precise&lt;br /&gt;
					; alignment on an original Amstrad,&lt;br /&gt;
					; you need to comment out this line&lt;br /&gt;
					; OR replace it with a NOP!&lt;br /&gt;
&lt;br /&gt;
					; No worries, intro size will not&lt;br /&gt;
					; exceed 256 bytes either way ;-)&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - BEGIN&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopBegin:		ld	de,VAR_LineSkipMinus + 9&lt;br /&gt;
		add	hl,de&lt;br /&gt;
&lt;br /&gt;
	;---------	Wait for perfect sync! ---------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	b,203		; waste time!&lt;br /&gt;
waste1:		nop			; waste time!&lt;br /&gt;
		add	ix,ix		; waste time!&lt;br /&gt;
		djnz	waste1		; waste time!&lt;br /&gt;
&lt;br /&gt;
	;---------	Start CRTC code ----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,CONST_TotalRasterLines&lt;br /&gt;
		ld	bc,&amp;amp;7f00&lt;br /&gt;
		out	(c),c&lt;br /&gt;
&lt;br /&gt;
crash:		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time!&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
&lt;br /&gt;
		dec	de&lt;br /&gt;
		ld	a,d&lt;br /&gt;
		or	e&lt;br /&gt;
		jr	nz,crash&lt;br /&gt;
&lt;br /&gt;
	;---------	Raster colour = Black ----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,&amp;amp;54&lt;br /&gt;
		out	(c),a&lt;br /&gt;
&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
		ld	b,(hl)		; waste time!&lt;br /&gt;
		ld	b,224		; waste time!&lt;br /&gt;
waste2:		djnz	waste2		; waste time!&lt;br /&gt;
&lt;br /&gt;
loopEnd:		jr	loopBegin&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - END&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	;---------	Procedure for Flip/Flop --------------------------------------&lt;br /&gt;
&lt;br /&gt;
Proc_FlipFlop:	ld	a,(VAR_FlipFlop)&lt;br /&gt;
		xor	VAR_XOR&lt;br /&gt;
		ld	(VAR_FlipFlop),a&lt;br /&gt;
		ret&lt;br /&gt;
&lt;br /&gt;
	;---------	CRTC Data ----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
CRTC_Data:		db	1,54		; set display width&lt;br /&gt;
		db	2,50		; set horizontal sync&lt;br /&gt;
		db	6,34		; set display height&lt;br /&gt;
		db	7,35		; set vertical sync&lt;br /&gt;
		db	255		; =&amp;gt; EXIT LOOP&lt;br /&gt;
&lt;br /&gt;
Message:		db	'  WELCOME TO 7DX2011 ',255&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71878</id>
		<title>256 byte Overscan MEGATEXT Intro - (features 50Hz fullscreen scroll)</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71878"/>
				<updated>2011-12-30T10:48:56Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
	;	256 byte Overscan MegaText Intro v1.1b&lt;br /&gt;
	;	(7DX Demo Party 2011 Release)&lt;br /&gt;
	;&lt;br /&gt;
	;	for Amstrad 464/664/6128 computers&lt;br /&gt;
	;&lt;br /&gt;
	;	by matahari - (Dec 24, 2011)&lt;br /&gt;
	;&lt;br /&gt;
	;	Featuring;&lt;br /&gt;
	;	 - Greetings message via 50Hz CRTC hardware scroll&lt;br /&gt;
	;	 - 100% overscan (full) screen size&lt;br /&gt;
	;	 - Complete Amstrad palette (27 colours) on screen at once&lt;br /&gt;
	;	 - And, all in 256 bytes!&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		LET ADDR_Start 		= &amp;amp;400&lt;br /&gt;
		LET ADDR_TextMap		= ADDR_Start + 256&lt;br /&gt;
&lt;br /&gt;
		LET CONST_TotalRasterLines	= 269&lt;br /&gt;
&lt;br /&gt;
		LET VAR_BgrndColour		= ADDR_Start - 1&lt;br /&gt;
		LET VAR_FlipFlop		= VAR_BgrndColour - 1&lt;br /&gt;
		LET VAR_LineSkipMinus		= CONST_TotalRasterLines * -9&lt;br /&gt;
		LET VAR_LineSkipPlus		= CONST_TotalRasterLines * 9&lt;br /&gt;
&lt;br /&gt;
		VAR_XOR			equ 1 xor 0&lt;br /&gt;
&lt;br /&gt;
		run start&lt;br /&gt;
		org ADDR_Start&lt;br /&gt;
&lt;br /&gt;
start:	;---------	Generate a dummy interrupt handler ---------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,&amp;amp;c9fb&lt;br /&gt;
		ld	(&amp;amp;0038),hl&lt;br /&gt;
&lt;br /&gt;
	;---------	Set CRTC Registers -------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,CRTC_Data&lt;br /&gt;
loopCRTC:		ld	a,(hl)&lt;br /&gt;
		ld	b,&amp;amp;bc + 1&lt;br /&gt;
		outi&lt;br /&gt;
		ld	b,&amp;amp;bd + 1&lt;br /&gt;
		outi&lt;br /&gt;
		inc	a&lt;br /&gt;
		jr	nz,loopCRTC&lt;br /&gt;
&lt;br /&gt;
	;---------	Display text message -----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,ADDR_TextMap &lt;br /&gt;
		ld	de,Message&lt;br /&gt;
&lt;br /&gt;
loopText:		push	de&lt;br /&gt;
		push	hl&lt;br /&gt;
		ld	a,2&lt;br /&gt;
		call	&amp;amp;bc0e&lt;br /&gt;
		pop	hl&lt;br /&gt;
		pop	de&lt;br /&gt;
&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
		cp	255&lt;br /&gt;
		jr	z,loopExec&lt;br /&gt;
&lt;br /&gt;
		call	&amp;amp;bb5a&lt;br /&gt;
&lt;br /&gt;
		inc	de&lt;br /&gt;
		push	de&lt;br /&gt;
&lt;br /&gt;
	;---------	Grab pixels of displayed char --------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,&amp;amp;c000&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		ld	c,&amp;amp;40&lt;br /&gt;
outer:		ex	af,af'&lt;br /&gt;
		ld	iy,vangelis + 1&lt;br /&gt;
		ld	(iy),%10000000&lt;br /&gt;
		call	Proc_FlipFlop&lt;br /&gt;
inner:		call	Proc_FlipFlop&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,bitBckgrndA&lt;br /&gt;
		ld	a,&amp;amp;55&lt;br /&gt;
		jr	bitBckgrndB&lt;br /&gt;
bitBckgrndA:	ld	a,&amp;amp;57&lt;br /&gt;
bitBckgrndB:	ld	(VAR_BgrndColour),a&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
vangelis:		and	0&lt;br /&gt;
		jr	z,blit&lt;br /&gt;
		ld	a,c&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
blit:		push	hl&lt;br /&gt;
		push	de&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	de,9&lt;br /&gt;
		ld	b,26&lt;br /&gt;
blitText:		add	hl,de&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,blitBckgrnd&lt;br /&gt;
		ld	(hl),c&lt;br /&gt;
		inc	c&lt;br /&gt;
		jr	blitSkip&lt;br /&gt;
&lt;br /&gt;
blitBckgrnd:	push	af&lt;br /&gt;
		ld	a,(VAR_BgrndColour)&lt;br /&gt;
		ld	(hl),a&lt;br /&gt;
		pop	af&lt;br /&gt;
&lt;br /&gt;
blitSkip:		djnz	blitText&lt;br /&gt;
		pop	bc&lt;br /&gt;
		pop	de&lt;br /&gt;
		pop	hl&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		rr	(iy)&lt;br /&gt;
		jr	nc,inner&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		add	a,d&lt;br /&gt;
		ld	d,a&lt;br /&gt;
&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	bc,25*9&lt;br /&gt;
		add	hl,bc&lt;br /&gt;
		pop	bc&lt;br /&gt;
&lt;br /&gt;
		ex	af,af'&lt;br /&gt;
		dec	a&lt;br /&gt;
		jr	nz,outer&lt;br /&gt;
&lt;br /&gt;
		pop	de&lt;br /&gt;
		jr	loopText&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - INITIALIZE!&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopExec:		ld	hl,ADDR_TextMap + VAR_LineSkipPlus&lt;br /&gt;
&lt;br /&gt;
					; Checking VBlanking only for once!&lt;br /&gt;
					; Rest of the code will be manually synced&lt;br /&gt;
					; via precise t-state calculations.&lt;br /&gt;
		ld	b,&amp;amp;f5&lt;br /&gt;
waitVBlanking:	in	a,(c)&lt;br /&gt;
		rra&lt;br /&gt;
		jr	nc,waitVBlanking&lt;br /&gt;
&lt;br /&gt;
		halt&lt;br /&gt;
		di&lt;br /&gt;
&lt;br /&gt;
	;---------	X-Pos Alignment ----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time! =&amp;gt; 7 cycles&lt;br /&gt;
					; Aligns perfect on WinApe.&lt;br /&gt;
&lt;br /&gt;
					; If you need precise&lt;br /&gt;
					; alignment on an original Amstrad,&lt;br /&gt;
					; you need to comment out this line&lt;br /&gt;
					; OR replace it with a NOP!&lt;br /&gt;
&lt;br /&gt;
					; No worries, intro size will not&lt;br /&gt;
					; exceed 256 bytes either way ;-)&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - BEGIN&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopBegin:		ld	de,VAR_LineSkipMinus + 9&lt;br /&gt;
		add	hl,de&lt;br /&gt;
&lt;br /&gt;
	;---------	Wait for perfect sync! ---------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	b,203		; waste time!&lt;br /&gt;
waste1:		nop			; waste time!&lt;br /&gt;
		add	ix,ix		; waste time!&lt;br /&gt;
		djnz	waste1		; waste time!&lt;br /&gt;
&lt;br /&gt;
	;---------	Start CRTC code ----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,CONST_TotalRasterLines&lt;br /&gt;
		ld	bc,&amp;amp;7f00&lt;br /&gt;
		out	(c),c&lt;br /&gt;
&lt;br /&gt;
crash:		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time!&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
&lt;br /&gt;
		dec	de&lt;br /&gt;
		ld	a,d&lt;br /&gt;
		or	e&lt;br /&gt;
		jr	nz,crash&lt;br /&gt;
&lt;br /&gt;
	;---------	Raster colour = Black ----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,&amp;amp;54&lt;br /&gt;
		out	(c),a&lt;br /&gt;
&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
		ld	b,(hl)		; waste time!&lt;br /&gt;
		ld	b,224		; waste time!&lt;br /&gt;
waste2:		djnz	waste2		; waste time!&lt;br /&gt;
&lt;br /&gt;
loopEnd:		jr	loopBegin&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - END&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	;---------	Procedure for Flip/Flop --------------------------------------&lt;br /&gt;
&lt;br /&gt;
Proc_FlipFlop:	ld	a,(VAR_FlipFlop)&lt;br /&gt;
		xor	VAR_XOR&lt;br /&gt;
		ld	(VAR_FlipFlop),a&lt;br /&gt;
		ret&lt;br /&gt;
&lt;br /&gt;
	;---------	CRTC Data ----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
CRTC_Data:		db	1,54		; set display width&lt;br /&gt;
		db	2,50		; set horizontal sync&lt;br /&gt;
		db	6,34		; set display height&lt;br /&gt;
		db	7,35		; set vertical sync&lt;br /&gt;
		db	255		; =&amp;gt; EXIT LOOP&lt;br /&gt;
&lt;br /&gt;
Message:		db	'  WELCOME TO 7DX2011 ',255&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71877</id>
		<title>256 byte Overscan MEGATEXT Intro - (features 50Hz fullscreen scroll)</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=256_byte_Overscan_MEGATEXT_Intro_-_(features_50Hz_fullscreen_scroll)&amp;diff=71877"/>
				<updated>2011-12-30T10:26:28Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: Created page with &amp;quot;&amp;lt;pre&amp;gt; 	;--------------------------------------------------------------------- 	;	256 byte Overscan MegaText Intro v1.1b 	;	(7DX Demo Party 2011 Release) 	; 	;	for Amstrad 464/664...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
	;	256 byte Overscan MegaText Intro v1.1b&lt;br /&gt;
	;	(7DX Demo Party 2011 Release)&lt;br /&gt;
	;&lt;br /&gt;
	;	for Amstrad 464/664/6128 computers&lt;br /&gt;
	;&lt;br /&gt;
	;	by matahari - (Dec 24, 2011)&lt;br /&gt;
	;&lt;br /&gt;
	;	Featuring;&lt;br /&gt;
	;	 - Greetings message via 50Hz CRTC hardware scroll&lt;br /&gt;
	;	 - 100% overscan (full) screen size&lt;br /&gt;
	;	 - Complete Amstrad palette (27 colours) on screen at once&lt;br /&gt;
	;	 - And, all in 256 bytes!&lt;br /&gt;
	;---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		LET ADDR_Start 		= &amp;amp;400&lt;br /&gt;
		LET ADDR_TextMap		= ADDR_Start + 256&lt;br /&gt;
&lt;br /&gt;
		LET CONST_TotalRasterLines	= 269&lt;br /&gt;
&lt;br /&gt;
		LET VAR_BgrndColour		= ADDR_Start - 1&lt;br /&gt;
		LET VAR_FlipFlop		= VAR_BgrndColour - 1&lt;br /&gt;
		LET VAR_LineSkipMinus		= CONST_TotalRasterLines * -9&lt;br /&gt;
		LET VAR_LineSkipPlus		= CONST_TotalRasterLines * 9&lt;br /&gt;
&lt;br /&gt;
		VAR_XOR			equ 1 xor 0&lt;br /&gt;
&lt;br /&gt;
		run start&lt;br /&gt;
		org ADDR_Start&lt;br /&gt;
&lt;br /&gt;
start:	;---------	Generate a dummy interrupt handler ---------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,&amp;amp;c9fb&lt;br /&gt;
		ld	(&amp;amp;0038),hl&lt;br /&gt;
&lt;br /&gt;
	;---------	Set CRTC Registers -------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,CRTC_Data&lt;br /&gt;
loopCRTC:		ld	a,(hl)&lt;br /&gt;
		ld	b,&amp;amp;bc + 1&lt;br /&gt;
		outi&lt;br /&gt;
		ld	b,&amp;amp;bd + 1&lt;br /&gt;
		outi&lt;br /&gt;
		inc	a&lt;br /&gt;
		jr	nz,loopCRTC&lt;br /&gt;
&lt;br /&gt;
	;---------	Display text message -----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	hl,ADDR_TextMap &lt;br /&gt;
		ld	de,Message&lt;br /&gt;
&lt;br /&gt;
loopText:		push	de&lt;br /&gt;
		push	hl&lt;br /&gt;
		ld	a,2&lt;br /&gt;
		call	&amp;amp;bc0e&lt;br /&gt;
		pop	hl&lt;br /&gt;
		pop	de&lt;br /&gt;
&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
		cp	255&lt;br /&gt;
		jr	z,loopExec&lt;br /&gt;
&lt;br /&gt;
		call	&amp;amp;bb5a&lt;br /&gt;
&lt;br /&gt;
		inc	de&lt;br /&gt;
		push	de&lt;br /&gt;
&lt;br /&gt;
	;---------	Grab pixels of displayed char --------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,&amp;amp;c000&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		ld	c,&amp;amp;40&lt;br /&gt;
outer:		ex	af,af'&lt;br /&gt;
		ld	iy,vangelis + 1&lt;br /&gt;
		ld	(iy),%10000000&lt;br /&gt;
		call	Proc_FlipFlop&lt;br /&gt;
inner:		call	Proc_FlipFlop&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,bitBckgrndA&lt;br /&gt;
		ld	a,&amp;amp;55&lt;br /&gt;
		jr	bitBckgrndB&lt;br /&gt;
bitBckgrndA:	ld	a,&amp;amp;57&lt;br /&gt;
bitBckgrndB:	ld	(VAR_BgrndColour),a&lt;br /&gt;
		ld	a,(de)&lt;br /&gt;
vangelis:		and	0&lt;br /&gt;
		jr	z,blit&lt;br /&gt;
		ld	a,c&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
blit:		push	hl&lt;br /&gt;
		push	de&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	de,9&lt;br /&gt;
		ld	b,26&lt;br /&gt;
blitText:		add	hl,de&lt;br /&gt;
		or	a&lt;br /&gt;
		jr	z,blitBckgrnd&lt;br /&gt;
		ld	(hl),c&lt;br /&gt;
		inc	c&lt;br /&gt;
		jr	blitSkip&lt;br /&gt;
&lt;br /&gt;
blitBckgrnd:	push	af&lt;br /&gt;
		ld	a,(VAR_BgrndColour)&lt;br /&gt;
		ld	(hl),a&lt;br /&gt;
		pop	af&lt;br /&gt;
&lt;br /&gt;
blitSkip:		djnz	blitText&lt;br /&gt;
		pop	bc&lt;br /&gt;
		pop	de&lt;br /&gt;
		pop	hl&lt;br /&gt;
&lt;br /&gt;
		;*********************************&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		rr	(iy)&lt;br /&gt;
		jr	nc,inner&lt;br /&gt;
&lt;br /&gt;
		inc	hl&lt;br /&gt;
		&lt;br /&gt;
		ld	a,8&lt;br /&gt;
		add	a,d&lt;br /&gt;
		ld	d,a&lt;br /&gt;
&lt;br /&gt;
		push	bc&lt;br /&gt;
		ld	bc,25*9&lt;br /&gt;
		add	hl,bc&lt;br /&gt;
		pop	bc&lt;br /&gt;
&lt;br /&gt;
		ex	af,af'&lt;br /&gt;
		dec	a&lt;br /&gt;
		jr	nz,outer&lt;br /&gt;
&lt;br /&gt;
		pop	de&lt;br /&gt;
		jr	loopText&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - INITIALIZE!&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopExec:		ld	hl,ADDR_TextMap + VAR_LineSkipPlus&lt;br /&gt;
&lt;br /&gt;
					; Checking VBlanking only for once!&lt;br /&gt;
					; Rest of the code will be manually synced&lt;br /&gt;
					; via precise t-state calculations.&lt;br /&gt;
		ld	b,&amp;amp;f5&lt;br /&gt;
waitVBlanking:	in	a,(c)&lt;br /&gt;
		rra&lt;br /&gt;
		jr	nc,waitVBlanking&lt;br /&gt;
&lt;br /&gt;
		halt&lt;br /&gt;
		di&lt;br /&gt;
&lt;br /&gt;
	;---------	X-Pos Alignment ----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time! =&amp;gt; 7 cycles&lt;br /&gt;
					; Aligns perfect on WinApe.&lt;br /&gt;
&lt;br /&gt;
					; If you need precise&lt;br /&gt;
					; alignment on an original Amstrad,&lt;br /&gt;
					; you need to comment out this line&lt;br /&gt;
					; OR replace it with a NOP!&lt;br /&gt;
&lt;br /&gt;
					; No worries, intro size will not&lt;br /&gt;
					; exceed 256 bytes either way ;-)&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - BEGIN&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
loopBegin:		ld	de,VAR_LineSkipMinus + 9&lt;br /&gt;
		add	hl,de&lt;br /&gt;
&lt;br /&gt;
	;---------	Wait for perfect sync! ---------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	b,203		; waste time!&lt;br /&gt;
waste1:		nop			; waste time!&lt;br /&gt;
		add	ix,ix		; waste time!&lt;br /&gt;
		djnz	waste1		; waste time!&lt;br /&gt;
&lt;br /&gt;
	;---------	Start CRTC code ----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	de,CONST_TotalRasterLines&lt;br /&gt;
		ld	bc,&amp;amp;7f00&lt;br /&gt;
		out	(c),c&lt;br /&gt;
&lt;br /&gt;
crash:		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
		outi&lt;br /&gt;
		inc	b&lt;br /&gt;
&lt;br /&gt;
		ld	a,(hl)		; waste time!&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
&lt;br /&gt;
		dec	de&lt;br /&gt;
		ld	a,d&lt;br /&gt;
		or	e&lt;br /&gt;
		jr	nz,crash&lt;br /&gt;
&lt;br /&gt;
	;---------	Raster colour = Black ----------------------------------------&lt;br /&gt;
&lt;br /&gt;
		ld	a,&amp;amp;54&lt;br /&gt;
		out	(c),a&lt;br /&gt;
&lt;br /&gt;
		nop			; waste time!&lt;br /&gt;
		ld	b,(hl)		; waste time!&lt;br /&gt;
		ld	b,224		; waste time!&lt;br /&gt;
waste2:		djnz	waste2		; waste time!&lt;br /&gt;
&lt;br /&gt;
loopEnd:		jr	loopBegin&lt;br /&gt;
&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
	;	MAIN LOOP - END&lt;br /&gt;
	;*********************************************************************&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	;---------	Procedure for Flip/Flop --------------------------------------&lt;br /&gt;
&lt;br /&gt;
Proc_FlipFlop:	ld	a,(VAR_FlipFlop)&lt;br /&gt;
		xor	VAR_XOR&lt;br /&gt;
		ld	(VAR_FlipFlop),a&lt;br /&gt;
		ret&lt;br /&gt;
&lt;br /&gt;
	;---------	CRTC Data ----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
CRTC_Data:	db	1,54			; set display width&lt;br /&gt;
		db	2,50		; set horizontal sync&lt;br /&gt;
		db	6,34		; set display height&lt;br /&gt;
		db	7,35		; set vertical sync&lt;br /&gt;
		db	255		; =&amp;gt; EXIT LOOP&lt;br /&gt;
&lt;br /&gt;
Message:	db	'  WELCOME TO 7DX2011 ',255&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Source_Codes&amp;diff=71876</id>
		<title>Source Codes</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Source_Codes&amp;diff=71876"/>
				<updated>2011-12-30T09:53:25Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: /* Graphics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Programming]]&lt;br /&gt;
''This article contains source codes and programming examples. You may also have a look at''&lt;br /&gt;
* [[Programming software]]&lt;br /&gt;
* [[BIOS Functions]]&lt;br /&gt;
* [[Technical documentation]]s&lt;br /&gt;
* [[Locomotive BASIC]]&lt;br /&gt;
* [[Type Ins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assembler ==&lt;br /&gt;
*[[Z80_-_undocumented_opcodes|Z80 - undocumented opcodes]]&lt;br /&gt;
*[[Where to learn?]]&lt;br /&gt;
&lt;br /&gt;
== Algorithms ==&lt;br /&gt;
*[[Programming:Bubble sort|Bubble sort]]&lt;br /&gt;
*[[Programming:CPC OS floating point routines|CPC OS floating point routines]]&lt;br /&gt;
*[[Programming:CRC16|CRC16]]&lt;br /&gt;
*[[Programming:CRC32|CRC32]]&lt;br /&gt;
*[[Programming:Integer Division|Integer Division]]&lt;br /&gt;
*[[Programming:Integer Multiplication|Integer Multiplication]]&lt;br /&gt;
*[[Programming:Logarithm|Logarithm]]&lt;br /&gt;
*[[Programming:Ultrafast Multiplication|Ultrafast Multiplication]] by [[Prodatron]]&lt;br /&gt;
*[[Programming:Fast Square Root|Fast Square Root]]&lt;br /&gt;
*[[Programming:Fast 16 bit Square Root|Fast 16 bit Square Root]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Filling memory with a byte|Filling memory with a byte]]&lt;br /&gt;
*[[Programming:Square Root|Square Root]]&lt;br /&gt;
*[[Programming:Precalculated square|Precalculated square]]&lt;br /&gt;
*[[Programming:Random Number Generator|Random Number Generator]]&lt;br /&gt;
*[[Programming:Reverse A|Reverse A]]&lt;br /&gt;
*[[Programming:Quicksort|Quicksort]]&lt;br /&gt;
*[[Programming:Sin/Cos calculation|Sin/Cos calculation]]&lt;br /&gt;
&lt;br /&gt;
== CP/M ==&lt;br /&gt;
*[[Programming:A simple 'Hello World' program for CP/M using BDOS|A simple 'Hello World' program for CP/M using BDOS]]&lt;br /&gt;
*[[Programming:A simple 'Hello World' program for CP/M using BIOS|A simple 'Hello World' program for CP/M using BIOS]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1|Executing firmware functions from within CP/M 2.1]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1 or CP/M plus|Executing firmware functions from within CP/M 2.1 or CP/M plus]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1|Executing firmware functions from within CP/M 2.1]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M plus|Executing firmware functions from within CP/M plus]]&lt;br /&gt;
&lt;br /&gt;
== CPC Plus ==&lt;br /&gt;
*[[Amstrad CPC plus sprite format]]&lt;br /&gt;
*[[Programming:Convert CPC sprites to Plus hardware sprites|Convert CPC sprites to Plus hardware sprites]]&lt;br /&gt;
*[[Sprites Multiplexing]]&lt;br /&gt;
*[[Programming:CPC Plus Hardware Sprites|Hardware sprites]]&lt;br /&gt;
*[[Programming:CPC Plus Horizontal scroll|Horizontal scroll]]&lt;br /&gt;
*[[Programming:CPC Plus RLE Hardware Sprites|RLE hardware sprites]]&lt;br /&gt;
*[[Programming:CPC Plus Screen Splitting|Screen splitting]]&lt;br /&gt;
*[[Programming:CPC Plus Vertical scroll|Vertical scroll]]&lt;br /&gt;
*[[Operation of Z80 interrupt mode 0 in the CPC plus design]]&lt;br /&gt;
*[[Programming:Simple Raster Example 2 (uses CPC plus features)|Simple Raster Example 1 (uses CPC plus features)]]&lt;br /&gt;
*[[Programming:Simple Raster Example 3 (uses CPC plus features)|Simple Raster Example 2 (uses CPC plus features)]]&lt;br /&gt;
*[[Programming:Unlocking ASIC|Unlocking ASIC]]&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
*[[Programming:CPC Booster|CPC Booster]]&lt;br /&gt;
*[[Programming:Digiblaster|Digiblaster]]&lt;br /&gt;
*[[Programming:Program to save the ROM of the Multiface 2|Program to save the ROM of the Multiface 2]]&lt;br /&gt;
*[[Programming:SYMBiFACE II|SYMBiFACE II]]&lt;br /&gt;
&lt;br /&gt;
== File access ==&lt;br /&gt;
*[[Programming:An example to read a file byte-by-byte|An example to read a file byte-by-byte]]&lt;br /&gt;
*[[Programming:An example to write a file byte-by-byte|An example to write a file byte-by-byte]]&lt;br /&gt;
*[[Programming:A simple file copier using firmware functions (copies byte-by-byte)|A simple file copier using firmware functions (copies byte-by-byte)]]&lt;br /&gt;
*[[Programming:Loading a file|Loading a file]]&lt;br /&gt;
*[[Programming:Saving a file|Saving a file]]&lt;br /&gt;
*[[Programming:Unlocking a protected basic file|Unlocking a protected basic file]]&lt;br /&gt;
*[[Programming:Undo delete of file|Undo delete of file]]&lt;br /&gt;
&lt;br /&gt;
== Floppy disk ==&lt;br /&gt;
*[[Programming:A simple disc copier using BDOS functions|A simple disc copier using BDOS functions]]&lt;br /&gt;
*[[Programming:A simple disc formatter using BDOS functions|A simple disc formatter using BDOS functions]]&lt;br /&gt;
*[[Programming:An example loader|An example loader]]&lt;br /&gt;
*[[Programming:Catalog a disc and retrieve a directory|Catalog a disc and retrieve a directory]]&lt;br /&gt;
*[[Programming:Detecting an Amstrad or Vortex disc controler|Detecting an Amstrad or Vortex disc controler]]&lt;br /&gt;
*[[Programming:Formatting a track on a disc|Formatting a track on a disc]]&lt;br /&gt;
*[[Programming:Reading a sector from a disc|Reading a sector from a disc]]&lt;br /&gt;
*[[Programming:Reading and writing the boot sector of a SYSTEM/VENDOR disc|Reading and writing the boot sector of a SYSTEM/VENDOR disc]]&lt;br /&gt;
*[[Programming:Writing a sector to disc|Writing a sector to disc]]&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
*[[Programming:Display a 8-bit number in binary|Display a 8-bit number in binary]]&lt;br /&gt;
*[[Programming:Display a 8-bit number in hex|Display a 8-bit number in hex]]&lt;br /&gt;
*[[Programming:Display a byte as a 3-digit decimal number|Display a byte as a 3-digit decimal number]]&lt;br /&gt;
*[[Programming:Display and update Scores|Display and update Scores]]&lt;br /&gt;
*[[Programming:Distorting the screen using register 2 of the CRTC (Horizontal Sync Position)|Distorting the screen using register 2 of the CRTC (Horizontal Sync Position)]]&lt;br /&gt;
*[[Programming:Fast plot|Fast plot]]&lt;br /&gt;
*[[Programming:Fast Sprites|Fast Sprites]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Fast Textoutput|Fast Textoutput]] by [[Prodatron]]&lt;br /&gt;
*[[Programming:Hardware scrolling|Hardware Scrolling]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Hardware scrolling 2|Hardware Scrolling 2]]&lt;br /&gt;
*[[Programming:Hardware scrolling the screen horizontally byte-by-byte using the CRTC|Hardware scrolling the screen horizontally byte-by-byte using the CRTC]]&lt;br /&gt;
*[[Programming:Hardware scrolling the screen using the CRTC|Hardware scrolling the screen using the CRTC]]&lt;br /&gt;
*[[Programming:Next / previous line calculation|Next / previous line calculation]]&lt;br /&gt;
*[[Programming:Overscan|Overscan]]&lt;br /&gt;
*[[Programming:Plotting a sprite using character matrices|Plotting a sprite using character matrices]]&lt;br /&gt;
*[[Programming:Simple Raster Example 1|Simple Raster Example]]&lt;br /&gt;
*[[Programming:Simple Split Raster Example 1|Simple Split Raster Example]]&lt;br /&gt;
*[[Synchronising with the CRTC and display]]&lt;br /&gt;
*[[CRTC change colour (fill) test with precise timing]] by [[User:Matahari|Matahari]]&lt;br /&gt;
*[[256 byte Overscan MEGATEXT Intro - (features 50Hz fullscreen scroll)]] by [[User:Matahari|Matahari]]&lt;br /&gt;
&lt;br /&gt;
== Interrupts ==&lt;br /&gt;
* [[Reliable use of interrupt mode 2 on the CPC]]&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
*[[Programming:Keyboard scanning|Keyboard scanning]]&lt;br /&gt;
&lt;br /&gt;
== Other routines ==&lt;br /&gt;
*[[Programming:An example boot sector (executed with rsx command CPM)|An example boot sector (executed with rsx command CPM)]]&lt;br /&gt;
*[[Programming:An example to define a RSX|An example to define a RSX]]&lt;br /&gt;
*[[Programming:Calling a RSX from outside of BASIC|Calling a RSX from outside of BASIC]]&lt;br /&gt;
*[[Programming:Dumping the data of BASIC or AMSDOS or an expansion rom|Dumping the data of BASIC or AMSDOS or an expansion rom]]&lt;br /&gt;
*[[Programming:Dumping the data of the lower rom|Dumping the data of the lower rom]]&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
*[[How to access the PSG via PPI]]&lt;br /&gt;
*[[Programming:Tutorial - Understanding the fundamentals of BASIC SOUND and the Firmware SOUND QUEUE|Tutorial - Understanding the fundamentals of BASIC SOUND and the Firmware SOUND QUEUE]]&lt;br /&gt;
*[[Programming:Source code to show 0x0ff is always returned when reading PSG port B|Source code to show 0x0ff is always returned when reading PSG port B]]&lt;br /&gt;
*[[Programming:Source code to show it is possible to store data in PSG register 14 and 15 (port A and port B)|Source code to show it is possible to store data in PSG register 14 and 15 (port A and port B)]]&lt;br /&gt;
*[[Programming:Source code to show it is possible to store data in PSG register 14 and 15 even if the port has been set to input|Source code to show it is possible to store data in PSG register 14 and 15 even if the port has been set to input]]&lt;br /&gt;
*[[Programming:Source code to show that some registers always return 0 in some bits|Source code to show that some registers always return 0 in some bits]]&lt;br /&gt;
*[[Programming:Source code to show that when a port is read in output mode; the data read will be ANDed with the inputs to that port|Source code to show that when a port is read in output mode; the data read will be ANDed with the inputs to that port]]&lt;br /&gt;
&lt;br /&gt;
== Cross Development ==&lt;br /&gt;
*[[Programming:Cross Development|Cross Development]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Source code]]&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67071</id>
		<title>CRTC change colour (fill) test with precise timing</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67071"/>
				<updated>2011-03-28T14:24:41Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;;-------------------------------------------------------&lt;br /&gt;
; CRTC change colour (fill) test&lt;br /&gt;
; with precise timing!&lt;br /&gt;
;&lt;br /&gt;
; by matahari - (March 27, 2011)&lt;br /&gt;
;&lt;br /&gt;
; NOTE - Watch the &amp;quot;precisely shifted&amp;quot; raster line!&lt;br /&gt;
;        And, use it wisely to make some filled vectors &lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;amp;3000&lt;br /&gt;
run &amp;amp;amp;3000&lt;br /&gt;
&lt;br /&gt;
;------ Switch to Mode 1 -------------------------------&lt;br /&gt;
&lt;br /&gt;
ld a,1&lt;br /&gt;
call &amp;amp;amp;bc0e&lt;br /&gt;
&lt;br /&gt;
;------ Set an interrupt that makes nothing! -----------&lt;br /&gt;
&lt;br /&gt;
di&lt;br /&gt;
im 1&lt;br /&gt;
ld hl,&amp;amp;amp;c9fb&lt;br /&gt;
ld (&amp;amp;amp;38),hl&lt;br /&gt;
ei&lt;br /&gt;
&lt;br /&gt;
;====== Here comes the MAIN LOOP =======================&lt;br /&gt;
&lt;br /&gt;
Loop:&lt;br /&gt;
&lt;br /&gt;
;------ Wait for vertical blanking sync ----------------&lt;br /&gt;
&lt;br /&gt;
ld b,&amp;amp;amp;f5&lt;br /&gt;
WaitVB: in a,(c)&lt;br /&gt;
rra&lt;br /&gt;
jr nc,WaitVB&lt;br /&gt;
&lt;br /&gt;
halt&lt;br /&gt;
halt&lt;br /&gt;
&lt;br /&gt;
;------ Set the colours --------------------------------&lt;br /&gt;
&lt;br /&gt;
ld bc,&amp;amp;amp;7f00&lt;br /&gt;
out (c),c&lt;br /&gt;
&lt;br /&gt;
ld h,&amp;amp;amp;51&lt;br /&gt;
ld l,&amp;amp;amp;48&lt;br /&gt;
ld d,&amp;amp;amp;43&lt;br /&gt;
ld e,&amp;amp;amp;4d&lt;br /&gt;
ld a,&amp;amp;amp;44&lt;br /&gt;
&lt;br /&gt;
defs 1128&lt;br /&gt;
&lt;br /&gt;
;------ Here comes copper (sorry, CRTC) list! ----------&lt;br /&gt;
&lt;br /&gt;
REPEAT 4&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24+1&amp;amp;nbsp;; Yes, we're adding 1 more NOP&lt;br /&gt;
	 &amp;amp;nbsp;; to achieve 8 pixel precision shift&lt;br /&gt;
	 &amp;amp;nbsp;; during next scan&amp;amp;nbsp;!!!&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24-1&amp;amp;nbsp;; Fixing previous addition!&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
REPEAT 5&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),a&amp;amp;nbsp;; Blue space&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
jp loop&lt;br /&gt;
&lt;br /&gt;
;====== End of MAIN LOOP ===============================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67070</id>
		<title>CRTC change colour (fill) test with precise timing</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67070"/>
				<updated>2011-03-28T14:20:55Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;;-------------------------------------------------------&lt;br /&gt;
; CRTC change colour (fill) test&lt;br /&gt;
; with precise timing!&lt;br /&gt;
;&lt;br /&gt;
; by matahari - (March 27, 2011)&lt;br /&gt;
;&lt;br /&gt;
; NOTE - Watch the &amp;quot;precisely shifted&amp;quot; raster line!&lt;br /&gt;
;        And, use it wisely to make some filled vectors &lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;amp;3000&lt;br /&gt;
run &amp;amp;amp;3000&lt;br /&gt;
&lt;br /&gt;
;------ Switch to Mode 1 -------------------------------&lt;br /&gt;
&lt;br /&gt;
ld a,1&lt;br /&gt;
call &amp;amp;amp;bc0e&lt;br /&gt;
&lt;br /&gt;
;------ Set an interrupt that makes nothing! -----------&lt;br /&gt;
&lt;br /&gt;
di&lt;br /&gt;
im 1&lt;br /&gt;
ld hl,&amp;amp;amp;c9fb&lt;br /&gt;
ld (&amp;amp;amp;38),hl&lt;br /&gt;
ei&lt;br /&gt;
&lt;br /&gt;
;====== Here comes the MAIN LOOP =======================&lt;br /&gt;
&lt;br /&gt;
Loop:&lt;br /&gt;
&lt;br /&gt;
;------ Wait for vertical blanking sync ----------------&lt;br /&gt;
&lt;br /&gt;
ld b,&amp;amp;amp;f5&lt;br /&gt;
WaitVB: in a,(c)&lt;br /&gt;
rra&lt;br /&gt;
jr nc,WaitVB&lt;br /&gt;
&lt;br /&gt;
halt&lt;br /&gt;
halt&lt;br /&gt;
&lt;br /&gt;
;------ Set the colours --------------------------------&lt;br /&gt;
&lt;br /&gt;
ld bc,&amp;amp;amp;7f00&lt;br /&gt;
out (c),c&lt;br /&gt;
&lt;br /&gt;
ld h,&amp;amp;amp;51&lt;br /&gt;
ld l,&amp;amp;amp;48&lt;br /&gt;
ld d,&amp;amp;amp;43&lt;br /&gt;
ld e,&amp;amp;amp;4d&lt;br /&gt;
ld a,&amp;amp;amp;44&lt;br /&gt;
&lt;br /&gt;
defs 1128&lt;br /&gt;
&lt;br /&gt;
;------ Here comes copper (sorry, CRTC) list! ----------&lt;br /&gt;
&lt;br /&gt;
REPEAT 4&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24+1&amp;amp;nbsp;; Yes, we're using 1 NOP more&lt;br /&gt;
	 &amp;amp;nbsp;; to achieve 8 pixel precision shift&lt;br /&gt;
	 &amp;amp;nbsp;; during next scan&amp;amp;nbsp;!!!&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24-1&amp;amp;nbsp;; Fixing previous subtraction!&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
REPEAT 5&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),a&amp;amp;nbsp;; Blue space&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
jp loop&lt;br /&gt;
&lt;br /&gt;
;====== End of MAIN LOOP ===============================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67069</id>
		<title>CRTC change colour (fill) test with precise timing</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67069"/>
				<updated>2011-03-28T14:15:01Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;;-------------------------------------------------------&lt;br /&gt;
; CRTC change colour (fill) test&lt;br /&gt;
; with precise timing!&lt;br /&gt;
;&lt;br /&gt;
; by matahari - (March 27, 2011)&lt;br /&gt;
;&lt;br /&gt;
; NOTE - Watch the &amp;quot;precisely shifted&amp;quot; raster line!&lt;br /&gt;
;        And, use it wisely to make some filled vectors &lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;amp;3000&lt;br /&gt;
run &amp;amp;amp;3000&lt;br /&gt;
&lt;br /&gt;
;------ Switch to Mode 1 -------------------------------&lt;br /&gt;
&lt;br /&gt;
ld a,1&lt;br /&gt;
call &amp;amp;amp;bc0e&lt;br /&gt;
&lt;br /&gt;
;------ Set an interrupt that makes nothing! -----------&lt;br /&gt;
&lt;br /&gt;
di&lt;br /&gt;
im 1&lt;br /&gt;
ld hl,&amp;amp;amp;c9fb&lt;br /&gt;
ld (&amp;amp;amp;38),hl&lt;br /&gt;
ei&lt;br /&gt;
&lt;br /&gt;
;====== Here comes the MAIN LOOP =======================&lt;br /&gt;
&lt;br /&gt;
Loop:&lt;br /&gt;
&lt;br /&gt;
;------ Wait for vertical blanking sync ----------------&lt;br /&gt;
&lt;br /&gt;
ld b,&amp;amp;amp;f5&lt;br /&gt;
WaitVB: in a,(c)&lt;br /&gt;
rra&lt;br /&gt;
jr nc,WaitVB&lt;br /&gt;
&lt;br /&gt;
halt&lt;br /&gt;
halt&lt;br /&gt;
&lt;br /&gt;
;------ Set the colours --------------------------------&lt;br /&gt;
&lt;br /&gt;
ld bc,&amp;amp;amp;7f00&lt;br /&gt;
out (c),c&lt;br /&gt;
&lt;br /&gt;
ld h,&amp;amp;amp;51&lt;br /&gt;
ld l,&amp;amp;amp;48&lt;br /&gt;
ld d,&amp;amp;amp;43&lt;br /&gt;
ld e,&amp;amp;amp;4d&lt;br /&gt;
ld a,&amp;amp;amp;44&lt;br /&gt;
&lt;br /&gt;
defs 1128&lt;br /&gt;
&lt;br /&gt;
;------ Here comes copper (sorry, CRTC) list! ----------&lt;br /&gt;
&lt;br /&gt;
REPEAT 4&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 25-1&amp;amp;nbsp;; Yes, we're using 1 NOP less&lt;br /&gt;
	 &amp;amp;nbsp;; to achieve 8 pixel precision shift&lt;br /&gt;
	 &amp;amp;nbsp;; during next scan&amp;amp;nbsp;!!!&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 25&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 23&amp;amp;nbsp; &amp;amp;nbsp;; Fixing previous subtraction!&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
REPEAT 5&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),a&amp;amp;nbsp;; Blue space&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
jp loop&lt;br /&gt;
&lt;br /&gt;
;====== End of MAIN LOOP ===============================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67052</id>
		<title>CRTC change colour (fill) test with precise timing</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67052"/>
				<updated>2011-03-27T15:16:37Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;;-------------------------------------------------------&lt;br /&gt;
; CRTC change colour (fill) test&lt;br /&gt;
; with precise timing!&lt;br /&gt;
;&lt;br /&gt;
; by matahari - (March 27, 2011)&lt;br /&gt;
;&lt;br /&gt;
; NOTE - Watch the &amp;quot;precisely shifted&amp;quot; raster line!&lt;br /&gt;
;        And, use it wisely to make some filled vectors &lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;amp;3000&lt;br /&gt;
run &amp;amp;amp;3000&lt;br /&gt;
&lt;br /&gt;
;------ Switch to Mode 1 -------------------------------&lt;br /&gt;
&lt;br /&gt;
ld a,1&lt;br /&gt;
call &amp;amp;amp;bc0e&lt;br /&gt;
&lt;br /&gt;
;------ Set an interrupt that makes nothing! -----------&lt;br /&gt;
&lt;br /&gt;
di&lt;br /&gt;
im 1&lt;br /&gt;
ld hl,&amp;amp;amp;c9fb&lt;br /&gt;
ld (&amp;amp;amp;38),hl&lt;br /&gt;
&lt;br /&gt;
;====== Here comes the MAIN LOOP =======================&lt;br /&gt;
&lt;br /&gt;
Loop: ei&lt;br /&gt;
&lt;br /&gt;
;------ Wait for vertical blanking sync ----------------&lt;br /&gt;
&lt;br /&gt;
ld b,&amp;amp;amp;f5&lt;br /&gt;
WaitVB: in a,(c)&lt;br /&gt;
rra&lt;br /&gt;
jr nc,WaitVB&lt;br /&gt;
&lt;br /&gt;
halt&lt;br /&gt;
halt&lt;br /&gt;
di &lt;br /&gt;
&lt;br /&gt;
;------ Set the colours --------------------------------&lt;br /&gt;
&lt;br /&gt;
ld bc,&amp;amp;amp;7f00&lt;br /&gt;
out (c),c&lt;br /&gt;
&lt;br /&gt;
ld h,&amp;amp;amp;51&lt;br /&gt;
ld l,&amp;amp;amp;48&lt;br /&gt;
ld d,&amp;amp;amp;43&lt;br /&gt;
ld e,&amp;amp;amp;4d&lt;br /&gt;
ld a,&amp;amp;amp;44&lt;br /&gt;
&lt;br /&gt;
defs 1127&lt;br /&gt;
&lt;br /&gt;
;------ Here comes copper (sorry, CRTC) list! ----------&lt;br /&gt;
&lt;br /&gt;
REPEAT 4&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 25-1&amp;amp;nbsp;; Yes, we're using 1 NOP less&lt;br /&gt;
	 &amp;amp;nbsp;; to achieve 8 pixel precision shift&lt;br /&gt;
	 &amp;amp;nbsp;; during next scan&amp;amp;nbsp;!!!&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 25&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 23&amp;amp;nbsp; &amp;amp;nbsp;; Fixing previous subtraction!&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
REPEAT 5&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),a&amp;amp;nbsp;; Blue space&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
jp loop&lt;br /&gt;
&lt;br /&gt;
;====== End of MAIN LOOP ===============================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=User:Matahari&amp;diff=67051</id>
		<title>User:Matahari</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=User:Matahari&amp;diff=67051"/>
				<updated>2011-03-27T15:13:07Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: Created page with &amp;quot;aka Mert Börü&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;aka Mert Börü&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67050</id>
		<title>CRTC change colour (fill) test with precise timing</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=CRTC_change_colour_(fill)_test_with_precise_timing&amp;diff=67050"/>
				<updated>2011-03-27T15:11:26Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: Created page with &amp;quot;&amp;lt;pre&amp;gt;;------------------------------------------------------- ; CRTC change colour (fill) test ; with precise timing! ; ; by matahari - (March 27, 2011) ; ; NOTE: Watch the &amp;quot;prec...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;;-------------------------------------------------------&lt;br /&gt;
; CRTC change colour (fill) test&lt;br /&gt;
; with precise timing!&lt;br /&gt;
;&lt;br /&gt;
; by matahari - (March 27, 2011)&lt;br /&gt;
;&lt;br /&gt;
; NOTE: Watch the &amp;quot;precisely shifted&amp;quot; raster line!&lt;br /&gt;
;       And, use it wisely to make some filled vectors. &lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;amp;3000&lt;br /&gt;
run &amp;amp;amp;3000&lt;br /&gt;
&lt;br /&gt;
;------ Switch to Mode 1 -------------------------------&lt;br /&gt;
&lt;br /&gt;
ld a,1&lt;br /&gt;
call &amp;amp;amp;bc0e&lt;br /&gt;
&lt;br /&gt;
;------ Set an interrupt that makes nothing! -----------&lt;br /&gt;
&lt;br /&gt;
di&lt;br /&gt;
im 1&lt;br /&gt;
ld hl,&amp;amp;amp;c9fb&lt;br /&gt;
ld (&amp;amp;amp;38),hl&lt;br /&gt;
&lt;br /&gt;
;====== Here comes the MAIN LOOP =======================&lt;br /&gt;
&lt;br /&gt;
Loop: ei&lt;br /&gt;
&lt;br /&gt;
;------ Wait for vertical blanking sync ----------------&lt;br /&gt;
&lt;br /&gt;
ld b,&amp;amp;amp;f5&lt;br /&gt;
WaitVB: in a,(c)&lt;br /&gt;
rra&lt;br /&gt;
jr nc,WaitVB&lt;br /&gt;
&lt;br /&gt;
halt&lt;br /&gt;
halt&lt;br /&gt;
di &lt;br /&gt;
&lt;br /&gt;
;------ Set the colours --------------------------------&lt;br /&gt;
&lt;br /&gt;
ld bc,&amp;amp;amp;7f00&lt;br /&gt;
out (c),c&lt;br /&gt;
&lt;br /&gt;
ld h,&amp;amp;amp;51&lt;br /&gt;
ld l,&amp;amp;amp;48&lt;br /&gt;
ld d,&amp;amp;amp;43&lt;br /&gt;
ld e,&amp;amp;amp;4d&lt;br /&gt;
ld a,&amp;amp;amp;44&lt;br /&gt;
&lt;br /&gt;
defs 1127&lt;br /&gt;
&lt;br /&gt;
;------ Here comes copper (sorry, CRTC) list! ----------&lt;br /&gt;
&lt;br /&gt;
REPEAT 4&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 25-1&amp;amp;nbsp;; Yes, we're using 1 NOP less&lt;br /&gt;
	 &amp;amp;nbsp;; to achieve 8 pixel precision shift&lt;br /&gt;
	 &amp;amp;nbsp;; during next scan&amp;amp;nbsp;!!!&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 25&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 23&amp;amp;nbsp; &amp;amp;nbsp;; Fixing previous subtraction!&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
REPEAT 5&lt;br /&gt;
&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #1 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #2 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #3 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #4 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #5 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #6 = RED&lt;br /&gt;
out (c),d&amp;amp;nbsp;; Box #7 = YELLOW&lt;br /&gt;
out (c),e&amp;amp;nbsp;; Box #8 = PURPLE&lt;br /&gt;
out (c),h&amp;amp;nbsp;; Box #9 = GREEN&lt;br /&gt;
out (c),l&amp;amp;nbsp;; Box #10 = RED&lt;br /&gt;
&lt;br /&gt;
defs 24&amp;amp;nbsp; &amp;amp;nbsp;; NOP&lt;br /&gt;
&lt;br /&gt;
REND&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
out (c),a&amp;amp;nbsp;; Blue space&lt;br /&gt;
&lt;br /&gt;
;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
jp loop&lt;br /&gt;
&lt;br /&gt;
;====== End of MAIN LOOP ===============================&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Source_Codes&amp;diff=67049</id>
		<title>Source Codes</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Source_Codes&amp;diff=67049"/>
				<updated>2011-03-27T14:58:54Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: /* Graphics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Programming]]&lt;br /&gt;
''This article contains source codes and programming examples. You may also have a look at''&lt;br /&gt;
* [[Programming software]]&lt;br /&gt;
* [[BIOS Functions]]&lt;br /&gt;
* [[Technical documentation]]s&lt;br /&gt;
* [[Locomotive BASIC]]&lt;br /&gt;
* [[Type Ins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assembler ==&lt;br /&gt;
*[[Z80_-_undocumented_opcodes|Z80 - undocumented opcodes]]&lt;br /&gt;
*[[Where to learn?]]&lt;br /&gt;
&lt;br /&gt;
== Algorithms ==&lt;br /&gt;
*[[Programming:CPC OS floating point routines|CPC OS floating point routines]]&lt;br /&gt;
*[[Programming:CRC16|CRC16]]&lt;br /&gt;
*[[Programming:CRC32|CRC32]]&lt;br /&gt;
*[[Programming:Integer Division|Integer Division]]&lt;br /&gt;
*[[Programming:Integer Multiplication|Integer Multiplication]]&lt;br /&gt;
*[[Programming:Ultrafast Multiplication|Ultrafast Multiplication]] by [[Prodatron]]&lt;br /&gt;
*[[Programming:Fast Square Root|Fast Square Root]]&lt;br /&gt;
*[[Programming:Fast 16 bit Square Root|Fast 16 bit Square Root]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Filling memory with a byte|Filling memory with a byte]]&lt;br /&gt;
*[[Programming:Square Root|Square Root]]&lt;br /&gt;
*[[Programming:Precalculated square|Precalculated square]]&lt;br /&gt;
*[[Programming:Random Number Generator|Random Number Generator]]&lt;br /&gt;
*[[Programming:Quicksort|Quicksort]]&lt;br /&gt;
*[[Programming:Sin/Cos calculation|Sin/Cos calculation]]&lt;br /&gt;
&lt;br /&gt;
== CP/M ==&lt;br /&gt;
*[[Programming:A simple 'Hello World' program for CP/M using BDOS|A simple 'Hello World' program for CP/M using BDOS]]&lt;br /&gt;
*[[Programming:A simple 'Hello World' program for CP/M using BIOS|A simple 'Hello World' program for CP/M using BIOS]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1|Executing firmware functions from within CP/M 2.1]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1 or CP/M plus|Executing firmware functions from within CP/M 2.1 or CP/M plus]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1|Executing firmware functions from within CP/M 2.1]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M plus|Executing firmware functions from within CP/M plus]]&lt;br /&gt;
&lt;br /&gt;
== CPC Plus ==&lt;br /&gt;
*[[Amstrad CPC plus sprite format]]&lt;br /&gt;
*[[Programming:Convert CPC sprites to Plus hardware sprites|Convert CPC sprites to Plus hardware sprites]]&lt;br /&gt;
*[[Sprites Multiplexing]]&lt;br /&gt;
*[[Programming:CPC Plus Hardware Sprites|Hardware sprites]]&lt;br /&gt;
*[[Programming:CPC Plus Horizontal scroll|Horizontal scroll]]&lt;br /&gt;
*[[Programming:CPC Plus RLE Hardware Sprites|RLE hardware sprites]]&lt;br /&gt;
*[[Programming:CPC Plus Screen Splitting|Screen splitting]]&lt;br /&gt;
*[[Programming:CPC Plus Vertical scroll|Vertical scroll]]&lt;br /&gt;
*[[Operation of Z80 interrupt mode 0 in the CPC plus design]]&lt;br /&gt;
*[[Programming:Simple Raster Example 2 (uses CPC plus features)|Simple Raster Example 1 (uses CPC plus features)]]&lt;br /&gt;
*[[Programming:Simple Raster Example 3 (uses CPC plus features)|Simple Raster Example 2 (uses CPC plus features)]]&lt;br /&gt;
*[[Programming:Unlocking ASIC|Unlocking ASIC]]&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
*[[Programming:CPC Booster|CPC Booster]]&lt;br /&gt;
*[[Programming:Digiblaster|Digiblaster]]&lt;br /&gt;
*[[Programming:Program to save the ROM of the Multiface 2|Program to save the ROM of the Multiface 2]]&lt;br /&gt;
*[[Programming:SYMBiFACE II|SYMBiFACE II]]&lt;br /&gt;
&lt;br /&gt;
== File access ==&lt;br /&gt;
*[[Programming:An example to read a file byte-by-byte|An example to read a file byte-by-byte]]&lt;br /&gt;
*[[Programming:An example to write a file byte-by-byte|An example to write a file byte-by-byte]]&lt;br /&gt;
*[[Programming:A simple file copier using firmware functions (copies byte-by-byte)|A simple file copier using firmware functions (copies byte-by-byte)]]&lt;br /&gt;
*[[Programming:Loading a file|Loading a file]]&lt;br /&gt;
*[[Programming:Saving a file|Saving a file]]&lt;br /&gt;
*[[Programming:Unlocking a protected basic file|Unlocking a protected basic file]]&lt;br /&gt;
*[[Programming:Undo delete of file|Undo delete of file]]&lt;br /&gt;
&lt;br /&gt;
== Floppy disk ==&lt;br /&gt;
*[[Programming:A simple disc copier using BDOS functions|A simple disc copier using BDOS functions]]&lt;br /&gt;
*[[Programming:A simple disc formatter using BDOS functions|A simple disc formatter using BDOS functions]]&lt;br /&gt;
*[[Programming:An example loader|An example loader]]&lt;br /&gt;
*[[Programming:Catalog a disc and retrieve a directory|Catalog a disc and retrieve a directory]]&lt;br /&gt;
*[[Programming:Detecting an Amstrad or Vortex disc controler|Detecting an Amstrad or Vortex disc controler]]&lt;br /&gt;
*[[Programming:Formatting a track on a disc|Formatting a track on a disc]]&lt;br /&gt;
*[[Programming:Reading a sector from a disc|Reading a sector from a disc]]&lt;br /&gt;
*[[Programming:Reading and writing the boot sector of a SYSTEM/VENDOR disc|Reading and writing the boot sector of a SYSTEM/VENDOR disc]]&lt;br /&gt;
*[[Programming:Writing a sector to disc|Writing a sector to disc]]&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
*[[Programming:Display a 8-bit number in binary|Display a 8-bit number in binary]]&lt;br /&gt;
*[[Programming:Display a 8-bit number in hex|Display a 8-bit number in hex]]&lt;br /&gt;
*[[Programming:Display a byte as a 3-digit decimal number|Display a byte as a 3-digit decimal number]]&lt;br /&gt;
*[[Programming:Display and update Scores|Display and update Scores]]&lt;br /&gt;
*[[Programming:Distorting the screen using register 2 of the CRTC (Horizontal Sync Position)|Distorting the screen using register 2 of the CRTC (Horizontal Sync Position)]]&lt;br /&gt;
*[[Programming:Fast plot|Fast plot]]&lt;br /&gt;
*[[Programming:Fast Sprites|Fast Sprites]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Fast Textoutput|Fast Textoutput]] by [[Prodatron]]&lt;br /&gt;
*[[Programming:Hardware scrolling|Hardware Scrolling]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Hardware scrolling 2|Hardware Scrolling 2]]&lt;br /&gt;
*[[Programming:Hardware scrolling the screen horizontally byte-by-byte using the CRTC|Hardware scrolling the screen horizontally byte-by-byte using the CRTC]]&lt;br /&gt;
*[[Programming:Hardware scrolling the screen using the CRTC|Hardware scrolling the screen using the CRTC]]&lt;br /&gt;
*[[Programming:Next / previous line calculation|Next / previous line calculation]]&lt;br /&gt;
*[[Programming:Overscan|Overscan]]&lt;br /&gt;
*[[Programming:Plotting a sprite using character matrices|Plotting a sprite using character matrices]]&lt;br /&gt;
*[[Programming:Simple Raster Example 1|Simple Raster Example]]&lt;br /&gt;
*[[Programming:Simple Split Raster Example 1|Simple Split Raster Example]]&lt;br /&gt;
*[[Synchronising with the CRTC and display]]&lt;br /&gt;
*[[CRTC change colour (fill) test with precise timing]] by [[User:Matahari|Matahari]]&lt;br /&gt;
&lt;br /&gt;
== Interrupts ==&lt;br /&gt;
* [[Reliable use of interrupt mode 2 on the CPC]]&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
*[[Programming:Keyboard scanning|Keyboard scanning]]&lt;br /&gt;
&lt;br /&gt;
== Other routines ==&lt;br /&gt;
*[[Programming:An example boot sector (executed with rsx command CPM)|An example boot sector (executed with rsx command CPM)]]&lt;br /&gt;
*[[Programming:An example to define a RSX|An example to define a RSX]]&lt;br /&gt;
*[[Programming:Calling a RSX from outside of BASIC|Calling a RSX from outside of BASIC]]&lt;br /&gt;
*[[Programming:Dumping the data of BASIC or AMSDOS or an expansion rom|Dumping the data of BASIC or AMSDOS or an expansion rom]]&lt;br /&gt;
*[[Programming:Dumping the data of the lower rom|Dumping the data of the lower rom]]&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
*[[Programming:Tutorial - Understanding the fundamentals of BASIC SOUND and the Firmware SOUND QUEUE|Tutorial - Understanding the fundamentals of BASIC SOUND and the Firmware SOUND QUEUE]]&lt;br /&gt;
*[[Programming:Source code to show 0x0ff is always returned when reading PSG port B|Source code to show 0x0ff is always returned when reading PSG port B]]&lt;br /&gt;
*[[Programming:Source code to show it is possible to store data in PSG register 14 and 15 (port A and port B)|Source code to show it is possible to store data in PSG register 14 and 15 (port A and port B)]]&lt;br /&gt;
*[[Programming:Source code to show it is possible to store data in PSG register 14 and 15 even if the port has been set to input|Source code to show it is possible to store data in PSG register 14 and 15 even if the port has been set to input]]&lt;br /&gt;
*[[Programming:Source code to show that some registers always return 0 in some bits|Source code to show that some registers always return 0 in some bits]]&lt;br /&gt;
*[[Programming:Source code to show that when a port is read in output mode; the data read will be ANDed with the inputs to that port|Source code to show that when a port is read in output mode; the data read will be ANDed with the inputs to that port]]&lt;br /&gt;
&lt;br /&gt;
== Cross Development ==&lt;br /&gt;
*[[Programming:Cross Development|Cross Development]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Source code]]&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Source_Codes&amp;diff=67048</id>
		<title>Source Codes</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Source_Codes&amp;diff=67048"/>
				<updated>2011-03-27T14:55:33Z</updated>
		
		<summary type="html">&lt;p&gt;Matahari: /* Graphics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Programming]]&lt;br /&gt;
''This article contains source codes and programming examples. You may also have a look at''&lt;br /&gt;
* [[Programming software]]&lt;br /&gt;
* [[BIOS Functions]]&lt;br /&gt;
* [[Technical documentation]]s&lt;br /&gt;
* [[Locomotive BASIC]]&lt;br /&gt;
* [[Type Ins]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assembler ==&lt;br /&gt;
*[[Z80_-_undocumented_opcodes|Z80 - undocumented opcodes]]&lt;br /&gt;
*[[Where to learn?]]&lt;br /&gt;
&lt;br /&gt;
== Algorithms ==&lt;br /&gt;
*[[Programming:CPC OS floating point routines|CPC OS floating point routines]]&lt;br /&gt;
*[[Programming:CRC16|CRC16]]&lt;br /&gt;
*[[Programming:CRC32|CRC32]]&lt;br /&gt;
*[[Programming:Integer Division|Integer Division]]&lt;br /&gt;
*[[Programming:Integer Multiplication|Integer Multiplication]]&lt;br /&gt;
*[[Programming:Ultrafast Multiplication|Ultrafast Multiplication]] by [[Prodatron]]&lt;br /&gt;
*[[Programming:Fast Square Root|Fast Square Root]]&lt;br /&gt;
*[[Programming:Fast 16 bit Square Root|Fast 16 bit Square Root]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Filling memory with a byte|Filling memory with a byte]]&lt;br /&gt;
*[[Programming:Square Root|Square Root]]&lt;br /&gt;
*[[Programming:Precalculated square|Precalculated square]]&lt;br /&gt;
*[[Programming:Random Number Generator|Random Number Generator]]&lt;br /&gt;
*[[Programming:Quicksort|Quicksort]]&lt;br /&gt;
*[[Programming:Sin/Cos calculation|Sin/Cos calculation]]&lt;br /&gt;
&lt;br /&gt;
== CP/M ==&lt;br /&gt;
*[[Programming:A simple 'Hello World' program for CP/M using BDOS|A simple 'Hello World' program for CP/M using BDOS]]&lt;br /&gt;
*[[Programming:A simple 'Hello World' program for CP/M using BIOS|A simple 'Hello World' program for CP/M using BIOS]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1|Executing firmware functions from within CP/M 2.1]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1 or CP/M plus|Executing firmware functions from within CP/M 2.1 or CP/M plus]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M 2.1|Executing firmware functions from within CP/M 2.1]]&lt;br /&gt;
*[[Programming:Executing firmware functions from within CP/M plus|Executing firmware functions from within CP/M plus]]&lt;br /&gt;
&lt;br /&gt;
== CPC Plus ==&lt;br /&gt;
*[[Amstrad CPC plus sprite format]]&lt;br /&gt;
*[[Programming:Convert CPC sprites to Plus hardware sprites|Convert CPC sprites to Plus hardware sprites]]&lt;br /&gt;
*[[Sprites Multiplexing]]&lt;br /&gt;
*[[Programming:CPC Plus Hardware Sprites|Hardware sprites]]&lt;br /&gt;
*[[Programming:CPC Plus Horizontal scroll|Horizontal scroll]]&lt;br /&gt;
*[[Programming:CPC Plus RLE Hardware Sprites|RLE hardware sprites]]&lt;br /&gt;
*[[Programming:CPC Plus Screen Splitting|Screen splitting]]&lt;br /&gt;
*[[Programming:CPC Plus Vertical scroll|Vertical scroll]]&lt;br /&gt;
*[[Operation of Z80 interrupt mode 0 in the CPC plus design]]&lt;br /&gt;
*[[Programming:Simple Raster Example 2 (uses CPC plus features)|Simple Raster Example 1 (uses CPC plus features)]]&lt;br /&gt;
*[[Programming:Simple Raster Example 3 (uses CPC plus features)|Simple Raster Example 2 (uses CPC plus features)]]&lt;br /&gt;
*[[Programming:Unlocking ASIC|Unlocking ASIC]]&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
*[[Programming:CPC Booster|CPC Booster]]&lt;br /&gt;
*[[Programming:Digiblaster|Digiblaster]]&lt;br /&gt;
*[[Programming:Program to save the ROM of the Multiface 2|Program to save the ROM of the Multiface 2]]&lt;br /&gt;
*[[Programming:SYMBiFACE II|SYMBiFACE II]]&lt;br /&gt;
&lt;br /&gt;
== File access ==&lt;br /&gt;
*[[Programming:An example to read a file byte-by-byte|An example to read a file byte-by-byte]]&lt;br /&gt;
*[[Programming:An example to write a file byte-by-byte|An example to write a file byte-by-byte]]&lt;br /&gt;
*[[Programming:A simple file copier using firmware functions (copies byte-by-byte)|A simple file copier using firmware functions (copies byte-by-byte)]]&lt;br /&gt;
*[[Programming:Loading a file|Loading a file]]&lt;br /&gt;
*[[Programming:Saving a file|Saving a file]]&lt;br /&gt;
*[[Programming:Unlocking a protected basic file|Unlocking a protected basic file]]&lt;br /&gt;
*[[Programming:Undo delete of file|Undo delete of file]]&lt;br /&gt;
&lt;br /&gt;
== Floppy disk ==&lt;br /&gt;
*[[Programming:A simple disc copier using BDOS functions|A simple disc copier using BDOS functions]]&lt;br /&gt;
*[[Programming:A simple disc formatter using BDOS functions|A simple disc formatter using BDOS functions]]&lt;br /&gt;
*[[Programming:An example loader|An example loader]]&lt;br /&gt;
*[[Programming:Catalog a disc and retrieve a directory|Catalog a disc and retrieve a directory]]&lt;br /&gt;
*[[Programming:Detecting an Amstrad or Vortex disc controler|Detecting an Amstrad or Vortex disc controler]]&lt;br /&gt;
*[[Programming:Formatting a track on a disc|Formatting a track on a disc]]&lt;br /&gt;
*[[Programming:Reading a sector from a disc|Reading a sector from a disc]]&lt;br /&gt;
*[[Programming:Reading and writing the boot sector of a SYSTEM/VENDOR disc|Reading and writing the boot sector of a SYSTEM/VENDOR disc]]&lt;br /&gt;
*[[Programming:Writing a sector to disc|Writing a sector to disc]]&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
*[[Programming:Display a 8-bit number in binary|Display a 8-bit number in binary]]&lt;br /&gt;
*[[Programming:Display a 8-bit number in hex|Display a 8-bit number in hex]]&lt;br /&gt;
*[[Programming:Display a byte as a 3-digit decimal number|Display a byte as a 3-digit decimal number]]&lt;br /&gt;
*[[Programming:Display and update Scores|Display and update Scores]]&lt;br /&gt;
*[[Programming:Distorting the screen using register 2 of the CRTC (Horizontal Sync Position)|Distorting the screen using register 2 of the CRTC (Horizontal Sync Position)]]&lt;br /&gt;
*[[Programming:Fast plot|Fast plot]]&lt;br /&gt;
*[[Programming:Fast Sprites|Fast Sprites]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Fast Textoutput|Fast Textoutput]] by [[Prodatron]]&lt;br /&gt;
*[[Programming:Hardware scrolling|Hardware Scrolling]] by [[User:Executioner|Executioner]]&lt;br /&gt;
*[[Programming:Hardware scrolling 2|Hardware Scrolling 2]]&lt;br /&gt;
*[[Programming:Hardware scrolling the screen horizontally byte-by-byte using the CRTC|Hardware scrolling the screen horizontally byte-by-byte using the CRTC]]&lt;br /&gt;
*[[Programming:Hardware scrolling the screen using the CRTC|Hardware scrolling the screen using the CRTC]]&lt;br /&gt;
*[[Programming:Next / previous line calculation|Next / previous line calculation]]&lt;br /&gt;
*[[Programming:Overscan|Overscan]]&lt;br /&gt;
*[[Programming:Plotting a sprite using character matrices|Plotting a sprite using character matrices]]&lt;br /&gt;
*[[Programming:Simple Raster Example 1|Simple Raster Example]]&lt;br /&gt;
*[[Programming:Simple Split Raster Example 1|Simple Split Raster Example]]&lt;br /&gt;
*[[Synchronising with the CRTC and display]]&lt;br /&gt;
*[[Programming:CRTC change colour (fill) test with precise timing]]&lt;br /&gt;
&lt;br /&gt;
== Interrupts ==&lt;br /&gt;
* [[Reliable use of interrupt mode 2 on the CPC]]&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
*[[Programming:Keyboard scanning|Keyboard scanning]]&lt;br /&gt;
&lt;br /&gt;
== Other routines ==&lt;br /&gt;
*[[Programming:An example boot sector (executed with rsx command CPM)|An example boot sector (executed with rsx command CPM)]]&lt;br /&gt;
*[[Programming:An example to define a RSX|An example to define a RSX]]&lt;br /&gt;
*[[Programming:Calling a RSX from outside of BASIC|Calling a RSX from outside of BASIC]]&lt;br /&gt;
*[[Programming:Dumping the data of BASIC or AMSDOS or an expansion rom|Dumping the data of BASIC or AMSDOS or an expansion rom]]&lt;br /&gt;
*[[Programming:Dumping the data of the lower rom|Dumping the data of the lower rom]]&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
*[[Programming:Tutorial - Understanding the fundamentals of BASIC SOUND and the Firmware SOUND QUEUE|Tutorial - Understanding the fundamentals of BASIC SOUND and the Firmware SOUND QUEUE]]&lt;br /&gt;
*[[Programming:Source code to show 0x0ff is always returned when reading PSG port B|Source code to show 0x0ff is always returned when reading PSG port B]]&lt;br /&gt;
*[[Programming:Source code to show it is possible to store data in PSG register 14 and 15 (port A and port B)|Source code to show it is possible to store data in PSG register 14 and 15 (port A and port B)]]&lt;br /&gt;
*[[Programming:Source code to show it is possible to store data in PSG register 14 and 15 even if the port has been set to input|Source code to show it is possible to store data in PSG register 14 and 15 even if the port has been set to input]]&lt;br /&gt;
*[[Programming:Source code to show that some registers always return 0 in some bits|Source code to show that some registers always return 0 in some bits]]&lt;br /&gt;
*[[Programming:Source code to show that when a port is read in output mode; the data read will be ANDed with the inputs to that port|Source code to show that when a port is read in output mode; the data read will be ANDed with the inputs to that port]]&lt;br /&gt;
&lt;br /&gt;
== Cross Development ==&lt;br /&gt;
*[[Programming:Cross Development|Cross Development]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Source code]]&lt;/div&gt;</summary>
		<author><name>Matahari</name></author>	</entry>

	</feed>