Jump to content
IGNORED

Sprite/Background collision proof of concept.


marc.hull

Recommended Posts

Having a special VMBW routine that clobbers 8 bytes at a time makes sense. That is the only read in the routine. But if I shove it into scratchpad then it may bonk out. I can't remember if it is setting the address without a delay that causes the error or reading too fast. I'll experiment. I have a feeling that cramming it all into no wait state memory will have the largest impact. Running with no wait states on my console doubles performance. Obviously that will be pared down as the VMBR will not be in the fast area but I imagine I can get at least a 40 percent performance boost over all.

 

I don't know if I'd bother putting it in scratchpad unless it's actually hurting your game's performance. I would optimize the heck out of it in 8-bit RAM first.

 

That said, I did a lot of theorhetical work on what's safe or not, and as long as you are not using register-indirect to register-indirect (ie: even register-indirect post-increment or symbolic addressing is good) then a normal machine won't have trouble on reads. Where you have to watch your timing is between setting the address and reading, you need a delay between those two steps.

 

It doesn't look like any more speed is needed currently so I'll leave it as is. If it becomes a stumbling block later on I'll shove it down into the >8300 neighborhood (will need some condensing first.)

 

Congrats on your current award. You too retro and insane-o ;-)

Link to comment
Share on other sites

Having a special VMBW routine that clobbers 8 bytes at a time makes sense. That is the only read in the routine. But if I shove it into scratchpad then it may bonk out. I can't remember if it is setting the address without a delay that causes the error or reading too fast. I'll experiment. I have a feeling that cramming it all into no wait state memory will have the largest impact. Running with no wait states on my console doubles performance. Obviously that will be pared down as the VMBR will not be in the fast area but I imagine I can get at least a 40 percent performance boost over all.

 

I don't know if I'd bother putting it in scratchpad unless it's actually hurting your game's performance. I would optimize the heck out of it in 8-bit RAM first.

 

That said, I did a lot of theorhetical work on what's safe or not, and as long as you are not using register-indirect to register-indirect (ie: even register-indirect post-increment or symbolic addressing is good) then a normal machine won't have trouble on reads. Where you have to watch your timing is between setting the address and reading, you need a delay between those two steps.

 

It doesn't look like any more speed is needed currently so I'll leave it as is. If it becomes a stumbling block later on I'll shove it down into the >8300 neighborhood (will need some condensing first.)

 

Congrats on your current award. You too retro and insane-o ;-)

 

 

If you go to TI INTERN and look at ROM 0 address >06D2 you will see that the COINC routine built into the TI runs only from Scratch Pad RAM.

 

And other then fetching the Sprite Coinc tables from GROM it runs about as fast as you can get, they only way you could make it faster is to take the tables and put them in RAM.

 

I think Tursi was right on the spot for the fastest and most efficient way to do it. If you take a copy of the GROM tables put them in RAM and use the same routines it would half the size of the current method.

Edited by RXB
Link to comment
Share on other sites

I think Tursi was right on the spot for the fastest and most efficient way to do it. If you take a copy of the GROM tables put them in RAM and use the same routines it would half the size of the current method.

 

It may, but it won't do the same thing. The GPL COIN function needs pre-generated tables, Marc is reading the bitmap from the screen dynamically.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 years later...

Hi Marc,

Congrats on site if the month!

 

I was just thinking about this project. I am working on something that requires sprite/background collision detection.

 

However, I am unable to open the demo or s2bcoinc files.

 

I want to add your collision detection to an XB game, is that possible?

Can I call it as a subroutine?

 

An documentation you can point me to would be great.

 

Thank you,

Gene

Link to comment
Share on other sites

Hi Marc,

Congrats on site if the month!

 

I was just thinking about this project. I am working on something that requires sprite/background collision detection.

 

However, I am unable to open the demo or s2bcoinc files.

 

I want to add your collision detection to an XB game, is that possible?

Can I call it as a subroutine?

 

An documentation you can point me to would be great.

 

Thank you,

Gene

The files are obviously zipped but are also disk images. If you are using MESS or another emulator you will need to use TIDIR to extract the unarchived file to text to see the source/convert to text. Or dump to a floppy for use on a TI.

 

Using TIDIR is fairly easy. Extract the zip. Open TIDIR and click on the disk. You can the open the source file and convert to PC text or save the demo into whatever form you need for whatever emu you use..

 

I am sure you could use the routine from XB but one of the issues you may run into is that it needs to be called immediately after the VDP interrupt and after all screen changes have been performed to insure accuracy. Not sure if there is a way to do this from XB or if it will be catastrophic if you can't. In it's current state it is set up for double size sprite with single magnification.

 

There are no docs per se but the code is documented. I haven't looked at it in quite a while but I would be willing to help if you desire.

Link to comment
Share on other sites

Removed the WEB ring banner. Hope that takes care of the problem and there is not more I need to do cause I'm pretty dull when it comes to the whole WEB site thing.

 

Attached is a zip copy of the source for S2BCOINCE. Feel free to use it. Like I said, I'm not sure of it's value in an XB environment. At the very least you will need to add a workspace and perform a LIMI. Give it a shot, May do the trick.

 

UH what happened to the attachment button ?

Link to comment
Share on other sites

Removed the WEB ring banner. Hope that takes care of the problem and there is not more I need to do cause I'm pretty dull when it comes to the whole WEB site thing.

 

Attached is a zip copy of the source for S2BCOINCE. Feel free to use it. Like I said, I'm not sure of it's value in an XB environment. At the very least you will need to add a workspace and perform a LIMI. Give it a shot, May do the trick.

 

UH what happened to the attachment button ?

Go to "More Reply Options" in the lower right :)

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