Learning Assembly, #21

Today I continued learning about horizontal positioning! So, more about horizontal positioning. The shortest loop to wait on the beam uses 15 pixels per loop. I can set the position of objects using the loop, but I need something else in order to set their position between those 15 pixel increments. The TIA chip has…

Published

Learning Assembly, #20

Today I finally started learning about horizontal positioning. It’s every bit the wild ride I anticipated and I wouldn’t have it any other way xD Here’s kind of how it works: positioning things on the Atari involves timing with the CRT display because the CPU and display run in sync. To position things vertically, you…

Published

Learning Assembly, #19

Today I got the vertical positioning working! I’m still not quite used to some assembly specific things, like setting the carry flag before performing subtraction, but that should come with more practice.

Published

Learning Assembly, #18

Today I learned the theory of a better way to vertically position screen objects. So far, I’ve been manually drawing empty scanlines, but it’d be much better to have a system which tracks the current scanline and start drawing when the beam reaches their position. Tomorrow I should have it working!

Published

Learning Assembly, #17

Today I learned about the relationship between processor registers and RAM addresses. It’s like the processor has a limited number of slots to work with and it has to use RAM to store more. It makes so much more sense to me now, that higher level languages’ variables are actually memory addresses and when they’re…

Published

Learning Assembly, #16

Today I learned about defining names for memory addresses, which are a lot like variables. I also set the playfield to use the player 0 and player 1 colors. One thing I’m not sure about is, if the playfield only mirrors or reflects the left side of the screen, what happens when the players have…

Published

Learning Assembly, #15

Today I finally got the Atari’s TIA screen objects working! It was less difficult than I thought and now it almost feels intuitive, loading the sprites from ROM into the player graphics memory. I don’t know how to change the players’ X positions, but I think that’s coming up next.

Published

Learning Assembly, #14

Today I learned more about the Atari’s TIA screen objects, like the player 0 and 1 sprites. I’m not done yet with the code to display them, so here’s a grid pattern I made with the playfield: I didn’t realize the playfield could display multiple colors per frame. I’m not sure how I missed that,…

Published

Learning Assembly, #13

Today I played with the playfield! I made a checkerboard pattern and a modified version of the last rectangular pattern. I also learned that I can nest repeat statements, which made the checkerboard easier than using another register to loop.

Published

Learning Assembly, #12

Today I worked on using the Atari’s playfield! It’s pretty simple right now, but I think it should be easy to draw something more complex.

Published

Learning Assembly, #11

Today I learned about the Atari’s TIA screen objects. It’s kind of like the TIA chip has presets for sprites and there’s a limited number of settings to configure them. The most interesting screen object to me is the playfield. It’s a per-scanline 20 bit pattern which is either mirrored or repeated for the left…

Published

Learning Assembly, #10

Today I made a better program to display all the colors! It loops through the scanlines and displays one color per line. It still isn’t actually all the colors; there’s only 192 visible scanlines and the Atari’s palette has 256 colors. Next I want to learn how to display multiple colors per line.

Published

Learning Assembly, #9

Today I learned more about the Atari’s display timing. It’s weird for me coming from PICO-8, where you can set pixels anywhere and the only limit is the CPU. Comparing the two:

Published

Learning Assembly, #8

Today I finally got something on the screen! I started with making the background yellow and then I tried cycling through all the colors: It isn’t actually all the colors: there’s a limit on the number of colors per scan line and I don’t know how to do the timing to show all of them.…

Published

Learning Assembly, #7

Today I fixed a bug with my memory clearing program! I also tried writing #$FF into the RAM instead of 0 and it made a weird buzzing sound!

Published

Learning Assembly, #6

Today I wrote my first assembly program for the Atari 2600! It just clears the memory, but it’s so cool! Also, the emulator I’m using (Stella) has a debugger mode with a complete view of the memory and registers. I feel like this is a much easier way to learn assembly than going straight to…

Published

Learning Assembly, #5

Today I started learning about the 6507 processor, how it represents numbers, and its op codes. The 6507 uses two’s compliment to represent negative and positive numbers. I think two’s compliment explains why, in PICO-8, adding 1 to 32768 causes it to go negative. It runs out of bits and carries 1 into the sign…

Published

Learning Assembly, #4

Today I did a review of binary and hexadecimal numbers! Some notes: to distinguish number bases in Atari assembly, # is decimal, $ is hexadecimal, and % is binary. So #10 is 10, $10 is 16, and %10 is 2.

Published