Log In  

Cart #wudawupota-1 | 2019-10-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

A crude test program to emulate the HDMA behaviour of the SNES.

Current features:
--background tiling
--scrolling background
--scaling background
--changing scaling between drawing lines

Runs VERY slowly.

UPDATE: changed a bit of code to fix some graphical errors. (Don't do math on indexes. It causes issues.)

P#69211 2019-10-23 19:57 ( Edited 2019-10-24 01:02)

Hi Wackerly.

There should be a way to speed this up. Check with ace Pico-8 coders and outstanding programmers. I've seen this effect in a SNES side-view shooter so it shouldn't be too difficult to master.

The first words out of my mouth on this are though, are you using the SPRITE table as storage to produce your effect ?

P#69218 2019-10-24 00:20 ( Edited 2019-10-24 02:33)

In a roundabout way. I stored the checkerboard pattern in the map data, then I fetch the sprite index from the map, then calculate the spritesheet location from the sprite index.

I'm guessing that most of the slowdown is due to the above, as well as the fact that I'm essentially drawing the entire screen pixel-by-pixel manually.

The speed it runs at is very much secondary to my understanding of the principle of the technique anyway. I's love to see this run at full speed, but I'm not going to worry about it right away.

P#69219 2019-10-24 00:38

Have you considered POKE4 for the high-speed transfer ? It appears to me you might just need to use SSPR and stretch horizontally or vertically what you need.

It's only recently I realized SSPR with a full table in the sprite sheet can do some interesting 3D effects.

P#69220 2019-10-24 01:17

That certainly sounds like what I should be doing instead; I may try that later. I only did it this way because I knew it would be possible and doable in a couple sittings.

P#69221 2019-10-24 05:57

nice effect but really need sspr for sure!
can definitely be done in real time.

P#69224 2019-10-24 08:21

Castlevania IV!

P#69252 2019-10-25 07:17

That was the inspiration, yes! I decided to try this after Retro Game Mechanics Explained did a video on Youtube about it.

P#69267 2019-10-25 17:17

I was debating doing this myself after seeing that video!

P#69425 2019-10-28 23:12

I encourage you to give it a go. Your implementation may work better than mine!

P#69471 2019-10-29 20:17

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-03-22 16:23:01 | 0.009s | Q:26