Stipple ATTR Art Tool

Show us what you're working on, (preferably with screenshots).
Post Reply
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: Stipple ATTR Art Tool

Post by uglifruit »

Well, I've done it! Here it is - the fully machine code version.

HINT: When you run it, press SYMBOL SHIFT + Numbers to see what it does. Also press and hold I for Instructions. Otherwise it's a bit boring (being just a blank screen)


Keys:

Q,A,O,P: M, or SPACE to draw as you move. (ENTER to toggle the PEN on/off)

1,2,3,4,5,6,7,8,0 - Set Ink Colour (with 8 being 'Transparent') and 1,2,3,4,5,6,7,8,0 + CAPS - Set Paper Colour

B and F - Set the Bright and Paper attribute (0,1, or 8 for transparent)

G - Gets the attributes from under the current cursor, which is handy when use with..

H - Brings up a Colour Swatch, (that can't be written on, but can have the colours 'G'd from). There's a panel at the bottom showing the colour of the square you're currently on, for comparison.

L - makes the status bar appear/move to different corners/disappear. This was a pain in the arse to get working. Especially when I swapped workspace, I carried on having attributes left behind from it. Grr.

T - chooses between three cursors - multicoloured, flashing tranparent and completely invisible (hold T for about a second get the last 'hidden' one)

CAPS + QAOP scroll the screen display.

Hold 'I' (the letter) for Information/keys

Hold CAPS and SYMBOLSHIFT for a short while to clear the screen of the current workspace (filled with the current colour).

1,2,3,4,5,6,7,8,0 + SYM - Chooses the current screen with one of 9 'workspaces' in memory.

[Workspaces 1,2,3,4,5,6,7,8 come preloaded with some art for 'enjoy']



I'm ever so proud of this, even the .asm is a bit of a mess!


https://drive.google.com/open?id=1U1Cn2 ... U7Koqf7NY



Image

Image

Image

Image

Image
CLEAR 23855
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stipple ATTR Art Tool

Post by Ast A. Moore »

Brilliant! A bit of debouncing could help here and there:

Code: Select all

1$	call $28e	;poll keyboard
	inc e		;if E=FFh (no key is pressed), INC E will result in 0
	jr nz,1$
Usability could benefit from the cursor changing color/shape to indicate a particular action, as well. But overall, I’m loving it! Very refreshing to use and look at.

Next, you might want to start optimizing it. At 10K, it seems the code could hit the gym.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: Stipple ATTR Art Tool

Post by uglifruit »

Ast A. Moore wrote: Wed Jan 08, 2020 1:07 am

Code: Select all

1$	call $28e	;poll keyboard
	inc e		;if E=FFh (no key is pressed), INC E will result in 0
	jr nz,1$
Thanks for that. I could have done with that many hours ago!
Ast A. Moore wrote: Wed Jan 08, 2020 1:07 am Next, you might want to start optimizing it. At 10K, it seems the code could hit the gym.
Oh definitely. There is lots of repeated bits, and some very ungainly sections just to "get it working" rather than be elegant. That became my mantra at some point.
To be fair *most* of the size is taken up with the 8 included pieces of "art" already loaded into the workspaces. (that accounts for 8 x 768 bytes). And the colour swatch board (key H) is also stored as an uncompressed attr screen (another 768 bytes, that could definitely be "built", rather than just copied to the screen with far less data). Actually, I'm using that space anyway, as somewhere to store the screen when you call you the swatch, so it's space that's needed anyway. Though if I was loading from tape I'd be a bit pissed off at having to load 6.5K of pictures just to use it.

(I'm not defending the rest of it. The coding really is shockingly inefficient).
CLEAR 23855
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stipple ATTR Art Tool

Post by Ast A. Moore »

uglifruit wrote: Wed Jan 08, 2020 1:52 am To be fair *most* of the size is taken up with the 8 included pieces of "art" already loaded into the workspaces.
Right. Sorry, my bad. However obvious, it’d totally slipped my mind.

Could be an interesting opportunity to code a simple custom compressor/decompressor just for that purpose.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: Stipple ATTR Art Tool

Post by uglifruit »

There was a bug in my Flash/Bright handling (one was affecting the other, in some combinations).
I worked out it was a bitwise rotation I'd buggered up.
AND I've saved 10 bytes. (Next stop, 3D chess!)

New link, to updated version. This is now a proper finished thing, I think, and I'm using it happily.

https://drive.google.com/file/d/1fSuDUy ... sp=sharing
CLEAR 23855
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stipple ATTR Art Tool

Post by Ast A. Moore »

uglifruit wrote: Wed Jan 08, 2020 7:39 pm AND I've saved 10 bytes. (Next stop, 3D chess!)
I don’t know if that’s wise. I once speculated that if arkannoyed optimized his code any more, the Universe would implode on itself. :D
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Post Reply