Jump to content

Photo

VBXE speed


64 replies to this topic

#51 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,162 posts
  • Location:Australia

Posted Wed May 17, 2017 10:00 AM

Yes, from memory the 1.0 version had the colourmap and little else.

Personally I think the bitmap modes and blitter are by far the most useful features.   But the overall package brings us on par or better than midrange Amigas and Falcons for most graphical features at least.



#52 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,251 posts
  • Location:USA

Posted Wed May 17, 2017 10:29 PM

Phaeron... when is that offsets added? Each pixel? when blitting one line (sizex=64 and sizey=0) why seems it adds the source stepx and stepy to start source? (Luckily it does but....)

 

X step is added each time the blitter steps to the next source byte within a row. Y step is added each time it processes a source row. Basically, the address of a source pixel at (x,y) in the blit is SourceBaseAddr + SourceStepX*x + SourceStepY*y. Pre-zoom and ignoring pattern mode, of course.

 

The X step is useful for rotation/flip operations and any time strided data is being accessed. This includes the attribute map (4 bytes/tile) and 80 column text mode (2 bytes/character).

 

As for why the VBXE does or doesn't have some features, that's partly for lack of anything to inform on what should be in it. There's not much software that uses VBXE and of course there was none when it was initially designed. To be honest it seems fairly well designed for a first iteration; it's just that as programmers we always want the hardware to do more.

 

The Amiga blitter didn't have fractional capability for regular blits. It could do fractional calculations in line draw mode, but that wasn't really usable for texture mapping. Unlike the VBXE blitter, it did have shifting capabilities, but that was to deal with the annoying evil abomination called bitplanes.



#53 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Wed May 17, 2017 10:35 PM

I managed to do my 1d blits by the mentioned 90 deg rotation in my head... so I use ystep 12bits to parse my gradient table which is 4096 bytes long....

It's just ignoring the xstep when you do horizontal blits in my case.

So I use it as 4.8 fixed point.

#54 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Wed May 17, 2017 11:31 PM

yeah but it does not work of course....

 

as I am blitting dest with destxstep+1 and sizex=spanlength sizey=0 i can not parse source with xstep=0 and ystep=gradient step....

 

grrr...



#55 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,251 posts
  • Location:USA

Posted Wed May 17, 2017 11:35 PM

Why not? Dest also has x-step and y-step. Worst case, draw your polygons with vertical spans instead of horizontal.



#56 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Wed May 17, 2017 11:44 PM

it only works using source step y when destsizey=length of span.

 

 

Attached Thumbnails

  • vbxe31.png


#57 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Wed May 17, 2017 11:46 PM

so... I can not tell the blitter to use in source stepy and in dest stepx independently except for the values?

 

and yes... in worst case... rewriting my scanedge routines to turn 90 deg.



#58 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,251 posts
  • Location:USA

Posted Thu May 18, 2017 12:05 AM

No need to use dest x-step, do a vertical 1xN blit with source y-step and dest y-step, with x-steps ignored (since it's a 1-wide blit).



#59 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Thu May 18, 2017 12:41 AM

yeah... but i can't do a destx step with a vertical source ystep? right? or is that bug in my code?



#60 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Thu May 18, 2017 12:58 AM

ah fuck... dest step y=1 would work I guess instead of 256.



#61 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Thu May 18, 2017 5:49 AM

ok... dest ystep 1

Attached Thumbnails

  • vbxe32.png


#62 JoSch OFFLINE  

JoSch

    Moonsweeper

  • 423 posts
  • Location:Germany

Posted Thu May 18, 2017 6:51 AM

I really like the VBXE and this thread, but you both lost me long ago.

Isn't there something like Dummy guide to VBXE programming or VBXE for Basic programmers.

The official VBXE guide is more of a reference guide IMO, than a programming guide.

The examples are fine and well, but as somebody who can barely read 6502 assembler, much less understand it, I rather would have some high level explanation in Mad Pascal, for example.



#63 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,162 posts
  • Location:Australia

Posted Thu May 18, 2017 6:58 AM

Hit the link, Stellar Shuttle, second one in my tagline.

It's got some VBXE enhancements for a Basic with some assembler program I did a long time ago.

 

I also think I released the source code to Quadrillion, I'd need to check.

There's not really guides to programming it around, there's some examples in the release packages on Candle's site.  There's not a lot of VBXE based software around, probably less than 25 games or enhancements to existing games, and probably even less in the way of applications.  A few demos, and probably well over 50 pictures by now.



#64 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Thu May 18, 2017 9:49 AM

Depends on you knowledge... it helps if you know the concept of Blitter, bank switching etc.

There is a thread of Rybags even with some examples in basic. And I guess mad pascal has support, too.

Just do it like you would do in 80s. Poke around and look what happens on screen ;)

#65 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 10,338 posts
  • Location:Baden-Württemberg, Germany

Posted Thu May 18, 2017 9:52 AM

And Josch...

We are here already into deep becAuse when you are coding "on the limit" you are already discussing ways to do it faster. And esp then how accurate Altirra is as you don't want to code natively nowadays.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users