Teletext paint program

bbc micro/electron/atom/risc os coding queries and routines
User avatar
FourthStone
Posts: 1030
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Teletext paint program

Post by FourthStone » Tue Sep 01, 2020 6:41 am

Posted a small update above to fix a scrolling bug and added ascii code viewer in 'F' sub menu, I'm actually really enjoying using the tool, it is becoming quite well featured, hope others find it useful as well :D

User avatar
FourthStone
Posts: 1030
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Teletext paint program

Post by FourthStone » Tue Sep 01, 2020 8:37 am

Call out to Richard, when running our little app on Android (and I suspect iPad) the program aborts with 'File or path not found'. It appears to be having trouble finding libraries in the @lib$ folder.

On my Android phone @lib$ resolves to '/data/data/com.rtrussell.bbcbasic/files/lib'

The folder where my files run from resolve to '/storage/emulated/0/Android/data/com.rtrussell.bbcbasic/files/' this is the same as @usr$

I've tried copying the lib folder to the @usr$ folder but that does not help.


The other error that is when I use the filedlg library and *HEX 64 on a x86 PC I get an error in the filedg library 'number too big in module <path>\lib\filedlg'

If I rem out *HEX 64 then on the x86 PC everything works fine, but the only reason I added this is as it seems to be required for iPad which I guess is 64 bit... so I'm in a bit of a pickle about whether we can fix the 'number too big' issue on x86 with *HEX 64 enabled or do I need to put OS checks in and only run *HEX 64 on 64bit OS?

The other option is to move away from using the LIBs but I dread re-writing large blocks of code that you have already got working and that mostly work on a PC.

Any assistance you can offer?

EDIT: I added all of your library functions to my program and this line causes the error with *HEX 64 enabled:
X% = &80000000 : Y% = &80000000

Any clues?

User avatar
FourthStone
Posts: 1030
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Teletext paint program

Post by FourthStone » Tue Sep 01, 2020 9:10 am

Hey Pixel, can you try this version out on iPad? I've imported all the library functions so that there are no external dependencies and it uses the library file dialog for loading in Mode 3. It is a huge improvement on my little file dialog attempt even though I love the Mode 7 look of my one :-k

I can now use it on Android! Although the file dialog is proving very difficult to control on an Android screen, but it mostly works for me! I can paint, create colour backgrounds, animate, it's amazing!

You'll have to download from my github page, seems the source code is now too big for stardot... oops :oops:

https://github.com/marsFS/ART-4-Windows

ART4MODE7_BBCSDL_006.bbc

EDIT: I've modified the file save format so that it sorts better, I will at some stage look at creating a session folder but not until I work through the file dialog issues I am having. Sorry last post for the day I promise :roll:

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Tue Sep 01, 2020 12:36 pm

Thanks so much for getting that working Fourthstone. It looks tricky. It's amazing it works in Android the way it does. We will have to see what Richard says it if he can make any suggestions.

I will try it on the ipad and report back.
Last edited by pixelblip on Sat Sep 05, 2020 4:48 am, edited 1 time in total.

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Tue Sep 01, 2020 6:31 pm

Please would you mind posting the program as text to github....thanks
iPads can’t open a downloaded program. Not unless you faff about with iTunes.
So the way I’ve been doing it is just cutting and pasting straight into bbc basic.

I wish Apple would let useful software like bbc basic access to the filing system Without resorting to using a computer but that is never gonna happen.
Last edited by pixelblip on Sat Sep 12, 2020 4:35 am, edited 1 time in total.

User avatar
FourthStone
Posts: 1030
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Teletext paint program

Post by FourthStone » Tue Sep 01, 2020 9:31 pm

Text file version uploaded:

https://github.com/marsFS/ART-4-Windows

ART4MODE7_BBCSDL_006.bas

User avatar
FourthStone
Posts: 1030
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Teletext paint program

Post by FourthStone » Sat Sep 12, 2020 12:35 am

If anyone is still following this thread I've made progressive improvements to the program including the following:
* Undo / Redo for each frame
* Load dialog now supports folders
* Save creates a session folder and all save actions from the current session are saved to this folder
* Numerous bug fixes and tidy ups
* Removed external library dependency by importing library functions into main program and modifying where needed

If anyone is willing to test and provide feedback to help improve this program I'm very interested in your suggestions :-k

https://github.com/marsFS/ART-4-Windows
ART4MODE7_BBCSDL_008.bbc

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Sun Sep 13, 2020 7:25 am

Fourthstone continues to update this great program. Thank you so much =D>

Richard has posted a very important update to bbc basic iOS. You can update It here https://www.bbcbasic.co.uk/bbcsdl/download.html.

The update lets one save files to the bbc basic folder using the iOS files app within the iPad making updating the program easy From the web and making picture export available. Well done and thank you Richard!

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Thu Sep 24, 2020 1:00 pm

Much being added to our program......keep checking github and try it out....look for the art4mode7.bbc latest file in there and open it in bbc basic sdl.

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Mon Oct 05, 2020 7:54 am

Here’s a menu screen....thanks for doing that Fourthstone. Very helpful.
Attachments
8A7BEA12-BB41-4FA7-A3EB-DA488FAD1FA2.jpeg

User avatar
FourthStone
Posts: 1030
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Teletext paint program

Post by FourthStone » Sun Oct 11, 2020 5:09 am

I've added a rudimentary bmp / frame import function in TelePaint, due to the way BBC Basic handles reading pixels from the screen it can be slow for large selections, latest version available on GIT.

Example of how to import multiple frames:

1. Select the amount of frames you want to work with and tap 'Import Image'
Telepaint_Import_01.PNG
2. Browse to the BMP file and load it:
Telepaint_Import_02.PNG
3. Drag a box around image for first frame:
Telepaint_Import_03.PNG
4. Area will be processed when selection is completed (mouse / finger release)

5. Prompt appears to process another frame, select yes or no, if no is selected or max frames is reached then the main editor is displayed.

Any questions, comments, improvements most welcome.

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Sun Oct 11, 2020 9:59 pm

Oh just wow.
Ive been thinking of this very idea for a while now...like rotoscoping.
Really exciting development!

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Tue Oct 13, 2020 9:20 am

This feature is truly amazing Fourthstone. Well done! That must have taken some headscratching.
I think for it to be a little easier it might be worth setting the same grab frame size so all you have to do is move the box. The chances are the box isn't going to move up or down either......just food for thought.

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Tue Oct 13, 2020 7:35 pm

Also to add....if there was a way of specifying how many frames in total at the start...then horizontal and vertical tiles number.....then you draw one box over the first....it could work out the rest.....based on the values one puts in.

Maybe that is doable or not......I tried grabbing a bird flying animation today and it was a bit hit n miss....

The animation tool now reminds me of Another World....the cool rotoscoping in that.....

It makes me wonder how you could grab youtube clips as well.
It's a very cool thing to see this tool in action. Well done for working it out! Also to the chap that posted the code.

I guess we use this tool now to digitise pics into telepaint?

It would be fun to digitise some old mode 2 pics to see what they look like.

User avatar
FourthStone
Posts: 1030
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Teletext paint program

Post by FourthStone » Sat Oct 17, 2020 2:05 am

Posted an update on GIT, I'm trying to get a grid based capture working, there is still a small frame drift issue I am trying to track down but it works well enough for the time being for testing. It's mostly working for my running man animation but I haven't tested out any other animations.

The import currently only detects black or not black, you may need to convert images before trying to import into Telepaint.

The workflow for how to grab frames from a grid is as follows, in this case it's 20 frames:

Select the amount of frames desired:
Telepaint_Import_01.PNG
Select a file and choose 'Grid' and frame layout (left to right, top to bottom):
Telepaint_Import_04.PNG
Drag a grid to suit frame layout:
Telepaint_Import_05.PNG
Import will proceed (slowly).

Things to consider for future:
* Confirmation of grid selection
* Ability to move grid once drawn
* Ability to resize grid once drawn
* Solve drifting pixel issue e.g. last frame is out of step with first frame by approx 1 char size

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Teletext paint program

Post by pixelblip » Mon Oct 19, 2020 11:42 am

This is superb work Fourthstone!

Post Reply

Return to “programming”