Jump to content

Photo

wonky playfield behavior with CTRLPF = $10


9 replies to this topic

#1 BenMcLean OFFLINE  

BenMcLean

    Space Invader

  • 38 posts

Posted Tue Aug 12, 2014 12:21 PM

The playfield goes all wonky and doesn't match what I put in visually when I use CTRLPF = $10 with " set kernel_options player1colors playercolors pfcolors". Any idea why that's happening? I've attached a test case.
Attached File  default.bas   1.06KB   101 downloads

Also, I am going to need to use pfread with those kernel options if possible. Does this mean I need to add a module? Random Terrain's site seems to indicate this, but doesn't really explain whether one should use the official pfread_msk.asm or bogax's version.

#2 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,854 posts

Posted Tue Aug 12, 2014 12:24 PM

$10 doesn't seem like a valid option according to R.T.s chart.  Have you tried $11 instead?

 

Update:  Also, I vagualy remember not having great success with the old pfread_msk.asm.  I'd go for whatever bogax did.  Remember: it's only for the multi-sprite kernel.

 

Update update:  Meaning, pfread is built-in for the other kernels.



#3 bogax OFFLINE  

bogax

    Dragonstomper

  • 724 posts

Posted Tue Aug 12, 2014 12:37 PM

but doesn't really explain whether one should use the official pfread_msk.asm or bogax's version.


 I don't think it matters.

 IIRC
 Someone said pfread didn't work
 so I threw out a little bit of code
 that did work

 but when I got around to looking at
 original msk pfread I didn't find anything
 wrong with it, it worked fine.

 



#4 BenMcLean OFFLINE  

BenMcLean

    Space Invader

  • Topic Starter
  • 38 posts

Posted Tue Aug 12, 2014 12:40 PM

$10 doesn't seem like a valid option according to R.T.s chart.  Have you tried $11 instead?

The chart says $1x, where (x = don't care). But I can try $11, sure.

#5 BenMcLean OFFLINE  

BenMcLean

    Space Invader

  • Topic Starter
  • 38 posts

Posted Tue Aug 12, 2014 12:41 PM

Apparently, all I needed to do was say $11 and it works now. Great! Thanks! I'm gonna message RandomTerrain to suggest that his chart should say $11 instead of $1x

Then I've got to figure out that inline command

Edited by BenMcLean, Tue Aug 12, 2014 12:42 PM.


#6 SpiceWare ONLINE  

SpiceWare

    Draconian

  • 11,649 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Tue Aug 12, 2014 12:45 PM

If you check the Stella Programmer's Guide over at MiniDig you'll see that D0 of CTRLPF controls whether the playfield is Reflected or Repeated.  

 

bB kernels are designed for a Reflected playfield, which means D0 must be set to 1 (that's why all the listed values are odd).
 

CTRLPF

This address is used to write into the playfield control register (logic 1 causes action as described below)
D0 = REF (reflect playfield)
D1 = SCORE (left half of playfield gets color of player 0, right half gets color of player 1)
D2 = PFP (playfield gets priority over players so they can move behind the playfield)
D4 & D5 = BALL SIZE



#7 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,854 posts

Posted Tue Aug 12, 2014 12:48 PM

 I don't think it matters.

 IIRC
 Someone said pfread didn't work
 so I threw out a little bit of code
 that did work

 but when I got around to looking at
 original msk pfread I didn't find anything
 wrong with it, it worked fine.

 

 

I was probably the one having issues with the pfread_msk.asm and the multi-sprite kernel.   It's a quirky beast.  I'm not surprised pfread works for some people and not others.



#8 SpiceWare ONLINE  

SpiceWare

    Draconian

  • 11,649 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Tue Aug 12, 2014 12:54 PM

I'm gonna message RandomTerrain to suggest that his chart should say $11 instead of $1x

$13, $15 and $17 will also work.   That section should probably be revised along the lines of:

 

 

 

CTRLPF

Changes properties of the playfield and ball.

Use value $bp where b is the ball setting and p is the playfield setting.

 

b = 0 for a 1 pixel wide ball
b = 1 for a 2 pixel wide ball
b = 2 for a 4 pixel wide ball

b = 3 for an 8 pixel wide ball

 

p = 1 for a "normal" bB playfield

p = 3 for "special color" playfield where left half of PF gets player0 color, right half gets player1 color
p = 5 for players move behind playfield
p = 7 for both "special color" and "payers behind" playfield

 

For example, $25 will set a 4 pixel wide ball and make the players move behind the playfield

 

Note that ball and playfield properties are both set with a single write.


Edited by SpiceWare, Tue Aug 12, 2014 12:55 PM.


#9 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,310 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Aug 13, 2014 7:19 PM

That section should probably be revised along the lines of . . .


How is this:

randomterrain.com/atari-2600-memories-batari-basic-commands.html#ctrlpf



#10 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,854 posts

Posted Wed Aug 13, 2014 10:42 PM

I think CTRLPF = $x0 should be mentioned as a valid option.  I've used the playfield reversing effect on my Uppa Creek! homebrew.  Also, in the multi-sprite kernel, it seems to repeat the orientation of the left side instead of mirror it.

 

Sounds like an unintended feature :)






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users