Open danj2k opened 4 months ago
Interestingly this works on the BBC Master emulation under jsbeeb (the emulator underpinning owlet). I will try and look at the GXR rom version (Which is a bit more owlet specific). thanks for the bug.
This is actually a documented shortcoming of the GXR - from the manual:
Flooding a region with a colour which it already contains will not work. For example if you are attempting a flood to non-background with the background colour being black then you should not try to flood in black or a pattern which contains black pixels. If you do this then it will try to fill a region, find that pixels in it are still in the background colour and try again. When this occurs a small region of the screen will be flooded and then the flood fill will give up.
The "England" pattern contains black and the background colour is black (the default) and &85
is "Flood until non-background".
If it works on a BBC Master, that probably means they managed to fix this limitation in that later version.
If it works in BeebEm and you're emulating a BBC B. then I think you must have a newer GXR version - owlet uses 1.20. You can check the version with: V.14:*H.G.
If it works on a BBC Master, that probably means they managed to fix this limitation in that later version.
I found a copy of the "BBC Master Reference Manual Part 1" which says:
Flood fill to non-background [...] may fail to complete the flood fill if: [...] the colour being used to fill the area can itself be filled (e.g. plot codes 131 and 135, which fill with background until non-background is found, will fail in this way if the current background plotting mode (specified via VDU 18) is 0)
That doesn't explicitly include anything equivalent to the "pattern which contains black pixels" part from the standalone GXR documentation, but "the colour being used to fill the area can itself be filled" could be interpreted as including this case.
I hope this is the right place to post, I looked in "about" on https://bbcmic.ro and it said to post issues here. I'm seeing an issue regarding using the GXR flood fill capability.
Steps to reproduce:
Open https://bbcmic.ro and copy and paste the BBC BASIC program from this gist: https://gist.githubusercontent.com/danj2k/374776c005929d4b0de9108f89db6b5f/raw/47c09ba141ace9c699c17d5537fe49819cac1b28/bbc_gbmap.bas Click the "play" button
Expected outcome:
A cross-hatch filled labelled drawing of Great Britain
Screenshot from BeebEm:
Actual outcome:
Wales is filled successfully but England and Scotland are only filled a little bit, also weird corruption appears around the edges.
Screenshot:
The same program works as expected in offline emulators such as BeebEm.