<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3AMixed_modes_using_firmware</id>
		<title>Programming:Mixed modes using firmware - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3AMixed_modes_using_firmware"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Mixed_modes_using_firmware&amp;action=history"/>
		<updated>2026-08-28T10:04:16Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Mixed_modes_using_firmware&amp;diff=126621&amp;oldid=prev</id>
		<title>Arnoldemu at 12:18, 6 July 2025</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Mixed_modes_using_firmware&amp;diff=126621&amp;oldid=prev"/>
				<updated>2025-07-06T12:18:16Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 12:18, 6 July 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L200&quot; &gt;Line 200:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end start&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end start&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Source code]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:126620:newid:126621 --&gt;
&lt;/table&gt;</summary>
		<author><name>Arnoldemu</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Mixed_modes_using_firmware&amp;diff=126620&amp;oldid=prev</id>
		<title>Arnoldemu at 12:17, 6 July 2025</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Mixed_modes_using_firmware&amp;diff=126620&amp;oldid=prev"/>
				<updated>2025-07-06T12:17:33Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 12:17, 6 July 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;	&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;; Example to change the mode and inks using the firmware&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;; Example to change the mode and inks using the firmware&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;; and then how to plot in each area.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;; and then how to plot in each area.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L198&quot; &gt;Line 198:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 199:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end start&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end start&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:126619:newid:126620 --&gt;
&lt;/table&gt;</summary>
		<author><name>Arnoldemu</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Mixed_modes_using_firmware&amp;diff=126619&amp;oldid=prev</id>
		<title>Arnoldemu: Created page with &quot;;; Example to change the mode and inks using the firmware ;; and then how to plot in each area. ;; by Kevin Thacker. 2025. Released under BSD License. kl_new_fast_ticker equ &amp;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Mixed_modes_using_firmware&amp;diff=126619&amp;oldid=prev"/>
				<updated>2025-07-06T12:16:49Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;;; Example to change the mode and inks using the firmware ;; and then how to plot in each area. ;; by Kevin Thacker. 2025. Released under BSD License. kl_new_fast_ticker equ &amp;amp;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;;; Example to change the mode and inks using the firmware&lt;br /&gt;
;; and then how to plot in each area.&lt;br /&gt;
;; by Kevin Thacker. 2025. Released under BSD License.&lt;br /&gt;
kl_new_fast_ticker equ &amp;amp;bce0&lt;br /&gt;
mc_set_mode equ &amp;amp;bd1c&lt;br /&gt;
kl_new_frame_fly equ &amp;amp;bcd7&lt;br /&gt;
mc_set_inks equ &amp;amp;bd25&lt;br /&gt;
scr_set_mode equ &amp;amp;bc0e&lt;br /&gt;
scr_mode_clear equ &amp;amp;bdeb&lt;br /&gt;
txt_set_cursor equ &amp;amp;bb75&lt;br /&gt;
txt_output equ &amp;amp;bb5a&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;4000&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
;; set a mode and clear screen&lt;br /&gt;
xor a&lt;br /&gt;
call scr_set_mode&lt;br /&gt;
&lt;br /&gt;
;; prevent screen clearing. See SOFT968 Hits and Tips&lt;br /&gt;
ld a,&amp;amp;c9&lt;br /&gt;
ld (scr_mode_clear),a&lt;br /&gt;
&lt;br /&gt;
;; interrupt counter which goes from 0-5.&lt;br /&gt;
xor a&lt;br /&gt;
ld (interrupt_index),a&lt;br /&gt;
&lt;br /&gt;
;; install frame flyback interrupt to reset counter.&lt;br /&gt;
ld hl,frame_flyback_block&lt;br /&gt;
ld b,&amp;amp;81&lt;br /&gt;
ld c,&amp;amp;ff&lt;br /&gt;
ld de,frame_flyback_function&lt;br /&gt;
call kl_new_frame_fly&lt;br /&gt;
&lt;br /&gt;
;; install fast ticker interrupt to set mode and inks.&lt;br /&gt;
ld hl,fast_ticker_block&lt;br /&gt;
ld b,&amp;amp;81&lt;br /&gt;
ld c,&amp;amp;ff ;; in main ram&lt;br /&gt;
ld de,fast_ticker_function&lt;br /&gt;
call kl_new_fast_ticker&lt;br /&gt;
&lt;br /&gt;
;; set mode 1 - now without clearing screen&lt;br /&gt;
ld a,1&lt;br /&gt;
call scr_set_mode&lt;br /&gt;
;; set text position&lt;br /&gt;
ld h,1&lt;br /&gt;
ld l,24&lt;br /&gt;
call txt_set_cursor&lt;br /&gt;
;; write text in mode 1&lt;br /&gt;
ld hl,message_lower&lt;br /&gt;
call display_message&lt;br /&gt;
&lt;br /&gt;
;; set mode 0 - now without clearing screen&lt;br /&gt;
xor a&lt;br /&gt;
call scr_set_mode&lt;br /&gt;
;; set text position&lt;br /&gt;
ld h,1&lt;br /&gt;
ld l,1&lt;br /&gt;
call txt_set_cursor&lt;br /&gt;
;; write text in mode 0&lt;br /&gt;
ld hl,message_upper&lt;br /&gt;
call display_message&lt;br /&gt;
&lt;br /&gt;
;; loop to see effect.&lt;br /&gt;
loop:&lt;br /&gt;
jp loop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
message_upper:&lt;br /&gt;
defb &amp;quot;This is in mode 0&amp;quot;,0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
message_lower:&lt;br /&gt;
defb &amp;quot;This is in mode 1&amp;quot;,0&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
display_message:&lt;br /&gt;
ld a,(hl)&lt;br /&gt;
inc hl&lt;br /&gt;
or a ;; look for 0 which is end of string&lt;br /&gt;
ret z&lt;br /&gt;
call txt_output&lt;br /&gt;
jr display_message&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
frame_flyback_function:&lt;br /&gt;
push af&lt;br /&gt;
xor a&lt;br /&gt;
ld (fast_ticker_block),a&lt;br /&gt;
pop af&lt;br /&gt;
ret&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
fast_ticker_function:&lt;br /&gt;
push af&lt;br /&gt;
push hl&lt;br /&gt;
push bc&lt;br /&gt;
push de&lt;br /&gt;
&lt;br /&gt;
ld hl,modes&lt;br /&gt;
ld a,(fast_ticker_block)&lt;br /&gt;
ld c,a&lt;br /&gt;
ld b,0&lt;br /&gt;
add hl,bc&lt;br /&gt;
ld a,(hl)&lt;br /&gt;
call mc_set_mode&lt;br /&gt;
&lt;br /&gt;
ld a,(fast_ticker_block)&lt;br /&gt;
ld l,a&lt;br /&gt;
ld h,0&lt;br /&gt;
ld c,l&lt;br /&gt;
ld b,0&lt;br /&gt;
add hl,hl   ;; x2&lt;br /&gt;
add hl,hl   ;; x4&lt;br /&gt;
add hl,hl   ;; x8&lt;br /&gt;
add hl,hl   ;; x16&lt;br /&gt;
add hl,bc   ;; x17&lt;br /&gt;
ld bc,inks&lt;br /&gt;
add hl,bc&lt;br /&gt;
ld e,l&lt;br /&gt;
ld d,h&lt;br /&gt;
call mc_set_inks&lt;br /&gt;
&lt;br /&gt;
ld a,(fast_ticker_block)&lt;br /&gt;
cp 5&lt;br /&gt;
jr z,ftf&lt;br /&gt;
inc a&lt;br /&gt;
ld (fast_ticker_block),a&lt;br /&gt;
ftf:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
pop de&lt;br /&gt;
pop bc&lt;br /&gt;
pop hl&lt;br /&gt;
pop af&lt;br /&gt;
ret&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;; must be in range &amp;amp;4000-&amp;amp;7fff&lt;br /&gt;
frame_flyback_block:&lt;br /&gt;
defs 9&lt;br /&gt;
&lt;br /&gt;
;; must be in range &amp;amp;4000-&amp;amp;7fff&lt;br /&gt;
fast_ticker_block:&lt;br /&gt;
defs 9&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;; which interrupt.&lt;br /&gt;
interrupt_index:&lt;br /&gt;
defb 0&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;; mode per interrupt&lt;br /&gt;
modes:&lt;br /&gt;
;; mode in top border. not useful unless screen height is changed.&lt;br /&gt;
defb 0&lt;br /&gt;
&lt;br /&gt;
;; to set mode for top few lines of screen&lt;br /&gt;
defb 0&lt;br /&gt;
&lt;br /&gt;
;; mode in middle of screen&lt;br /&gt;
defb 0&lt;br /&gt;
defb 0&lt;br /&gt;
&lt;br /&gt;
;; to set mode for bottom few lines of screen&lt;br /&gt;
defb 1&lt;br /&gt;
&lt;br /&gt;
;; mode in bottom border. not useful unless screen height is changed.&lt;br /&gt;
defb 0&lt;br /&gt;
&lt;br /&gt;
;;---------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;; palette per interrupt; 17 values, border then inks.&lt;br /&gt;
;; All inks are set even if mode doesn't use them all.&lt;br /&gt;
inks:&lt;br /&gt;
;; top border.&lt;br /&gt;
defb 21,21,10,20,12,11,20,21,13,6,30,27,7,18,25,4,23&lt;br /&gt;
&lt;br /&gt;
;; just before graphics starts.&lt;br /&gt;
defb 0,21,10,20,12,11,20,21,13,6,30,27,7,18,25,4,23&lt;br /&gt;
&lt;br /&gt;
defb 21,21,10,20,12,11,20,21,13,6,30,27,7,18,25,4,23&lt;br /&gt;
&lt;br /&gt;
defb 0,21,10,20,12,11,20,21,13,6,30,27,7,18,25,4,23&lt;br /&gt;
&lt;br /&gt;
defb 21,21,10,20,12,11,20,21,13,6,30,27,7,18,25,4,23&lt;br /&gt;
&lt;br /&gt;
;; single line before graphics ends and into bottom border&lt;br /&gt;
defb 0,21,10,20,12,11,20,21,13,6,30,27,7,18,25,4,23&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
end start&lt;/div&gt;</summary>
		<author><name>Arnoldemu</name></author>	</entry>

	</feed>