Schrijver
| How to crash the PAINT command...
|
LeandroCorreia msx addict Berichten: 449 | Geplaatst: 15 Januari 2008, 17:39   |
Dumb, I know, but I think it´s interesting anyway...
10 screen 2
20 for j=0to 191 step 2:for i=0to 255 step 2:pset (i,j):next:next
30 paint (1,1)
This program gives an OUT OF MEMORY.  |
|
DemonSeed msx professional Berichten: 914 | Geplaatst: 15 Januari 2008, 17:41   |
Cool!
|
|
cax
 msx professional Berichten: 1011 | Geplaatst: 15 Januari 2008, 18:42   |
What's about step 3, 4, etc. at one or both of the axis ? When it stop failing, and how much time will the longest PAINT take ?
|
|
LeandroCorreia msx addict Berichten: 449 | Geplaatst: 15 Januari 2008, 19:32   |
Cax, the paint command seems to fill horizontal lines. If it finds a "hole", it probably memorizes its place and then keeps filling the screen. Later it goes to that memorized hole and keeps filling the screen from it.
The step 2 I used was simply to create a dithered screen, i.e.: a screen full of many places where the paint command would have to memorize another restart fill point. Too many restart points for the paint command to support.
It´s not new, I´ve got this limitation once with Deluxe Paint for PC. I just remembered it and I decided to see what would happen in an MSX.  |
|
PingPong msx professional Berichten: 876 | Geplaatst: 15 Januari 2008, 19:51   |
This problem apply to any stack based flood fill algo's. Nothing special
|
|
|
|
|