peteym5 Posted May 11, 2016 Share Posted May 11, 2016 I know this had been mentioned several times, but I cannot find a specific posting on how to do this. Some people say its possible with the player/missile graphics to stretch the missile across the full width of the screen. Where can I find code on how to do this? Quote Link to comment Share on other sites More sharing options...
+Cafeman Posted May 11, 2016 Share Posted May 11, 2016 That's news to me! Quote Link to comment Share on other sites More sharing options...
foft Posted May 11, 2016 Share Posted May 11, 2016 You need to change the player width as its drawing the player (cycle exact). The shift register gets confused. The Altirra hardware reference manual has details. 2 Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 12, 2016 Share Posted May 12, 2016 (edited) I've not tried it yet and get the feeling it probably won't work but with VBXE - the GTIA modes aren't properly implemented, I think it's the colour only mode where the background inherits the luma value from COLBAK, but the proper behaviour of that mode is that background shoud always be luma 0, with nonzero pixel values inheriting the luma value of that register. By having a PM object stretched as an underlay it might be able to fix static pictures as to work properly on VBXE. Then again, it'd probably be just as easy to setup a repeating solid graphics overlay that sits under the GTIA display to override and produce the wanted background colour. Edited May 12, 2016 by Rybags Quote Link to comment Share on other sites More sharing options...
phaeron Posted May 12, 2016 Share Posted May 12, 2016 If you're bored enough, you can abuse this bug to emulate HDMA windowing tricks. Please excuse my crappy division and edge drawing routines. pmfull.zip 15 Quote Link to comment Share on other sites More sharing options...
xxl Posted May 12, 2016 Share Posted May 12, 2016 wot da h... Quote Link to comment Share on other sites More sharing options...
analmux Posted May 13, 2016 Share Posted May 13, 2016 @ phaeron Wow! I assume some kernel must be used. Could you clearly explain how it works? In a few sentences? Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 13, 2016 Share Posted May 13, 2016 To reveal some of the trickery, run in Altirra. Press F8 and enter from the debug console E D01A A2 (changes background colour) From what I can work out, he's using the size trick each scanline to make missiles 0 and 2 persistent. Missile 0 is positioned to start the triangle, Missile 2 at the end to mask it back to background colour. Quote Link to comment Share on other sites More sharing options...
Bryan Posted May 13, 2016 Share Posted May 13, 2016 Can you shut off the missile by moving it so it gets re-triggered? Quote Link to comment Share on other sites More sharing options...
emkay Posted May 13, 2016 Share Posted May 13, 2016 How would that work ontop of a gr. 9 screen? Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 13, 2016 Share Posted May 13, 2016 (edited) From what I can gather you can only shut it off by changing size to a value other than 2 or when the object is triggered for redisplay when the HPOS comparitor matches. Earlier explanation of mine a bit out. Kernal loop starts. Just after WSync, missiles 0/2 are positioned at HPOS=0C. Colours - Missile 0 is black, Missile 2 is red. SIZEM set to 33 then 22 which makes the 2 missiles persistent. Due to M0 priority over M2, the display is black. The kernal then sets each missile to the trigger position which will empty the shift register and stop display of each. Missile 0 (black) ends where the triangle starts. Missile 2 (red) is the triangle. The position change for missile 2 empties it's shift register at the end of the triangle. Then repeat for each scanline. Explanation of PM persistence bug on pages 100-101 of the 2016-03 Altirra HW reference manual. Edited May 13, 2016 by Rybags 4 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted May 13, 2016 Share Posted May 13, 2016 that's _INSANE!_ 1 Quote Link to comment Share on other sites More sharing options...
Bryan Posted May 13, 2016 Share Posted May 13, 2016 How would that work ontop of a gr. 9 screen? I thought the same thing. Colored shapes mixed with 16 shades. 1 Quote Link to comment Share on other sites More sharing options...
phaeron Posted May 14, 2016 Share Posted May 14, 2016 This can be merged into GR.9, but there are a couple of caveats. First, only the missiles can be used as fifth player mode must be enabled. GTIA 9/11 count as background instead of playfield for priority purposes and the playfield is shut off whenever any players or missiles are active, regardless of priority setting (PRIOR[0:3]). The fifth player, though, isn't counted as P/M graphics for this and so it will merge with the playfield. Therefore, you can tint a GR.9 screen with the missiles. The second problem is that this technique effectively only gives you windows on the left side. This is because the locking up the player or missile requires a tight register write sequence, while turning the P/M object back off can be done via the HPOS register. The problem is that you can't XOR the missiles, so you have to overlap them -- and if fifth player mode is enabled, this doesn't do you any good because all of the missiles are the same color and are effectively ORed together. You can draw colored shapes on top of GR.9 this way, but you're stuck with the shapes that extend all the way to the left border, or at least where you elect to toggle the missiles on with the CPU. An underlay beneath GR.8 would be possible, though, since the hires layer is completely unaffected by P/M graphics. One possibility that I had thought of was using the fifth player conflict trick. It is possible to stencil the fifth player with PF0-PF1 and the players by setting PRIOR[0:3]=%1000; this would theoretically allow one of the players to subtract from the left side of a missile and allow the missile to draw a double-sided shape beneath a 2-color playfield. Switching from two missiles to player+missile requires two more writes to size registers, though, which makes the scanline timing tighter. In any case, using this for a cooler demo is left as an exercise for the reader. 4 Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 14, 2016 Share Posted May 14, 2016 (edited) The biggest strength of this trick might be as extra colour underlays for normal 160x multicolour modes. Though the problem is that since the size and position setup is required that takes away from time to do colour register changes. Maybe pictures could be done in a venetian effect. First scanline has colour changes, second scanline has background underlays. Edited May 14, 2016 by Rybags 1 Quote Link to comment Share on other sites More sharing options...
Sandor / HARD Posted December 18, 2017 Share Posted December 18, 2017 This is the type of thing that amazes me! I'm hoping a skilled game dev will make a racing game like Power Drift using this for the road so that scrolling / DLIST isn't used up for the road creation. Especially if this can be done twice, for all 4 missiles, giving us two separate colored shapes for the grey middle & striped sides of the road. Keep discovering stuff like this please 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted December 18, 2017 Share Posted December 18, 2017 Sandor I was of the opinion it would only work in player pairs 0,2....1,3 of course I could be wrong.. Quote Link to comment Share on other sites More sharing options...
Sandor / HARD Posted December 19, 2017 Share Posted December 19, 2017 Sandor I was of the opinion it would only work in player pairs 0,2....1,3 of course I could be wrong.. Well, whatever your approach is, let's see it in motion! Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 19, 2017 Share Posted December 19, 2017 (edited) btw. guys.... simply check Numen "Turbovecs" which are done by PM only.... https://youtu.be/HVuEd742Yyg?t=686 ah... need to check Avery's code as Atari 800 Mac version does only show bands and not filled... Edited December 19, 2017 by Heaven/TQA 3 Quote Link to comment Share on other sites More sharing options...
Sandor / HARD Posted December 19, 2017 Share Posted December 19, 2017 btw. guys.... simply check Numen "Turbovecs" which are done by PM only.... https://youtu.be/HVuEd742Yyg?t=686 ah... need to check Avery's code as Atari 800 Mac version does only show bands and not filled... PM only? Nice! Why didn't you guys put gfx behind it? I tried this missile-stretch stuff a while ago on Altirra and it worked as advertised. Very impressive stuff. I didn't go into the details and I was into my own ideas for REHARDEN, but I thought this needs to be used for road... 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 19, 2017 Share Posted December 19, 2017 No gfx because no dma steal Quote Link to comment Share on other sites More sharing options...
emkay Posted December 19, 2017 Share Posted December 19, 2017 No gfx because no dma steal I'd bet, people still stumble into that trap on and on. As long as they read the wrong books Testing "Sprites" with DMA OFF is beyond reality IF some routine is usable, you only could get to a real production, if the DMA is enabled to the maximum possible. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 19, 2017 Share Posted December 19, 2017 Ok.... maybe I missed your point but turbovecs of Fox has no display list enabled, writes only prior and pos reg... so where is the DMA steal? 1 Quote Link to comment Share on other sites More sharing options...
Xuel Posted December 19, 2017 Share Posted December 19, 2017 (edited) No gfx because no dma steal There is some DMA used to fill in the center of the largest faces but it's minimal because it's ANTIC mode 8 with the pixels crunched down from 8 scan-lines per pixel to 1 scan-line per pixel via VSCROL. Here's the DMA pattern in Altirra: Here's one of the kernels where you can see VSCROL getting updated every scan-line and DLISTL getting updated every other scan-line: Edit: Correction on how often DLISTL gets updated. Edited December 19, 2017 by Xuel 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 19, 2017 Share Posted December 19, 2017 thanks Xuel. is that from Numen or from Avery's demo? 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.