How do you save a screen

Discuss all aspects of programming here. From 8-bit through to modern architectures.
User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Wed Jan 11, 2017 5:47 pm

I'm so jealous..... I wish I could program like this in assembler :lol:
It's just another thing to learn and not enough time!

What would be good ( and not so easy) is if you clicked on the black square all the shades of black could come up..........the same for red.........say 10 patterns for each colour.....so 10 columns with patterns .....so for each colour 70 blocks on screen (7x10)

On a side note .......I never forget when I first saw Dpaint V on the Amiga!

The way they allowed colour mixing on a palette in 4096 colour HAM Mode .....it was really wow at the time........it was like you had a Quantel paint system all for yourself. That was a lovely way of doing colours.............bit beyond the Beeb I know!

That was a real wow moment (and seeing the Amiga King Tut on Microlive with Fred Harris!).

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Wed Jan 11, 2017 8:38 pm

Things progressing.........the eyes are proving very hard.....hmmmm

I think this is where using a tablet and pen could be lots easier............this weekend I might try to get out my old tablet (XP) and see if I can work on it with Beeb Em...............and nail those hard to do eyes

Sorry to keep posting pictures in the thread.....but a bit of vibrant colour in January never did any harm :wink:

I suddenly just remembered someone got here first......Joe Lavery with his King Tut Super Art pic! Oh well this is homage to him as well. A mode 2 version!
Attachments
Tut2.jpg

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

Re: How do you save a screen

Post by FourthStone » Wed Jan 11, 2017 10:59 pm

What would be good ( and not so easy) is if you clicked on the black square all the shades of black could come up..........the same for red.........say 10 patterns for each colour.....so 10 columns with patterns .....so for each colour 70 blocks on screen (7x10)
How big would you need each shade to be to be able to know what it is? e.g. would 8x8 pixels be big enough to clearly show each shade or do you need each shade bigger? Could you create a png with all the shades so I can play around with it?

What we could do is, with memory constraints in mind, have the first menu show solid colours, if a colour is clicked then a new menu is shown with a strip of shades for that colour and either clickable buttons or hotkeys to scroll left and right through the shades. Buttons or hotkeys could be implemented to go backwards and forwards through the menu. e.g. Press 'M' for menu, click a colour, click a pattern, menu closes

Another option is that if shadow ram is definitely a requirement then we could use a spare page for a more elaborate menu system with more screen real-estate. Only thing is I am not up to date with how shadow ram works, but I'm guessing there may be others on the forum who are :wink:

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Wed Jan 11, 2017 11:16 pm

If the program is already relying on having 32K of sideways RAM to save the screen for undoing flood fills, only 20K of that is needed to save a copy of the full screen for undo - so there's 12K left free in the second 16K bank. That would be enough to save 152 lines out of the 256 temporarily while displaying a palette, and it wouldn't interfere with the undo.

What would be even easier - and probably not a big deal in practice, if you're running this on an emulator - would be just to use a second 32K of sideways RAM (so 64K in total) to store the screen while showing the palette. On a Master, you'd just use X%=6:Y%=7 instead of X%=4:Y%=5 when calling the machine code to save/restore to the other 32K - no new machine code would need to be written.

Easiest of all would be to say "bringing up the palette loses the undo", and just re-use the existing screen saving code which is already there and working.

And of course, you're right that you could use shadow RAM for this as well - though if the program might grow over time, it might be best to prefer another solution so the program isn't cramped by having to leave enough main RAM free for one of the two screens.

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

Re: How do you save a screen

Post by FourthStone » Thu Jan 12, 2017 12:13 am

Good thinking Steve... btw does the F stand for Furber?

Trying to wrap my head around the shadow ram store and fetch code, am I right in assuming that two banks (16k each) are being used? Banks 4 & 5 I take it from X and Y params passed to the asm routine. I am also assuming that the first bank is filled and about 4k of the second is used, therefore I was wondering if you can tell me how to seed or modify the routine to utilize the remaining 12k for the menu system?

I'm slowly picking it apart myself but if you had any tips that would be awesome :D

EDIT: Ok, I think I have it mostly figured out... sorta at least in terms of the copying code.. Steve do you know what the following OS calls perform in the VRAM section and if I can leave them out of a copy to or from shadow ram? I've seen examples of store and fetch that just set the RAM bank and perform a transfer, any advice? It's getting called before and after the transfer so I'm not sure...

EDIT2: Ok, so the first OSBYTE call (132) reads the bottom of display ram but I can't find references to the 108 and 111 OSBYTE calls, i'm guessing it is checking to see if the display is in shadow mode or not but not sure... i'll dig a bit deeper.

Code: Select all

   80   .scrcopy
   90   BIT &FFFB:BMI exit
  100   STX rom1:STY rom2:CMP #1
  110   LDA #&30:BCC P%+4:LDA #&80
  120   STA src+1:EOR #&B0:STA dst+1
  130   LDA #1:JSR vram
  140   LDA &F4:PHA:LDX #&40:LDA rom1:CLC
  150   LDY #0:STY src:STY dst
  160   .lp1
  170   STA &F4:STA &FE30
  180   .lp2
  190   LDA (src),Y:STA (dst),Y:INY:BNE lp2
  200   INC src+1:INC dst+1:DEX:BNE lp2
  210   LDA src+1:BPL skip1:LDA #&80:STA src+1:.skip1
  220   LDA dst+1:BPL skip2:LDA #&80:STA dst+1:.skip2
  230   LDX #&10:ROL A:EOR #1:ROR A:LDA rom2:BCS lp1
  240   PLA:STA &F4:STA &FE30:LDA #0
  250   .vram
  260   PHA:LDA #&84:JSR OSBYTE:PLA:CPY #&80:BCC exit
  270   PHA:TAX:LDA #108:JSR OSBYTE
  280   PLA:INX:BNE exit
  290   EOR #1:TAX:LDA #111:JMP OSBYTE
  300   .exit
  310   RTS

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Thu Jan 12, 2017 9:43 am

I will create a png for you so you can see. 8x8 pixels for each block is more than adequate......
Thanks a lot

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Thu Jan 12, 2017 11:53 am

No, I'm not Steve Furber, though it would be cool if he was on the forums, wouldn't it? :-)

I'm at work so just a quick post but you may want to look at this page on BeebWiki regarding shadow RAM - the code fragment on there is IIRC more or less the same as the code in pixelblip's program (not too surprising, since I think he got it from a post by JGH): http://beebwiki.mdfs.net/Paging_in_video_memory That might also point you at information on what those OSBYTE calls are doing.

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Thu Jan 12, 2017 6:50 pm

There must be some old Acorn people old these forums...........I wouldn't be surprised....

I did a mockup of how I can imagine the color palette ( I did it in MS Paint).....They are 8x8 squares

I tried to program it on the GXR Rom but gave up! At least if you see this it will give you an idea.....if you clicked on the red box you'd get these (for example ) - all the reds

Sorry don't know why it's not letting me post this as a picture in the post....tried a few times

Image
Picture link added so it shows in post - Mark. Edited by 1024MAK 2017-01-14 21:03
Attachments
reds.jpg
reds.jpg (32.83 KiB) Viewed 1084 times

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

Re: How do you save a screen

Post by FourthStone » Thu Jan 12, 2017 10:00 pm

Thanks for the shades, that will be a good starting point.

Talk about pennies dropping, does your program require the GXR rom installed to make it work? :oops:

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Thu Jan 12, 2017 11:57 pm

Sorry for another "drive by" post, but I thought it might help - ignore me if it doesn't! :-)
FourthStone wrote:Trying to wrap my head around the shadow ram store and fetch code
Sorry to be pedantic, but I *think* you mean sideways RAM, not shadow RAM here. If you meant the RAM used by the code in pixelbip's program as posted above, it's sideways RAM. I'll assume you do mean sideways RAM. Actually, to be fair, this code uses both shadow and sideways RAM, so what you said isn't wrong, but I'm just trying to be clear (and probably failing!).

(Quick summary - sideways RAM comes in 16K chunks and is paged in and out between &8000 and &C000, shadow RAM comes in (roughly) a single 20K chunk and is paged in and out between &3000 and &8000 to hold the screen display.)
ForthStone wrote:am I right in assuming that two banks (16k each) are being used? Banks 4 & 5 I take it from X and Y params passed to the asm routine. I am also assuming that the first bank is filled and about 4k of the second is used, therefore I was wondering if you can tell me how to seed or modify the routine to utilize the remaining 12k for the menu system?

I'm slowly picking it apart myself but if you had any tips that would be awesome :D
I see your edits, so I'm guessing you've mostly figured it out. If you have any questions post them and if I can't help I'm sure someone else can. You are right about using banks 4 and 5 and only 4K of bank 5 being used. To use the remaining 12K you need to modify the code (probably a copy, since the current function is needed for the undo) so that it just pages in bank 5 (instead of doing bank 4 then bank 5) and copies from (say) the range "&3000 to &3000+12K" to "&8000+4K to &8000+4K+12K" in bank 5, or vice versa to restore after the menu is finished with. You can just leave all the shadow screen handling code as is and just make sure you put your copy loop "inside" the OSBYTE calls related to the shadow screen (i.e. just rewrite lines 140 to 240, and leave the bits before and after that alone).
ForthStone wrote:EDIT: Ok, I think I have it mostly figured out... sorta at least in terms of the copying code.. Steve do you know what the following OS calls perform in the VRAM section and if I can leave them out of a copy to or from shadow ram? I've seen examples of store and fetch that just set the RAM bank and perform a transfer, any advice? It's getting called before and after the transfer so I'm not sure...

EDIT2: Ok, so the first OSBYTE call (132) reads the bottom of display ram but I can't find references to the 108 and 111 OSBYTE calls, i'm guessing it is checking to see if the display is in shadow mode or not but not sure... i'll dig a bit deeper.
To keep things simple, let's just assume this code is running on a Master; things like the use of RAM banks 4, 5, 6 and 7 kind of imply that. I'll also assume mode 2, so the screen is from &3000-&8000. (The code doesn't make most of these assumptions.)

OSBYTE &6C (108) (http://beebwiki.mdfs.net/OSBYTE_%266C) controls whether loads (e.g. LDA) and stores (e.g. STA) to the addresses in the range &3000-&8000 see "main RAM" or "shadow RAM". If you're not using a shadow mode (i.e. MODE 2), you don't need to worry about this as the screen is in main RAM and that's accessible by default. However, if you're using a shadow mode (i.e. MODE 130), reading from &3000 won't normally read the first byte of the screen memory in shadow RAM - it will read main RAM, and the byte at &3000 probably contains a byte of the program code or data or just junk. So in order to read the screen correctly when in shadow mode, so it can be saved to sideways RAM, this machine code routine first uses OSBYTE &6C to make the shadow memory visible at &3000. It can then read it and store it into sideways RAM, then before it returns to the program, it has to make the main RAM visible at &3000 instead (otherwise the program would probably crash). Part of the reason for the "complexity" of this assembly is that it uses OSBYTE 132 to decide if the program is using a shadow mode or not, and then pages in main RAM only if it is using a shadow mode. So it "just works" either way, which is great except it's a bit trickier to understand.

On a Master, OSBYTE &6C is the right call to use. On a BBC B with a third party shadow RAM expansion, not all such expansions use OSBYTE &6C to do this job. So the code tries to use OSBYTE &6C, and if that fails, it falls back to trying OSBYTE &6F (111) (http://beebwiki.mdfs.net/OSBYTE_%266F). That OSBYTE won't ever be called on a Master.

I hope this helps, please excuse any errors as I have bashed this out fairly quickly, but I thought I'd post since no one else has chipped in yet.

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Fri Jan 13, 2017 12:02 am

FourthStone wrote:Talk about pennies dropping, does your program require the GXR rom installed to make it work? :oops:
I think it does, I'm sure pixelblip can confirm. However, the GXR ROM is effectively built into the Master, so if you're using an emulator just put it in Master mode and you're good - the GXR ROM is only a separate thing on a BBC B or B+. I think the program pretty much assumes a Master anyway, as that's the only machine which by default has sideways RAM in banks 4 and 5.

User avatar
tricky
Posts: 3443
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: How do you save a screen

Post by tricky » Fri Jan 13, 2017 12:19 am

Image
If it is less than 320x?, I think you have to include it in an IMG tag, but you can link to your own attached file ;)

Code: Select all

[img]http://stardot.org.uk/forums/download/file.php?id=26831[/img]

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

Re: How do you save a screen

Post by FourthStone » Fri Jan 13, 2017 12:33 am

Thanks Steve, you've confirmed what I had suspected and have been reading about, and added some excellent explanations to boot so thank you for taking the time to reply :D I've got the basic store and fetch routines in place for a menu system which I'll (slowly) expand upon. You're right about referring to sideways ram, always good to be using the right terminology.

I think the question of what hardware model is being targeted needs to be clarified by Pixelblip as so far I have been playing around with a model b in beebem with SW RAM write enabled. Pixelblip if you can confirm what model you're happy with I'll plug away on coming up with something targeted for that.

EDIT: I've tested in Master 128 mode and all the graphics drawing works haha... :lol:

Just a side note, I used to program drawing and sprite routines back in the day using basic and I've always wanted to take it to the next level, one of the reasons I'm keen to play around with this drawing program is to try polish my assembly and to refine some of those early ideas. Hope you don't mind if it appear's i'm bumbling my way through all this :wink:

I've been toying with the idea of moving the mouse routine to assembler but my head is near exploding trying to figure out the adval mouse co-ord conversions in assembler... anyone know if it's already been done before?

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Fri Jan 13, 2017 9:21 am

I am happy with any platform....thank you. As I am using Beeb em it's not an issue for me. So Master I guess as it gives you more wiggle room if you want to add things........wow this is really coming on.

The other advantage of using Beeb em is that I can use a tablet to draw......welding old and new technology together is fun ( Tablet and BBC )...

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

Re: How do you save a screen

Post by FourthStone » Fri Jan 13, 2017 10:24 am

Try this out, please forgive the slow menu speed as I am just trying things out for now, hoping to make it a lot snappier to redraw once we decide it's what you want so for now it's still in prototype mode. The menu pops up over and preserves any existing drawing and you can click the colours but nothing is selected as yet. Use T to show and hide menu as before. All of your other functions/hotkeys should still work including undo etc :D

The next stage if you like what I have done so far will be to make sure you're happy with the textures and colour combinations, keep in mind we can add more patterns and combos by using a scroll mechanism. The colours used for this version I ripped straight from the GXR manual :D

Anyway, have a play and let me know what you think and if you find bugs etc :-k

Also if anyone else has suggestions, happy to take on board idea's or improvement advice :idea:

Code: Select all

   10 OSBYTE=&FFF4
   20 DIM mc% 220:src=&70:dst=&72:rom1=&74:rom2=&75:mOnOff=&76
   30 FOR P=0 TO 1
   40   P%=mc%
   50   [OPT P*2
   60   \ A=0 store 1=fetch, X=bank 1, Y=bank 2
   70   .scrcopy
   80   BIT &FFFB:BMI exit
   90   STX rom1:STY rom2:CMP #1
  100   LDA #&30:BCC P%+4:LDA #&80
  110   STA src+1:EOR #&B0:STA dst+1
  120   LDA #1:JSR vram
  130   LDA &F4:PHA:LDX #&40:LDA rom1:CLC
  140   LDY #0:STY src:STY dst
  150   .lp1
  160   STA &F4:STA &FE30
  170   .lp2
  180   LDA (src),Y:STA (dst),Y:INY:BNE lp2
  190   INC src+1:INC dst+1:DEX:BNE lp2
  200   LDA src+1:BPL skip1:LDA #&80:STA src+1:.skip1
  210   LDA dst+1:BPL skip2:LDA #&80:STA dst+1:.skip2
  220   LDX #&10:ROL A:EOR #1:ROR A:LDA rom2:BCS lp1
  230   PLA:STA &F4:STA &FE30:LDA #0
  240   .vram
  250   PHA:LDA #&84:JSR OSBYTE:PLA:CPY #&80:BCC exit
  260   PHA:TAX:LDA #108:JSR OSBYTE
  270   PLA:INX:BNE exit
  280   EOR #1:TAX:LDA #111:JMP OSBYTE
  290   .exit
  300   RTS
  310   .menu
  320   SEI:STA mOnOff:CMP #1:LDA #&30:BCC revaddr:LDA #&98
  330   .revaddr STA src+1:EOR #&A8:STA dst+1:LDA #1:JSR vram
  340   LDA &F4:PHA:LDA #5:STA &F4:STA &FE30:LDX #20
  350   LDY #0:STY src:STY dst
  360   .preloop:LDA mOnOff:CMP #0:.menuloop
  370   LDA (src),Y:STA (dst),Y:BCC skipp:LDA #0:STA (src),Y:.skipp:INY:BNE menuloop
  380   INC src+1:INC dst+1:DEX:BNE preloop
  390   PLA:STA &F4:STA &FE30:CLI:LDA #0:JSR vram
  400   RTS
  410   ]NEXT
  420MODE 2
  430VDU23;10,32;0;0;0;
  440screen%=1
  450ch%=6
  460c1%=1
  470c2%=1
  480c1sw%=c1%:c2sw%=c2%
  490x%=0
  500y%=0
  510*FX12,32
  520ox%=-1:oy%=0:crh%=24
  530REPEAT
  540PROCcursor(0)
  550GCOL 16,0
  560key$=INKEY$(0)
  570IF c1%>7 c1%=7
  580IF c2%>7 c2%=7
  590IF c1%<1 c1%=0
  600IF c2%<1 c2%=0
  610IF key$="T" PROCmenu
  620IF key$="I" c1%=c2sw%:c2%=c1sw%
  630IF key$="Q" c1%=c1%-1:PROCdrawblock
  640IF key$="W" c1%=c1%+1:PROCdrawblock
  650IF key$="A" c2%=c2%-1:PROCdrawblock
  660IF key$="S" c2%=c2%+1:PROCdrawblock
  670IF key$="1" ch%=1:PROCdrawblock
  680IF key$="2" ch%=2:PROCdrawblock
  690IF key$="3" ch%=3:PROCdrawblock
  700IF key$="4" ch%=4:PROCdrawblock
  710IF key$="5" ch%=5:PROCdrawblock
  720IF key$="6" ch%=6:PROCdrawblock
  730IF key$="7" ch%=7:PROCdrawblock
  740IF key$="8" ch%=8:PROCdrawblock
  750IF key$="9" ch%=9:PROCdrawblock
  760IF key$="0" ch%=0:PROCdrawblock
  770IF key$="V" PROCplot65(0,7,mx%-1,my%-1,mx%+1,my%+1)
  780IF key$="B" PROCplot65(0,7,mx%-4,my%-4,mx%+4,my%+4)
  790IF key$="N" PROCplot65(0,0,mx%-1,my%-1,mx%+1,my%+1)
  800IF key$="M" PROCplot65(0,0,mx%-4,my%-4,mx%+4,my%+4)
  810IF key$="\" PROCplot65(16,0,mx%-1,my%-1,mx%+1,my%+1)
  820IF key$="Z" PROCplot65(16,0,mx%-4,my%-4,mx%+4,my%+4)
  830IF key$="X" PROCplot65(16,0,mx%-8,my%-8,mx%+8,my%+8)
  840IF key$="C" PROCplot65(16,0,mx%-12,my%-12,mx%+12,my%+12)
  850IF key$="P" screen%=screen%+1:PROCsavescreen
  860IF key$="U" PROCloadscreen
  870IF (ADVAL(0) AND 1)<>0 THEN PROCtempsavescreen:GCOL 0,135:PLOT&85,mx%,my%
  880UNTIL FALSE
  890END
  900:
  910DEF FNscale_x(C%)
  920C%=C%-48
  930C%=65472-C%
  940=1280*C%/65472
  950:
  960DEF FNscale_y(C%)
  970C%=C%-48
  980=1024*C%/65472
  990:
 1000 DEF PROCdrawblock
 1010 IF c1%>7 c1%=7
 1020 IF c2%>7 c2%=7
 1030  IF c1%<1 c1%=0
 1040  IF c2%<1 c2%=0
 1050 IF ch%=1 VDU 23,12,c1%,c1%,c1%,c1%,c1%,c1%,c1%,c2%
 1060 IF ch%=2 VDU 23,12,c1%,c1%,c1%,c1%,c1%,c1%,c2%,c2%
 1070 IF ch%=3 VDU 23,12,c1%,c1%,c1%,c1%,c1%,c2%,c2%,c2%
 1080 IF ch%=4 VDU 23,12,c1%,c1%,c1%,c1%,c2%,c2%,c2%,c2%
 1090 IF ch%=5 VDU 23,12,c1%,c1%,c1%,c2%,c2%,c2%,c2%,c2%
 1100 IF ch%=6 VDU 23,12,c1%,c1%,c2%,c2%,c2%,c2%,c2%,c2%
 1110 IF ch%=7 VDU 23,12,c1%,c2%,c2%,c2%,c2%,c2%,c2%,c2%
 1120 IF ch%=8 VDU 23,12,c2%,c2%,c2%,c2%,c2%,c2%,c2%,c2%
 1130 IF ch%=9 VDU 23,12,c1%,c2%,c2%,c1%,c1%,c2%,c2%,c1%
 1140 IF ch%=0 VDU 23,12,c1%,c2%,c1%,c2%,c2%,c1%,c2%,c1%
 1150 PROCdrawcross(mx%,my%,-1)
 1160 GCOL 16,0
 1170 MOVE x%,y%
 1180 PLOT &65,x%+1280,y%+10
 1190 MOVE x%,y%
 1200 PLOT &65,x%+10,y%+1024
 1210 MOVE x%,1024-10
 1220 PLOT &65,x%+1280,1024
 1230 MOVE 1280-10,1024
 1240 PLOT &65,1280,0
 1250 GCOL 16,0
 1260 MOVE x%,y%
 1270 DRAW x%+10,y%+10
 1280 DRAW x%,y%+10
 1290 DRAW x%,y%
 1300 ENDPROC
 1310:
 1320 DEF PROCplot65(A%,B%,C%,D%,E%,F%)
 1330 PROCdrawcross(mx%,my%,-1)
 1340 GCOL A%,B%:MOVE C%,D%:PLOT&65,E%,F%
 1350 ENDPROC
 1360:
 1370 DEF PROCloadtempscreen
 1380 PROCdrawcross(mx%,my%,-1)
 1390*LOAD TEMP
 1400 ENDPROC
 1410:
 1420 DEF PROCtempsavescreen
 1430 PROCdrawcross(mx%,my%,-1)
 1440 A%=0:X%=4:Y%=5:CALL scrcopy
 1450 ENDPROC
 1460:
 1470 DEF PROCsavescreen
 1480 PROCdrawcross(mx%,my%,-1)
 1490 OSCLI "SAVE nuc"+STR$screen%+" 3000 5000"
 1500A%=0:X%=4:Y%=5:CALL scrcopy
 1510 ENDPROC
 1520:
 1530 DEF PROCloadscreen
 1540IFscreen%<1 screen%=1
 1550 PROCdrawcross(mx%,my%,-1)
 1560 A%=1:X%=4:Y%=5:CALL scrcopy
 1570 ENDPROC
 1580:
 1590 DEF PROCmenu
 1600 PROCdrawcross(mx%,my%,-1)
 1610 A%=0:CALL menu
 1620 GCOL 0,2:MOVE 0,1023:DRAW 1279,1023:DRAW 1279,771:DRAW 0,771:DRAW 0,1023
 1630 GCOL16,0
 1640 FORX%=0TO7
 1650 FORY%=0TO7
 1660 U%=((Y% DIV 4)*512+24)+X%*64:W%=959-56*(Y% MOD 4)
 1670 VDU23,12,X%,Y%,Y%,X%,X%,Y%,Y%,X%
 1680 GCOL16,0
 1690 MOVEU%,W%
 1700 PLOT &65,U%+48,W%+48
 1710 GCOL0,7
 1720 MOVEU%,W%:DRAWU%+48,W%:DRAWU%+48,W%+48:DRAWU%,W%+48:DRAWU%,W%
 1730 NEXT
 1740 NEXT
 1750 REPEAT
 1760 PROCcursor(1)
 1770 key$=INKEY$(0)
 1780 but%=((mx%-24) DIV 64)+((1007-my%) DIV 56)*16
 1790 IF but%<0 but%=0
 1800 IF but%>63 but%=63
 1810 IF (ADVAL(0) AND 1)<>0 PROCdrawcross(mx%,my%,-1):PRINTTAB(16,1);but%;" "
 1820 UNTIL key$="T"
 1830 PROCdrawcross(mx%,my%,-1)
 1840 A%=1:CALL menu
 1850 ENDPROC
 1860:
 1870 DEF PROCcursor(Z%)
 1880 mx%=FNscale_x(ADVAL(1))
 1890 my%=FNscale_y(ADVAL(2))
 1900 IF Z%=1 AND my%<771 my%=771
 1910 IF ox%=mx% AND oy%=my% GOTO 1950
 1920 IF ox%=-1 GOTO 1940
 1930 PROCdrawcross(ox%,oy%,ox%)
 1940 PROCdrawcross(mx%,my%,ox%)
 1950 ox%=mx%: oy%=my%
 1960 ENDPROC
 1970:
 1980 DEF PROCdrawcross(L%,M%,O%)
 1990 GCOL3,7
 2000 MOVE L%-crh%,M%:DRAW L%+crh%,M%
 2010 MOVE L%,M%-crh%:DRAW L%,M%+crh%
 2020 ox%=O%
 2030 ENDPROC

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Fri Jan 13, 2017 12:26 pm

That is really awesome! I was trying to work out how to do that for ages (the palette)....you are very talented ( we all have our own things we are good at and mine isn't programming :lol: )

It's like having a cheap Quantel Paint on the BBC :)
It really gets my juices going this......
PS Thanks tricky for helping me with that palette pic showing as well....and steve f for all those explanations

I can imagine people doing lots of pics down the line.....lots of colourful pics.
Last edited by pixelblip on Fri Jan 13, 2017 5:52 pm, edited 1 time in total.

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

Re: How do you save a screen

Post by FourthStone » Fri Jan 13, 2017 12:42 pm

Glad you like it :D

The mode 2 patterns are configured as follows and we could draw with 4 custom patterns at a time with any colour combos... we might even be able to make custom ones on the fly with a bit of effort put into the menu:
c1 : c2
c3 : c4
c5 : c6
c7 : c8

An example of the simple crosshatch pattern in my menu program looks like this:

Red : Green
Green : Red
Red : Green
Green : Red

...or VDU 23,12,1,2,2,1,1,2,2,1

We can come up with a few different patterns with all the colours to make a vibrant palette to use... which is where you will come in because I am no artist that's for sure :lol:

Here is the GXR manual if you don't already have it which explains it better than I ever could.

http://www.8bs.com/othrdnld/manuals/app ... oftGFX.zip

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Fri Jan 13, 2017 1:37 pm

Thanks Fourth Stone.
I have read the GXR manual a few times now.............
I couldn't work how to draw a line in it! The patterns were a bit of a mystery ( why use GCOL 32 rather than GCOL 16)......and flood fills.........
We can look at some of the things as we go along....I am sure someone whizzy like yourself will just know :lol:

I am looking forward to starting another pic this weekend - thinking of doing an Alien Abduction picture!

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Fri Jan 13, 2017 9:50 pm

pixelblip wrote:I am looking forward to starting another pic this weekend - thinking of doing an Alien Abduction picture!
Sounds good! Slightly off topic, but how do you draw your picture before colouring it in? Some other BBC art program? On another system then convert the line art to mode 2 resolution? (Is there another thread where you posted about this?)

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

Re: How do you save a screen

Post by FourthStone » Fri Jan 13, 2017 10:33 pm

how to draw a line in it
Is this something you want? We could easily add line drawing, even boxes, triangles, circles etc but I think the basic line drawing primitives are what you want? From what I've read you can also use the patterns to do the line drawing and flood fills.
why use GCOL 32 rather than GCOL 16
Still wrapping my head around it but here goes... there are 4 big and 4 small custom patterns that can be user defined:
Big (2x8 pixels for mode 2):
VDU 23,1...
VDU 23,2...
VDU 23,3...
VDU 23,4...

Small (2x4 pixels for mode 2):
VDU 23,12...
VDU 23,13...
VDU 23,14...
VDU 23,15...

These 'brushes' can then be selected with gcol:
GCOL 12,0 = pattern 1/12
GCOL 32,0 = pattern 2/13
GCOL 48,0 = pattern 3/12
GCOL 64,0 = pattern 4/12

I think, haven't confirmed, that the small patterns are just a subset of the large pattern... will do more some testing to see.

So one way to do it might be to select any four colour/patterns available from the menu and use hotkeys to do the drawing at the mouse cursor, or flood fills and lines etc,
e.g.
'Z,X,C,V' for drawing a square of each selected pattern Z=pattern1, X=pattern2 etc.
'A,S,D,F' for flood fill with each selected pattern
'Q,W,E,R' for line draw of each selected pattern, M to move, Q to draw a line, Q to draw again etc.

Small steps, if I have time over the weekend I'll do some more playing around.

Looking forward to a colourful picture to inspire me :-o

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Fri Jan 13, 2017 10:45 pm

Great to see this coming together!
FourthStone wrote:I've been toying with the idea of moving the mouse routine to assembler but my head is near exploding trying to figure out the adval mouse co-ord conversions in assembler... anyone know if it's already been done before?
This article on ADVAL may help: http://beebwiki.mdfs.net/ADVAL The key thing is that it's just a wrapper around OSBYTE &80 http://beebwiki.mdfs.net/OSBYTE_%2680 so you need to call that.

While I wouldn't want to put you off for the educational value, I don't know if converting the mouse coordinate reads to machine code will offer much of a speed boost - most of the time spent will probably be in the OS code handling OSBYTE &80. But I could easily be wrong!

ETA: Or did you mean you were struggling to do the arithmetic to convert the values returned by OSBYTE &80 into screen co-ordinates? If you were, I'll just observe that I made up those calculations based on some quick and dirty fiddling with BeebEm and it may be that slightly different constants would give just as good or better results, and might make the calculation easier.

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

Re: How do you save a screen

Post by FourthStone » Sat Jan 14, 2017 12:17 am

ETA: Or did you mean you were struggling to do the arithmetic to convert the values returned by OSBYTE &80 into screen co-ordinates?
Yeah this, happy getting the AD values from an OS call, and converting with math in basic is fairly straight forward, but where I was hoping to get a speed improvement was calculating the address and drawing/erasing the cursor in asm. Thinking it might be a little less laggy by converting the addr calc and drawing.

That is one of the area's where a good asm programmer shines, doing complex math in 8 bit binary I struggle with... I'm sure Tricky might have something to add to this [-o< The drawing in asm I can handle once I have a starting address.

It's not a huge thing though, I think the program can still work well as it is :D

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Sat Jan 14, 2017 12:34 am

I'd be very interested to hear from someone like tricky on this, but my suspicion is that the cursor would benefit from being plotted using machine code which directly writes to the screen RAM, instead of going via the OS. One side effect of doing that would be that you'd want to do a different calculation from the ADVAL return values, since you'd be using the "real" screen co-ordinates (160x256) not the virtual ones the OS uses (1280x1024). I don't know if that would make the calculations better or worse. You could always cheat with a lookup table.

What also might help from BASIC (I think the code is still using the same routine I posted as a quick hack) would be to not redraw and undraw the cursor constantly, but to only erase and redraw it when the X/Y co-ordinates actually changed. The flashing of the cursor in the current implementation was not intended to make it visible, it was just a convenience for my original hacky post. :-) I think you've already changed this, but I could be wrong.

ETA: Also, if you're willing to assume the program is being run on an emulator, you could simply remove the crosshair altogether - the crosshair essentially tracks the tip of the host operating system mouse pointer, and so it's redundant. You can't get faster than not plotting something at all. :-)

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

Re: How do you save a screen

Post by FourthStone » Sat Jan 14, 2017 1:07 am

Have a look at the latest code I posted above, the cursor only updates when moving the mouse or drawing :D

Good point regarding running on an emulator as the mouse is already visible via Windows. I do like the idea that someone could run the program on real hardware if required.

Converting the AD values into an address via a lookup sounds correct ... I've been reading up on calculating screen addr from x,y co-ords in combination with a lookup and I'm guessing I can modify this whole process to also convert the AD values and hopefully gain a little speed improvement. What I am trying to avoid is calculating the x,y values in between :-k

I'll get there in my own slow way, but if I can find an example of someone already doing it then I can focus on improving other parts of the program. I'll put it on the back burner for now anyway as it works pretty well from Basic.

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

Re: How do you save a screen

Post by FourthStone » Sat Jan 14, 2017 6:06 am

Minor update, have added a few (16) pages of texture patterns to the menu and two scroll buttons. Still very slow to redraw, working my way up to redoing the menu for speed once you're happy with the texture layouts. Might have to wait until i'm back at work, hard to focus on coding at home :lol:

EDIT: A question regarding colour layout, would you prefer each page to have 1 primary colour and all the various patterns available for that colour... or.... similar to the way it is now with all the colour combos on one page for one pattern? I know in the colour layout you posted it was the first option I mentioned so just thought I'd get an artists preference :-k

EDIT#2: Added a Move 'Y', Draw 'R' and Fill 'E', keys will be reassigned at a later date, just temp for now... still can't select patterns yet... and I apologise about my grade school drawing, just wanted to test it out :oops:

EDIT#3: How did you paint the pictures you've posted, it must of taken ages to get all the patterns right? :mrgreen:

Code: Select all

   10 OSBYTE=&FFF4
   20 DIM mc% 220:src=&70:dst=&72:rom1=&74:rom2=&75:mOnOff=&76
   30 FOR P=0 TO 1
   40   P%=mc%
   50   [OPT P*2
   60   \ A=0 store 1=fetch, X=bank 1, Y=bank 2
   70   .scrcopy
   80   BIT &FFFB:BMI exit
   90   STX rom1:STY rom2:CMP #1
  100   LDA #&30:BCC P%+4:LDA #&80
  110   STA src+1:EOR #&B0:STA dst+1
  120   LDA #1:JSR vram
  130   LDA &F4:PHA:LDX #&40:LDA rom1:CLC
  140   LDY #0:STY src:STY dst
  150   .lp1
  160   STA &F4:STA &FE30
  170   .lp2
  180   LDA (src),Y:STA (dst),Y:INY:BNE lp2
  190   INC src+1:INC dst+1:DEX:BNE lp2
  200   LDA src+1:BPL skip1:LDA #&80:STA src+1:.skip1
  210   LDA dst+1:BPL skip2:LDA #&80:STA dst+1:.skip2
  220   LDX #&10:ROL A:EOR #1:ROR A:LDA rom2:BCS lp1
  230   PLA:STA &F4:STA &FE30:LDA #0
  240   .vram
  250   PHA:LDA #&84:JSR OSBYTE:PLA:CPY #&80:BCC exit
  260   PHA:TAX:LDA #108:JSR OSBYTE
  270   PLA:INX:BNE exit
  280   EOR #1:TAX:LDA #111:JMP OSBYTE
  290   .exit
  300   RTS
  310   .menu
  320   SEI:STA mOnOff:CMP #1:LDA #&30:BCC revaddr:LDA #&98
  330   .revaddr STA src+1:EOR #&A8:STA dst+1:LDA #1:JSR vram
  340   LDA &F4:PHA:LDA #5:STA &F4:STA &FE30:LDX #20
  350   LDY #0:STY src:STY dst
  360   .preloop:LDA mOnOff:CMP #0:.menuloop
  370   LDA (src),Y:STA (dst),Y:BCC skipp:LDA #0:STA (src),Y:.skipp:INY:BNE menuloop
  380   INC src+1:INC dst+1:DEX:BNE preloop
  390   PLA:STA &F4:STA &FE30:CLI:LDA #0:JSR vram
  400   RTS
  410   ]NEXT
  420MODE 2
  430VDU23;10,32;0;0;0;
  440screen%=1
  450ch%=6
  460c1%=1
  470c2%=1
  480c1sw%=c1%:c2sw%=c2%
  490x%=0:y%=0
  500dx%=0:dy%=0
  510*FX12,32
  520ox%=-1:oy%=0:crh%=24:col%=0
  530REPEAT
  540PROCcursor(0)
  550GCOL 16,0
  560key$=INKEY$(0)
  570IF c1%>7 c1%=7
  580IF c2%>7 c2%=7
  590IF c1%<1 c1%=0
  600IF c2%<1 c2%=0
  610IF key$="T" PROCmenu
  612IF key$="Y" dx%=mx%:dy%=my%
  614IF key$="R" PROCdrawcross(mx%,my%,-1):GCOL 16,0:MOVE dx%,dy%:PLOT5,mx%,my%:dx%=mx%:dy%=my%
  615IF key$="E" PROCdrawcross(mx%,my%,-1):GCOL 16,0:PLOT 133,mx%,my%
  620IF key$="I" c1%=c2sw%:c2%=c1sw%
  630IF key$="Q" c1%=c1%-1:PROCdrawblock
  640IF key$="W" c1%=c1%+1:PROCdrawblock
  650IF key$="A" c2%=c2%-1:PROCdrawblock
  660IF key$="S" c2%=c2%+1:PROCdrawblock
  670IF key$="1" ch%=1:PROCdrawblock
  680IF key$="2" ch%=2:PROCdrawblock
  690IF key$="3" ch%=3:PROCdrawblock
  700IF key$="4" ch%=4:PROCdrawblock
  710IF key$="5" ch%=5:PROCdrawblock
  720IF key$="6" ch%=6:PROCdrawblock
  730IF key$="7" ch%=7:PROCdrawblock
  740IF key$="8" ch%=8:PROCdrawblock
  750IF key$="9" ch%=9:PROCdrawblock
  760IF key$="0" ch%=0:PROCdrawblock
  770IF key$="V" PROCplot65(0,7,mx%-1,my%-1,mx%+1,my%+1)
  780IF key$="B" PROCplot65(0,7,mx%-4,my%-4,mx%+4,my%+4)
  790IF key$="N" PROCplot65(0,0,mx%-1,my%-1,mx%+1,my%+1)
  800IF key$="M" PROCplot65(0,0,mx%-4,my%-4,mx%+4,my%+4)
  810IF key$="\" PROCplot65(16,0,mx%-1,my%-1,mx%+1,my%+1)
  820IF key$="Z" PROCplot65(16,0,mx%-4,my%-4,mx%+4,my%+4)
  830IF key$="X" PROCplot65(16,0,mx%-8,my%-8,mx%+8,my%+8)
  840IF key$="C" PROCplot65(16,0,mx%-12,my%-12,mx%+12,my%+12)
  850IF key$="P" screen%=screen%+1:PROCsavescreen
  860IF key$="U" PROCloadscreen
  870IF (ADVAL(0) AND 1)<>0 THEN PROCtempsavescreen:GCOL 0,135:PLOT&85,mx%,my%
  880UNTIL FALSE
  890END
  900:
  910DEF FNscale_x(C%)
  920C%=C%-48
  930C%=65472-C%
  940=1280*C%/65472
  950:
  960DEF FNscale_y(C%)
  970C%=C%-48
  980=1024*C%/65472
  990:
 1000 DEF PROCdrawblock
 1010 IF c1%>7 c1%=7
 1020 IF c2%>7 c2%=7
 1030  IF c1%<1 c1%=0
 1040  IF c2%<1 c2%=0
 1050 IF ch%=1 VDU 23,12,c1%,c1%,c1%,c1%,c1%,c1%,c1%,c2%
 1060 IF ch%=2 VDU 23,12,c1%,c1%,c1%,c1%,c1%,c1%,c2%,c2%
 1070 IF ch%=3 VDU 23,12,c1%,c1%,c1%,c1%,c1%,c2%,c2%,c2%
 1080 IF ch%=4 VDU 23,12,c1%,c1%,c1%,c1%,c2%,c2%,c2%,c2%
 1090 IF ch%=5 VDU 23,12,c1%,c1%,c1%,c2%,c2%,c2%,c2%,c2%
 1100 IF ch%=6 VDU 23,12,c1%,c1%,c2%,c2%,c2%,c2%,c2%,c2%
 1110 IF ch%=7 VDU 23,12,c1%,c2%,c2%,c2%,c2%,c2%,c2%,c2%
 1120 IF ch%=8 VDU 23,12,c2%,c2%,c2%,c2%,c2%,c2%,c2%,c2%
 1130 IF ch%=9 VDU 23,12,c1%,c2%,c2%,c1%,c1%,c2%,c2%,c1%
 1140 IF ch%=0 VDU 23,12,c1%,c2%,c1%,c2%,c2%,c1%,c2%,c1%
 1150 PROCdrawcross(mx%,my%,-1)
 1160 GCOL 16,0
 1170 MOVE x%,y%
 1180 PLOT &65,x%+1280,y%+10
 1190 MOVE x%,y%
 1200 PLOT &65,x%+10,y%+1024
 1210 MOVE x%,1024-10
 1220 PLOT &65,x%+1280,1024
 1230 MOVE 1280-10,1024
 1240 PLOT &65,1280,0
 1250 GCOL 16,0
 1260 MOVE x%,y%
 1270 DRAW x%+10,y%+10
 1280 DRAW x%,y%+10
 1290 DRAW x%,y%
 1300 ENDPROC
 1310:
 1320 DEF PROCplot65(A%,B%,C%,D%,E%,F%)
 1330 PROCdrawcross(mx%,my%,-1)
 1340 GCOL A%,B%:MOVE C%,D%:PLOT&65,E%,F%
 1350 ENDPROC
 1360:
 1370 DEF PROCloadtempscreen
 1380 PROCdrawcross(mx%,my%,-1)
 1390*LOAD TEMP
 1400 ENDPROC
 1410:
 1420 DEF PROCtempsavescreen
 1430 PROCdrawcross(mx%,my%,-1)
 1440 A%=0:X%=4:Y%=5:CALL scrcopy
 1450 ENDPROC
 1460:
 1470 DEF PROCsavescreen
 1480 PROCdrawcross(mx%,my%,-1)
 1490 OSCLI "SAVE nuc"+STR$screen%+" 3000 5000"
 1500A%=0:X%=4:Y%=5:CALL scrcopy
 1510 ENDPROC
 1520:
 1530 DEF PROCloadscreen
 1540IFscreen%<1 screen%=1
 1550 PROCdrawcross(mx%,my%,-1)
 1560 A%=1:X%=4:Y%=5:CALL scrcopy
 1570 ENDPROC
 1580:
 1590 DEF PROCmenu
 1591 but%=-1
 1600 PROCdrawcross(mx%,my%,-1)
 1610 A%=0:CALL menu
 1620 GCOL 0,2:MOVE 0,1023:DRAW 1279,1023:DRAW 1279,771:DRAW 0,771:DRAW 0,1023
 1621 MOVE 1063,987:DRAW 1087,1003:DRAW 1111,987
 1622 MOVE 1063,807:DRAW 1087,791:DRAW 1111,807
 1630 PROCdrawcolours
 1750 REPEAT
 1760 PROCcursor(1)
 1770 key$=INKEY$(0)
 1780 but%=((mx%-24) DIV 64)+((1007-my%) DIV 56)*16
 1790 IF but%<0 but%=0
 1800 IF but%>79 but%=79
 1810 IF (ADVAL(0) AND 1)<>0 PROCdrawcross(mx%,my%,-1):PROCdrawcolours
 1820 UNTIL key$="T"
 1830 PROCdrawcross(mx%,my%,-1)
 1840 A%=1:CALL menu
 1850 ENDPROC
 1860:
 1870 DEF PROCcursor(Z%)
 1880 mx%=FNscale_x(ADVAL(1))
 1890 my%=FNscale_y(ADVAL(2))
 1900 IF Z%=1 AND my%<771 my%=771
 1910 IF ox%=mx% AND oy%=my% GOTO 1950
 1920 IF ox%=-1 GOTO 1940
 1930 PROCdrawcross(ox%,oy%,ox%)
 1940 PROCdrawcross(mx%,my%,ox%)
 1950 ox%=mx%: oy%=my%
 1960 ENDPROC
 1970:
 1980 DEF PROCdrawcross(L%,M%,O%)
 1990 GCOL3,7
 2000 MOVE L%-crh%,M%:DRAW L%+crh%,M%
 2010 MOVE L%,M%-crh%:DRAW L%,M%+crh%
 2020 ox%=O%
 2030 ENDPROC
 2040:
 2050 DEF PROCdrawcolours
 2052 IF but%=64 but%=-1:col%=(col%+1) MOD 17
 2053 IF but%=16 but%=-1:col%=col%-1:IF col%=-1 col%=16
 2054 IF but%<>-1 GOTO 2240
 2060 FORX%=0TO7
 2070 FORY%=0TO7
 2080 U%=((Y% DIV 4)*512+24)+X%*64:W%=959-56*(Y% MOD 4)
 2090 IF col%=0 VDU23,12,X%,Y%,Y%,X%,X%,Y%,Y%,X%
 2100 IF col%=1 VDU23,12,X%,Y%,X%,Y%,X%,Y%,X%,Y%
 2110 IF col%=2 VDU23,12,X%,X%,Y%,Y%,X%,X%,Y%,Y%
 2120 IF col%=3 VDU23,12,Y%,X%,Y%,Y%,Y%,X%,Y%,Y%
 2130 IF col%=4 VDU23,12,Y%,Y%,Y%,Y%,Y%,X%,Y%,Y%
 2140 IF col%=5 VDU23,12,X%,Y%,Y%,Y%,Y%,Y%,Y%,X%
 2150 IF col%=6 VDU23,12,Y%,Y%,Y%,X%,X%,Y%,Y%,Y%
 2160 IF col%=7 VDU23,12,Y%,Y%,Y%,Y%,Y%,Y%,X%,X%
 2161 IF col%=8 VDU 23,12,Y%,Y%,Y%,Y%,Y%,Y%,Y%,X%
 2162 IF col%=9 VDU 23,12,Y%,Y%,Y%,Y%,Y%,Y%,X%,X%
 2163 IF col%=10 VDU 23,12,Y%,Y%,Y%,Y%,Y%,X%,X%,X%
 2164 IF col%=11 VDU 23,12,Y%,Y%,Y%,Y%,X%,X%,X%,X%
 2165 IF col%=12 VDU 23,12,Y%,Y%,Y%,X%,X%,X%,X%,X%
 2166 IF col%=13 VDU 23,12,Y%,Y%,X%,X%,X%,X%,X%,X%
 2167 IF col%=14 VDU 23,12,Y%,X%,X%,X%,X%,X%,X%,X%
 2168 IF col%=15 VDU 23,12,Y%,X%,X%,Y%,Y%,X%,X%,Y%
 2169 IF col%=16 VDU 23,12,Y%,X%,Y%,X%,X%,Y%,X%,Y%
 2170 GCOL16,0
 2180 MOVEU%,W%
 2190 PLOT &65,U%+48,W%+48
 2200 GCOL0,7
 2210 MOVEU%,W%:DRAWU%+48,W%:DRAWU%+48,W%+48:DRAWU%,W%+48:DRAWU%,W%
 2220 NEXT
 2230 NEXT
 2240 ENDPROC   
Art01.png

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Sat Jan 14, 2017 9:01 am

Ah that is fab! =D>
You are so quick..........that would have taken me months in Basic and it still would be rubbish!

I think if it's quick enough then put the whole palette on .......the trouble is just for the reds you are showing 56 blocks - so you'd need to show 7x56 blocks on screen ....that's a lot .............I think you'll have to decide on that depending on the screen redraw times e.t.c Having to open an extra menu isn't a big deal.....but one less sel;ection :lol: click is a an extra brush stroke I say!

Yeh it did take ages to paint the pictures....that is the thing about doing it, it's a slog sometimes.....but a pleasure.

I have found a good workflow....I tend to draw on my Nintendo DS first........then import into the BBC and carry on from there. That way I don't get bogged down with IT not working when I want to draw quickly, I can sit in bed and do it and the screen resolution of the DS is suited to Mode 2......if you have less pixels you tend to do more!

Last night I woke up at 12:30 so I thought ok what is this Alien Abduction picture going to look like....so I started a doodle.........I thought I gotta make everyone laugh a bit ...I also tried a desert island out that was simple....so hopefully this will encourage you to keep going!
Attachments
Desert Island.jpg
Abduction.jpg

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Sat Jan 14, 2017 3:54 pm

Ok finally got Beebem on my zoostorm xp tablet pc ( which is very cheap and cheerful!). Before when I tried this the mouse wouldn't line up with the tablet but using Analogue Joystick in Beeb Em means this is no longer the case. Which is amazing!!!!! To think I can draw onto the screen now using BBC software....cor
It's only an Atom processor so it's slow but it's ok enough to draw......let's see what comes out!

The only big snag is I need to get to the keyboard to operate the program ( which is hard on the zoostorm as you have to flip the lid up)....hmmm

Update: abandoned it for the time being and back to the mouse......to many issues ...never mind I am sure we will get there with that one..

User avatar
pixelblip
Posts: 1207
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: How do you save a screen

Post by pixelblip » Sat Jan 14, 2017 6:02 pm

Close Encounters of the Beeb Kind! :lol:
Attachments
Aliens.jpg

SteveF
Posts: 512
Joined: Fri Aug 28, 2015 8:34 pm
Contact:

Re: How do you save a screen

Post by SteveF » Sat Jan 14, 2017 6:57 pm

=D>

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

Re: How do you save a screen

Post by FourthStone » Sat Jan 14, 2017 8:38 pm

Amazing that you can produce that from your program, really nice pixel control :mrgreen:

Post Reply