How do you save a screen

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

Re: How do you save a screen

Post by pixelblip » Sat Jan 14, 2017 9:13 pm

I could see the potential in the GXR chip...............it has masses!

User avatar
1024MAK
Posts: 9278
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: How do you save a screen

Post by 1024MAK » Sat Jan 14, 2017 9:46 pm

Now, where is that like button when you need it :D

@ pixelblip, another lovely picture =D>

Mark

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

Re: How do you save a screen

Post by FourthStone » Sun Jan 15, 2017 9:48 am

Quick update, I've had a bit of a think about how to do the colour selection and working towards having something working soon. Want to make sure it works properly so need another day or so to get the program logic right.

There's not really enough memory available to show all colours and patterns at the same time, so I've decided to go with a colour selection approach which I hope will still be ok. I'm hoping this design coupled with the ability to select 4 colour/patterns along with intuitive drawing hotkeys will be a good combination for drawing some spiffy art [-o<

Anyway, will post again when it's ready for a test.
Art02.png

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

Re: How do you save a screen

Post by pixelblip » Sun Jan 15, 2017 9:56 am

Look at all those colours! It's like the Stargate in 2001! :lol:

Thanks very much it looks really great...... =D>

So exciting to see a new art program for the Beeb developing after all these years!

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

Re: How do you save a screen

Post by pixelblip » Sun Jan 15, 2017 10:44 am

That palette really looks great.

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

Re: How do you save a screen

Post by pixelblip » Sun Jan 15, 2017 11:13 am

Am struggling with this one a bit this morning :x
It's all in the struggle eh :lol:

Of course it would be better if I was actually there first hand to study this subject properly before painting it so all contributions greatly received in January for a winter busman's holiday :lol:
Attachments
Desert2.jpg

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

Re: How do you save a screen

Post by tricky » Sun Jan 15, 2017 11:58 am

Sorry, been of on a Red Alert 2 bender!
Loving the drawings =D>, yet another area I have zero talent.

I couldn't see anywhere where you were changing from four ADC (ADVAL) channels to two, which seems to be all you need, so this should halve the ADC lag. Reducing the size of the cursor from 24 to 16 also helps a bit whilst still being visible.

Code: Select all

512*FX16,2
520ox%=-1:oy%=0:crh%=16:col%=0
Replacing 670..760 with less code that does less checks helps too.

Code: Select all

666K%=ASC(key$)
667IF 48<=K% AND K%<=57 ch%=K%-48:PROCdrawblock
It isn't quite as neat, but it might help to make all the checks numeric using the build in integer K%.
Any frequently used integer variables will be slightly faster using the built in A%..Z%.
I'm a little busy at the moment, but I will write a cursor drawing routine if you like.
There seems to be a small bug where the cursor gets left behind, only happens when I'm clicking and pressing buttons, so my fault.

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

Re: How do you save a screen

Post by pixelblip » Sun Jan 15, 2017 3:24 pm

This is getting a bit better now.....got little fishies in there....oh and tricky you have talent........I mean you are helping us with the programming - I can't do that!
Attachments
Desert3.jpg

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

Re: How do you save a screen

Post by FourthStone » Mon Jan 16, 2017 5:32 am

Hi all,

Ok, where to start, oh yeah at the beginning... a long long time ago... Star Wars picture theme next maybe? EDIT: Love the beach scene, will be 38 degrees Celsius where I am tomorrow :oops:

Anyway, I'm still tinkering around but wanted to share what I have for now so please try out the program below and let me know what you think.

Couple of things:
  • Bug1: The fill routine stalls or goes slow for patterns with black in them, probably something to do with background colours.
  • Bug2: The fill routine stops working completely after the Undo, kind of defeats the purpose, still looking at it.
  • Bug3: Pressing an action hotkey and clicking double erases mouse cursor which makes it reappear, will fix in next revision.
  • Menu is still slow to redraw on load and after colour selection, will rewrite this in asm after menu layout is decided on
  • Tried Tricky's suggestion for only using 2 ADVAL ports but the mouse button stopped working so leaving it out for now
  • Made the cursor a bit smaller, still thinking of doing an asm mouse drawing routine eventually
  • Major key reshuffle, see below.
  • Features, Need a solid colour option, need additional menu panel for save / load / options / help, maybe a mode 7 screen as per other art programs
  • General clean up of variables and code required, focusing more on features at the moment
Current key layout, please make any suggestions for changes:
'T' show and hide menu
'M' to move graphics cursor, used as the starting point for line drawing
'1,2,3,4' change drawing block size in sizes of 4,8,12,16
'Q,W,E,R' draw line using each selected pattern, QWER to draw a line, QWER to draw again etc. Uses last Move or Draw location as start point
'A,S,D,F' for flood fill with each selected pattern (see bugs above)
'Z,X,C,V' for drawing a square of each selected pattern Z=pattern1, X=pattern2 etc.
'P' Save screen to disk
'L' Load 'TEMP' file from disk
'Mouse Button 1' create an undo screen
'U' Replace current picture with undo screen

Menu controls:
Left side: Mouse Click to select primary pattern colour (causes redraw of patterns)
Right side: Mouse Click to select patterns 1-4
Middle: Mouse Click to assign to the currently selected pattern (p1-p4)

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
  460DIM ps(3,1)
  470ps(0,0)=0:ps(0,1)=1
  480ps(1,0)=1:ps(1,1)=2
  490ps(2,0)=2:ps(2,1)=3
  500ps(3,0)=3:ps(3,1)=4
  510PROCselectedcolours(0)
  520VDU23,224,228,172,228,132,142,0,0,0
  530VDU23,225,228,170,226,132,142,0,0,0
  540VDU23,226,238,162,238,130,142,0,0,0
  550VDU23,227,226,170,238,130,130,0,0,0
  560dx%=0:dy%=0
  570*FX12,32
  580REM*FX16,2
  590ox%=-1:oy%=0:crh%=16:col%=0:pat%=0:ds%=8
  600REPEAT
  610PROCcursor(0)
  620GCOL 16,0
  630key$=INKEY$(0)
  640IF key$="T" PROCmenu
  650IF key$="M" dx%=mx%:dy%=my%
  660REM Block Size
  670IF key$="1" ds%=4
  680IF key$="2" ds%=8
  690IF key$="3" ds%=12
  700IF key$="4" ds%=16
  710REM Draw Line with P1,P2,P3,P4
  720IF key$="Q" PROCdrawline(16)
  730IF key$="W" PROCdrawline(32)
  740IF key$="E" PROCdrawline(48)
  750IF key$="R" PROCdrawline(64)
  760REM Flood Fill with P1,P2,P3,P4
  770IF key$="A" PROCfloodfill(16)
  780IF key$="S" PROCfloodfill(32)
  790IF key$="D" PROCfloodfill(48)
  800IF key$="F" PROCfloodfill(64)
  810REM Draw block with P1,P2,P3,P4
  820IF key$="Z" PROCplot65(16,0,mx%-ds%,my%-ds%,mx%+ds%,my%+ds%)
  830IF key$="X" PROCplot65(32,0,mx%-ds%,my%-ds%,mx%+ds%,my%+ds%)
  840IF key$="C" PROCplot65(48,0,mx%-ds%,my%-ds%,mx%+ds%,my%+ds%)
  850IF key$="V" PROCplot65(64,0,mx%-ds%,my%-ds%,mx%+ds%,my%+ds%)
  860IF key$="L" PROCloadtempScreen
  870IF key$="P" screen%=screen%+1:PROCsavescreen
  880IF key$="U" PROCloadscreen
  890IF (ADVAL(0) AND 1)<>0 THEN PROCtempSavescreen:GCOL 0,135:PLOT&85,mx%,my%
  900UNTIL FALSE
  910END
  920:
  930DEF FNscale_x(C%)
  940C%=C%-48
  950C%=65472-C%
  960=1280*C%/65472
  970:
  980DEF FNscale_y(C%)
  990C%=C%-48
 1000=1024*C%/65472
 1010:
 1020 DEF PROCplot65(A%,B%,C%,D%,E%,F%)
 1030 PROCdrawcross(mx%,my%,-1)
 1040 GCOL A%,B%:MOVE C%,D%:PLOT&65,E%,F%
 1050 ENDPROC
 1060:
 1070 DEF PROCloadtempScreen
 1080 PROCdrawcross(mx%,my%,-1)
 1090*LOAD TEMP
 1100 ENDPROC
 1110:
 1120 DEF PROCtempSavescreen
 1130 PROCdrawcross(mx%,my%,-1)
 1140 A%=0:X%=4:Y%=5:CALL scrcopy
 1150 ENDPROC
 1160:
 1170 DEF PROCsavescreen
 1180 PROCdrawcross(mx%,my%,-1)
 1190 OSCLI "SAVE nuc"+STR$screen%+" 3000 5000"
 1200A%=0:X%=4:Y%=5:CALL scrcopy
 1210 ENDPROC
 1220:
 1230 DEF PROCloadscreen
 1240IFscreen%<1 screen%=1
 1250 PROCdrawcross(mx%,my%,-1)
 1260 A%=1:X%=4:Y%=5:CALL scrcopy
 1270 ENDPROC
 1280:
 1290 DEF PROCmenu
 1300 PROCdrawcross(mx%,my%,-1)
 1310 A%=0:CALL menu
 1320 GCOL 0,2:MOVE 0,1020:DRAW 128,1020:DRAW 128,768:DRAW 0,768:DRAW 0,1020
 1330 MOVE 144,1020:DRAW 1272,1020:DRAW 1272,768:DRAW 144,768:DRAW144,1020
 1340 GCOL16,0:FORC%=0TO7:VDU23,12,C%,C%,C%,C%,C%,C%,C%,C%:MOVE16+(C% MOD 2)*56,1004-(C% DIV 2)*56:PLOT&65,56+(C% MOD 2)*56,960-(C% DIV 2)*56:NEXT
 1350 VDU5:FORK%=0TO3:MOVE1116,992-K%*56:PRINTCHR$(K%+224):NEXT:VDU4
 1360 PROCcolourselect(col%,7)
 1370 PROCdrawcolours(-1,col%)
 1380 PROCselectedcolours(1)
 1390 REPEAT
 1400 but%=-1
 1410 PROCcursor(1)
 1420 key$=INKEY$(0)
 1430 IF (ADVAL(0) AND 1)<>0 PROCcheckbutton
 1440 IF but%>=0 AND but%<8 AND col%<>but% PROCdrawcross(mx%,my%,-1):PROCdrawcolours(col%,but%)
 1450 IF but%>7 AND but%<64 PROCpatternselectnew
 1460 IF but%>63 AND but%<68 AND (but%-64)<>pat% PROCdrawcross(mx%,my%,-1):PROCpatternselect(but%-64)
 1470 UNTIL key$="T"
 1480 PROCdrawcross(mx%,my%,-1)
 1490 PROCselectedcolours(0)
 1500 A%=1:CALL menu
 1510 ENDPROC
 1520:
 1530 DEF PROCcursor(Z%)
 1540 mx%=FNscale_x(ADVAL(1))
 1550 my%=FNscale_y(ADVAL(2))
 1560 IF Z%=1 AND my%<768 my%=768
 1570 IF ox%=mx% AND oy%=my% GOTO 1610
 1580 IF ox%=-1 GOTO 1600
 1590 PROCdrawcross(ox%,oy%,ox%)
 1600 PROCdrawcross(mx%,my%,ox%)
 1610 ox%=mx%: oy%=my%
 1620 ENDPROC
 1630:
 1640 DEF PROCdrawcross(E%,F%,G%)
 1650 GCOL3,7
 1660 MOVE E%-crh%,F%:DRAW E%+crh%,F%
 1670 MOVE E%,F%-crh%:DRAW E%,F%+crh%
 1680 ox%=G%
 1690 ENDPROC
 1700:
 1710 DEF PROCdrawcolours(E%,F%)
 1720 col%=F%:col2%=0:IF col%=0 col2%=1
 1730 IF E%<>-1 PROCcolourselect(E%,0)
 1740 PROCcolourselect(col%,7)
 1750 FORX%=0TO6
 1760 FORY%=0TO7
 1770 U%=((Y% MOD 2)*64+160)+X%*128:W%=959-56*(Y% DIV 2)
 1780 PROCsetpattern(Y%,12,col%,col2%)
 1790 GCOL16,0
 1800 MOVEU%,W%
 1810 PLOT &65,U%+48,W%+48
 1820 GCOL0,7
 1830 MOVEU%,W%:DRAWU%+48,W%:DRAWU%+48,W%+48:DRAWU%,W%+48:DRAWU%,W%
 1840 NEXT
 1850 col2%=col2%+1:IF col2%=col% GOTO 1850
 1860 NEXT
 1870 ENDPROC
 1880:
 1890 DEF PROCcolourselect(E%,F%)
 1900 U%=8+(E% MOD 2)*56:W%=1008-(E% DIV 2)*56
 1910 GCOL 0,F%:MOVE U%,W%:DRAW U%+56,W%:DRAW U%+56,W%-52:DRAW U%,W%-52:DRAW U%,W%
 1920 ENDPROC
 1930:
 1940 DEF PROCcheckbutton
 1950 IF mx%<128 but%=((mx%-8) DIV 64)+((1008-my%) DIV 56)*2
 1960 IF mx%>160 AND mx%<1048 but%=8+((mx%-160) DIV 64)+((1008-my%) DIV 56)*14
 1970 IF mx%>1189 but%=64+((1008-my%) DIV 56)
 1980 REMPRINTTAB(0,9)"BT:";but%;" "
 1990 REMPRINTTAB(0,10)"MX:";mx%;"   "
 2000 REMPRINTTAB(0,11)"MY:";my%;"   "
 2010 ENDPROC
 2020:
 2030 DEF PROCselectedcolours(E%)
 2040 FOR K%=0TO3
 2050 PROCsetpattern(ps(K%,0),K%+12,ps(K%,1) AND &F,(ps(K%,1) AND &F0) DIV 16)
 2060 IF E%=1 GCOL16+K%*16,0:MOVE1192,1004-K%*56:PLOT&65,1240,960-K%*56
 2070 NEXT
 2080 IF E%=1 PROCpatternselect(pat%)
 2090 ENDPROC
 2100:
 2110 DEF PROCsetpattern(K%,J%,E%,F%)
 2120 IF K%=0 VDU23,J%,F%,F%,E%,F%,F%,F%,F%,F%
 2130 IF K%=1 VDU23,J%,F%,F%,E%,F%,F%,F%,E%,F%
 2140 IF K%=2 VDU23,J%,F%,F%,E%,E%,F%,F%,E%,E%
 2150 IF K%=3 VDU23,J%,E%,F%,E%,F%,E%,F%,E%,F%
 2160 IF K%=4 VDU23,J%,E%,F%,E%,F%,F%,E%,F%,E%
 2170 IF K%=5 VDU23,J%,E%,F%,F%,E%,E%,F%,F%,E%
 2180 IF K%=6 VDU23,J%,E%,E%,F%,E%,E%,E%,F%,E%
 2190 IF K%=7 VDU23,J%,E%,E%,F%,E%,E%,E%,E%,E%
 2200 ENDPROC
 2210:
 2220 DEF PROCpatternselect(E%)
 2230 IF E%<>pat% W%=1008-pat%*56:GCOL 0,0:MOVE 1186,W%:DRAW 1250,W%:DRAW 1250,W%-52:DRAW 1186,W%-52:DRAW 1186,W%
 2240 pat%=E%:W%=1008-E%*56:GCOL 0,7:MOVE 1186,W%:DRAW 1250,W%:DRAW 1250,W%-52:DRAW 1186,W%-52:DRAW 1186,W%
 2250 ENDPROC
 2260:
 2270 DEF PROCpatternselectnew
 2280 E%=(but%-8) MOD 2+((but%-8) DIV 14)*2
 2290 F%=((but%-8) DIV 2) MOD 7
 2300 IF F%>=col% F%=F%+1
 2310 ps(pat%,0)=E%
 2320 REMPRINTTAB(0,12)"C:";F%
 2330 REMPRINTTAB(0,13)"CS:";F%
 2340 ps(pat%,1)=col% OR F%*16
 2350 PROCselectedcolours(1)
 2360 ENDPROC
 2370:
 2380 DEF PROCdrawline(E%)
 2390 PROCdrawcross(mx%,my%,-1):GCOL E%,0:MOVE dx%,dy%:PLOT5,mx%,my%:dx%=mx%:dy%=my%
 2400 ENDPROC
 2410:
 2420 DEF PROCfloodfill(E%)
 2430 PROCdrawcross(mx%,my%,-1):GCOL E%,0:PLOT 133,mx%,my%
 2440 ENDPROC

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

Re: How do you save a screen

Post by pixelblip » Mon Jan 16, 2017 12:24 pm

Thanks Fourthstone that is great. You are really on a roll here :D
Where are you going that is 38 degrees.............

I will try out things later when I get back. I had a little play before work and didn't want to leave the house. The palette is awesome!

I will report back..........thank you for all your hard work.....(and everyone else chipping in) - good stuff!

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

Re: How do you save a screen

Post by pixelblip » Mon Jan 16, 2017 1:25 pm

OH PS Maybe I will do a star wars picture next......
Also been thinking of doing some kind of 2001/hal picture..........as I was talking about the stargate the other day......and all those amazing colours ...well suited to the Graphics Extension Rom eh :D

Also Fourthstone you have some really good ideas - like using the mouse button as an undo........and having line drawing in there will make a big difference....it can be jittery trying to paint with a mouse in Mode 2 at times so a line tool is most welcome....

I can't wait for some holiday so I can get stuck in and do a batch of piccies.......

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

Re: How do you save a screen

Post by pixelblip » Mon Jan 16, 2017 8:09 pm

Just a few ideas I can think of using the program........I know you are probably aware of this and a lot will be solved moving over to assembler....some more ideas as well

1) Be nice to click the mouse button and it paints (as well as the other keys)

2) Be nice if the paint flowed if you hold the mouse button down and move ( I am sure this will be the case when it's optimised )....at the moment it's drawing block on block so you have to paint quite slowly else you just get blocks in a line

3) Be great if you clicked on a colour in the palette and it went straight back to the canvas ( and closes the palette)

4) Some ideas down the line: Filled in shapes (so you can rubber band any shape and then when you finish the object it fills in the polygon ). I've always liked using a tool like this rather than just line drawing and filling.

Also (this might be hard I know) - some kind of mesh dither ......so you get a sort of transparency effect.......Grafx2 has this as 'mesh' - you can see objects underneath when you paint. Good for overpainting and highlighting. I do appreciate this is quite hard as you rely on the GXR chip.

I have to say seeing the colour palette come up is truly awesome............it looks really beautiful if you ask me! The BBC is the best ....so programmable and the colours so vibrant.....there is life in it yet to fully explore Mode 2's colours and hues :D

I am hoping to get this going on a tablet.....it would be so cool......I'll try again at the weekend.
Now this week I need to try and get my Tut done !

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

Re: How do you save a screen

Post by FourthStone » Mon Jan 16, 2017 10:16 pm

Where are you going that is 38 degrees.............
Work unfortunately, although I will take a dip in the pool when I get home \:D/ I live in Australia and the summers here can be brutal.
2) Be nice if the paint flowed if you hold the mouse button down and move
Will have to see if optimising the mouse will allow this, your original program was using mouse button to store the undo screen as well, I can change this to a hotkey.
3) Be great if you clicked on a colour in the palette and it went straight back to the canvas ( and closes the palette)
Happy to do this, will mean there is only ever one colour/pattern active though. I'm thinking of moving the hotkeys for the menu to the function keys, so maybe F1 for colour menu, F2 for shapes/tools menu, F3 for save / load menu, F4 for options menu etc.
4) Some ideas down the line: Filled in shapes (so you can rubber band any shape and then when you finish the object it fills in the polygon ).
Shapes we can do pretty easily, rubber banding i'll have to have a play around, might also depend on seeing if the mouse movement can be optimised as having smoother mouse movement will improve the feel of everything especially drawing and outlining shapes.
Also (this might be hard I know) - some kind of mesh dither ......so you get a sort of transparency effect.......Grafx2 has this as 'mesh' - you can see objects underneath when you paint. Good for overpainting and highlighting
This might be beyond my humble skills, transparency and meshing would require some hefty (for the beeb) real-time image processing, some of the graphics pros might have some thoughts on this one?

Another option if you want more advanced features is to configure a modern paint program to restrict colour and resolution to match the beeb but still have access to advanced effects. I am actually developing a windows application that has screen import, colour conversion, sprite designer and a bunch of other useful tools to help me import and manipulate pictures for export to my own programs on the beeb. This can massively reduce the time it takes to get things done.

Good luck with the tut, i'll start fleshing out the next release.

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

Re: How do you save a screen

Post by pixelblip » Mon Jan 16, 2017 10:29 pm

Thank you Fourth Stone. You have done so much already.
The mesh thing was a bit far fetched........to be honest I think there will be more than enough there to do some good pictures......it's really great you are doing this........thank you =D>

PS I don't know if I envy Summer in Australia. I have a bad enough time in London coping with it! Having said that last Friday it was 2c and pouring of rain..........and so glum. Maybe that's why I need to work with all this colour!

User avatar
jgharston
Posts: 3721
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: How do you save a screen

Post by jgharston » Mon Jan 16, 2017 10:54 pm

Ooo... looking good. Certainly better than my proof-of-concept mouse-test paint program. :)

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

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

Re: How do you save a screen

Post by pixelblip » Mon Jan 16, 2017 11:12 pm

Well if it wasn't for you with that program we wouldn't be here now so thank you to you as well for starting the ball rolling =D>

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

Re: How do you save a screen

Post by FourthStone » Tue Jan 17, 2017 1:19 am

Been having a play with the mouse, it looks like we're able to read the adval values every 2 hundredths of a second which might be fast enough for smoother mouse control. Have created a basic program of what needs to happen in asm but it's still not as smooth as I'd like ](*,) Then again, my math is pretty basic, maybe some further improvement can be had. Now onto some super fast menu drawing routines :D

See what Tricky can pull out of the bag but my suspicion is we won't get truly smooth mouse due to timer limitations in the AD hw?

Code: Select all

   10MODE2
   20REM*FX16,2
   25O%=-1
   30REPEAT
   40TIME=0
   50X%=FNscale_x(ADVAL(1))
   60Y%=FNscale_y(ADVAL(2))
   65A%=&3000+(X% DIV 2)*8+(Y% DIV 8)*640+(Y% MOD 8)
   66Z%=42-(X% MOD 2)*21
   67IF O%>-1 THEN ?O%=0
   68?A%=Z%:O%=A%
   70REMPRINTTAB(0,0)"MX:";X%;"    "
   80REMPRINTTAB(0,1)"MY:";Y%;"    "
   85REMPRINTTAB(0,2)"AD:";~A%;"    "
   90REMPRINTTAB(0,3)"TIME:";TIME;"    "
  100UNTILFALSE
  110DEF FNscale_x(C%)
  120C%=65472-(C%-48)
  130REMC%=65472-C%
  140=160*C%/65472
  150:
  160DEF FNscale_y(C%)
  170C%=65472-(C%-48)
  180=256*C%/65472

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

Re: How do you save a screen

Post by pixelblip » Tue Jan 17, 2017 11:37 am

I can live with it - it's not a big thing.......but if it can be improved then great.

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

Re: How do you save a screen

Post by pixelblip » Tue Jan 17, 2017 5:57 pm

Sorry Fourthstone.........just though of one more useful thing.......( there won't be many more I promise :lol: )
When line drawing if it could draw in the current brush thickness that would be really useful.......hope you don't mind me asking.......that will be it from me I think! :)

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

Re: How do you save a screen

Post by FourthStone » Thu Jan 19, 2017 11:34 am

Hey Pixel, line drawing in thickness of brush is on the list. Currently focusing on the menu and mouse routines, once I have them working smoothly I'll go back to feature adding and polishing. I like the way it's coming together, and I hope it's something that can help get your idea's out... can't wait to see some new pictures when you have time :D

It would be great if the forum had a projects list with the ability to add and modify features and stuff to be done. Tasks could be made shareable or assigned to forum users, and contributors could add new items to the project, would be a great way to track progress and also a good way for others to pick up abandoned projects. Tasks could be coding or level design, artwork, or anything the project owner needs to get the project done... just thinking out loud here :-k

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

Re: How do you save a screen

Post by pixelblip » Thu Jan 19, 2017 11:46 am

Oh Super thanks Fourth Stone. I didn't really want to ask you for any more items....sorry if it gets grating with all the work you have put in! :lol: Thank you for all you are doing ( and tricky and SteveF) - you all know your beans......I will repay you with some great Mode 2 piccies......hopefully this weekend I can get the Tut done......if only we didn't have to go to work eh..........
It makes me wonder what you all do for a living.......are you all programmers....it sounds like it :D

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

Re: How do you save a screen

Post by tricky » Thu Jan 19, 2017 12:58 pm

Been earning money for programming for nearly 40 years, but as a job for a little over 30. I have also: run arcades, been a lifeguard, run a chain of video shops, been a bouncer, cleaned fish vans, sold ice creams, called bingo and a few other bits :)

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

Re: How do you save a screen

Post by FourthStone » Fri Jan 20, 2017 2:02 am

Always been in IT as a desktop applications support specialist, at the moment (18+ years) I do application packaging and deployment which involves a little coding/scripting and automating and lots of problem solving. Basically I pick things apart to work out how to configure them the way a customer needs. I've always been involved in programming and the app development life cycle but never had a programming job proper, it's more of a hobby for me but I have written a few apps that in have been used in production environments.

Kind of lucky in that when my workload is low I can get away with doing a bit of hobby programming :D

Hope to work on the art proggy this weekend, have been trying to speed up the menu system but struggling with memory constraints and lack of real skill :oops: I'll get it right, just sorta making it up as I go [-o<

P.S. Thanks for the mouse code Tricky :D Hoping to tie it all together in the near future.

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

Re: How do you save a screen

Post by pixelblip » Fri Jan 20, 2017 11:40 am

Thank you. Try to reserve some of the weekend for yourself won't you :D
I know what it's like when it get's obsessive and you want to solve problems.......sometimes getting around limitations is very satisfying (like memory constraints)....and that's what I like about painting on old computers - you have limitations you try to push.

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

Re: How do you save a screen

Post by FourthStone » Fri Jan 20, 2017 12:07 pm

Indeed! Lots of family time over the weekend, if I'm lucky I'll get one or two hours to play around :D

A lot of times when I get stuck spending time doing other things makes the problem seem simpler, or at least make the problem seem impossible, therefore solving the problem one way or another :wink:

User avatar
aerworuld
Posts: 1717
Joined: Tue Sep 25, 2012 8:40 pm
Location: Basingstoke, Hampshire
Contact:

Re: How do you save a screen

Post by aerworuld » Fri Jan 20, 2017 12:18 pm

This artwork is beautiful! =D> =D> =D>

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

Re: How do you save a screen

Post by pixelblip » Fri Jan 20, 2017 9:26 pm

Thank you aerworuld. I hope to bring some more colourful Mode 2 images to you all soon.

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

Re: How do you save a screen

Post by pixelblip » Fri Jan 20, 2017 10:46 pm

Tut
Attachments
tut300.jpg

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

Re: How do you save a screen

Post by pixelblip » Sat Jan 21, 2017 11:37 am

Island
Attachments
Island.jpg

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

Re: How do you save a screen

Post by pixelblip » Sun Jan 22, 2017 8:48 am

Had some ideas last night.........I think when I start drawing Dave from 2001 it is not going to be easy ..............but the colours of the stargate could look good...of course Hal 9000 will be in there ........I've been saying 'I'm sorry Dave' all night in my head :lol:
Attachments
city.png
winter.png
2001.png

Post Reply