Jump to content
IGNORED

Landscape VBXE


drac030

Recommended Posts

After this little discussion:

 

 

it came to my mind that it should be fairly easy to reproduce this effect using mostly VBXE blitter with little CPU intervention, also making it moving. The result is attached (the archive also contains the source code @tschak909).

 

PS. One of the darkest shades of grey looks blueish. A bug probably.

 

PS. 2. On Altirra the movement does not look smooth, on real hardware it does. I do not know, why.

 

landvbxe.arc

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

On 9/29/2020 at 5:50 AM, drac030 said:

After this little discussion:

 

PS. 2. On Altirra the movement does not look smooth, on real hardware it does. I do not know, why.

It is as smooth as it can get for me, given that in PAL the emulator needs to resample from 50Hz to 60Hz. In NTSC, it is overrunning the frame and dropping to 30Hz due to the huge scroll blit:

 

image.thumb.png.f98c144c91900a1a03ed5f85812c3add.png

 

By my reckoning VBXE only just barely has enough memory bandwidth to brute-force scroll a 320x240 SR screen in NTSC and not enough to do further rendering. There are 114 * 8 * 262 = 238,944 local cycles per frame, of which 153,600 are needed for the blit and 76,800 are needed for display (overlay) DMA. 153,600 + 76,800 = 230,400, with 8,544 local cycles left over. It might actually be faster to redraw the entire landscape from scratch with a large blit list of lines since the blitter can fill at 1 cycle/byte vs. copy at 2c/b. Hardware scrolling would be much faster than either, though.

 

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, phaeron said:

It is as smooth as it can get for me

Whenever I run Altirra, I run it in a window, and it is not smooth then. I forgot about the full-screen option. Running full-screen it is as smooth as on my Atari, so everything is right in this point.

 

8 hours ago, phaeron said:

In NTSC, it is overrunning the frame and dropping to 30Hz due to the huge scroll blit

So it seems I have accidentally created my first PAL-only program (also somehow forgetting at that moment that NTSC exists and the blitter may indeed run out of frame cycles doing the blits).

 

8 hours ago, phaeron said:

Hardware scrolling would be much faster than either, though.

Are hardware scrolls available in VBXE pixel modes at all? The documentation seems to speak of them only as of a feature available in the texmode, but perhaps I get this wrong.

Edited by drac030
  • Like 1
Link to comment
Share on other sites

You don't really need hardware type scrolling in the bitmap modes.

Firstly since it's a byte per pixel there's no fractional value to worry about.

Secondly, the XDL allows you to specify start address of the bitmap and increment value per scanline with little limitation.

So without too much work you could implement scrolling as a measure to free up blit cycles.

Edited by Rybags
  • Like 1
Link to comment
Share on other sites

That is true, one could just draw with the blitter and change the display memory location within a 150k buffer.

 

But I will rather not update the program further, it was just a toy for one evening (and next morning), and even at 30 Hz it looks good enough in NTSC (I just checked in emulator). So maybe someone else will implement it better, either from scratch or basing on the source attached to post #1. :)

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