Page 1 of 2

Vintage Computing Christmas Challenge 2023

Posted: Wed Dec 06, 2023 1:49 pm
by g0blinish

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 11:12 am
by Dr beep
I have a program ready to sent in.

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 11:27 am
by uglifruit
Me too, and I've thoroughly enjoyed thinking about it - and approaching constructing the pattern in different ways and seeing which I found most efficient. I've also been cursing the lack of modulo in ZX Speccy BASIC which I think would have helped. I still have a few more approaches I might explore. And I'll be very interested to see what other approaches people take.

Ii's interesting to be judged primarily on size of "source code", given that's a plain text file with the BASIC in it. So using NOT PI instead of 0 (as I'd do if I was making minimal size) is a massive no-no.

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 11:47 am
by TMD2003
uglifruit wrote: Fri Dec 08, 2023 11:27 am Me too, and I've thoroughly enjoyed thinking about it - and approaching constructing the pattern in different ways and seeing which I found most efficient. I've also been cursing the lack of modulo in ZX Speccy BASIC which I think would have helped. I still have a few more approaches I might explore. And I'll be very interested to see what other approaches people take.
I can think of a few with-modulo BASICs that are all relevant to us in some way: Next BASIC, QL SuperBASIC... and BBC BASIC on the Z88.

Go for it!

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 3:17 pm
by Dr beep
Program sent in!

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 3:57 pm
by MustardTiger
I've got a BASIC one and a machine code one. Both use completely different solutions.

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 4:04 pm
by Dr beep
5 minutes after sending in I found a byte won, so now 1 byte below a round number.
Previous version had a round number.

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 4:04 pm
by Dr beep
MustardTiger wrote: Fri Dec 08, 2023 3:57 pm I've got a BASIC one and a machine code one. Both use completely different solutions.
Did you sent them in?

Re: Vintage Computing Christmas Challenge 2023

Posted: Fri Dec 08, 2023 4:34 pm
by MustardTiger
Dr beep wrote: Fri Dec 08, 2023 4:04 pm Did you sent them in?
Not yet.

Re: Vintage Computing Christmas Challenge 2023

Posted: Sat Dec 09, 2023 6:39 pm
by MustardTiger
@Dr beep I just saw your entry for last year on the results video, 29 bytes! Crazy! :shock:

Re: Vintage Computing Christmas Challenge 2023

Posted: Sat Dec 09, 2023 7:57 pm
by Dr beep
MustardTiger wrote: Sat Dec 09, 2023 6:39 pm @Dr beep I just saw your entry for last year on the results video, 29 bytes! Crazy! :shock:
after the contest I got to 25 for ZX81 and 26 for ZX Spectrum

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 10, 2023 5:43 pm
by Dr beep
I already sent in 4 programs, every time a bit shorter.

Re: Vintage Computing Christmas Challenge 2023

Posted: Mon Dec 18, 2023 7:35 pm
by Dr beep
MustardTiger wrote: Sat Dec 09, 2023 6:39 pm @Dr beep I just saw your entry for last year on the results video, 29 bytes! Crazy! :shock:
Hope to amaze you this year once again.
I can't say anything, wait another week.

Re: Vintage Computing Christmas Challenge 2023

Posted: Mon Dec 18, 2023 8:03 pm
by MustardTiger
Dr beep wrote: Mon Dec 18, 2023 7:35 pm Hope to amaze you this year once again.
I can't say anything, wait another week.
I'm looking forward to see the results. I've sent in an entry which I'm happy with. I ended up making an assembler version of my Basic attempt.

Re: Vintage Computing Christmas Challenge 2023

Posted: Mon Dec 18, 2023 9:03 pm
by flange
Just for a giggle I did it in Forth-79 (ZX81) but I don't it think would be as short as Johan's or any other offerings so will leave it and see where mine would have come in the scheme of things. :lol:

Re: Vintage Computing Christmas Challenge 2023

Posted: Tue Dec 19, 2023 8:29 pm
by Dr beep
MustardTiger wrote: Mon Dec 18, 2023 8:03 pm I'm looking forward to see the results. I've sent in an entry which I'm happy with. I ended up making an assembler version of my Basic attempt.
I stated in my coding course that everybody should code assembler since this is shorter.
So was your code shorter than BASIC?

Re: Vintage Computing Christmas Challenge 2023

Posted: Tue Dec 19, 2023 10:28 pm
by MustardTiger
Dr beep wrote: Tue Dec 19, 2023 8:29 pm I stated in my coding course that everybody should code assembler since this is shorter.
So was your code shorter than BASIC?
My assembler one is 30% the size of the BASIC one. I do most of my speccy programming in assembler, my BASIC version of this was just to get my algorithm working.

Re: Vintage Computing Christmas Challenge 2023

Posted: Mon Dec 25, 2023 1:04 pm
by Dr beep
Woke up this night with a wild idea.... out of bed to test... didn't work.
Hour later wope up again... another idea... out of bed.... did work, so another byte off of the code.

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 31, 2023 2:57 am
by g0blinish

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 31, 2023 3:19 pm
by uglifruit
Presentation here: https://www.youtube.com/watch?v=RGv2u6epVTY&feature=youtu.be

I managed to forget to send my entry, misread the deadline. D'oh.

Code: Select all

1 CLS:FOR a=3 to 18 STEP 6:for b=0 to 35:PRINT AT FN d(b+a),FN d(b);"*":NEXT b:NEXT a:DEF FN d(x)=x-(x>18)*2*(x-18)
Was quite pleased with it as well! (116 characters, including the carriage return)


And was pleased to use the fact Spectrum basic can print at negative co-ordinates to save me an ABS. It's obviously my thing. And a DEF FN

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 31, 2023 3:38 pm
by g0blinish
still imressing on winter - 23bytes :shock:

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 31, 2023 3:48 pm
by ParadigmShifter
I'm just shocked that Dr. Beep did not win :shock:

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 31, 2023 4:24 pm
by flange
I did it at home for fun and managed 173 bytes using Toddy Forth79 (ZX81.)
Beat the Ace Forth though which was pleasing. :lol:

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 31, 2023 4:44 pm
by Dr beep
ParadigmShifter wrote: Sun Dec 31, 2023 3:48 pm I'm just shocked that Dr. Beep did not win :shock:
If you compare our code you will see that 99% is the same.
In my defense: I did it alone!

Re: Vintage Computing Christmas Challenge 2023

Posted: Sun Dec 31, 2023 4:49 pm
by Dr beep
ParadigmShifter wrote: Sun Dec 31, 2023 3:48 pm I'm just shocked that Dr. Beep did not win :shock:
His single byte less is where I was looking for all the time.
I had the idea another byte could come off, but I didn't see it in time.

The ADD HL,BC trick was indeed the way to get H in the right value.
I did make my own 23 bytes version AFTER seeing the winner trying to make it 22

Code: Select all

	org 	55570			

; A=18
; C=18
	ld	e,a
	rrca

	add	hl,bc	; ATTEMPT TO SET H AND L BUT H ONLY SUCCEEDS NO WINS!
				
l1	ld	b,a
	call 	#200a			; PRINT AT C,B!!!

	ld	a,"*"
	rst	16			; PRINT "*"

	ld	a,e			; mirror X-coordinate
	sub	b			; A now 18-X

	dec	d			; repeat even number of times
	jr	nz,l1			; so at the end A holds start X

	sub	h			; go to next X-coordinate
	jr	nc,l1			; test out of screen

	adc	a,e			; if so repair in screen and move 1 position up
	dec	c
	ret	m
	jr	l1