easmith Posted January 7, 2018 Share Posted January 7, 2018 Hi, I am a newbie this is my first post/ program. I am struggling with figuring out the correct placement of HMOVE . I have placed a sprite , but I want to move it 3 pixels to the left . When I try to load the offset , do WSYNC and then HMOVE immediately after RESP0 I get a crazy flickering screen. can someone please help ? Does the HMOVE need t be done on each sprite scanline or once per frame? If once per frame , then where should it be placed? I have seen several examples of algorithms for fine horizontal placement but cannot get these to work correctly either. Perhaps it has to do with the fact that I am wasting my VBLANK periods by not using timer. Sorry for so many questions... code is attached borderwcatfine6.asm Quote Link to comment Share on other sites More sharing options...
+xucaen Posted January 7, 2018 Share Posted January 7, 2018 HMOVE needs to follow a WSYNC. http://atariage.com/forums/topic/47639-session-24-some-nice-code/ edit: from the Stella Programmer's Guide: 8.0 Horizontal MotionHorizontal motion allows the programmer to move any of the 5 graphics objects relative to their current horizontal position. Each object has a 4 bit horizontal motion register (HMP0, HMP1, HMM0, HMM1, HMBL) that can be loaded with a value in the range of +7 to -8 (negative values are expressed in two's complement from). This motion is not executed until the HMOVE register is written to, at which time all motion registers move their respective objects. Objects can be moved repeatedly by simply executing HMOVE. Any object that is not to move must have a 0 in its motion register. With the horizontal positioning command confined to positioning objects at 15 color clock intervals, the motion registers fills in the gaps by moving objects +7 to -8 color clocks. Objects can not be placed at any color clock position across the screen. All 5 motion registers can be set to zero simultaneously by writing to the horizontal motion clear register (HMCLR). There are timing constraints for the HMOVE command. The HMOVE command must immediately follow a WSYNC (Wait for SYNC) to insure the HMOVE operation occurs during horizontal blanking. This is to allow sufficient time for the motion registers to do their thing before the electron beam starts drawing the next scan line. Also, for mysterious internal hardware considerations, the motion registers should not be modified for at least 24 machine cycles after an HMOVE command. 1 Quote Link to comment Share on other sites More sharing options...
vidak Posted January 21, 2018 Share Posted January 21, 2018 I can't see HMOVE anywhere in this code! I use the linux text editor called "Kate", and it seems to be showing some strange varying quality of indentation in your code. 1. Please fix the indentation in your code text so that it is uniform 2. I don't think you've initialised your constants properly. For instance here: YPos .byte What is the actual binary value Ypos is supposed to be holding? 3. You have not formatted your program labels properly. This is incorrect: Start sei ; disable interrupts Do either of these: .Start sei OR Start: sei That's all I have time for right now, I'll come back soon. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.