It is currently Sun Jun 25, 2017 3:17 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Apr 17, 2017 9:30 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2170
I might as well start a new about it.

It can't be drawing it one pixel at a time because then it has only 228*312*15/7*2/256/224=5.316 cycles per pixel. It has to do at least 4 pixels at once just to move data from one place to another fast enough, but where does it get it's pixel data from then?


Top
 Profile  
 
PostPosted: Mon Apr 17, 2017 9:50 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5840
Location: Seattle
The effect is often called a "rotozoom(er)". There's a writeup about how one was implemented on the contemporary and comparable-spec Atari ST here.


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 8:00 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2170
That was interesting, but that looks like it would need at least 12 cycles per pixel.


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 8:14 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18517
Location: NE Indiana, USA (NTSC)
If you can't get your rotozoomer up to full speed, render the rotation at 17 fps and use background shearing for inbetweening. This is the effect used to roll the horizon in Star Fox, and we've talked about it before.

  • On Super NES: Use mode 2, load the vertical scroll position per 8 pixels into VRAM, and use HDMA to send the horizontal position per scanline.
  • On Genesis: Load the vertical scroll position per 16 pixels into VSRAM, and load the horizontal position per scanline into VRAM.

But because shearing starts to fall apart when the angle exceeds arctan(1/8), you'll need to actually render about 16 steps.


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 8:39 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2170
Is this how it works:

-Grab initial frame
-Use offset-per-tile and line-scroll to tilt image, while the CPU does scaling
-When it passes "arctan(1/8)" render a full affine-mapped image
-do the same thing again


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 11:57 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2170
Scratch that idea. I think I'm pretty close at figuring this out. It involves color addition and byte aligned shearing, but with x position toggling between 0 and 1 depending on if the first pixel of a scanline is even or odd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group