Jump to content
IGNORED

STNICCC 2000 remix for Jaguar (2nd and WIP)


42bs

Recommended Posts

15 hours ago, JagChris said:

In the source codes included with the Graphic Gems collections was a line drawing algorithm called LINE.C. It looks like Eric Smith had separated it out and was going to use it for something. Maybe you should consider throwing that in there after running it through the risc compiler and see how that one does.

Found it. It is a classical Bresenham.

  • Like 1
Link to comment
Share on other sites

Bresenham gives nicer "lines" and works better for slopes where y steps are != 1.

But for a poly algo, I do not care, I need to record  min and max X per Y. So I only need the X step and Y is always 1.

 

DDA:

-
      -
           -
Bresenham

--
  -----
       ----

So for a poly routine, Bresenham actually calculates to many X.

 

  • Like 1
Link to comment
Share on other sites

Triangle only routine means splitting up the > 3 point polys. But you may just adapt my poly routine.

What is the rez. of the Specci? 192x100?

For the Lynx we pre-processed scene.bin to fit the Lynx rez.

Link to comment
Share on other sites

Just now, Seedy1812 said:

Speccy rez is 256*192 but on the Next there are a number of modes one being byte per pixel

So you can use the original data, maybe shrink y a bit. 1 byte per pixel, is cool. IIRC Z80 has a loop filling instruction, right? So horizontal lines can be done quick.

Link to comment
Share on other sites

1 minute ago, 42bs said:

Does it have a linear gfx memory or weird thing like the Amstrad 464?

 

In this mode yes - but you have to page it into main memory - so you can treat the memory as 8k chunks or 16k chunks . So normally create your array of min/max x and then work down paging the memory so (0, 64 and 128  regions for y )

Link to comment
Share on other sites

17 hours ago, 42bs said:

Found it. It is a classical Bresenham.

I want to make sure we're talking about the same line.c because it's like 3X longer than a standard Bresenham. 

 

Does it have this header?

 

/*
Symmetric Double Step Line Algorithm
by Brian Wyvill
from "Graphics Gems", Academic Press, 1990

user provides "setpixel()" function for output.
*/

 

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