Ted's Tidbits https://tidbits.tedchoward.com/ en Thu, 02 Nov 2023 15:46:22 -0500 https://tidbits.tedchoward.com/2023/11/02/dallas-morning-news.html Thu, 02 Nov 2023 15:46:22 -0500 http://tedchoward.micro.blog/2023/11/02/dallas-morning-news.html <p>Dallas Morning News front page today</p> <img src="https://cdn.uploads.micro.blog/26264/2023/ddd7f22488.jpg" width="316" height="600" alt=""> VGA Followup https://tidbits.tedchoward.com/2023/07/02/vga-followup.html Sun, 02 Jul 2023 16:58:39 -0500 http://tedchoward.micro.blog/2023/07/02/vga-followup.html <p>I need to remember how valuable writing is as a thought tool. The other night I was truly stumped as to how to solve my VGA problem.</p> <p>As I was finishing writing my <a href="https://tidbits.tedchoward.com/2023/07/02/debugging-a-vga.html">previous post</a>, I began to get an idea of where to start debugging my problem. I even said so in the post:</p> <blockquote> <p>Remember, there’s a break at the end of every line. This means that I need to start loading the character data for the start of the next line at the end of this blank period. There’s also a longer break at the end of each screen. This means that I need to load the data for the first character of the screen at the end of this blank period.</p> </blockquote> <blockquote> <p>I think this is where the bug is. All the characters in the first column are one half-line (at 320x240) lower than the rest of the screen. My best guess is that I need to start the data load a little sooner during the blank period.</p> </blockquote> <p>So, I looked for the code that calculates which row of pixels to load, and I found this:</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-verilog" data-lang="verilog"><span style="color:#66d9ef">wire</span> [<span style="color:#ae81ff">11</span><span style="color:#f92672">:</span><span style="color:#ae81ff">0</span>] rom_adr <span style="color:#f92672">=</span> { pattern_num, vga_vpos[<span style="color:#ae81ff">3</span><span style="color:#f92672">:</span><span style="color:#ae81ff">1</span>] }; </code></pre></div><p>This line says, &ldquo;the location in ROM is composed of the <code>pattern_num</code> (i.e. the ASCII character) and bits 3, 2, and 1 of the <strong>current line</strong>&rdquo;. Apologies to anyone still reading this that isn&rsquo;t familiar with binary numbers, but those details don&rsquo;t really matter. What matters is what I put in bold above. We are using the value of the current line to calculate the value of the next character. This works for every character in a row, except for the first character.</p> <p>When we read the font data for the first character in a row, we are using a value based on the previous row. We need a special case for when we read the first character.</p> <p>This is what I ended up with</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-verilog" data-lang="verilog"><span style="color:#66d9ef">wire</span> [<span style="color:#ae81ff">10</span><span style="color:#f92672">:</span><span style="color:#ae81ff">0</span>] rom_adr <span style="color:#f92672">=</span> { pattern_num, (display_on <span style="color:#f92672">?</span> vga_vpos[<span style="color:#ae81ff">3</span><span style="color:#f92672">:</span><span style="color:#ae81ff">1</span>] <span style="color:#f92672">:</span> next_rom_row) }; </code></pre></div><p>Basically this says that if the display is on, use the current line position. If the display is off, (i.e. the blank period at the end of the line) use the next line position.</p> <p>There was some other work I had to to do calculate that value properly, but it works now!</p> <img src="https://cdn.uploads.micro.blog/26264/2023/image.jpg" width="600" height="450" alt="Monitor showing text. The first column is properly aligned with the rest of the columns."> Debugging a VGA Issue https://tidbits.tedchoward.com/2023/07/02/debugging-a-vga.html Sun, 02 Jul 2023 13:23:37 -0500 http://tedchoward.micro.blog/2023/07/02/debugging-a-vga.html <p>I&rsquo;m building an 8-bit computer. I should probably write an overview of the project, why I decided to do it, how I got started, etc, but today I have a problem to solve.</p> <p>Take a look at the following image:</p> <img src="https://cdn.uploads.micro.blog/26264/2023/computer-and-display.jpg" width="450" height="600" alt="LCD Monitor with text on a messy desk with a breadboard full of wires and chips"> <p>This shows a VGA monitor displaying text at a resolution of 40 columns x 30 rows. Each character is an 8x8 block, giving an overall screen resolution of 320x240 pixels.</p> <p>Now, what&rsquo;s the problem?</p> <p>Look closely at the first column. Does it look a little off to you? It did do me, which caused me to zoom in.</p> <img src="https://cdn.uploads.micro.blog/26264/2023/col-1-issue.jpg" width="600" height="526" alt="text on a monitor, with a yellow line under the second row to show the character in the first column is lower than the rest"> <p>The first column is one half-line lower than all the following columns.</p> <p>How can this be?</p> <p>It&rsquo;s time to talk about how this is <em>supposed</em> to work.</p> <p>I have an <a href="https://nandland.com/lesson-1-what-is-an-fpga-what-is-an-asic/">FPGA</a> that is acting as a video processor (like the <a href="https://en.wikipedia.org/wiki/MOS_Technology_VIC-II">VIC II</a> in the Commodore or the <a href="https://en.wikipedia.org/wiki/ANTIC">ANTIC</a>/<a href="https://en.wikipedia.org/wiki/CTIA_and_GTIA">GTIA</a> combo in the Atari). I have a character font stored in <abbr title="Read-Only Memory">ROM</abbr>. There&rsquo;s also a section of <abbr title="Random-Access Memory">RAM</abbr> that stores the <a href="https://en.wikipedia.org/wiki/ASCII">ASCII</a> values of the characters to display on the screen in order. The first byte in this section of RAM controls the character in the top-left corner of the screen. The last byte controls the character displayed in the bottom-right corner of the screen.</p> <p>In order to control a VGA monitor, the video processor sends the pixel data (either on or off in my case) for each pixel on the display starting at the top-left, one line at a time, moving left-to-right. This happens at a constant rate, with a fixed-length break at the end of each line, and a slightly longer break at the end of each screen. This process happens 60 times every second.<sup id="fnr1-2023-07-02"><a href="#fn1-2023-07-02">1</a></sup></p> <p>In order to display the expected values on the screen, the video processor must do the following:</p> <ol> <li>Load the next character from RAM.</li> <li>Combine the value from RAM with the vertical position on the screen to look up the font data from ROM. (Remember each font is 8 lines tall, so we need to know which line of the font to draw.)</li> <li>Send the font data out one pixel at a time.</li> </ol> <p>As you can imagine, the timing of these operations is critical. We need to load the next character from RAM and the font data from ROM while we are in the process of sending the pixel data to the monitor for the last character.</p> <p>Oh yeah, one other thing. VGA doesn&rsquo;t technically support a screen resolution of 320x240, but it does support 640x480. So I&rsquo;m drawing every pixel twice per line, and drawing every line twice.<sup id="fnr2-2023-07-02"><a href="#fn2-2023-07-02">2</a></sup></p> <p>When the processor is outputting the 5th pixel for a character, it starts loading the data for the next character. This seems to work just fine for almost the entire screen, except for the first column.</p> <p>Remember, there&rsquo;s a break at the end of every line. This means that I need to start loading the character data for the start of the next line at the end of this blank period. There&rsquo;s also a longer break at the end of each screen. This means that I need to load the data for the first character of the screen at the end of this blank period.</p> <p>I think this is where the bug is. All the characters in the first column are one half-line (at 320x240) lower than the rest of the screen. My best guess is that I need to start the data load a little sooner during the blank period.</p> <hr> <ol> <li id="fn1-2023-07-02">For a much better explanation of how VGA works, I recommend <a href="https://www.youtube.com/watch?v=l7rce6IQDWs">Ben Eater's excellent video</a>.<a href="#fnr1-2023-07-02">↩︎</a></li> <li id="fn2-2023-07-02">I want a 320x240 screen size because my 8-bit system doesn't have enough memory to support a 640x480 size screen.<a href="#fnr2-2023-07-02">↩︎</a></li> </ol> Layoffs Will Continue Until Morale Decreases https://tidbits.tedchoward.com/2023/04/14/layoffs-will-continue.html Fri, 14 Apr 2023 13:55:16 -0500 http://tedchoward.micro.blog/2023/04/14/layoffs-will-continue.html <p><a href="https://pluralistic.net/2023/04/12/algorithmic-wage-discrimination/#fishers-of-men">Cory Doctorow</a>:</p> <blockquote> <p>The tech worker layoffs are best understood as an all-out war on tech worker morale, because that morale is the source of tech workers' confidence and thus their demands for a larger share of the value generated by their labor. The current tech layoff template is very different from previous tech layoffs: today&rsquo;s layoffs are taking place over a period of months, long after they are announced, and laid off tech worker is likely to be offered a months of paid post-layoff work, rather than severance. This means that tech workplaces are now haunted by the walking dead, workers who have been laid off but need to come into the office for months, even as the threat of layoffs looms over the heads of the workers who remain. As an old friend, recently laid off from Microsoft after decades of service, wrote to me, this is &ldquo;a new arrow in the quiver of bringing tech workers to heel and ensuring that we&rsquo;re properly thankful for the jobs we have (had?).&rdquo;</p> </blockquote> Five Dallas Council Members Call for Independent Study of I-345 Removal https://tidbits.tedchoward.com/2023/04/11/five-dallas-council.html Tue, 11 Apr 2023 09:10:09 -0500 http://tedchoward.micro.blog/2023/04/11/five-dallas-council.html <p><a href="https://www.dmagazine.com/frontburner/2023/04/five-dallas-council-members-call-for-independent-study-of-i-345-removal/">Matt Goodman</a>:</p> <blockquote> <p>That’s the difficulty in this debate. It’s about the city’s future, a generational chance to trade eight elevated lanes of highway for an eventual new neighborhood. The members who added their names to the memo have expressed more interest in analyzing the opportunities removal could present; after all, traffic data cannot account for changes in technology and behavior, both of which inform how frequently people drive. As Councilwoman Willis asked last year, what happens if the city’s economic development plan creates jobs in southern Dallas so residents there no longer have to drive as far to get to work?</p> </blockquote> https://tidbits.tedchoward.com/2023/04/05/this-just-came.html Wed, 05 Apr 2023 11:44:52 -0500 http://tedchoward.micro.blog/2023/04/05/this-just-came.html <p>This just came in the mail. It’s about time I started trying to understand computers! 😜 📚</p> <img src="https://cdn.uploads.micro.blog/26264/2023/7c254d8939.jpg" width="600" height="600" alt=""> https://tidbits.tedchoward.com/2023/04/01/im-finally-learning.html Sat, 01 Apr 2023 17:00:56 -0500 http://tedchoward.micro.blog/2023/04/01/im-finally-learning.html <p>I’m finally learning how to solder. I think I’m doing pretty good.</p> <p><img src="https://cdn.uploads.micro.blog/26264/2023/a60544a165.jpg" width="600" height="600" alt=""><img src="https://cdn.uploads.micro.blog/26264/2023/b1ea5ae7d4.jpg" width="600" height="600" alt=""></p> https://tidbits.tedchoward.com/2023/03/28/i-just-started.html Tue, 28 Mar 2023 21:21:06 -0500 http://tedchoward.micro.blog/2023/03/28/i-just-started.html <p>I just started reading: <a href="https://micro.blog/books/9780226816524">The Apple II Age</a> by Laine Nooney. This is going to be an interesting read.📚</p> https://tidbits.tedchoward.com/2022/12/06/i-really-enjoyed.html Tue, 06 Dec 2022 12:43:09 -0500 http://tedchoward.micro.blog/2022/12/06/i-really-enjoyed.html <p>I really enjoyed reading <a href="https://www.newyorker.com/culture/the-new-yorker-interview/cory-doctorow-wants-you-to-know-what-computers-can-and-cant-do">this interview with Cory Doctorow</a>.</p> https://tidbits.tedchoward.com/2022/12/04/have-you-ever.html Sun, 04 Dec 2022 16:07:26 -0500 http://tedchoward.micro.blog/2022/12/04/have-you-ever.html <p>Have you ever wanted to start composting, but have been too lazy? Do you have gutters? Are you equally as lazy about cleaning your gutters? I may have some good news for you.</p> https://tidbits.tedchoward.com/2022/12/04/things-they-dont.html Sun, 04 Dec 2022 15:51:07 -0500 http://tedchoward.micro.blog/2022/12/04/things-they-dont.html <p>Things they don’t tell you about owning a home: you will periodically need to sweep your roof.</p> https://tidbits.tedchoward.com/2022/11/17/in-the-early.html Fri, 18 Nov 2022 00:16:44 -0500 http://tedchoward.micro.blog/2022/11/17/in-the-early.html <p>In the early days of Twitter, all people posted about was Twitter. We have now come full-circle.</p> https://tidbits.tedchoward.com/2022/11/14/i-just-got.html Mon, 14 Nov 2022 19:14:40 -0500 http://tedchoward.micro.blog/2022/11/14/i-just-got.html <p>I just got <a href="https://micro.blog/books/9781640651623">A Women&rsquo;s Lectionary for the Whole Church: Year A</a> by Wilda C. Gafney. I&rsquo;m looking forward to using this to plan our Advent lessons. 📚</p> https://tidbits.tedchoward.com/2022/11/14/i-havent-given.html Mon, 14 Nov 2022 17:31:41 -0500 http://tedchoward.micro.blog/2022/11/14/i-havent-given.html <p>I haven&rsquo;t given up on Twitter yet, but I&rsquo;ve noticed several people I follow have started using Mastodon. My blog speaks Mastodon, so you can follow me at <a href="https://micro.blog/ted?remote_follow=1">ted@tidbits.tedchoward.com</a></p> https://tidbits.tedchoward.com/2022/10/10/robin-rendle-doesnt.html Mon, 10 Oct 2022 11:14:34 -0500 http://tedchoward.micro.blog/2022/10/10/robin-rendle-doesnt.html <p>Robin Rendle doesn&rsquo;t believe in sprints. I find myself agreeing with this position more and more over time. <a href="https://www.robinrendle.com/notes/i-don%E2%80%99t-believe-in-sprints/">www.robinrendle.com/notes/i-d&hellip;</a></p> https://tidbits.tedchoward.com/2022/10/10/i-want-one.html Mon, 10 Oct 2022 10:35:18 -0500 http://tedchoward.micro.blog/2022/10/10/i-want-one.html <p>I want one of these! <a href="https://www.retrokits.de/index.php/hdd-clicker-hdd-sound-simulator-v0-1/">www.retrokits.de/index.php&hellip;</a></p> https://tidbits.tedchoward.com/2021/08/10/global-temperature-over.html Tue, 10 Aug 2021 09:54:15 -0500 http://tedchoward.micro.blog/2021/08/10/global-temperature-over.html <p><a href="https://xkcd.com/2500/">Global Temperature Over My Lifetime</a></p> https://tidbits.tedchoward.com/2021/07/28/how-traffic-studies.html Wed, 28 Jul 2021 11:49:53 -0500 http://tedchoward.micro.blog/2021/07/28/how-traffic-studies.html <p><a href="https://www.dmagazine.com/frontburner/2021/07/how-traffic-studies-perpetuate-a-traffic-congestion-obsession/">How Traffic Studies Perpetuate a Traffic Congestion Obsession</a></p> https://tidbits.tedchoward.com/2021/07/20/txdot-intends-to.html Tue, 20 Jul 2021 09:41:19 -0500 http://tedchoward.micro.blog/2021/07/20/txdot-intends-to.html <p><a href="https://www.texasobserver.org/the-road-home/">TXDOT intends to spend $25 billion widening highways in cities. What if we tore then down instead?</a></p> https://tidbits.tedchoward.com/2021/07/15/three-cheers-for.html Thu, 15 Jul 2021 17:01:35 -0500 http://tedchoward.micro.blog/2021/07/15/three-cheers-for.html <p><a href="https://www.commonwealmagazine.org/three-cheers-socialism">Three Cheers for Socialism: Christian Love and Political Practice</a></p> https://tidbits.tedchoward.com/2021/06/17/the-spaghetti-warehouse.html Thu, 17 Jun 2021 11:21:24 -0500 http://tedchoward.micro.blog/2021/06/17/the-spaghetti-warehouse.html <p><a href="https://www.dallasobserver.com/arts/the-spaghetti-warehouse-streetcar-is-taken-back-by-pieces-to-the-neighborhood-it-birthed-12035641">The Spaghetti Warehouse Streetcar Is Taken Back by Pieces to the Neighborhood it Birthed - Dallas Observer</a></p> https://tidbits.tedchoward.com/2021/06/15/what-we-really.html Tue, 15 Jun 2021 17:31:55 -0500 http://tedchoward.micro.blog/2021/06/15/what-we-really.html <p><a href="https://www.dmagazine.com/frontburner/2021/06/what-we-really-lose-when-highways-destroy-historic-neighborhoods/">What We Really Lose When Highways Destroy Historic Neighborhoods - D Magazine</a></p> https://tidbits.tedchoward.com/2021/06/08/why-we-should.html Tue, 08 Jun 2021 16:36:47 -0500 http://tedchoward.micro.blog/2021/06/08/why-we-should.html <p>Why We Should Pay Dallas City Council Members More <a href="https://www.dmagazine.com/frontburner/2021/06/why-we-should-pay-dallas-city-council-members-more/">www.dmagazine.com/frontburn&hellip;</a></p> I built a computer on a breadboard! https://tidbits.tedchoward.com/2021/05/16/i-built-a.html Sun, 16 May 2021 22:13:00 -0500 http://tedchoward.micro.blog/2021/05/16/i-built-a.html <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/hajCCoWhTbY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> https://tidbits.tedchoward.com/2021/05/13/with-current-technology.html Thu, 13 May 2021 11:24:34 -0500 http://tedchoward.micro.blog/2021/05/13/with-current-technology.html <p><a href="https://www.newyorker.com/news/annals-of-a-warming-planet/renewable-energy-is-suddenly-startlingly-cheap">“with current technology and in a subset of available locations we can capture at least 6,700 petawatt-hours per year from solar and wind, which is more than 100 times global energy demand”</a></p>