Jump to content

Recommended Posts

Can you get three copies of a player and not of a missile (or vice versa) using batari BASIC?

NUSIZ0 and NUSIZ1 control the numbers and sizes of the players and missiles. NUSIZx affects the number and spacing of players and missiles at the same time. However, the size (width) of the missile is separate from the size of the player. Thus, you can set the player 0 width to be different than the missile 0 width, but you can't set the number of copies to be different than each other.

 

This is controlled by the TIA, not by batari BASIC. The NUSIZ0 register works as follows:

 

Bits 0, 1, and 2 -- control the number of copies, and the spacing between them, for player 0 and missile 0 -- also control the size (width) of player 0, but only when there is just one copy of player 0

 

Bit 3 -- not used

 

Bits 4 and 5 -- control the size of missile 0

 

Bits 6 and 7 -- not used

 

The values (and their effects) for bits 0, 1, and 2 are as follows:

 

NUSIZ0 = %xxxxx000 -- one copy of player 0 and missile 0; player 0 single-width

NUSIZ0 = %xxxxx101 -- one copy of player 0 and missile 0; player 0 double-width

NUSIZ0 = %xxxxx111 -- one copy of player 0 and missile 0; player 0 quadruple-width

 

NUSIZ0 = %xxxxx001 -- two closely-spaced copies of player 0 and missile 0; player 0 single-width

NUSIZ0 = %xxxxx010 -- two medium-spaced copies of player 0 and missile 0; player 0 single-width

NUSIZ0 = %xxxxx100 -- two widely-spaced copies of player 0 and missile 0; player 0 single-width

 

NUSIZ0 = %xxxxx011 -- three closely-spaced copies of player 0 and missile 0; player 0 single-width

NUSIZ0 = %xxxxx110 -- three medium-spaced copies of player 0 and missile 0; player 0 single-width

 

The values (and their effects) for bits 4 and 5 are as follows:

 

NUSIZ0 = %xx00xxxx -- missile 0 single-width

NUSIZ0 = %xx01xxxx -- missile 0 double-width

NUSIZ0 = %xx10xxxx -- missile 0 quadruple-width

NUSIZ0 = %xx11xxxx -- missile 0 octuple-width

 

In all cases above, an "x" in the binary values indicates that the value of that bit doesn't matter. For example, NUSIZ0 = %11001111 and NUSIZ0 = %00000000 both set missile 0 to single-width, since in both cases bits 4 and 5 are 0, and those are the only bits that affect the width of missile 0. When you are setting the values in batari BASIC (or for that matter, in 6502 assembly code), you do *not* put the "x" in those bit positions, because if you do you will get a compile error.

 

So you can combine any of the eight (8 ) possible combinations of bits 0, 1, and 2 with any of the four (4) possible combinations of bits 4 and 5, thereby getting thirty-two (32) different settings (8 times 4). For example, if you set bits 0, 1, and 2 such that there are three close copies of player 0 and missile 0, then player 0 will necessarily be single-width, but you can set missile 0 to be any width by setting bits 4 and 5 as desired.

 

For registers like NUSIZ0, binary notation is usually the easiest notation to use, because you can easily set any bit to 0 or 1 as desired, without having to figure out what the equivalent decimal value would be.

 

MR

Edited by SeaGtGruff
Link to comment
https://forums.atariage.com/topic/93007-nusiz01-question/#findComment-1130102
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...