Looking for a PAINT routine for MSX2

Page 2/3
1 | | 3

By Dolphin101546015

Expert (101)

Dolphin101546015's picture

13-02-2020, 08:04

Preview of new Paint for Fusion-C
It non recursive hardware scanline algorithm with stack using.

By Grauw

Ascended (8704)

Grauw's picture

13-02-2020, 08:06

Nice 'n quick!

What about the traces test, how fast goes that?

By Dolphin101546015

Expert (101)

Dolphin101546015's picture

13-02-2020, 08:25

Grauw wrote:

What about the traces test, how fast goes that?

Thank you Smile
Traces test preview

By ericb59

Paladin (904)

ericb59's picture

13-02-2020, 09:40

I would like to thank Dolphin_Soft for its kindness and its very efficient routine.
Fusion-C 1.3 will have a new Paint function. super fast.
LOL!
Thank you

By Dolphin101546015

Expert (101)

Dolphin101546015's picture

13-02-2020, 10:03

ericb59 wrote:

I would like to thank Dolphin_Soft for its kindness and its very efficient routine.
Fusion-C 1.3 will have a new Paint function. super fast.

Do not beautify so much, this function is still not the most effective, although twice as fast as the original. Cool
(Actualy it efficient, just not an ideal) Smile

ericb59 wrote:

Thank you

U welcome Wink
Also thanx for so big work you doing!

By Dolphin101546015

Expert (101)

Dolphin101546015's picture

20-02-2020, 11:40

Btw, stock Paint function in MSX2 not working!

It stop painting, coz have bug.

Also, it not have buffer memory problem, just wrong area observing.
I will create video comparsion.

Here Test Code in MSX Basic

By pgimeno

Resident (62)

pgimeno's picture

26-02-2020, 05:28

Here's a stress test image for a flood fill algorithm:

10 DEFINT A-Z
20 COLOR 15,0,4:SCREEN 2
30 LINE (1,0)-(1,95)
40 LINE (1,97)-(1,191)
50 LINE (3,49)-(3,143)
60 LINE (5,25)-(5,71)
70 LINE (5,121)-(5,167)
80 FOR I=0 TO 3:LINE (7,13+I*48)-(7,35+I*48):NEXT
90 FOR I=0 TO 7:LINE (9,7+I*24)-(9,17+I*24):NEXT
100 FOR I=0 TO 15:LINE (11,4+I*12)-(11,8+I*12):NEXT
110 FOR I=0 TO 31:LINE (13,2+I*6)-(13,4+I*6):NEXT
120 LINE (15,0)-(255,190),15,BF
130 FOR I=1 TO 189 STEP 2:LINE (15,I)-(255,I),0:NEXT
140 FOR I=16 TO 254 STEP 2:LINE (I,0)-(I,191),0:NEXT
1000 PAINT (0,0)
1010 PRINT INPUT$(1);

BASIC fails it. How well does your algorithm do, Dolphin?

By Dolphin101546015

Expert (101)

Dolphin101546015's picture

26-02-2020, 07:50

pgimeno wrote:

Here's a stress test image for a flood fill algorithm:

BASIC fails it. How well does your algorithm do, Dolphin?

Only graphic modes using.
Hardware scanline working only G4+
Also no any problems, to write it in softmode for G1-G3

Your test in graphic mode here.
(Slow - is real speed of MSX, fast - speedup by 8 times)

(In my library, function using whole VRAM as flat canvas, therefore you see floodfill folow from down also.) :)

PS: In addition, as I wrote above, BASICs Paint does not work correctly. I assume that when they wrote MSX Basic, they did not understand the whole concept of using VDP (my humble opinion).
... Otherwise, the performance of MSX Basic would be much higher.

By Dolphin101546015

Expert (101)

Dolphin101546015's picture

26-02-2020, 07:45

Dolphin101546015 wrote:
Grauw wrote:

What about the traces test, how fast goes that?

Thank you Smile
Traces test preview

Here I showed the first test for traces, but you can see a slight decrease in speed on the left side of the screen.
I suspect that the VDP lookup function in OpenMSX is not working properly.
Eric promised do test on real equipment (I can’t do this at the moment). If the situation clears up, there will be a need to create a bugreport.

By pgimeno

Resident (62)

pgimeno's picture

26-02-2020, 13:08

I wrote it for screen 2. The line at line 40 is supposed to reach the bottom of the screen. Please change that before testing.

Also, please check line 50; it's wrong. It should be vertical and it's going diagonally.

Page 2/3
1 | | 3