<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="http://smartbasic.net/forum/app.php/feed/topic/46" />

	<title>SmartBASIC - A Coleco Adam Forum</title>
	<subtitle>Let's Talk Adam</subtitle>
	<link href="http://smartbasic.net/forum/index.php" />
	<updated>2021-01-09T09:16:59-04:00</updated>

	<author><name><![CDATA[SmartBASIC - A Coleco Adam Forum]]></name></author>
	<id>http://smartbasic.net/forum/app.php/feed/topic/46</id>

		<entry>
		<author><name><![CDATA[Wmaalouli]]></name></author>
		<updated>2021-01-09T09:16:59-04:00</updated>

		<published>2021-01-09T09:16:59-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=544#p544</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=544#p544"/>
		<title type="html"><![CDATA[Re: VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=544#p544"><![CDATA[
56h is used by the pattern descriptor table.<br>I just realized that CP/M on the Adam does use some sprites for the cursor and the I-VI key display, so it's probably taking the upper 16 sprites for its own use.<p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=51">Wmaalouli</a> — Sat Jan 09, 2021 8:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Milli]]></name></author>
		<updated>2021-01-06T14:40:54-04:00</updated>

		<published>2021-01-06T14:40:54-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=543#p543</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=543#p543"/>
		<title type="html"><![CDATA[Re: VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=543#p543"><![CDATA[
<blockquote class="uncited"><div>During the development of my current project with Turbo Pascal 3 and the graphic extensions, I encountered an odd bug where the pattern of any defined sprite beyond the 16th sprite was getting corrupted. I poured over my extensions code but could not find any problems there. Then I remembered the VDP map posted by Milli here, and upon closer inspection, it looks like the Sprite Descriptor Table (SDT) which holds the patterns for the sprites has enough allocated space for only 16 sprites, not the expected 32! It starts at $3800 and ends at $387F whereas it should extend to $38FF since each sprite pattern is 8 bytes.<br>After the 16th sprite, the SDT starts overwriting the Sprite Attribute List (SAL) at $3880 and then when the SAL is updated it corrupts any sprite patterns beyond the 16th.<br>So I figured it should be an easy fix: just move the SAL to $3900 and problem solved, which would only involve changing the value in VDP register 5 to a multiple of $80, i.e. for a base SAL address of $3900, VR5 should contain $72 ($72 x $80 = $3900). Unfortunately, it did not work and all I got was either no visible effect or screen corruption. I tried multiple different technically unused locations within the VDP RAM with similar results.<br>Major bummer! I'm not sure what the issue is but I suspect that CP/M is writing stuff to the unused areas of the VDP and somebody at Coleco apparently figured that no one was going to use sprites under CP/M any way. Hah!<br>Major bummer...</div></blockquote><br>How about moving it to this open location (56h for register 5)?<br><br>1B00h - 1FFFh Unused, CP/M may use for scratch RAM<p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=2">Milli</a> — Wed Jan 06, 2021 1:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Wmaalouli]]></name></author>
		<updated>2020-12-30T16:35:18-04:00</updated>

		<published>2020-12-30T16:35:18-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=540#p540</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=540#p540"/>
		<title type="html"><![CDATA[Re: VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=540#p540"><![CDATA[
During the development of my current project with Turbo Pascal 3 and the graphic extensions, I encountered an odd bug where the pattern of any defined sprite beyond the 16th sprite was getting corrupted. I poured over my extensions code but could not find any problems there. Then I remembered the VDP map posted by Milli here, and upon closer inspection, it looks like the Sprite Descriptor Table (SDT) which holds the patterns for the sprites has enough allocated space for only 16 sprites, not the expected 32! It starts at $3800 and ends at $387F whereas it should extend to $38FF since each sprite pattern is 8 bytes.<br>After the 16th sprite, the SDT starts overwriting the Sprite Attribute List (SAL) at $3880 and then when the SAL is updated it corrupts any sprite patterns beyond the 16th.<br>So I figured it should be an easy fix: just move the SAL to $3900 and problem solved, which would only involve changing the value in VDP register 5 to a multiple of $80, i.e. for a base SAL address of $3900, VR5 should contain $72 ($72 x $80 = $3900). Unfortunately, it did not work and all I got was either no visible effect or screen corruption. I tried multiple different technically unused locations within the VDP RAM with similar results.<br>Major bummer! I'm not sure what the issue is but I suspect that CP/M is writing stuff to the unused areas of the VDP and somebody at Coleco apparently figured that no one was going to use sprites under CP/M any way. Hah!<br>Major bummer...<p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=51">Wmaalouli</a> — Wed Dec 30, 2020 3:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Milli]]></name></author>
		<updated>2019-08-18T08:29:48-04:00</updated>

		<published>2019-08-18T08:29:48-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=155#p155</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=155#p155"/>
		<title type="html"><![CDATA[Re: VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=155#p155"><![CDATA[
<blockquote class="uncited"><div>One <strong class="text-strong">important difference</strong> between the set up of the VDP on the ADAM compared to the TI 99/4A is that the bitmap display on the ADAM <em class="text-italics">disables interrupts</em> in VDP register 1 whereas on the TI they are enabled. Therefore, the standard content of VR1 for the ADAM for the bitmap mode is $C0. It took me a while to figure this out while ripping my hair trying to understand why the screen was getting corrupted!  <img class="smilies" src="http://smartbasic.net/forum/images/smilies/icon_mrgreen.gif" width="15" height="17" alt=":mrgreen:" title="Mr. Green"></div></blockquote>I bet this is my problem too! It works fine in the Emulator but on real hardware garbage<p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=2">Milli</a> — Sun Aug 18, 2019 8:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Wmaalouli]]></name></author>
		<updated>2019-08-17T16:06:31-04:00</updated>

		<published>2019-08-17T16:06:31-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=150#p150</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=150#p150"/>
		<title type="html"><![CDATA[Re: VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=150#p150"><![CDATA[
One <strong class="text-strong">important difference</strong> between the set up of the VDP on the ADAM compared to the TI 99/4A is that the bitmap display on the ADAM <em class="text-italics">disables interrupts</em> in VDP register 1 whereas on the TI they are enabled. Therefore, the standard content of VR1 for the ADAM for the bitmap mode is $C0. It took me a while to figure this out while ripping my hair trying to understand why the screen was getting corrupted!  <img class="smilies" src="http://smartbasic.net/forum/images/smilies/icon_mrgreen.gif" width="15" height="17" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=51">Wmaalouli</a> — Sat Aug 17, 2019 4:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Milli]]></name></author>
		<updated>2019-08-17T07:22:28-04:00</updated>

		<published>2019-08-17T07:22:28-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=144#p144</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=144#p144"/>
		<title type="html"><![CDATA[Re: VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=144#p144"><![CDATA[
Thank you for posting this - once I get back in to coding in a week or 2 this will come in handy.<p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=2">Milli</a> — Sat Aug 17, 2019 7:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Wmaalouli]]></name></author>
		<updated>2019-08-16T12:52:42-04:00</updated>

		<published>2019-08-16T12:52:42-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=143#p143</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=143#p143"/>
		<title type="html"><![CDATA[Re: VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=143#p143"><![CDATA[
I thought this might be useful for anyone trying to understand how the VDP is organized and how to use it. It's an excerpt for the TI 99/4A computer Editor/Assembler manual, and it goes into great detail not otherwise easily available for the Adam.<dl class="file"><dt><span class="imageset icon_topic_attach"></span> <a class="postlink" href="http://smartbasic.net/forum/download/file.php?id=47">VDP graphics instructions PDF.zip</a></dt></dl><p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=51">Wmaalouli</a> — Fri Aug 16, 2019 12:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Wmaalouli]]></name></author>
		<updated>2019-08-05T09:41:19-04:00</updated>

		<published>2019-08-05T09:41:19-04:00</published>
		<id>http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=129#p129</id>
		<link href="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=129#p129"/>
		<title type="html"><![CDATA[VDP memory organization]]></title>

		
		<content type="html" xml:base="http://smartbasic.net/forum/viewtopic.php?t=46&amp;p=129#p129"><![CDATA[
This is a repost of Milli's excellent breakdown of the VDP memory organization table for those interested in accessing graphics via assembly language (form the AtariAge forum). I thought it would be easier to find and more relevant here. I just clarified the titles of each section based on the TI nomenclature.<br><br>-------------------------------------------------------------------------------------<br><br>Notes: CPM breaks the screen up into thirds: TOP, MID, BOT<br>CPM uses a sprite for the cursor<br><br>0000h - 07FFh Font patterns for the top 8 lines of screen <strong class="text-strong">(Pattern Descriptor Table)</strong><br><br>0800h - 0FFFh Font patterns for the middle 8 lines of screen<br><br>1000h - 17FFh Font patterns for the bottom 8 lines of screen<br><br>1800h - 18FFh Characters for the top 8 lines  <strong class="text-strong">(Screen Image Table)</strong><br><br>1900h - 19FFh Characters for the middle 8 lines<br><br>1A00h - 1AFFh Characters for the bottom 8 lines<br><br>1B00h - 1FFFh Unused, CP/M may use for scratch RAM<br><br>2000h - 27FFh Colors for the top 8 lines of the screen  <strong class="text-strong">(Color Table)</strong><br><br>2800h - 3FFFh Colors for the middle 8 lines of the screen<br><br>3000h - 37FFh Colors for the bottom 8 lines of the screen<br><br>3800h - 387Fh <strong class="text-strong">(Sprite Descriptor Table)</strong><br><br>3880h - 38FFh <strong class="text-strong">(Sprite Attribute List)</strong><br><br>3900h - 3FFFh Unused, CP/M may use for scratch RAM<br>Milli<p>Statistics: Posted by <a href="http://smartbasic.net/forum/memberlist.php?mode=viewprofile&amp;u=51">Wmaalouli</a> — Mon Aug 05, 2019 9:41 am</p><hr />
]]></content>
	</entry>
	</feed>
