Jump to content
IGNORED

Multiple HMOVEs per scanline


Kylearan

Recommended Posts

Hi,


right now I'm looking into ways of repositioning an object for the next scanline more than the standard -7/+8 pixels, without having a blank scanline inbetween (i.e., without having to do a full RESx, WSYNC, HMOVE). So I thought about what happens if I do sta HMOVE repeatedly after WSYNC, and sure enough, in Stella I can move P0 21 pixels to the right with $e0 in HMP0 and 3 consecutive sta HMOVEs, for example.


Searching this forum I couldn't find anything about this topic even though it looks quite useful in certain cases, and reading the TIA hardware notes left me more confused than enlightened on the topic of how HMOVE works exactly. Now the problem is that my Harmony cartridge hasn't arrived yet so I cannot test this on real hardware, so here's my question to more experienced people than I am:


1) Do multiple HMOVEs per scanline work on real hardware?


2) If yes, are there any known limits or problems with this?


One thing I know I'd have to keep in mind is that repeated sta HMOVEs would happen on later cycles than usual, thus the movement would be different (according to that table about how HMOVE on different cycles behaves). But what I don't know yet is if I can simply add up the movement values, or if there are any limits or unexpected behaviors. And before I write a systematic testing kernel, I thought I'd better ask if this works on real hardware first. ;)


Thanks,

-Kylearan


Link to comment
Share on other sites

It doesn't work like that on real hardware-- it's a bug in Stella's TIA emulation, which I'm sure will get fixed eventually.

 

You can definitely do two HMOVEs on a line if you do one at the "standard" time and the other at cycle 73 or 74, but that won't give you what you're trying to accomplish. To do two HMOVEs back-to-back I'm pretty sure you'd need to let the first one finish before triggering the second one, and I'm not sure whether that would work.

 

An alternative that might work would be to change the HMOVE value of an object while HMOVE is executing, but you'd need to time the change just right, and I believe the timing needed varies depending on the values used. This is most often done to get the "star field" effect with the missiles, but it might also work with the players. However, I think different versions of the TIA (and TIA clones) can produce different results, so compatibility might be an issue.

Link to comment
Share on other sites

I remember long ago on the stella mailing list someone posted a table that showed what will happen if you hit HMOVE at any of the 76 cycles, for all possible inputs -7 to +8. I believe that is how we rediscovered the HMOVE timings that do not generate the 16 blank color clocks on the left edge of the screen. I can't find that post now. It was a good bit of TIA research.

 

Edit: Here it is... http://www.biglist.com/lists/stella/archives/199804/msg00198.html

Edited by Robert M
Link to comment
Share on other sites

Thomas, SeaGtGruff, thanks! Good that I asked before writing my kernel; too bad it won't work on real hardware.

 

Robert, I know that table, but thanks anyway. My question was about multiple HMOVEs on a single scanline, which works under Stella but apparently not with the Real Thing.

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