Jump to content
IGNORED

CHRST


ClausB

Recommended Posts

From the thread "Racing the Beam":

...To meet the programmers' needs, I wrote the CHRST subroutine. Given a binary horizontal position, it figures out how to issue a reset at the right time (running a 15 color clock cycle loop), and then perform the correct Hmove (+/- 7 color clocks). The programmers liked it, so we left the hardware alone....

 

Has anyone ever posted the source code for the CHRST subroutine? Or a disassembly of its use in an early Atari game?

 

In his presentation (http://www.atariarch...v/CGEXPO00.html) Mr. Decuir implies it is used in COMBAT but it does not appear in the "definitive" disassembly (http://www.atariage...._asm/index.html).

Link to comment
Share on other sites

I looked for CHRST because I wanted to find a reason for why they put the HMxx offset in the high nybble and not the low.

 

In the thread "Racing the Beam" supercat asked: "Was the decision to have HMxx latch D4-D7 really predicted upon 'ease of coding', or hardware layout considerations? In what anticipated scenario would it ease coding?" and Decuir answered: "for many moving objects in the Combat display (the original target game) the motion vector for the tank had a 4 bit horizontal and a 4 bit vertical component. We used the high nibble for horizontal; I don't remember why. Probably because we could mask off the top 4 bits to add to the current vertical position value (a memory byte) without having to shift anything."

 

In CHRST, the division by 15 is done by repeated subtractions and the remainder ends up in the low nybble. It has to be shifted before writing to HMPx. Another way to divide by 15 is to multiply by 1/15, (0.000100010001 binary), using shifts and adds. In that case the remainder ends up in the high nybble and needs no shifting for HMPx. So I was wondering whether Decuir did CHRST that way, but no.

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...