JagChris Posted June 8, 2022 Share Posted June 8, 2022 2 hours ago, 42bs said: Never hear of this. http://www.3do.cdinteractive.co.uk/viewtopic.php?f=35&t=3430#p39887 1 Quote Link to comment Share on other sites More sharing options...
JagChris Posted June 8, 2022 Share Posted June 8, 2022 2 hours ago, Cyprian said: do you mean This @Eric R Smith ? I have no idea. Could be. Or a couple thousand other Eric Smith's. Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 7 hours ago, JagChris said: http://www.3do.cdinteractive.co.uk/viewtopic.php?f=35&t=3430#p39887 Wow what a lot of stuff ... did not find line.c yet, though Guess I need to pull out an spare HD, unzip everything and let `find` do it's work. Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
JagChris Posted June 9, 2022 Share Posted June 9, 2022 That's weird. Wonder why they would they include that. That's not very different. Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 9, 2022 Share Posted June 9, 2022 https://www.geeksforgeeks.org/dda-line-generation-algorithm-computer-graphics/?ref=lbp Also you can get rid of the divides as you can replace that with a look up table of 1 / length Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 1 minute ago, Seedy1812 said: https://www.geeksforgeeks.org/dda-line-generation-algorithm-computer-graphics/?ref=lbp Also you can get rid of the divides as you can replace that with a look up table of 1 / length Allready tried it in Processing Needs to be ported to Jaguar after my paid work is finished. Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 9, 2022 Share Posted June 9, 2022 I started to convert STNICC to the ZX Spectrum Next a year or so ago but like you work got in the way. Got the processing of the data and it would loop and update the palette. Stopped half way through the triangle line drawing to create the spans to fill in Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 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. Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 Does it have a linear gfx memory or weird thing like the Amstrad 464? Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 9, 2022 Share Posted June 9, 2022 Speccy rez is 256*192 but on the Next there are a number of modes one being byte per pixel Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 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. Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 9, 2022 Share Posted June 9, 2022 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 ) Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 7 minutes ago, Seedy1812 said: ZX Spectrum Next Ah, its the machine. I did not know. Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 9, 2022 Share Posted June 9, 2022 (edited) Best thing with Next is you can run it at 28 mhz bit quicker than the standard speccy which was 3.5 Edited June 9, 2022 by Seedy1812 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 1 minute ago, Seedy1812 said: Best thing with Next is you can run it at 28 mhz Cheating! ? Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 9, 2022 Share Posted June 9, 2022 Next week I am on holiday ( well off to my mums as she having knee surgery ) so tempted to take my laptop and carry on working on it. 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted June 9, 2022 Author Share Posted June 9, 2022 A cheap HDMI USB grabber + VLC helps, no need to have an extra display for the Speccy. Did this at Outline with the Jaguar and it worked quiet well. Though the cheap thing lags often. Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 9, 2022 Share Posted June 9, 2022 No need for that about 99% of it is in an emulator CSpect ( http://cspect.org/ ) . Comes with assembler and the emulator contains a debugger so its not that bad to debug. 1 Quote Link to comment Share on other sites More sharing options...
JagChris Posted June 10, 2022 Share Posted June 10, 2022 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. */ Quote Link to comment Share on other sites More sharing options...
42bs Posted June 10, 2022 Author Share Posted June 10, 2022 (edited) Yes. It is Bresenham (variation of). But there is a lot in these "Gems" ? Edited June 10, 2022 by 42bs Quote Link to comment Share on other sites More sharing options...
JagChris Posted June 10, 2022 Share Posted June 10, 2022 38 minutes ago, 42bs said: Yes. It is Bresenham (variation of). But there is a lot in these "Gems" ? Maybe you'll find something useful. ? Quote Link to comment Share on other sites More sharing options...
Ericde45 Posted June 10, 2022 Share Posted June 10, 2022 you want to do very fast 3D ? you'd better dig into this : https://github.com/ggnkua/Atari_ST_Sources/tree/master/ASM/mcoder/3D close to the best 3D done on the Atari ST, convex/concave, with faces sorting in Z, depending how you build you object: visibility vector or not, and so on. 2 Quote Link to comment Share on other sites More sharing options...
Seedy1812 Posted June 10, 2022 Share Posted June 10, 2022 The repository from the Graphics Gems books can be found here http://www.realtimerendering.com/resources/GraphicsGems/ The C source for the Jag Chris mentioned is at http://www.realtimerendering.com/resources/GraphicsGems/gems/DoubleLine.c 2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.