Jump to content
IGNORED

Need help with drawing player to the screen


EchoNotation

Recommended Posts

Hey, I'm working on my first 2600 game, but have a glitch where the top part of the player gets cut off. I thought it was because my drawing routine was too slow, as it only happens if the player is too far to the left. However, if I step through that section of the code in the Stella debugger, there is still plenty of time left over. What am I doing wrong?

 

The relevant code starts at line 83.

cutoff.png

nocutoff.png

blindfire.asm blindfire.bin

Link to comment
Share on other sites

1 hour ago, EchoNotation said:

Thanks! Didn't know the HMOVE took too long to update.

 

Scanlines where HMOVE is strobed will hide the leftmost 8 pixels behind a black bar.  You can see it occur in many games like Ms. Pac-Man and Missile Command:

 

192403530_ScreenShot2021-01-26at5_29_54PM.thumb.png.c10be5985fc8e37247b17513fdd1292e.png

 

1917433660_ScreenShot2021-01-26at5_30_10PM.thumb.png.e723955d2898127a2c339eedfad5bfb8.png
 

 

If the screen is black like yours it's not immediately obvious.  Use the Developer Key ALT + . or CMD + . (on a Mac) to turn on Stella's Fixed Debug Colors mode and the display will be draw using specific colors for each object:

 

1839572811_ScreenShot2021-01-26at3_41_48PM.png.3ff0700bcb5ec248b0eb95175f624639.png

 

Backbground is grey and HMOVE lines are white when using this mode:

 

2073494991_ScreenShot2021-01-26at5_32_53PM.thumb.png.9436cb54f98016f573274b494e0b56f2.png

 

1826677758_ScreenShot2021-01-26at5_32_39PM.thumb.png.e3354e3bdcb1ae95021cd4d67c8c66c7.png

 

 

And your game:

1344733960_ScreenShot2021-01-26at3_41_26PM.thumb.png.c7049f2ab15bd13aeba72cf5bbaff54d.png

 

 

Link to comment
Share on other sites

It's a quirk of the 2600, but there is a workaround - hit HMOVE on cycle 73 or 74:

 

 

It does change how the values written to the HMxx registers will move the objects, see the HMOVE Timing information on MiniDig's Tricks page.

 

It's also not compatible with all Atari consoles, as noted here:

 

 

 

Link to comment
Share on other sites

On 1/27/2021 at 6:03 AM, SpiceWare said:

It's also not compatible with all Atari consoles, as noted here:

Was that ever confirmed? I use early HMOVEs on cycle 73 all the time, and never experienced issues on any of my late PAL 2600 Jr. consoles or PAL 7800's.

I think a lot of other homebrews also use early HMOVEs.

Edited by Dionoid
Link to comment
Share on other sites

2 hours ago, Dionoid said:

Was that ever confirmed?

 

Maybe - in the screenshot below is the special code in the 128 Pixel Bus Stuffing demo that was added to accommodate two of @alex_79's consoles that behaved differently. It does a cycle 73 HMOVE, followed by a cycle 0 RESP0, then tests player/playfield collision to decide which HMxx value needs to be used to create the 128 pixel display on his systems.

 

Quote

I use early HMOVEs on cycle 73 all the time, and never experienced issues on any of my late PAL 2600 Jr. consoles or PAL 7800's.

I think a lot of other homebrews also use early HMOVEs.

 

I've used it as well, in Stay Frosty 2. I think it just results in the fireballs and other objects being shifted by 1 pixel. Game should play OK, though the sprite masking to hide left/right wrap-around of the players would be off.

 

 

1184783154_ScreenShot2021-01-28at11_27_34AM.thumb.png.abd46313b5d619285869144c0af98b3d.png

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