Jump to content

esplonky

Recommended Posts

A cycle is like "a second of time", but much-much faster. Similar to how 60 seconds occur in a minute, 76 cycles occur during the time it takes to draw a single scan line on your TV. The Atari has 19,912 (if using the standard 262 scan line count for an NTSC display) cycles per frame(1 update of the TV's display, which gets updated 60 times per second - also known as 60 frames per second, or 60 fps).

 

That sounds like a lot, but the Atari's video chip is so primitive that the CPU must update it in real-time as the screen is being drawn. Games often display 192 scan lines of picture, so subtracting out 192 * 76 only leaves 5,320 cycles of time for your game logic. The section of the game that draws the screen is known as the kernel, and is one of the things that bB does for you. bB does other things as well, so you only get what's left over (of the 5,320 cycles) after bB has finished it's processing.

 

While this is probably more detailed than you're looking for - the Atari uses a 6507, which is a 6502 derivative, so you can reference 6502 tutorials. Looking at the 6502 opcodes you'll see info like this:

LDA (LoaD Accumulator)
Affects Flags: S Z

MODE           SYNTAX       HEX LEN TIM
Immediate     LDA #$44      $A9  2   2
Zero Page     LDA $44       $A5  2   3
Zero Page,X   LDA $44,X     $B5  2   4
Absolute      LDA $4400     $AD  3   4
Absolute,X    LDA $4400,X   $BD  3   4+
Absolute,Y    LDA $4400,Y   $B9  3   4+
Indirect,X    LDA ($44,X)   $A1  2   6
Indirect,Y    LDA ($44),Y   $B1  2   5+

+ add 1 cycle if page boundary crossed

 

The column labeled TIM is how many cycles each instruction uses.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...