Vintage Computing Christmas Challenge 2023

Introduce yourself. Pimp your website, competition, event or other activity here, as long as it's Spectrum related.
User avatar
g0blinish
Manic Miner
Posts: 287
Joined: Sun Jun 17, 2018 2:54 pm

Vintage Computing Christmas Challenge 2023

Post by g0blinish »

Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post by Dr beep »

I have a program ready to sent in.
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: Vintage Computing Christmas Challenge 2023

Post 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.
CLEAR 23855
User avatar
TMD2003
Rick Dangerous
Posts: 2043
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: Vintage Computing Christmas Challenge 2023

Post 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!
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post by Dr beep »

Program sent in!
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Vintage Computing Christmas Challenge 2023

Post by MustardTiger »

I've got a BASIC one and a machine code one. Both use completely different solutions.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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?
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Vintage Computing Christmas Challenge 2023

Post by MustardTiger »

Dr beep wrote: Fri Dec 08, 2023 4:04 pm Did you sent them in?
Not yet.
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Vintage Computing Christmas Challenge 2023

Post by MustardTiger »

@Dr beep I just saw your entry for last year on the results video, 29 bytes! Crazy! :shock:
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post by Dr beep »

I already sent in 4 programs, every time a bit shorter.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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.
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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.
flange
Drutt
Posts: 49
Joined: Tue Dec 12, 2023 5:27 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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:
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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?
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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.
User avatar
g0blinish
Manic Miner
Posts: 287
Joined: Sun Jun 17, 2018 2:54 pm

Re: Vintage Computing Christmas Challenge 2023

Post by g0blinish »

User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: Vintage Computing Christmas Challenge 2023

Post 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
CLEAR 23855
User avatar
g0blinish
Manic Miner
Posts: 287
Joined: Sun Jun 17, 2018 2:54 pm

Re: Vintage Computing Christmas Challenge 2023

Post by g0blinish »

still imressing on winter - 23bytes :shock:
User avatar
ParadigmShifter
Manic Miner
Posts: 670
Joined: Sat Sep 09, 2023 4:55 am

Re: Vintage Computing Christmas Challenge 2023

Post by ParadigmShifter »

I'm just shocked that Dr. Beep did not win :shock:
flange
Drutt
Posts: 49
Joined: Tue Dec 12, 2023 5:27 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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:
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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!
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Vintage Computing Christmas Challenge 2023

Post 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

Post Reply