reifsnyderb Posted December 12, 2022 Share Posted December 12, 2022 15 minutes ago, MrFish said: Yeah, I can represent Atari BASIC there. I have a few, more complex, variations I might submit too. Maybe we all should submit all of our variations so as to have better representation? Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 12, 2022 Share Posted December 12, 2022 2 minutes ago, reifsnyderb said: Maybe we all should submit all of our variations so as to have better representation? I didn't mean I should be the only one; and I don't think @ClausB did either. 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 12, 2022 Share Posted December 12, 2022 Hi! I finally broke the 90 byte barrier in Atari BASIC, with 86 bytes: And 75 bytes in Turbo Basic XL: Have Fun! PD: could not upload the animated gif to the post, so I linked from another side. Is it possible to simply upload GIF as is? 3 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 12, 2022 Share Posted December 12, 2022 57 minutes ago, dmsc said: I finally broke the 90 byte barrier in Atari BASIC, with 86 bytes: I think I can do the same if I want to leave the Ready prompt on screen at the end, which would make it 86 bytes also. I just need to alter my loops so the last plot is at the bottom, rather than the middle (where it currently is). Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 12, 2022 Share Posted December 12, 2022 (edited) 3 hours ago, dmsc said: I finally broke the 90 byte barrier in Atari BASIC, with 86 bytes: 2 hours ago, MrFish said: I think I can do the same if I want to leave the Ready prompt on screen at the end, which would make it 86 bytes also. I just need to alter my loops so the last plot is at the bottom, rather than the middle (where it currently is). Alright, I can only get mine down to 88 bytes (so far) with Ready printed at the bottom (still have screen cleared and no cursor). Mine would have been 86 bytes, as I said, but one constant needed to be increased by a character; and then changing some terms around left ambiguity between a variable and the TO command, which forces a space there. Edited December 12, 2022 by MrFish Quote Link to comment Share on other sites More sharing options...
rensoup Posted December 12, 2022 Share Posted December 12, 2022 22 hours ago, MrFish said: I don't see why not. There's nothing saying you have to code for the entire series of a machine. Although you might get some flak from those who are... The rules should have been more specific I think... memory/OS. I'm guessing using the OS will help too so perhaps there should have been more categories. 10 hours ago, carlsson said: Colour memory on the C64 defaults to the background colour so you need two POKEs or a quick flickering of background colour, clear screen and flick the background again. That overhead adds bytes and execution time. Unfortunately there is no native PRINT AT or PLOT method, and going through Kernel calls for printing at a given position adds even more overhead than the two POKEs. Perhaps I should try to port my code to the C64 if I can find the motivation! spoiler Quote 74 bytes with xex header no OS use, I'm feeling that it's not optimal but I've run out of ideas. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted December 13, 2022 Share Posted December 13, 2022 I think he said 74 bytes with xex header no OS use, I'm feeling that it's not optimal but I've run out of ideas. because font and color make it invisible to read. Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 29, 2022 Share Posted December 29, 2022 Hi! Results are online now, there is a Youtube video with all entries, and this CSV with the results. Best Atari entry was by @F#READY, at 58 bytes congrats!! Have Fun! VCCCC2022_Christmas_Star_Challenge.csv 3 Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 29, 2022 Share Posted December 29, 2022 Hi! And based on the best assembly version for the BBC, here is a 46 byte version for the Atari: org (256 - (tabend - star)) star row lda #<table sta sx char sx = *+1 lda table sy = *+1 adc table lda #42 bcc put lda #32 put jsr $f2b0 inc sx bne char jsr $F661 inc sy bne row rts table .byte $F0, $E0, $D0, $C0, $00, $10, $20, $30, $40, $30, $20, $10, $00, $C0, $D0, $E0, $F0 tabend It uses a 17 byte table that prints a star if "TAB(X) + TAB(Y) > 1". It is 15 bytes shorter than the one I submitted 😛 Have Fun! 2 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 29, 2022 Share Posted December 29, 2022 5 hours ago, dmsc said: Best Atari entry was by @F#READY, at 58 bytes congrats!! Wow... nice job. Interested to see what he did. Was it assembler or BASIC? [Edit] Nevermind, I see it was assembly... 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 29, 2022 Share Posted December 29, 2022 Hi! 1 hour ago, MrFish said: Wow... nice job. Interested to see what he did. This is F#READY entry, at 58 bytes: pl=$f2b0 org $80 inc 752 lda #18 sta 83 z lda #144 :3 lsr tax rol s, x lda #32 bcc w ora #10 w jsr pl pha dec z+1 bne z c jsr pl pla dec k bne c l beq l k .byte $90 s .byte $1F, $F0, $7F, $F0, $FF, $F1, $FF, $F7, $FF, $1F, $DE, $3, $1C, $7, $18, $C, $10, $10 This was my entry, at 61 bytes: org 140 start: loop yy = * + 1 lda #16 ; get ay = abs(y) jsr abs8 sta ay tay ; get ax = abs(x) xx = * + 1 lda #25 jsr abs8 tax ; get w = abs(ax-ay) sbc ay jsr abs0 cmp #5 bcs space lda #42 ; STAR cpx #5 bcc putch cpy #5 bcc putch space lda #32 ; SPACE putch jsr $f2B0 dec xx bpl loop ; Init X lda #37 sta xx dec yy bpl loop rts abs8 sec sbc #8 abs0 bpl oka adc #255 eor #255 oka rts ay = * The smallest BASIC entry for the Atari was my Turbo Basic XL code, 75 bytes: 0F.A=-8TO8:F.B=-8TO8:C=ABS(A)/9:D=ABS(B)/9:PUT42-C&D!ABS(C-D)*10:N.B:?:N.A Have Fun! 2 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 29, 2022 Share Posted December 29, 2022 2 minutes ago, dmsc said: The smallest BASIC entry for the Atari was my Turbo Basic XL code, 75 bytes: 0F.A=-8TO8:F.B=-8TO8:C=ABS(A)/9:D=ABS(B)/9:PUT42-C&D!ABS(C-D)*10:N.B:?:N.A What about your Atari BASIC program? It looks like you got it down from 86 to 84? Similar to your TBXL code, or different? Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 29, 2022 Share Posted December 29, 2022 (edited) Hi! 52 minutes ago, MrFish said: What about your Atari BASIC program? It looks like you got it down from 86 to 84? Similar to your TBXL code, or different? Similar, but larger as it can´t use bit operations: 0F.A=-8TO8:F.B=-8TO29:C=ABS(A):D=ABS(B):PUT#16,42-(C>4ANDD>4ORABS(C-D)>4)*10:N.B:N.A Have Fun! Edited December 29, 2022 by dmsc Replaced PUT#0 with PUT#16 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 29, 2022 Share Posted December 29, 2022 Hi! And, after looking at the code again, here is an Atari version at 82 bytes (83 if you count the EOL): 0F.A=-8TO8:F.B=-8TO29:PUT#16,42-(B*B>16ANDA*A>16ORABS(ABS(B)-ABS(A))>4)*10:N.B:N.A 1 Quote Link to comment Share on other sites More sharing options...
Mark2008 Posted December 30, 2022 Share Posted December 30, 2022 I haven't really followed the thread, so if this has been already stated, then please ignore. But my thought is this is trivial in Atari Logo. CS ?REPEAT 8 [FD 99 LT 135] 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 30, 2022 Share Posted December 30, 2022 4 hours ago, Mark2008 said: But my thought is this is trivial in Atari Logo. Unfortunately you haven't replicated the screen here. Maybe Logo can do the same thing in text mode, and let you choose the right character to draw with, and fill the object? 1 Quote Link to comment Share on other sites More sharing options...
Preppie Posted December 30, 2022 Share Posted December 30, 2022 (edited) This is the best I come up with. The main loop is only 61 characters but it requires some setup so ended up being 89 characters. Quote 1gr.0:poke752,1:?:c.42:f.a=4to12:pl.b,a:dr.16-b,a:pl.a,b:dr.a,16-b:b=b+1-(a>7)*2:n.a:?"*" star.avi Edited December 30, 2022 by Preppie 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 30, 2022 Share Posted December 30, 2022 On 12/29/2022 at 5:17 PM, dmsc said: And, after looking at the code again, here is an Atari version at 82 bytes (83 if you count the EOL): 0F.A=-8TO8:F.B=-8TO29:PUT#16,42-(B*B>16ANDA*A>16ORABS(ABS(B)-ABS(A))>4)*10:N.B:N.A On 12/30/2022 at 3:27 AM, Preppie said: This is the best I come up with. The main loop is only 61 characters but it requires some setup so ended up being 89 characters. Somewhat similar to mine, except you're using Drawto to draw your lines, whereas I'm using a loop for a continuous series of Plots; plus you're drawing diagonally, whereas I'm drawing vertically and horizontally. In both cases here, I'd say you need to include the EOL in your character count; because it's supposed to be the file size; and you can't ENTER a LISTed file that doesn't have an EOL. Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 30, 2022 Share Posted December 30, 2022 11 hours ago, dmsc said: And, after looking at the code again, here is an Atari version at 82 bytes (83 if you count the EOL): 0F.A=-8TO8:F.B=-8TO29:PUT#16,42-(B*B>16ANDA*A>16ORABS(ABS(B)-ABS(A))>4)*10:N.B:N.A I was looking at your program earlier, and wondering if the ABS statements could all be inlined too. Well, I think you win for the smallest Atari BASIC program (unrestricted); but how many bytes do you end up with if you clear the screen first, and keep the "Ready" and cursor from showing up at the end? Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 30, 2022 Share Posted December 30, 2022 On 12/12/2022 at 4:23 PM, MrFish said: Alright, I can only get mine down to 88 bytes (so far) with Ready printed at the bottom (still have screen cleared and no cursor). Mine would have been 86 bytes, as I said, but one constant needed to be increased by a character; and then changing some terms around left ambiguity between a variable and the TO command, which forces a space there. Here's my 88 bytes version, which still clears the screen but leaves "Ready" (and no cursor) at the bottom (my version that suppresses the "Ready" prompt is 91 bytes - already posted above). 0GR.0:C.42:POKE755,0:F.A=8TO12:F.B=12-A TOA+4:PL.B,16-A:PL.B,A:PL.16-A,B:PL.A,B:N.B:N.A› GRAPHICS 0 COLOR 42 POKE 755 , 0 FOR I = 8 TO 12 FOR J = 12 - I TO I + 4 PLOT J , 16 - I PLOT J , I PLOT 16 - I , J PLOT I , J NEXT J NEXT I star80a.lst 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 30, 2022 Share Posted December 30, 2022 Just thought I would post my example, not as small as others mine is 114 bytes, but a different take on solving the problem. It's nice to see other peoples thoughts. star.asm 1 Quote Link to comment Share on other sites More sharing options...
Mark2008 Posted December 30, 2022 Share Posted December 30, 2022 5 hours ago, MrFish said: Unfortunately you haven't replicated the screen here. Maybe Logo can do the same thing in text mode, and let you choose the right character to draw with, and fill the object? ah thanks, I totally thought we were doing an 8 pointed star. I don't really know Logo, but you can add words, I suppose you could teach it the shape asterisk and then it would eventually come up with an approximation, but being as it is late to actually enter the contest with a funny entry...not much point 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 30, 2022 Share Posted December 30, 2022 Hi 8 hours ago, MrFish said: Somewhat similar to mine, except you're using Drawto to draw your lines, whereas I'm using a loop for a continuous series of Plots; plus you're drawing diagonally, whereas I'm drawing vertically and horizontally. In both cases here, I'd say you need to include the EOL in your character count; because it's supposed to be the file size; and you can't ENTER a LISTed file without an EOL. Yes, I did not include it because I noticed that the C64 people reported "code size" instead of the full PRG size, to make the entries appear shorter 😛 This is the best C64 BASIC program, basically the same as my Atari BASIC one: https://files.scene.org/view/parties/2022/vccc22/christmas_star_challenge/serato_c64_basic_vc3-2022-68.zip Have Fun! Quote Link to comment Share on other sites More sharing options...
Mark2008 Posted December 30, 2022 Share Posted December 30, 2022 (edited) The turtle just doesn't want to follow the rules CS PU BK 50 RT 30 ?REPEAT 8 [REPEAT 10[PU FD 10 PD A] LT 135] PU LT 12 FD 75 PD A TO A RT 45 FD 10 BK 5 LT 90 FD 5 BK 10 FD 5 RT 135 FD 5 BK 10 FD 5 LT 90 END Edited December 30, 2022 by Mark2008 orientation 1 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted December 30, 2022 Share Posted December 30, 2022 37 minutes ago, Mark2008 said: The turtle just doesn't want to follow the rules Turtles are stubborn. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.