C64 haikus

Anything relating to non Sinclair computers from the 1980's, 90's or even before.
akeley
Manic Miner
Posts: 565
Joined: Sat Feb 01, 2020 5:47 pm

C64 haikus

Post by akeley »

Image

Image

https://archive.org/details/Computer_Haiku_1983_CES

"Sullen screen". So fabulous. Can you challenge this old program with a haiku nearly as cool?
1 x

User avatar
TMD2003
Manic Miner
Posts: 278
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: C64 haikus

Post by TMD2003 »

Hmmm. I've loaded it into WinVICE, hit Quit, LIST... what do you know, it's written in BASIC. I spy a challenge...

EASY: port it to the Spectrum.
NOT SO EASY: port it to the ZX81.
AAAARGH: port it to the ZX80.

Now to figure out what all the POKEs and C64 control characters do... and also if there's such a thing as a Bread Bin equivalent of LLIST.

So far my attempts at Spectrum ports from another machine haven't been terribly successful. Would you believe, the machine in question was the Dragon 32... it's the (standard) way it handles string arrays that had me floored. Must try harder next time...

EDIT: *cracks knuckles* Right, I'm going to do it. Give me a day or two and Supekutorumu-san will bring shame and dishonour upon Komodoru-san while the dreaded dojo of MSX samurai sharpen their katanas in the background.
2 x
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!

User avatar
TMD2003
Manic Miner
Posts: 278
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: C64 haikus

Post by TMD2003 »

Gaaaaaaaaaah! Curse all those Commodore users and their bizarre array of POKEs!

I took a look through the C64 manual and it's about as bare-bones as it gets - it's more of a "let's get you started" job, rather than a complete user guide to everything that BASIC offers the way the Spectrum did (even including what to do with something as near-useless as VAL$). I can't get WinVICE to accept a printer (even if it looks like I know how to operate it), so the only way I can list the program is with a load of screenshots pasted into GIMP.

Andthenthere'stheridiculouswaythattheBreadBindoesn'tneedspacesinitsBASIClinesanditgetsveryhardtoread. It is far from being the only computer of its day that was guilty of that - the BBC Micro was another.

The way the program works to generate the haiku might not be too tough to crack, but deciphering all those POKES, some of which are shoved into variables and sent all over the place, will take longer to untangle than a month's supply of ramen covered in very sticky teriyaki sauce.

"A day or two" was very optimistic...
0 x
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!

User avatar
+3code
Manic Miner
Posts: 281
Joined: Fri Dec 06, 2019 11:43 pm
Location: Valencia, Spain

Re: C64 haikus

Post by +3code »

I think in a Harnell's book came a similar program, can't remember the name.
0 x

User avatar
PeterJ
Site Admin
Posts: 3014
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: C64 haikus

Post by PeterJ »

TMD2003 wrote:
Sun Sep 13, 2020 11:50 pm
Gaaaaaaaaaah! Curse all those Commodore users and their bizarre array of POKEs!
Commodore BASIC is just terrible. I can't remember which user told me, but apparently Microsoft wanted a fee for each machine sold to include their BASIC so it ended up like it is.

The Peeking & Poking is for all the screen work (colours, paper, border, UDGs etc).
0 x
Rate your favourite games with Spectrum Computing

All Ratings (With Filters)
Top 100 Titles (5+ Votes)
Bottom 100 Titles (5+ Votes)

Click here for the Spectrum Emulator Features Spreadsheet - Feel free to request edit rights to contribute

User avatar
1024MAK
Dynamite Dan
Posts: 1059
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: C64 haikus

Post by 1024MAK »

PeterJ wrote:
Mon Sep 14, 2020 7:06 am
The Peeking & Poking is for all the screen work (colours, paper, border, UDGs etc).
Some of the POKEs and PEEKs will be to screen memory. Some for the VIC registers. And often some for the SID for sound control.

Compile a list of POKE / PEEK addresses used, next to each listed address, list the values that are POKEed. That makes it easier when trying to work out what they are doing.

Mark
1 x

User avatar
TMD2003
Manic Miner
Posts: 278
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: C64 haikus

Post by TMD2003 »

PeterJ wrote:
Mon Sep 14, 2020 7:06 am
The Peeking & Poking is for all the screen work (colours, paper, border, UDGs etc).
I thought as much - I have at least been through the manual briefly and found all the equivalents of INK, PAPER, BORDER, the display file and attributes, so I'm hoping not to find anything outside those ranges. Of course, using POKE to set the colours means the same addresses can be PEEKed, which might be troublesome for a Spectrum conversion. I suppose there's a way round this for the ink and paper colours with some heavy manipulation of ATTR in a fairly chunky subroutine to separate the ink and paper values from it. I suspect this involves converting to binary in a string, taking the three characters, and... crikey! Would it be something like "BIN VAL$..." to get it back to decimal? Is that an actual use of VAL$ that does something?
0 x
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!

User avatar
PeterJ
Site Admin
Posts: 3014
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: C64 haikus

Post by PeterJ »

If you have any problems identifying the pokes or strange control codes in print statements (Such as the heart for cls), drop me a PM @TMD2003.

I'm not a C64 expert but have been playing with the BASIC over lockdown.

PS. I do have some BASIC which does the equivalent of Print At if that is useful?
0 x
Rate your favourite games with Spectrum Computing

All Ratings (With Filters)
Top 100 Titles (5+ Votes)
Bottom 100 Titles (5+ Votes)

Click here for the Spectrum Emulator Features Spreadsheet - Feel free to request edit rights to contribute

User avatar
TMD2003
Manic Miner
Posts: 278
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: C64 haikus

Post by TMD2003 »

I think this program is better off with a complete rewrite.

Even the initial menu input flies off on a massive tangent changing its colours and then trying to do something that is best described as "INPUT, but with every key except 1, 2, 3, 4 and H disabled". Drop in an INKEY$, check that it's 1-4 (the H for "help" appears to just return to the menu...), job done.

I think the huge amount of error-checking routines are to ensure that this program runs on a PET as well as a C64, seeing as the Teacher Instructions says it should do so. There are bits of machine code in there, there are SYS commands that will address the processor in Motorola language instead of Z80...

Essentially, it's all the lines from 1000 onwards that actually generate the haiku which need a direct translation - everything else is just decoration.

Cracking on with BASin...
0 x
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!

akeley
Manic Miner
Posts: 565
Joined: Sat Feb 01, 2020 5:47 pm

Re: C64 haikus

Post by akeley »

Well, what I had in mind psoting this was if you could write some retro-computing haikus, not rewrite this program, but, hell, why not :) So...WHAT! EXECUTE!

I might have a go later myself. It's something like 5-7-5 syllables I think.
0 x

Post Reply