Jump to content
IGNORED

Vector FMV solution?


Recommended Posts

So I'm planning to make a wire frame Vector FMV engine and after some thinking I think I have a method. My intentions in using this will remain private for now, beyond "it's for a demo." However, I figure I'd share my notes on formatting and hear if people believe whether or not this is a viable or if anyone has better methods they would like to share.

 

Few things to go off of before I start.

 

I will be using the sprites (2x wide) alternating between 2 positions per scan-line (may dither). I'll call this the canvas. The canvas will be resolution of 32 by 25, and will be taking up 100 bytes of ram.

 

I do not care if it's optimized. It can take it's sweet time if there are too many cycles but I will be adding a timer later as well as music so I still need to save some cycles real-estate.

 

Will be a stock vcs with bank switching. No extra ram or dpc+.

 

Then end goal:

Draw vector lines to the canvas, or die trying


 

I plan to store vector groups as frames in rom and each vector will be formatted as such.


Line should come in 4 formats


1 Byte for flags (first 2 bits)


Bits 00 is a pixel *

Bits 01 is a vertical vector

Bits 10 is a horizontal vector

Bits 11 is a byte *


*This is what I mean by "die trying" (This is for compression sake.)


If a pixel:
Byte 1 (rom) is the y position and byte 2 (rom) is a number from 0-31 that decides the sprite and pixel


If V slope:
Byte 1 (rom) for the starting pose
Byte 2 (stored to ram) line height (counts down and clears at zero)
Byte 3 is slope input 1
Byte 4 is slope input 2
Byte 5 (ram) Pointer for x coordinates with a bit to say the number of the input.


If H slope:

It will be pre-rendered
The first byte is the starting y position
The second is the total number of bytes in a pre rendered line.
the third and fourth are bytes split up into nibbles for a bitmask lookup table and are ANDed against all the outcomes.
 The remainder is a look up table that starts at the given y position, and whenever the next byte is 0, is set to automatically add the y position to the next byte down (Move to the next byte over if the previous byte contained bit 1)


If byte:

It with set a given y position and variable to a byte. Contains 2 bytes. The ram location to change, and the the byte to store it there.

This was kinda rushed. If there is anything I need to clarify, let me know and I will try to answer and update this post to match if necessary.

My best guess is that this won't be viable for games which is why I'm only using it for an animation.

 

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