Hjalfi programs a ZX81

Поділитися
Вставка
  • Опубліковано 23 вер 2018
  • In which yr hmbl svt makes good use of time by writing a trivial game on one of the most obsolete of computers.
    Apologies for the focus issue two thirds of the way in --- my camera hates me.
  • Наука та технологія

КОМЕНТАРІ • 79

  • @0bm31770
    @0bm31770 4 місяці тому +1

    Watching this takes me back to 1982 when I got my TS1000. I'm glad it came with 2K RAM. I didn't have much trouble writing simple games. I also assembled a 16K module so I was able to write some long programs.

  • @alistermunro7090
    @alistermunro7090 Рік тому +2

    I loved my ZX-81. Had a green film over my spray painted B&W TV, 16K RAM pack, rubber addon keypad and of course the thermal printer.

  • @mauromartyn7941
    @mauromartyn7941 Рік тому +2

    My father say , in 1983; - "What do you want? Atari 2600 or a computer?"
    In my little tinny brain for a kid 8 years old, a computer was a faboulous machine with millions of games and oportunitys.....
    You need see my face, and the face of my sister, when my father start on this piece of WHAAAAAT!!!!
    But the old man , in this moment, would give me a big favor. Because, me and my sister , was take BASIC lessons in a new academy. That was my first contact with the world of computers. I study for be an ingenier, and I work as an IT in my job. Thanks dad!!

  • @NotMarkKnopfler
    @NotMarkKnopfler 2 роки тому +6

    Yes. This was how it was done. Your mate would come round after school, you'd put on some music on the record player, and take over the family TV to write the next 'mega game' that you had been talking about at school all day instead of doing your school work!! That's literally how it was.

  • @j0hnf_uk
    @j0hnf_uk 2 роки тому +2

    I spent the entire summer school holidays of 1981 learning to program this machine, and by the end of the 6 weeks, I was quite proficient and wrote many games which I saved on cassette. One C90 cassette, no less. Something I shouldn't have done, but didn't know better at the time. Needless to say, years later, when trying to load in some of them, I was sadly disappointed.

    • @hjalfi
      @hjalfi  2 роки тому +1

      It's probably stretched. If you still have the cassette, then it may be possible to digitise the audio and fiddle with the frequency until it decodes properly.

  • @Havanacuba1985
    @Havanacuba1985 3 роки тому +2

    This was my first computer in 1984 from WH Smith £39.99 got you the zx81 and a memotech 16k ram pack
    I could not believe I owned an actual computer. The manual was great and full of short interesting programs and explained things like variables very simply. I had great fun typing in programs from magazines .im so sorry I sold it in 1985 . I have just bought another 48k spectrum and am so looking forward to it.

  • @r0bhumm
    @r0bhumm 2 роки тому +1

    I suffer from severe dyslexia to program on a ZX 81 I found the fact that it expanded the key presses out to the commands on the screen help me immensely as a child.

  • @Plrang
    @Plrang 5 років тому +5

    I love that data transfer sound.. it takes me back, like meeting an oooold friend

  • @mikafoxx2717
    @mikafoxx2717 11 місяців тому +1

    I'm impressed with the editor, much better than the MS basics I've used..

  • @laser31415
    @laser31415 5 років тому +5

    My first computer! I loved programming it but hated the keyboard. My wrists start to ache just looking at this video.

  • @banjobear1666
    @banjobear1666 4 роки тому +3

    Ah, the good old days! This has inspired me to dig out my old ZX81 from the loft. Great programming !

  • @richartrod
    @richartrod Рік тому

    This is why I admire those who programmed these old-school machines. Clever coding and editing squeezed every last bit and byte out of the puny RAM and created impressive games and apps. This video demonstrates that cleverness in real time.

  • @lintuxvi
    @lintuxvi 5 років тому +7

    Love this, live-coding on some very ancient hardware is surprisingly great fun.

    • @herrbonk3635
      @herrbonk3635 3 роки тому

      I agree, but ancient computers were built in 1941, not 1981 :D

  • @gdutfulkbhh7537
    @gdutfulkbhh7537 9 місяців тому +1

    The Good Old Days were the Bad Old Days. Sinclair awfulness brings back distinctly mixed emotions.

  • @MikePerigo
    @MikePerigo 3 роки тому +5

    Before deleting the initialization lines, more space could have been saved by changing
    Line 30 (LET C=5) to line 9 and then changing lines 10 and 20 to LET A=C+C+C and LET B=A+C.
    Also, at the end, lines 140 and 201 still both contained the number 0 which could be replaced by Y.

  • @MarcoMugnatto
    @MarcoMugnatto 4 роки тому +3

    Two things I didn't know about zx81 that I learnt here: you can use two ATs in one line, and it saves variable values to the cassette

  • @TheSudsy
    @TheSudsy 2 роки тому +2

    This is why there was a generation of coders who could squeeze every last byte and frame out of a program. Once we got into the 16 bit + world then memory and performance were "unlimited" and coding got lazy. With a 16k and even 64k RAM pack - yes they existed i had one. You could let you imagination run riot. I used to code adventure games with (simple) graphics into 64 k.

  • @olavl8827
    @olavl8827 4 роки тому +2

    I just happened on this video today. You explain programming very nicely, well done. I had a ZX Spectrum 48K in the day which was a bit better than this, especially in terms of memory of course. At 53:08 you wonder why you need to give a filename when saving. It's because when loading from tape you can either fast forward the tape using the counter on the player to find the desired program (you'd typically keep a handwritten list with the cassette). Then use LOAD "" to make the computer load the first file that it hears. Or you can use LOAD "filename" and play the entire tape from the start and the computer loads only the file you specified when eventually it comes along.
    Of course nothing stops you from having different files with the same name on the cassette. Again, the computer will pick up the first that matches and ignores the others.

  • @jinchoung
    @jinchoung 3 роки тому +1

    very enjoyable indeed! watching you program "over your shoulder" with you explaining things as you went along was tremendously educational. geez, i wish i had you as a teacher when i had the zx81! and the fact that it is just soo limited makes every little optimization demonstrably important. teaches a lot of useful principles that may be harder to understand with our modern machines. thanks for the great vid!

  • @coldsilnc
    @coldsilnc 3 роки тому

    This brought back memories from my childhood. The zx81 was my first computer and i spent 1000s of hours programming on that machine. thanks for the video. :)

  • @philchurch927
    @philchurch927 4 роки тому

    Down memory lane, I had mine perched on the old upright piano keyboard cover with the portable tv on the top. boy did I get neck ache but you felt good when it worked.
    Thank you for this video.

  • @CelticSaint
    @CelticSaint 3 роки тому +1

    Thank you for this. You did a great job. I got back into BASIC a few years ago and have had a lot of fun writing games and simulations. There are one or two fundamental things that I would like to be able to do, but for the life of me I cannot work out how to do them, so I have hit a bit of a wall at the moment. There seem to be very few videos on YT like yours where people explain how to code and solve problems. Thanks again.

  • @Daeve42
    @Daeve42 5 років тому

    Really enjoyed this, learned more than could from a book in that time. Thanks.

  • @dollarsing
    @dollarsing 6 місяців тому +2

    Amazing. Talking hands!

  • @pyhunter101
    @pyhunter101 4 роки тому +1

    Well done. I was 10 when I got one of these and spent thousands of hours writing my own software/games (and a lot of time rewriting them when they didn’t save properly onto tape). I had a whole 16k of ram with mine though. Thanks for the memory’s.

  • @KennethSorling
    @KennethSorling Рік тому +2

    Thank you for this, it had lots of info and cool memory-saving tricks.
    One thing to make it more like a game, and thus more addictive, is keeping a score. Either you increment the score by a point or a few each time you catch the ball with the bat, or, simpler, increment the score by one for each second, or each 'turn' you manage to keep the ball 'alive'.
    I realize, though, that this is a pipe dream unless you squeeze out even more free bytes to accomplish all this. Not only to implement the logic, but to reserve space to display the score continuously. Man, this little computer was so frustratingly limited!
    So here's a thought: How about a machine language version of this? That has got to be not only less memory, but also quite a bit faster. Plus, it's a chance to introduce new tools and tricks. What would you even use to develop it? How would you get the code into the computer?

    • @hjalfi
      @hjalfi  Рік тому +1

      These days, for machine code ZX81 programs you'd do the coding on a PC in an emulator and then deploy it via an SD card interface like the ZXPand. It'd also be possible to output audio data via your soundcard which can be read in through the cassette jack. But developing on a PC is much less fun. Back in the day, to develop on a ZX81, you'd either have used an assembler on an upgraded machine (which was a pretty miserable experience) or else hand-assembled on paper and entered hex directly (which was also a pretty miserable experience). Changing anything in the program would have involved lots of re-keying bytes and lots of crashes, which would lose all your data.

  • @shadowboxer47
    @shadowboxer47 4 роки тому +1

    I appreciate this. I like collecting old computers. I have no experience with Sinclair and picked one up on ebay. This program might be the first one I try.

    • @hjalfi
      @hjalfi  4 роки тому +2

      Hope you have fun! Also, you may want to print a copy of Commander le Clef's Secret Encoder Wheel for reference... www.retrobattlestations.com/Cmdr-le-Clef/Secret-Encoder-Wheel.pdf

  • @SpaceParanoidX
    @SpaceParanoidX 3 роки тому +3

    Me talking at the screen: "...line 140....Line 140....LINE 140!!1!!" ;)

  • @bazza5699
    @bazza5699 2 роки тому

    great video, really enjoyed it, thanks

  • @maks_zbogar
    @maks_zbogar 3 роки тому +1

    If only today's software would be so memmory optimized :))). Congratulations! I would never believe that such a nice game could be done with 1024 bytes...

  • @antonnym214
    @antonnym214 9 місяців тому +1

    If this BASIC has peek and poke, I would write the game in Z80 assembly, poke the object code into RAM, and execute it with a Call command.

  • @dmitriyk2282
    @dmitriyk2282 4 роки тому

    всегда хотел поюзать zx81!! ))лайк!

  • @dannejendinger1847
    @dannejendinger1847 3 роки тому

    You are a Basic-Jedi!! 😃

  • @karlbesser1696
    @karlbesser1696 3 роки тому

    I remember me. There was a handle, called 'Spoke Grip'.

  • @andrewdavidloch360
    @andrewdavidloch360 4 роки тому +1

    I got the KIT to make it.. it was £3 short if you built it yourself... it was the cheap option. I MADE my ZX81 I soldiered it together and put the chips in their carriers and each resister.

    • @hjalfi
      @hjalfi  9 місяців тому

      But, did it work?

  • @reinoud6377
    @reinoud6377 9 місяців тому +1

    I thought the 16k expansion was kind of mandatory?

  • @antonnym214
    @antonnym214 4 роки тому +2

    Well done! I used to code in 8080 and Z-80 assembly. I presume there was an assembler for this? I could almost survive a 1K limit if I could use assembly language. Z-80 was a sophisticated CPU in those days! I have only one question: Will it run Crysis?

    • @hjalfi
      @hjalfi  4 роки тому +3

      There were assemblers, but entering text on that keyboard was painful. For small programs most people hand-assembled and then entered hex. And while I don't think there's Crysis, here's Dragon's Lair... ua-cam.com/video/CuF4g5CDZQA/v-deo.html

    • @antonnym214
      @antonnym214 4 роки тому +1

      @@hjalfi I was just being funny, but Dragon's Lair is amazing!

  • @AllGamingStarred
    @AllGamingStarred 10 місяців тому

    24x32
    how do I map that on graph paper? I don't have a ruler on me. Anyone, Picture?

  • @Havanacuba1985
    @Havanacuba1985 3 роки тому +1

    My new spectrum has had the composite mod, should I be able to use it with a small monitor like yours ? That would be ideal

    • @hjalfi
      @hjalfi  3 роки тому

      Yup, should work fine provided it's a PAL monitor (and you have a PAL Spectrum). My monitor's just a cheapo car reversing monitor with composite input, nothing special. The ZX81 is a bit more problematic due to producing a terrible quality video signal, but the Spectrum's significantly better.

    • @martindejong3974
      @martindejong3974 Рік тому +1

      @@hjalfi later ZX-81 produced a much better video signal that included the "front porch" signal, so the TV could figure out what the black level was. Without it most modern TV's will only produce a very faint picture. The ones with the improved signal (ULA chip) do much better.

  • @gregskuza7166
    @gregskuza7166 3 роки тому

    Timed Sinclair 1000 had 2kb of ram I think…

  • @toto123456ish
    @toto123456ish 5 років тому +2

    Can you program the ZX81 in Z80 assembler? And if so, can you do it from the computer itself?

    • @hjalfi
      @hjalfi  5 років тому +3

      Yes, and technically yes, but the 1kB model doesn't have enough space for an assembler and entering assembly on that keyboard is painful. What most people did back in the day was to hand assemble with pencil and paper and then enter hex.

    • @Matusalem1969
      @Matusalem1969 3 роки тому +1

      @@hjalfi My frriend, You can entet an Assembly program in a REM line and POKE it, byte by byte.
      Tha game you made, in Assembly Z80 could take half of the memory in BASIC or less than that. And you could have the advantage of the Speed of the machine language. It would require a lot of work, but it would compansate.
      You have economy of Memory IN BASIC if you adapt some instructions, for example: LET X=0, can be written as LET X= NOT PI or LET X = VAL "0", LET M=1 can be written LET M = SGN PI.

  • @GregMcMahan
    @GregMcMahan 4 роки тому +1

    Would changing line numbers to 1 or 2 digits save ram space?

    • @hjalfi
      @hjalfi  4 роки тому +1

      No, they were all encoded as 16-bit binary values, so were all the same size.

    • @Matusalem1969
      @Matusalem1969 3 роки тому +1

      You have economy of Memory IN BASIC if you adapt some instructions, for example: LET X=0, can be written as LET X= NOT PI or LET X = VAL "0", LET M=1 can be written LET M = SGN PI. There are other tricks to raise memory.

  • @CelticSaint
    @CelticSaint 5 років тому +2

    Good video but I could hardly hear it?

    • @hjalfi
      @hjalfi  5 років тому +2

      Yeah, sorry, I forgot to normalise, and you can't change the audio in UA-cam without deleting the video. All I can suggest is cranking the volume.

    • @CelticSaint
      @CelticSaint 5 років тому +1

      Thanks I thought it might have been my laptop for a moment!

  • @DavoidJohnson
    @DavoidJohnson 4 роки тому +1

    Damn, I just changed the likes from 81 to 82

  • @user-ir2fu4cx6p
    @user-ir2fu4cx6p 2 роки тому

    Why YT didn't recommended this to me two years ago ?

  • @semibiotic
    @semibiotic 2 роки тому

    It would better to take ZX-Spectrum, instead (or ZX81 with 16K). ZX80/81, PET, VIC20 BASIC memory limitations are so ridiculous

    • @hjalfi
      @hjalfi  9 місяців тому

      There's no fun in writing programs for anything _good!_

    • @semibiotic
      @semibiotic 9 місяців тому

      ​@@hjalfi Fighting to write 30 simple BASIC statements it is interesting experience, but it is no programming.

  • @arnolduk123
    @arnolduk123 5 років тому +1

    Just needs a "nag" screen or a 30 day trial before you can release it to the masses :)
    The video was mind numbing to watch all that code re-arranging and number mangling just to get the program to run. I'm surprised that WHSmith C15 cassette tape is still usable.

    • @hjalfi
      @hjalfi  5 років тому

      The ZX81 has so little memory that the only kind of transaction it can do is micro.

    • @arnolduk123
      @arnolduk123 5 років тому

      @@hjalfi well if someone can manage to program a game of chess on that thing, then that's sure a micro achievement!

    • @hjalfi
      @hjalfi  9 місяців тому

      @@arnolduk123 (Very delayed, but) good news! They did! It's called 1k chess and it plays a pretty good game, for a program that's 672 bytes long.

    • @arnolduk123
      @arnolduk123 9 місяців тому

      @@hjalfi Yes, I knew that and that's why I said it was an acheivement. The ZX81 is a good example of how more complex and memory restricted coding was for programmers. You were less likely to find bugs in code that was consistently analyzed line by line, although not true when typing then in line by line from a printed magazine that was full of typing errors :)

  • @Xoferif
    @Xoferif 5 років тому +2

    "tao" as in "Taos"...?

    • @hjalfi
      @hjalfi  5 років тому +2

      Yup. I worked there before it went bust.

    • @Xoferif
      @Xoferif 5 років тому +3

      Cool bananas! I was crazy about Taos when I was a student, and would read and re-read everything I could find. And that demo system they built with the processor cartridges - you could just plug in more cartridges and the programs would run faster! Amazing stuff.

    • @hjalfi
      @hjalfi  5 років тому +2

      If I remember that demo machine correctly, it was actually a bit embarrassing --- it was based around an eight-way Transputer system plugged into a host PC, running as a nine-CPU machine; except the early Pentium PC was so much faster than the Transputers that when drawing a Mandelbrot, the Transputers would take so long to draw a single scan line each that the Pentium had done the entire rest of the image all by itself...

  • @edmund-osborne
    @edmund-osborne 5 років тому +2

    How did you keep missing that glaringly obvious 0 in line 140 every time you tried to further reduce memory usage? Literally every time, it was like you were blind or something.

    • @hjalfi
      @hjalfi  5 років тому +3

      Practice!

    • @ksportz66
      @ksportz66 4 роки тому

      Edmund Osborne - did Football league program and had to poke some address to access lines under normal display for bottom teams

    • @ksportz66
      @ksportz66 4 роки тому

      hjalfi - Still cant code a for next loop quicker than on this.

  • @BenevolentChum
    @BenevolentChum 2 роки тому +1

    Thanks for some good fun. Converted your program to Micro Color BASIC: ua-cam.com/video/nkBIDif9K0w/v-deo.html

  • @clyth41
    @clyth41 9 місяців тому

    Presumably your English so why are you saying dollars? can't you do it in pounds, you know for your English watchers....

  • @theR1ddle
    @theR1ddle 3 роки тому +1

    2021 reporting in... Thank you, I enjoyed this video very much. Now I want to go out in the shed, drag out my old Timex Spectrum and follow along.