looking for a pixel flood fill routine

Here you can ask questions or provide insights about how to use efficiently 6502 assembly code on the Oric.
User avatar
Symoon
Archivist
Posts: 2000
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: looking for a pixel flood fill routine

Post by Symoon »

I almost finished commenting (in French) the Retour du Dr Genius flood fill routine.
I'm just in a boring moment with real life, kind of "a new problem each day". When (if!) things calm down, I'll post it.

User avatar
goyo
Officer Cadet
Posts: 51
Joined: Sat Jan 12, 2019 10:16 am

Re: looking for a pixel flood fill routine

Post by goyo »

Nice !
but it's not urgent.
if you have the time, otherwise it's okay. :wink:

User avatar
Symoon
Archivist
Posts: 2000
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: looking for a pixel flood fill routine

Post by Symoon »

There it is! In French sorry, but I guess automatic translators can do the job if any non-French is curious.

Sorry it took so long, I struggled a lot with the stack management, I never found a long quiet moment to focus on it and understand. Now here we are ;)

BTW, the code is long, maybe it's worth to take a look at Geoff Philips' one in his book, I didn't test it but it might be easier / less memory consuming, etc.
retour_dr_Genius_routine_flood_fill.zip
(11.41 KiB) Downloaded 18 times

User avatar
Symoon
Archivist
Posts: 2000
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: looking for a pixel flood fill routine

Post by Symoon »

goyo wrote:
Tue Oct 12, 2021 2:30 pm
The Lorigraph floodfill Algo look like very speed and optimal but it's difficult to disassemble it for me.
Oh yes it looks much faster than Genius. Genuis looks nice and is no-so-slow, but I wonder if Lorigraph doesn't already use the idea I had (check/fill pixels by group of six before doing it of one by one).

User avatar
Dbug
Site Admin
Posts: 3800
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: looking for a pixel flood fill routine

Post by Dbug »

Symoon wrote:
Fri Nov 12, 2021 11:37 am
goyo wrote:
Tue Oct 12, 2021 2:30 pm
The Lorigraph floodfill Algo look like very speed and optimal but it's difficult to disassemble it for me.
Oh yes it looks much faster than Genius. Genuis looks nice and is no-so-slow, but I wonder if Lorigraph doesn't already use the idea I had (check/fill pixels by group of six before doing it of one by one).
Yeah, a quick exit with a byte test makes sense :)

User avatar
Symoon
Archivist
Posts: 2000
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: looking for a pixel flood fill routine

Post by Symoon »

Dbug wrote:
Fri Nov 12, 2021 12:01 pm
Yeah, a quick exit with a byte test makes sense :)
Well, I haven't deeply checked but I saw a CMP $40 while Lorigraph was executing the fill routine.
So I guess that's the idea ;)

So finally, it will probably be better to isolate Lorigraph's routine... Oh no, not again!

User avatar
jbperin
Flight Lieutenant
Posts: 377
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: looking for a pixel flood fill routine

Post by jbperin »

Symoon wrote:
Fri Nov 12, 2021 12:01 am
There it is! In French sorry, but I guess automatic translators can do the job if any non-French is curious.
retour_dr_Genius_routine_flood_fill.zip
Waou :shock: nice work

It's very difficult to extract the meaning of an assembly code without knowing the design.
Well done.

User avatar
Symoon
Archivist
Posts: 2000
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: looking for a pixel flood fill routine

Post by Symoon »

Thanks!
Well, at least I knew from the start what I was looking for, it helped a lot ;)

User avatar
iss
Wing Commander
Posts: 1337
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: looking for a pixel flood fill routine

Post by iss »

@Symoon: Congrats for this huge amount of work!

User avatar
Symoon
Archivist
Posts: 2000
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: looking for a pixel flood fill routine

Post by Symoon »

Thanks, that's not that much work, it's just me complaining about the lack of spare time ;)
If you're curious and need some help translating, just let me know (I kept it in French both by lazyness and for Goyo)

Post Reply