Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > FASTER 3D GRAPHICS
2004-10-26 06:24
Stingray
Account closed

Registered: Feb 2003
Posts: 117
FASTER 3D GRAPHICS

I've heard it said before that the way the VIC chip addresses memory (8x8 cells) makes it slower fo rendering graphics because of the extra calculations needed. So what way would you have had the Commodore engineers design an alternative addressing mode so that 3D graphics could be calculated quicker? I would realy appreciate your ideas on this.
 
... 185 posts hidden. Click here to view all posts....
 
2010-03-01 12:54
Martin Piper

Registered: Nov 2007
Posts: 634
Quoting stingray
Martin, VIC-X as in VIC eXpander?


Exactly my thinking.
2010-03-01 13:37
JackAsser

Registered: Jun 2002
Posts: 1989
Regarding 3D-graphics and EOR-filling and what you would need.

1) Ways of setting up A^B = C (i.e. place A, B and C in memory and EOR-fill it).
2) Width, Height and Stride (bytes per line) for A, B and C.
3) Vertically EOR-fill that memory.
4) Clearing

With the above it would then be possible to HW-accelerate normal filled vectors and more over it would support the dithered EOR-filling used in f.e. Edge of Disgrace, Natural Wonders and Andropolis.

If you implement that, I can gladly "accellerate" my portal engine for you if you wanna test it.

Example:

* Set width & height to 256x128, horizontal linear mode
* Set stride of A to $20
* Set stirde of B and C to $28
* Point A to $2000 (line buffer)
* Point B to $6000 (bitmap)
* Point C to $6028 (bitmap, one row down)
* Start EOR-fill
* Clear A

This is actually exactly what you would do on an Amiga using the blitter...

For dithered mode you would do:

* Set width & height to 256x64, horizontal linear mode
* Set stride of A to $40
* Set stirde of B and C to $50
* Point A to $2000 (line buffer)
* Point B to $6000 (bitmap)
* Point C to $6050 (bitmap, two rows down)
* Start EOR-fill pass 1
* Point A to $2020 (line buffer, one row down)
* Point B to $6028 (bitmap, one row down)
* Point C to $6078 (bitmap, three rows down)
* Start EOR-fill pass 2
* Clear A

/JackAsser
2010-03-02 13:46
Stingray
Account closed

Registered: Feb 2003
Posts: 117
@Martin
What about for VIC eXtreme?
or even VIC UNLEASHED for names?

@WVL
From what I understand (in regards to FLI bug) the color port and data port on the VIC are actually open to receive data on the VIC? The only reason why you get undesired data is just because VIC isn't seeing the data that you would want it to, but VIC is actually display what it see's on the bus during the FLI bug area?

If my understanding is correct, that means that with this circuit (intercepting the data and address bus), ppl will no longer have to worry about FLI bug. Plus you get to FLI the COLOR RAM.
2010-03-02 14:41
Stingray
Account closed

Registered: Feb 2003
Posts: 117
Quoting JackAsser
Regarding 3D-graphics and EOR-filling and what you would need.

1) Ways of setting up A^B = C (i.e. place A, B and C in memory and EOR-fill it).
2) Width, Height and Stride (bytes per line) for A, B and C.
3) Vertically EOR-fill that memory.
4) Clearing

With the above it would then be possible to HW-accelerate normal filled vectors and more over it would support the dithered EOR-filling used in f.e. Edge of Disgrace, Natural Wonders and Andropolis.

If you implement that, I can gladly "accellerate" my portal engine for you if you wanna test it.

I checked out the demo's you referenced. The Doom maze is very very impressive.

*EOR-fill (on the fly)
*memory fill
*memory clear
*memory copy
*column based screens (256 byte column offsets)
*row based screen (40 or 256 byte row offsets)
*COLOR RAM anywhere (allows FLI of COLOR RAM)
*Removal of 16k bank limitation
*Plus a couple of extra little tricks i may include as a suprise

This is pretty much the spec I'm working to, so it sounds like it will a least do part of what you need.

BTW, in regards to memory fill/clear/copy circuit, do you think this function is enough to be classed as a simple Blitter?

I have read your post several times, I almost understand it I think.

Are you using 4k at $2000 (representing 256*128) to draw the lines?

You are then EOR filling a bitmap $6000?

what is A^B=C all about? is that A to the power of B = C?

I think I kinda get it, kinda don't, could you please break it down for me a bit more?

As I said, that Doom maze was very very impressive, I would love to make this project help accelerate that kind of thing or even same speed but larger window. Is that maze using your portal engine?
2010-03-02 15:00
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: Quoting JackAsser
Regarding 3D-graphics and EOR-filling and what you would need.

1) Ways of setting up A^B = C (i.e. place A, B and C in memory and EOR-fill it).
2) Width, Height and Stride (bytes per line) for A, B and C.
3) Vertically EOR-fill that memory.
4) Clearing

With the above it would then be possible to HW-accelerate normal filled vectors and more over it would support the dithered EOR-filling used in f.e. Edge of Disgrace, Natural Wonders and Andropolis.

If you implement that, I can gladly "accellerate" my portal engine for you if you wanna test it.

I checked out the demo's you referenced. The Doom maze is very very impressive.

*EOR-fill (on the fly)
*memory fill
*memory clear
*memory copy
*column based screens (256 byte column offsets)
*row based screen (40 or 256 byte row offsets)
*COLOR RAM anywhere (allows FLI of COLOR RAM)
*Removal of 16k bank limitation
*Plus a couple of extra little tricks i may include as a suprise

This is pretty much the spec I'm working to, so it sounds like it will a least do part of what you need.

BTW, in regards to memory fill/clear/copy circuit, do you think this function is enough to be classed as a simple Blitter?

I have read your post several times, I almost understand it I think.

Are you using 4k at $2000 (representing 256*128) to draw the lines?

You are then EOR filling a bitmap $6000?

what is A^B=C all about? is that A to the power of B = C?

I think I kinda get it, kinda don't, could you please break it down for me a bit more?

As I said, that Doom maze was very very impressive, I would love to make this project help accelerate that kind of thing or even same speed but larger window. Is that maze using your portal engine?


It could indeed be called a simple blitter.

At $2000 is the line buffer yes. Typically y-linear, or column based. That simplifies line drawing alot.

A,B and C are simply the two input sources and the destination. A^B=C means: At C store A[j] eor B[k].

The maze is using the portal engine yes.

Typically an unrolled eor-filler on the C64 is something like (which converts column based buffers to bitmap based direcly aswell):

.repeat 32,column
.repeat 128,row
lda linebuffer+column*128 + row ;column based
eor bitmap+column+(row&$f8)*320+row&7 ;bitmap based
sta bitmap+column+((row+1)&$f8)*320+(row+1)&7 ;bitmap based one row down
.endrep
.endrep

Now, for dithering you'd need to loop this twice, but every second row. Even rows in the first pass, then odd rows in the second pass.
2010-03-02 15:02
JackAsser

Registered: Jun 2002
Posts: 1989
row&$f8 => row/8 ofcourse. Silly me...
2010-03-02 15:18
Stingray
Account closed

Registered: Feb 2003
Posts: 117
Ok, I can see the convertersion of column based to bitmap based.

Still don't fully get how the filler is working, you have the lines in the line buffer, you EOR with bitmap and store in the next row, right? Is the bitmap clear when you start the EOR fill?
2010-03-02 15:21
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: Ok, I can see the convertersion of column based to bitmap based.

Still don't fully get how the filler is working, you have the lines in the line buffer, you EOR with bitmap and store in the next row, right? Is the bitmap clear when you start the EOR fill?


No, I'm just tired and lost. Here's the proper example:

.repeat 32,column
lda #0
.repeat 128,row
eor linebuffer+column*128 + row ;column based
sta bitmap+column+(row/8)*320+(row&7) ;bitmap based
.endrep
.endrep

:)
2010-03-02 15:34
Stingray
Account closed

Registered: Feb 2003
Posts: 117
ok, thanks.

So portal enigine draws the lines in a 256*128 column based format.

The portal engine then EOR fills it onto a bitmap

Is that right?
2010-03-02 15:39
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: ok, thanks.

So portal enigine draws the lines in a 256*128 column based format.

The portal engine then EOR fills it onto a bitmap

Is that right?


Correct. In two passes for dithering. Even row and odd rows seperatly.

However for a hw-assisted eor-fill I guess you don't have the luxury of having an A-register to use as temp. I.e. each store has to be stateless or?

If that is the case then you must do something similar to

lda linebuffer+row*128+column
eor bitmap+yaddayadda
sta bitmap+yaddayadda+one row down

And the engine must initialize the first row of the bitmap to the init values for the eor-filler (similar to the lda #0).

Previous - 1 | ... | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ... | 20 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
csabanw
Ervin/Abaddon
Skate/Plush
Guests online: 150
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.06 sec.