Jump to content
IGNORED

Logiker's Vintage Computing Christmas Challenge 2022


carlsson

Recommended Posts

5 hours ago, Mark2008 said:

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 :)  

The contest was sort of open-ended; but generally it was replicate the object as shown on the webpage. He was encouraging experimentation and offshoots, as a sort of additional vein.

 

I don't see why the contest idea couldn't be continued. I didn't even enter mine in the contest, and I may do some more versions and experimentation. It's just something to have fun with more than a serious competition.

 

Link to comment
Share on other sites

15 hours ago, dmsc said:

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

 

The rules clearly state file.

 

2.2 Make the size of the program file (e.g. PRG on C64) as small as possible
2.3 Don't manipulate the file (e.g. truncating the last bytes, changing the start address, etc. Mainly valid for "standard files" in BASIC and other languages.)

 

I suppose if you wanted to compare code with people writing in BASIC on the C64, you'd have to use Microsoft BASIC on the Atari. I think they're nearly same, eh?

 

Link to comment
Share on other sites

More progress....

 

Btw, I did read the text of the rules recently, and what I read is

 

Exactly the same shape

  1. The final picture must not include other characters than those of the object.

The text doesn't say asterisk.  It does say "Create a program that creates the object as seen within the images above, 1:1" - but I think those with asterisks might be a little unfair to us asterisk challenged folks?  haha, lol

 

Anyway, the Turtlefield in Atari Logo only has 2 characters, which are Pen-up and Pen Down.  Now, there is a text window at the bottom of the screen, but that isn't the turtlefield.

 

So, I do think that whether it was implied only - that it is required to fill in the star, so:

 

TO STAR :LEN
SETPOS [0 0] BK :LEN/2
REPEAT 8 [FD :LEN LT 135]
IF (:LEN>4) [STAR :LEN-2]
END

STAR 100

 

The code above uses recursion to fill in the star completely

image.png.f63f63ad7d21d2e0c5dd43d799c1252c.png

 

  • Thanks 1
Link to comment
Share on other sites

Hi!

3 hours ago, rensoup said:

bollocks... looks like pretty much all asm entries on the 6502 platforms used OS calls 😝

Yes, using OS calls keeps the code shorter. But you gave me an idea, mixing OS calls with direct screen access can result in even shorter code:

 

    org (256 - (tabend - star))

star
    ldy #16
char
    lda table,y
sy = *+1
    adc table

    txa     ; lda #0 , but in BW-DOS, X is 0 at start
    bcc put
    lda #10
put sta ($5E),y
    dey
    bpl char

    jsr $F1bb
    inc sy
    bne star
    rts

table
    .byte $40, $50, $60, $70, $C0, $B0, $A0, $90, $80, $90, $A0, $B0, $C0, $70, $60, $50, $40
tabend

 

The above is 42 bytes of code,  48 bytes of file size. It uses an undocumented XL OS call to print a new-line, asumes that X is 0 at program start and writes to the screen through the OLDADR zp variable.

image.thumb.png.b0b84b0cf2e3bb3838ba68fb3c000157.png

 

Skipping the printing of the spaces the code is 1 byte shorter, but it ends up messing the cursor, so there is a blank line at the left of the screen:

image.thumb.png.f2ed519a3839576be7197d527895e157.png

 

And if instead of a star character you print using @, the code is only 39 bytes (45 bytes of file size):

image.thumb.png.94ed04ec2811929af4c80bde3d4c6393.png

 

This is the "Star with @" source:

 

    org (256 - (tabend - star))

star
    ldy #16
char
    lda table,y
sy = *+1
    adc table
    and #32
put sta ($5E),y
    dey
    bpl char

    jsr $F1bb
    inc sy
    bne star
    rts

table
    .byte $08, $0A, $0C, $0E, $18, $16, $14, $12, $10, $12, $14, $16, $18, $0E, $0C, $0A, $08
tabend

 

The ATR file with the tree programs is attached.

 

Have Fun!

star-bst.atr

  • Like 3
Link to comment
Share on other sites

I've just been tooling around with this today, for some odd reason.  Of course, LOGO, blah, what a bad dream.

 

I didn't blaze any new ground with BASIC, but here is my little one liner:

 

0GR.0:C.42:POKE755,0:F.A=-4TO4:PL.4-ABS(A),8+A:DR.17-(4-ABS(A)),8+A:PL.8+A,4-ABS(A):DR.8+A,17-(4-ABS(A)):N.A:?"*";

 

Having now looked at the thread, I see it is about the usual, but anyway, it sure was fun.  I might've tried PL65, but with all the libraries, it would've been huge.

Link to comment
Share on other sites

1 hour ago, dmsc said:

Hi!

Yes, using OS calls keeps the code shorter. But you gave me an idea, mixing OS calls with direct screen access can result in even shorter code:

 

    org (256 - (tabend - star))

star
    ldy #16
char
    lda table,y
sy = *+1
    adc table

    txa     ; lda #0 , but in BW-DOS, X is 0 at start
    bcc put
    lda #10
put sta ($5E),y
    dey
    bpl char

    jsr $F1bb
    inc sy
    bne star
    rts

table
    .byte $40, $50, $60, $70, $C0, $B0, $A0, $90, $80, $90, $A0, $B0, $C0, $70, $60, $50, $40
tabend

 

The above is 42 bytes of code,  48 bytes of file size. It uses an undocumented XL OS call to print a new-line, asumes that X is 0 at program start and writes to the screen through the OLDADR zp variable.

image.thumb.png.b0b84b0cf2e3bb3838ba68fb3c000157.png

 

Skipping the printing of the spaces the code is 1 byte shorter, but it ends up messing the cursor, so there is a blank line at the left of the screen:

image.thumb.png.f2ed519a3839576be7197d527895e157.png

 

And if instead of a star character you print using @, the code is only 39 bytes (45 bytes of file size):

image.thumb.png.94ed04ec2811929af4c80bde3d4c6393.png

 

This is the "Star with @" source:

 

    org (256 - (tabend - star))

star
    ldy #16
char
    lda table,y
sy = *+1
    adc table
    and #32
put sta ($5E),y
    dey
    bpl char

    jsr $F1bb
    inc sy
    bne star
    rts

table
    .byte $08, $0A, $0C, $0E, $18, $16, $14, $12, $10, $12, $14, $16, $18, $0E, $0C, $0A, $08
tabend

 

The ATR file with the tree programs is attached.

 

Have Fun!

star-bst.atr 90.02 kB · 1 download

using altira os I didn't get anywhere with any of them

 

Link to comment
Share on other sites

Hi!

7 hours ago, _The Doctor__ said:

using altira os I didn't get anywhere with any of them

Those programs depend on the original XL OS, wont work with with the 800 OS or with Altirra OS. This is standard with any of those "short code competitions", as the only way to reduce size so much is to call into the OS directly.

image.thumb.png.615bea3ff7d1d8bfc5fd9155a7c1599a.png

Have Fun!

 

  • Like 1
Link to comment
Share on other sites

Nice work @dmsc

You could remove the "rts" beneath "bpl loop" to save one more byte :P

 

My version and source can be found here:

https://demozoo.org/productions/316797/

 

Or directly to github:

https://github.com/FreddyOffenga/star_vc3

 

Documented code for the 64 bytes version:

https://github.com/FreddyOffenga/star_vc3/blob/main/Atari/star65_documented.asm

 

@MrFish I like your BASIC version. I did the same for TIC-80 :)

 

Edited by F#READY
update
  • Like 1
Link to comment
Share on other sites

  • 3 months later...
On 12/8/2022 at 3:29 PM, reifsnyderb said:

I've been coding in Godot lately and it's interesting to use Atari BASIC again.  I had to dig out the book to look a couple things up.   🙂

 

I'm curious to learn more about how you are coding in Godot...I know it's cross platform, but how does one code then test it on a virtual machine?

Link to comment
Share on other sites

44 minutes ago, rdefabri said:

I'm curious to learn more about how you are coding in Godot...I know it's cross platform, but how does one code then test it on a virtual machine?

I've been using Godot Script.  Godot has one big file that you run.  Then you build the game/program inside of Godot.  No virtual machine is involved.

Link to comment
Share on other sites

2 hours ago, reifsnyderb said:

I've been using Godot Script.  Godot has one big file that you run.  Then you build the game/program inside of Godot.  No virtual machine is involved.

Poor choice of words on my part - I don’t mean a virtual machine like in the VMWare / AWS sense, I mean like Altirra or Atari800Win - an emulator.

 

Does Godot let you run what you code in an Atari emulated environment?  Without that, it’s not as useful for me (I’m a terrible coder).

Link to comment
Share on other sites

4 minutes ago, rdefabri said:

Poor choice of words on my part - I don’t mean a virtual machine like in the VMWare / AWS sense, I mean like Altirra or Atari800Win - an emulator.

 

Does Godot let you run what you code in an Atari emulated environment?  Without that, it’s not as useful for me (I’m a terrible coder).

Sorry.  Godot is for the PC.  It's a game engine for Windows, Linux, Mac, Android, etc.  I only mentioned it because I am writing a game in it.  It was a long time since I programmed in Atari BASIC.

Link to comment
Share on other sites

59 minutes ago, reifsnyderb said:

Sorry.  Godot is for the PC.  It's a game engine for Windows, Linux, Mac, Android, etc.  I only mentioned it because I am writing a game in it.  It was a long time since I programmed in Atari BASIC.

Gotcha - as I thought, I was confused and thought it had some support for the A8.

 

Would be cool if somehow that could be done but that’s asking a lot.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...