Action! Programming for the Atari 8-bit Computer - Part 23 - Player Missile Graphics 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ย. 2024
  • The 23rd in a series of videos in programming in Action! for the Atari 8-bit computers.
    An introduction to Player Missile Graphics in Action! This video covers animating and moving the dog we created in the last video. All in Action! No machine language required.
    Code for my videos are at my GitHub at GitHub.com/Davi...

ความคิดเห็น • 4

  • @SyntheToonz
    @SyntheToonz 2 ปีที่แล้ว +1

    You asked for some explanation of player missiles and coordinates. The short answer is that the Atari is operating its graphics across a larger part of the NTSC signal than most other systems. Player/Missiles extend into the overscan area horizontally and vertically. This means the coordinate system for Player/Missile graphics is larger than the typical X/Y size of the Playfield graphics display. The zero origin (first pixel on a horizontal line of playfield graphics) is not where the Atari's hardware starts generating color clocks to the screen.
    GTIA presents a logical 256 pixel (color clock) wide screen. Since the NTSC signal does not actually have that many color clocks available, some part of the logical 256 pixels are discarded on the left and right sides. Per Wikipedia page about GTIA, it begins generating physical color clocks at its logical position 34 (decimal) and ends at position 221. (That's 188 real color clocks across the screen.) Normal width Playfield graphics are 160 color clocks wide. So, there's an extra 28 pixels beyond the normal playfield, split between the left and right side.
    Vertical coordinates differ for similar reasons. ANTIC begins performing DMA to transfer data to GTIA to create the Player/Missile images at a scan line before the usual (default) playfield graphics.*** So, playfield line 0, is many scan lines after GTIA has begun displaying scan lines of Player/Missile graphics.
    (*** Not 100% true -- a custom display list can actually begin displaying playfield graphics in the overscan area a few scan lines before Player/Missile DMA/display begins.)
    Since Player/Missile graphics coordinates begin earlier on a horizontal line before the Playfield graphics, (or vertically on an earlier scan line) then the programmer needs to adjust coordinates between Players/Missiles and Playfield. The Wikipedia pages for ANTIC and GTIA have charts showing the Player/Missile positions v the Playfield positions at different screen widths and Player/Missile resolutions. I also recommend looking for the Altirra hardware reference manual.
    This initially seems confusing, but it is actually a bonus that most other systems of that period could not do easily -- Displaying graphics in the overscan area is a built-in, free feature of the Atari applicable to both Player/Missile graphics, and the Playfield.

    • @davidarlington1206
      @davidarlington1206  2 ปีที่แล้ว

      Wow, Ken, thanks for the detailed response! I will definitely check out those Wikipedia pages to get the exact details. That's all very helpful. Thanks again!

  • @rscotthayes9448
    @rscotthayes9448 2 ปีที่แล้ว +1

    David... Keep these going Love it!! ... And... Don't forget to show us how to move bits within in a character on the screen so it's not jumping two bytes at a time for horizontal movement. A one byte character moving one pixel or n pixels on screen with parameter would be cool. It would look like a player missile character horizontal movement. This sounds simple but it's totally not... there must be a known algorithm for this but I've never seen simple example.

  • @davidarlington1206
    @davidarlington1206  2 ปีที่แล้ว +1

    Wow, I missed my chance when I said it was super easy to move players horizontally, when I could have said "Super easy, barely an inconvenience" :)