<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Boriel Basic Forum - Library]]></title>
		<link>https://forum.boriel.com/</link>
		<description><![CDATA[Boriel Basic Forum - https://forum.boriel.com]]></description>
		<pubDate>Wed, 01 Jul 2026 07:40:13 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Mute compiler warnings for included libraries]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=1022</link>
			<pubDate>Tue, 26 Jan 2021 15:24:10 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=785">patters</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=1022</guid>
			<description><![CDATA[<span style="color: #333333;" class="mycode_color"><span style="font-family: Tahoma, Verdana, Arial, sans-serif;" class="mycode_font"><span style="font-size: small;" class="mycode_size">Every time I compile I get a big wall of text of warnings about unused variables and functions in libraries that are included in my program (input.bas, attr.bas and its own includes, HRPrint.bas, fastTrig.bas). Could such warnings for libraries be muted by default perhaps and make them elective for library debugging, or at least allow me to exclude them in my build script? I didn't write these pieces of code, so I'm not interested in these warnings. However if I mute all warnings then I could miss an</span><span style="font-size: small;" class="mycode_size"> issue</span><span style="font-size: small;" class="mycode_size"> with my own code. Even with warnings enabled I have missed many genuine warnings because they were drowned out by the noise (variable unused</span><span style="font-size: small;" class="mycode_size"> is the classic one</span><span style="font-size: small;" class="mycode_size"> - when a name has been mistyped or the capitalisation is wrong somewhere </span><span style="font-size: small;" class="mycode_size">in the listing).</span></span></span>]]></description>
			<content:encoded><![CDATA[<span style="color: #333333;" class="mycode_color"><span style="font-family: Tahoma, Verdana, Arial, sans-serif;" class="mycode_font"><span style="font-size: small;" class="mycode_size">Every time I compile I get a big wall of text of warnings about unused variables and functions in libraries that are included in my program (input.bas, attr.bas and its own includes, HRPrint.bas, fastTrig.bas). Could such warnings for libraries be muted by default perhaps and make them elective for library debugging, or at least allow me to exclude them in my build script? I didn't write these pieces of code, so I'm not interested in these warnings. However if I mute all warnings then I could miss an</span><span style="font-size: small;" class="mycode_size"> issue</span><span style="font-size: small;" class="mycode_size"> with my own code. Even with warnings enabled I have missed many genuine warnings because they were drowned out by the noise (variable unused</span><span style="font-size: small;" class="mycode_size"> is the classic one</span><span style="font-size: small;" class="mycode_size"> - when a name has been mistyped or the capitalisation is wrong somewhere </span><span style="font-size: small;" class="mycode_size">in the listing).</span></span></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[an additional label in <library-asm/print.asm>]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=594</link>
			<pubDate>Sun, 08 Jun 2014 19:11:56 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=160">programandala.net</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=594</guid>
			<description><![CDATA[Mi wish is easy to satisfy: I need one label after CP 80h in &lt;print.asm&gt;:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ex af, af'

        cp 80h  ; Is the char an UDG, a block character or a token?
JUMP_IF_GREATER_THAN_80H:
        ; XXX label needed to hack the printing system
        jp c, __SRCADDR ; if not, jump</code></div></div><br />
(That is an extract from my hacked version of &lt;print.asm&gt;, with additional comments of my own; the actual name of the label doesn't matter.)<br />
<br />
The reason I need a label there is I have written a module that provides a sub to switch on an off the ZX Spectrum legacy printing mode (that treats ASCII chars, block chars and UDG chars apart). When the legacy mode is off, all chars 32-255 are taken from the same charset. This makes it possible to write source code with a modern 8-bit encoding, e.g. Latin1. This is very useful for programs that print a lot of text in other languages than English.<br />
<br />
I tinkered with this idea four years ago, and hacked &lt;print.asm&gt;, but I had to redo the changes after every new version of ZX BASIC. The new approach is simpler and better: The sub modifies the code of &lt;print.asm&gt; in two locations, and the legacy printing mode can be restored at any time by the program. It works great. So far I have tried it with a modified version of &lt;print.asm&gt;. That's why I need that single label.<br />
<br />
I will publish the module as soon as it can be used with a new version of ZX BASIC, unless someone requires it sooner.<br />
<br />
Thank you.]]></description>
			<content:encoded><![CDATA[Mi wish is easy to satisfy: I need one label after CP 80h in &lt;print.asm&gt;:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ex af, af'

        cp 80h  ; Is the char an UDG, a block character or a token?
JUMP_IF_GREATER_THAN_80H:
        ; XXX label needed to hack the printing system
        jp c, __SRCADDR ; if not, jump</code></div></div><br />
(That is an extract from my hacked version of &lt;print.asm&gt;, with additional comments of my own; the actual name of the label doesn't matter.)<br />
<br />
The reason I need a label there is I have written a module that provides a sub to switch on an off the ZX Spectrum legacy printing mode (that treats ASCII chars, block chars and UDG chars apart). When the legacy mode is off, all chars 32-255 are taken from the same charset. This makes it possible to write source code with a modern 8-bit encoding, e.g. Latin1. This is very useful for programs that print a lot of text in other languages than English.<br />
<br />
I tinkered with this idea four years ago, and hacked &lt;print.asm&gt;, but I had to redo the changes after every new version of ZX BASIC. The new approach is simpler and better: The sub modifies the code of &lt;print.asm&gt; in two locations, and the legacy printing mode can be restored at any time by the program. It works great. So far I have tried it with a modified version of &lt;print.asm&gt;. That's why I need that single label.<br />
<br />
I will publish the module as soon as it can be used with a new version of ZX BASIC, unless someone requires it sooner.<br />
<br />
Thank you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[proportional text writing]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=442</link>
			<pubDate>Fri, 09 Mar 2012 22:56:36 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=187">nitrofurano</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=442</guid>
			<description><![CDATA[i started to try proportional text writing on zxbasic - it's far incomplete (not printing from strings yet) and slow<br />
<br />
test.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include "lib/NaftaRegular_charmap.bas"
dim i,j,adr,v,vq,vq2,x,y,x1,x2,c,c1,xps as uinteger
border 6:paper 7:ink 1: bright 1:cls
x=3:y=109
for c1=0 to 52
  x1=int(x/8)
  x2=7-(x mod 8)
  for j=0 to 11
    i= ((y+j)*32)+x1
    adr=(16384+((i band 31) bor ((i band 224)*8) bor ((i band 1793)/8) bor (i band 6144)))
    v=peek(uinteger, adr)
    vq2=(peek(@naftaregularcharmap+(12*c1)+j))*(2^x2)
    vqbs= ((vq2 band 65280)/256) bor ((vq2 band 255)*256)
    poke uinteger adr,v bor vqbs
    next j
  x=x+peek(@naftaregularcharmapspacing+c1)  
  next c1
pause 0</code></div></div><br />
lib/NaftaRegular_charmap.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>goto naftaregularcharmapend

naftaregularcharmap:
asm
  defb 000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,080h,080h,080h,080h,000h,080h,000h,000h,000h,000h
  defb 0a0h,0a0h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,050h,0f8h,050h,050h,0f8h,050h,000h,000h,000h,000h
  defb 040h,040h,0e0h,0c0h,0c0h,060h,060h,0e0h,040h,040h,000h,000h
  defb 000h,000h,048h,0b0h,050h,028h,034h,048h,000h,000h,000h,000h
  defb 000h,000h,020h,050h,064h,094h,088h,076h,000h,000h,000h,000h
  defb 080h,080h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 020h,040h,040h,080h,080h,080h,080h,080h,080h,040h,040h,020h
  defb 080h,040h,040h,020h,020h,020h,020h,020h,020h,040h,040h,080h
  defb 000h,040h,0e0h,0a0h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,040h,0e0h,040h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,040h,040h,080h,000h,000h
  defb 000h,000h,000h,000h,000h,0c0h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,080h,000h,000h,000h,000h
  defb 000h,000h,010h,020h,020h,040h,040h,080h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,090h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,0c0h,040h,040h,040h,040h,040h,000h,000h,000h,000h
  defb 000h,000h,060h,010h,010h,020h,040h,0f0h,000h,000h,000h,000h
  defb 000h,000h,060h,010h,020h,010h,010h,0e0h,000h,000h,000h,000h
  defb 000h,000h,020h,060h,060h,0a0h,0f0h,020h,000h,000h,000h,000h
  defb 000h,000h,060h,040h,060h,010h,010h,0e0h,000h,000h,000h,000h
  defb 000h,000h,020h,040h,0e0h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,0f0h,010h,020h,020h,040h,040h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,060h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,090h,070h,020h,040h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,080h,000h,000h,080h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,040h,000h,000h,040h,040h,080h,000h,000h
  defb 000h,000h,000h,000h,040h,080h,040h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0e0h,000h,0e0h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,080h,040h,080h,000h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,020h,040h,000h,040h,000h,000h,000h,000h
  defb 000h,000h,03ch,042h,099h,0a9h,0a9h,0beh,040h,03ch,000h,000h
  defb 000h,000h,010h,028h,028h,044h,07ch,082h,000h,000h,000h,000h
  defb 000h,000h,0c0h,0a0h,0c0h,0a0h,0a0h,0c0h,000h,000h,000h,000h
  defb 000h,000h,038h,040h,080h,080h,040h,038h,000h,000h,000h,000h
  defb 000h,000h,0e0h,090h,088h,088h,090h,0e0h,000h,000h,000h,000h
  defb 000h,000h,0c0h,080h,0c0h,080h,080h,0c0h,000h,000h,000h,000h
  defb 000h,000h,0c0h,080h,0c0h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,038h,040h,080h,08ch,044h,03ch,000h,000h,000h,000h
  defb 000h,000h,088h,088h,0f8h,088h,088h,088h,000h,000h,000h,000h
  defb 000h,000h,080h,080h,080h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,040h,040h,040h,040h,040h,040h,040h,080h,000h,000h
  defb 000h,000h,0a0h,0c0h,0c0h,0a0h,0a0h,090h,000h,000h,000h,000h
  defb 000h,000h,080h,080h,080h,080h,080h,0c0h,000h,000h,000h,000h
  defb 000h,000h,044h,044h,06ch,0aah,092h,092h,000h,000h,000h,000h
  defb 000h,000h,084h,0c4h,0a4h,094h,08ch,084h,000h,000h,000h,000h
  defb 000h,000h,030h,048h,084h,084h,048h,030h,000h,000h,000h,000h
  defb 000h,000h,0c0h,0a0h,0a0h,0c0h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,030h,048h,084h,084h,048h,030h,00ch,003h,000h,000h
  defb 000h,000h,0c0h,0a0h,0a0h,0c0h,0a0h,098h,000h,000h,000h,000h
  defb 000h,000h,060h,080h,040h,020h,010h,0e0h,000h,000h,000h,000h
  defb 000h,000h,0f8h,020h,020h,020h,020h,020h,000h,000h,000h,000h
  defb 000h,000h,088h,088h,088h,088h,088h,070h,000h,000h,000h,000h
  defb 000h,000h,082h,044h,044h,028h,028h,010h,000h,000h,000h,000h
  defb 000h,000h,0a2h,055h,055h,02ah,02ah,014h,000h,000h,000h,000h
  defb 000h,000h,090h,090h,060h,060h,090h,090h,000h,000h,000h,000h
  defb 000h,000h,088h,050h,020h,020h,020h,020h,000h,000h,000h,000h
  defb 000h,000h,0fch,008h,010h,020h,040h,0fch,000h,000h,000h,000h
  defb 0c0h,080h,080h,080h,080h,080h,080h,080h,080h,080h,080h,0c0h
  defb 000h,000h,080h,040h,040h,020h,020h,010h,000h,000h,000h,000h
  defb 0c0h,040h,040h,040h,040h,040h,040h,040h,040h,040h,040h,0c0h
  defb 000h,040h,0a0h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,000h,000h,0fch,000h,000h
  defb 000h,080h,040h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,020h,0e0h,0f0h,000h,000h,000h,000h
  defb 080h,080h,080h,080h,0a0h,0d0h,090h,0e0h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,080h,080h,060h,000h,000h,000h,000h
  defb 010h,010h,010h,010h,050h,0b0h,090h,070h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,0f0h,080h,060h,000h,000h,000h,000h
  defb 000h,030h,040h,040h,0e0h,040h,040h,040h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,03ch,048h,048h,070h,098h,064h,098h,060h
  defb 080h,080h,080h,080h,0a0h,0d0h,090h,090h,000h,000h,000h,000h
  defb 000h,000h,080h,000h,080h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,040h,000h,040h,040h,040h,040h,040h,040h,040h,080h
  defb 080h,080h,080h,080h,0a0h,0c0h,0a0h,090h,000h,000h,000h,000h
  defb 080h,080h,080h,080h,080h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0a4h,0dah,092h,092h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0a0h,0d0h,090h,090h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0a0h,0d0h,090h,0e0h,080h,080h,080h,080h
  defb 000h,000h,000h,000h,050h,0b0h,090h,070h,010h,010h,010h,010h
  defb 000h,000h,000h,000h,0a0h,0c0h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,040h,030h,0e0h,000h,000h,000h,000h
  defb 000h,000h,040h,040h,0e0h,040h,040h,060h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,090h,090h,0b0h,050h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,088h,050h,050h,020h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0aah,054h,054h,028h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,090h,060h,060h,090h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,088h,050h,050h,020h,020h,040h,040h,080h
  defb 000h,000h,000h,000h,0f0h,020h,040h,0f0h,000h,000h,000h,000h
  defb 020h,040h,040h,040h,040h,080h,040h,040h,040h,040h,040h,020h
  defb 080h,080h,080h,080h,080h,080h,080h,080h,080h,080h,080h,080h
  defb 080h,040h,040h,040h,040h,020h,040h,040h,040h,040h,040h,080h
  defb 000h,000h,000h,000h,050h,0a0h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  end asm

naftaregularcharmapspacing:
asm
  defb 4,2,4,6,4,7,8,2,4,4,4,4,3,3,2,5
  defb 5,3,5,5,5,5,5,5,5,5,2,3,3,4,3,5
  defb 9,8,4,6,6,3,3,7,6,2,3,5,3,8,7,7
  defb 4,7,5,5,6,6,8,9,5,6,7,3,5,3,4,7
  defb 3,5,5,4,5,5,5,8,5,2,3,5,2,8,5,5
  defb 5,5,4,5,4,5,6,8,5,6,5,4,2,4,5,4
  end asm

naftaregularcharmapkerning:
asm
  defb "VA"
  defb 0FEh
  defb "AV"
  defb 0FEh
  end asm

naftaregularcharmapend:</code></div></div>]]></description>
			<content:encoded><![CDATA[i started to try proportional text writing on zxbasic - it's far incomplete (not printing from strings yet) and slow<br />
<br />
test.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include "lib/NaftaRegular_charmap.bas"
dim i,j,adr,v,vq,vq2,x,y,x1,x2,c,c1,xps as uinteger
border 6:paper 7:ink 1: bright 1:cls
x=3:y=109
for c1=0 to 52
  x1=int(x/8)
  x2=7-(x mod 8)
  for j=0 to 11
    i= ((y+j)*32)+x1
    adr=(16384+((i band 31) bor ((i band 224)*8) bor ((i band 1793)/8) bor (i band 6144)))
    v=peek(uinteger, adr)
    vq2=(peek(@naftaregularcharmap+(12*c1)+j))*(2^x2)
    vqbs= ((vq2 band 65280)/256) bor ((vq2 band 255)*256)
    poke uinteger adr,v bor vqbs
    next j
  x=x+peek(@naftaregularcharmapspacing+c1)  
  next c1
pause 0</code></div></div><br />
lib/NaftaRegular_charmap.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>goto naftaregularcharmapend

naftaregularcharmap:
asm
  defb 000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,080h,080h,080h,080h,000h,080h,000h,000h,000h,000h
  defb 0a0h,0a0h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,050h,0f8h,050h,050h,0f8h,050h,000h,000h,000h,000h
  defb 040h,040h,0e0h,0c0h,0c0h,060h,060h,0e0h,040h,040h,000h,000h
  defb 000h,000h,048h,0b0h,050h,028h,034h,048h,000h,000h,000h,000h
  defb 000h,000h,020h,050h,064h,094h,088h,076h,000h,000h,000h,000h
  defb 080h,080h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 020h,040h,040h,080h,080h,080h,080h,080h,080h,040h,040h,020h
  defb 080h,040h,040h,020h,020h,020h,020h,020h,020h,040h,040h,080h
  defb 000h,040h,0e0h,0a0h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,040h,0e0h,040h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,040h,040h,080h,000h,000h
  defb 000h,000h,000h,000h,000h,0c0h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,080h,000h,000h,000h,000h
  defb 000h,000h,010h,020h,020h,040h,040h,080h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,090h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,0c0h,040h,040h,040h,040h,040h,000h,000h,000h,000h
  defb 000h,000h,060h,010h,010h,020h,040h,0f0h,000h,000h,000h,000h
  defb 000h,000h,060h,010h,020h,010h,010h,0e0h,000h,000h,000h,000h
  defb 000h,000h,020h,060h,060h,0a0h,0f0h,020h,000h,000h,000h,000h
  defb 000h,000h,060h,040h,060h,010h,010h,0e0h,000h,000h,000h,000h
  defb 000h,000h,020h,040h,0e0h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,0f0h,010h,020h,020h,040h,040h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,060h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,090h,070h,020h,040h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,080h,000h,000h,080h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,040h,000h,000h,040h,040h,080h,000h,000h
  defb 000h,000h,000h,000h,040h,080h,040h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0e0h,000h,0e0h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,080h,040h,080h,000h,000h,000h,000h,000h
  defb 000h,000h,060h,090h,020h,040h,000h,040h,000h,000h,000h,000h
  defb 000h,000h,03ch,042h,099h,0a9h,0a9h,0beh,040h,03ch,000h,000h
  defb 000h,000h,010h,028h,028h,044h,07ch,082h,000h,000h,000h,000h
  defb 000h,000h,0c0h,0a0h,0c0h,0a0h,0a0h,0c0h,000h,000h,000h,000h
  defb 000h,000h,038h,040h,080h,080h,040h,038h,000h,000h,000h,000h
  defb 000h,000h,0e0h,090h,088h,088h,090h,0e0h,000h,000h,000h,000h
  defb 000h,000h,0c0h,080h,0c0h,080h,080h,0c0h,000h,000h,000h,000h
  defb 000h,000h,0c0h,080h,0c0h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,038h,040h,080h,08ch,044h,03ch,000h,000h,000h,000h
  defb 000h,000h,088h,088h,0f8h,088h,088h,088h,000h,000h,000h,000h
  defb 000h,000h,080h,080h,080h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,040h,040h,040h,040h,040h,040h,040h,080h,000h,000h
  defb 000h,000h,0a0h,0c0h,0c0h,0a0h,0a0h,090h,000h,000h,000h,000h
  defb 000h,000h,080h,080h,080h,080h,080h,0c0h,000h,000h,000h,000h
  defb 000h,000h,044h,044h,06ch,0aah,092h,092h,000h,000h,000h,000h
  defb 000h,000h,084h,0c4h,0a4h,094h,08ch,084h,000h,000h,000h,000h
  defb 000h,000h,030h,048h,084h,084h,048h,030h,000h,000h,000h,000h
  defb 000h,000h,0c0h,0a0h,0a0h,0c0h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,030h,048h,084h,084h,048h,030h,00ch,003h,000h,000h
  defb 000h,000h,0c0h,0a0h,0a0h,0c0h,0a0h,098h,000h,000h,000h,000h
  defb 000h,000h,060h,080h,040h,020h,010h,0e0h,000h,000h,000h,000h
  defb 000h,000h,0f8h,020h,020h,020h,020h,020h,000h,000h,000h,000h
  defb 000h,000h,088h,088h,088h,088h,088h,070h,000h,000h,000h,000h
  defb 000h,000h,082h,044h,044h,028h,028h,010h,000h,000h,000h,000h
  defb 000h,000h,0a2h,055h,055h,02ah,02ah,014h,000h,000h,000h,000h
  defb 000h,000h,090h,090h,060h,060h,090h,090h,000h,000h,000h,000h
  defb 000h,000h,088h,050h,020h,020h,020h,020h,000h,000h,000h,000h
  defb 000h,000h,0fch,008h,010h,020h,040h,0fch,000h,000h,000h,000h
  defb 0c0h,080h,080h,080h,080h,080h,080h,080h,080h,080h,080h,0c0h
  defb 000h,000h,080h,040h,040h,020h,020h,010h,000h,000h,000h,000h
  defb 0c0h,040h,040h,040h,040h,040h,040h,040h,040h,040h,040h,0c0h
  defb 000h,040h,0a0h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,000h,000h,0fch,000h,000h
  defb 000h,080h,040h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,020h,0e0h,0f0h,000h,000h,000h,000h
  defb 080h,080h,080h,080h,0a0h,0d0h,090h,0e0h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,080h,080h,060h,000h,000h,000h,000h
  defb 010h,010h,010h,010h,050h,0b0h,090h,070h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,0f0h,080h,060h,000h,000h,000h,000h
  defb 000h,030h,040h,040h,0e0h,040h,040h,040h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,03ch,048h,048h,070h,098h,064h,098h,060h
  defb 080h,080h,080h,080h,0a0h,0d0h,090h,090h,000h,000h,000h,000h
  defb 000h,000h,080h,000h,080h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,040h,000h,040h,040h,040h,040h,040h,040h,040h,080h
  defb 080h,080h,080h,080h,0a0h,0c0h,0a0h,090h,000h,000h,000h,000h
  defb 080h,080h,080h,080h,080h,080h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0a4h,0dah,092h,092h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0a0h,0d0h,090h,090h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,090h,090h,060h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0a0h,0d0h,090h,0e0h,080h,080h,080h,080h
  defb 000h,000h,000h,000h,050h,0b0h,090h,070h,010h,010h,010h,010h
  defb 000h,000h,000h,000h,0a0h,0c0h,080h,080h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,060h,040h,030h,0e0h,000h,000h,000h,000h
  defb 000h,000h,040h,040h,0e0h,040h,040h,060h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,090h,090h,0b0h,050h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,088h,050h,050h,020h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,0aah,054h,054h,028h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,090h,060h,060h,090h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,088h,050h,050h,020h,020h,040h,040h,080h
  defb 000h,000h,000h,000h,0f0h,020h,040h,0f0h,000h,000h,000h,000h
  defb 020h,040h,040h,040h,040h,080h,040h,040h,040h,040h,040h,020h
  defb 080h,080h,080h,080h,080h,080h,080h,080h,080h,080h,080h,080h
  defb 080h,040h,040h,040h,040h,020h,040h,040h,040h,040h,040h,080h
  defb 000h,000h,000h,000h,050h,0a0h,000h,000h,000h,000h,000h,000h
  defb 000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h
  end asm

naftaregularcharmapspacing:
asm
  defb 4,2,4,6,4,7,8,2,4,4,4,4,3,3,2,5
  defb 5,3,5,5,5,5,5,5,5,5,2,3,3,4,3,5
  defb 9,8,4,6,6,3,3,7,6,2,3,5,3,8,7,7
  defb 4,7,5,5,6,6,8,9,5,6,7,3,5,3,4,7
  defb 3,5,5,4,5,5,5,8,5,2,3,5,2,8,5,5
  defb 5,5,4,5,4,5,6,8,5,6,5,4,2,4,5,4
  end asm

naftaregularcharmapkerning:
asm
  defb "VA"
  defb 0FEh
  defb "AV"
  defb 0FEh
  end asm

naftaregularcharmapend:</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[SamCoupé palette support]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=417</link>
			<pubDate>Wed, 21 Dec 2011 03:26:46 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=187">nitrofurano</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=417</guid>
			<description><![CDATA[Some people here may know that zx-spectrum stuff can run on sam coupé machines, and these stuff can write on its palette as well.<br />
<br />
This is based on the library i added to support ULAplus, and did the enough changes for the SamCoupé - i didn't test it yet.<br />
<br />
There are differences - while ULAplus has 64 palette colours from 256, SamCoupé has 16 from 128, and arranged in a different way. And anyway, SamCoupé palette seems to be simpler to use, since there are no need for tricky subroutines like "ulaplusattr(ikv as ubyte,pav as ubyte)"<br />
<br />
Besides the ULAplus version, i don't know or i have no way to get the palette values back, or test if the machine uses SamCoupé palette<br />
<br />
I didn't test this code yet - SimCoupé seems to be a good emulator for testing it:<br />
<br />
library/samcoupepalette.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>dim tmpv as uinteger

sub samcoupepalette(clv as ubyte, vlv as ubyte):
  out (clv*256)bor 248,vlv:pause 1
  end sub

function samcoupehexcolour(hxcv as uinteger):
  tmpv=(hxcv band 4)/4
  tmpv=tmpv bor ((hxcv band 64)/16) 
  tmpv=tmpv bor ((hxcv band 8)*2) 
  tmpv=tmpv bor ((hxcv band 128)/2) 
  tmpv=tmpv bor ((hxcv band 32)/4) 
  hxcv=int(hxcv/256)
  tmpv=tmpv bor ((hxcv band 64)/16) 
  tmpv=tmpv bor ((hxcv band 8)*2) 
  return tmpv
  end function</code></div></div><br />
the information on the code above is based on the reply i got from Velesoft at &lt;!-- m --&gt;&lt;a class="postlink" href="http://www.worldofspectrum.org/forums/showthread.php?p=583022#post583022"&gt;http://www.worldofspectrum.org/forums/s ... post583022&lt;/a&gt;&lt;!-- m --&gt;]]></description>
			<content:encoded><![CDATA[Some people here may know that zx-spectrum stuff can run on sam coupé machines, and these stuff can write on its palette as well.<br />
<br />
This is based on the library i added to support ULAplus, and did the enough changes for the SamCoupé - i didn't test it yet.<br />
<br />
There are differences - while ULAplus has 64 palette colours from 256, SamCoupé has 16 from 128, and arranged in a different way. And anyway, SamCoupé palette seems to be simpler to use, since there are no need for tricky subroutines like "ulaplusattr(ikv as ubyte,pav as ubyte)"<br />
<br />
Besides the ULAplus version, i don't know or i have no way to get the palette values back, or test if the machine uses SamCoupé palette<br />
<br />
I didn't test this code yet - SimCoupé seems to be a good emulator for testing it:<br />
<br />
library/samcoupepalette.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>dim tmpv as uinteger

sub samcoupepalette(clv as ubyte, vlv as ubyte):
  out (clv*256)bor 248,vlv:pause 1
  end sub

function samcoupehexcolour(hxcv as uinteger):
  tmpv=(hxcv band 4)/4
  tmpv=tmpv bor ((hxcv band 64)/16) 
  tmpv=tmpv bor ((hxcv band 8)*2) 
  tmpv=tmpv bor ((hxcv band 128)/2) 
  tmpv=tmpv bor ((hxcv band 32)/4) 
  hxcv=int(hxcv/256)
  tmpv=tmpv bor ((hxcv band 64)/16) 
  tmpv=tmpv bor ((hxcv band 8)*2) 
  return tmpv
  end function</code></div></div><br />
the information on the code above is based on the reply i got from Velesoft at &lt;!-- m --&gt;&lt;a class="postlink" href="http://www.worldofspectrum.org/forums/showthread.php?p=583022#post583022"&gt;http://www.worldofspectrum.org/forums/s ... post583022&lt;/a&gt;&lt;!-- m --&gt;]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[graphic library comparison]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=404</link>
			<pubDate>Tue, 08 Nov 2011 19:15:55 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=177">slenkar</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=404</guid>
			<description><![CDATA[Which graphic library is good to use in different situations? and what advantages disadvantages do they have?]]></description>
			<content:encoded><![CDATA[Which graphic library is good to use in different situations? and what advantages disadvantages do they have?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ULAplus support]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=401</link>
			<pubDate>Mon, 07 Nov 2011 11:59:37 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=187">nitrofurano</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=401</guid>
			<description><![CDATA[since i'm seeing so many good games from MojonTwins supporting ULAplus, and its implementation looked so simple, i tried to code some library and example for that - be welcome testing it (i think would be a good idea if this could be implemented defaultly on zxbasic-compiler, what do you all think?)<br />
(for now i'm testing this on SpectEmu on Wine, while there are no native emulators for LInux)<br />
<br />
library/ulaplus.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>dim tmpv as uinteger
dim fdbkv as ubyte

function ulapluscheck():
  tmpv=in(65339):pause 1:fdbkv=0
  out 48955,0:out 65339,0:pause 1
  if in(65339)&lt;&gt;tmpv then:fdbkv=1:out 48955,0:out 65339,tmpv:pause 1:end if
  return fdbkv
  end function

sub ulapluspalette(clv as ubyte, vlv as ubyte):
  out 48955,(clv band 63):out 65339,vlv:pause 1
  end sub

sub ulaplusswitch(flgv as ubyte):
  out 48955,64:out 65339,(flgv band 1):pause 1
  end sub</code></div></div><br />
ulaplus_example.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include "library/ulaplus.bas"

ulaplusswitch(1):cls

a&#36;="ULAplus is not present"
if ulapluscheck()&lt;&gt;0 then:a&#36;="ULAplus is present":end if
print at 0,0;a&#36;

for fl=0 to 1
  flash fl
  for hb=0 to 1
    bright hb
    for pa=0 to 7
      paper pa:inverse 0
      print " ";
      next
    for ik=0 to 7
      ink ik:inverse 1
      print " ";
      next
    next:next

for i=0 to 63
  ulapluspalette(i, int(rnd*255) )
  next

pause 0</code></div></div>]]></description>
			<content:encoded><![CDATA[since i'm seeing so many good games from MojonTwins supporting ULAplus, and its implementation looked so simple, i tried to code some library and example for that - be welcome testing it (i think would be a good idea if this could be implemented defaultly on zxbasic-compiler, what do you all think?)<br />
(for now i'm testing this on SpectEmu on Wine, while there are no native emulators for LInux)<br />
<br />
library/ulaplus.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>dim tmpv as uinteger
dim fdbkv as ubyte

function ulapluscheck():
  tmpv=in(65339):pause 1:fdbkv=0
  out 48955,0:out 65339,0:pause 1
  if in(65339)&lt;&gt;tmpv then:fdbkv=1:out 48955,0:out 65339,tmpv:pause 1:end if
  return fdbkv
  end function

sub ulapluspalette(clv as ubyte, vlv as ubyte):
  out 48955,(clv band 63):out 65339,vlv:pause 1
  end sub

sub ulaplusswitch(flgv as ubyte):
  out 48955,64:out 65339,(flgv band 1):pause 1
  end sub</code></div></div><br />
ulaplus_example.bas<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include "library/ulaplus.bas"

ulaplusswitch(1):cls

a&#36;="ULAplus is not present"
if ulapluscheck()&lt;&gt;0 then:a&#36;="ULAplus is present":end if
print at 0,0;a&#36;

for fl=0 to 1
  flash fl
  for hb=0 to 1
    bright hb
    for pa=0 to 7
      paper pa:inverse 0
      print " ";
      next
    for ik=0 to 7
      ink ik:inverse 1
      print " ";
      next
    next:next

for i=0 to 63
  ulapluspalette(i, int(rnd*255) )
  next

pause 0</code></div></div>]]></content:encoded>
		</item>
	</channel>
</rss>