Hjalfi programs a ZX81

  Рет қаралды 13,016

Poking Technology

Poking Technology

Күн бұрын

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
@mauromartyn7941
@mauromartyn7941 Жыл бұрын
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!!
@0bm31770
@0bm31770 6 ай бұрын
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 Жыл бұрын
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.
@j0hnf_uk
@j0hnf_uk 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 жыл бұрын
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.
@NotMarkKnopfler
@NotMarkKnopfler 2 жыл бұрын
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.
@r0bhumm
@r0bhumm 2 жыл бұрын
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.
@Havanacuba1985
@Havanacuba1985 3 жыл бұрын
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.
@mikafoxx2717
@mikafoxx2717 Жыл бұрын
I'm impressed with the editor, much better than the MS basics I've used..
@Plrang
@Plrang 6 жыл бұрын
I love that data transfer sound.. it takes me back, like meeting an oooold friend
@richartrod
@richartrod 2 жыл бұрын
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.
@banjobear1666
@banjobear1666 4 жыл бұрын
Ah, the good old days! This has inspired me to dig out my old ZX81 from the loft. Great programming !
@MikePerigo
@MikePerigo 3 жыл бұрын
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.
@lintuxvi
@lintuxvi 6 жыл бұрын
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
@laser31415
@laser31415 6 жыл бұрын
My first computer! I loved programming it but hated the keyboard. My wrists start to ache just looking at this video.
@TheSudsy
@TheSudsy 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.
@MarcoMugnatto
@MarcoMugnatto 4 жыл бұрын
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
@gdutfulkbhh7537
@gdutfulkbhh7537 10 ай бұрын
The Good Old Days were the Bad Old Days. Sinclair awfulness brings back distinctly mixed emotions.
@olavl8827
@olavl8827 4 жыл бұрын
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 жыл бұрын
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!
@KennethSorling
@KennethSorling Жыл бұрын
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 Жыл бұрын
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.
@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. :)
@CelticSaint
@CelticSaint 3 жыл бұрын
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.
@pyhunter101
@pyhunter101 4 жыл бұрын
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.
@theR1ddle
@theR1ddle 3 жыл бұрын
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.
@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.
@shadowboxer47
@shadowboxer47 4 жыл бұрын
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 жыл бұрын
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
@dollarsing
@dollarsing 8 ай бұрын
Amazing. Talking hands!
@SpaceParanoidX
@SpaceParanoidX 3 жыл бұрын
Me talking at the screen: "...line 140....Line 140....LINE 140!!1!!" ;)
@maks_zbogar
@maks_zbogar 3 жыл бұрын
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...
@Daeve42
@Daeve42 5 жыл бұрын
Really enjoyed this, learned more than could from a book in that time. Thanks.
@antonnym214
@antonnym214 10 ай бұрын
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.
@bazza5699
@bazza5699 3 жыл бұрын
great video, really enjoyed it, thanks
@andrewdavidloch360
@andrewdavidloch360 4 жыл бұрын
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 10 ай бұрын
But, did it work?
@antonnym214
@antonnym214 4 жыл бұрын
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 жыл бұрын
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... kzbin.info/www/bejne/eaapZZpreKmNh6M
@antonnym214
@antonnym214 4 жыл бұрын
@@hjalfi I was just being funny, but Dragon's Lair is amazing!
@reinoud6377
@reinoud6377 11 ай бұрын
I thought the 16k expansion was kind of mandatory?
@karlbesser1696
@karlbesser1696 3 жыл бұрын
I remember me. There was a handle, called 'Spoke Grip'.
@dannejendinger1847
@dannejendinger1847 3 жыл бұрын
You are a Basic-Jedi!! 😃
@AllGamingStarred
@AllGamingStarred Жыл бұрын
24x32 how do I map that on graph paper? I don't have a ruler on me. Anyone, Picture?
@Havanacuba1985
@Havanacuba1985 3 жыл бұрын
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 Жыл бұрын
@@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.
@dmitriyk2282
@dmitriyk2282 4 жыл бұрын
всегда хотел поюзать zx81!! ))лайк!
@gregskuza7166
@gregskuza7166 3 жыл бұрын
Timed Sinclair 1000 had 2kb of ram I think…
@user-ir2fu4cx6p
@user-ir2fu4cx6p 3 жыл бұрын
Why YT didn't recommended this to me two years ago ?
@toto123456ish
@toto123456ish 6 жыл бұрын
Can you program the ZX81 in Z80 assembler? And if so, can you do it from the computer itself?
@hjalfi
@hjalfi 6 жыл бұрын
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 жыл бұрын
@@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.
@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 10 ай бұрын
There's no fun in writing programs for anything _good!_
@semibiotic
@semibiotic 10 ай бұрын
​@@hjalfi Fighting to write 30 simple BASIC statements it is interesting experience, but it is no programming.
@CelticSaint
@CelticSaint 5 жыл бұрын
Good video but I could hardly hear it?
@hjalfi
@hjalfi 5 жыл бұрын
Yeah, sorry, I forgot to normalise, and you can't change the audio in KZbin without deleting the video. All I can suggest is cranking the volume.
@CelticSaint
@CelticSaint 5 жыл бұрын
Thanks I thought it might have been my laptop for a moment!
@GregMcMahan
@GregMcMahan 4 жыл бұрын
Would changing line numbers to 1 or 2 digits save ram space?
@hjalfi
@hjalfi 4 жыл бұрын
No, they were all encoded as 16-bit binary values, so were all the same size.
@Matusalem1969
@Matusalem1969 3 жыл бұрын
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.
@arnolduk123
@arnolduk123 5 жыл бұрын
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 10 ай бұрын
@@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 10 ай бұрын
@@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 :)
@DavoidJohnson
@DavoidJohnson 4 жыл бұрын
Damn, I just changed the likes from 81 to 82
@edmund-osborne
@edmund-osborne 5 жыл бұрын
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 жыл бұрын
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 жыл бұрын
Thanks for some good fun. Converted your program to Micro Color BASIC: kzbin.info/www/bejne/pJylenefm55-Ztk
@Xoferif
@Xoferif 6 жыл бұрын
"tao" as in "Taos"...?
@hjalfi
@hjalfi 6 жыл бұрын
Yup. I worked there before it went bust.
@Xoferif
@Xoferif 6 жыл бұрын
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 6 жыл бұрын
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...
@clyth41
@clyth41 10 ай бұрын
Presumably your English so why are you saying dollars? can't you do it in pounds, you know for your English watchers....
ZX81 still awesome after 40 years!
19:10
Robin Grosset
Рет қаралды 12 М.
Fixing a special ZX Spectrum
36:05
Mr Lurch's Things
Рет қаралды 12 М.
SCHOOLBOY. Мама флексит 🫣👩🏻
00:41
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 6 МЛН
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
Games That Push the Limits of the ZX81
17:58
Sharopolis
Рет қаралды 118 М.
ZX Spectrum, Expansion Port Research
40:45
James Sharman
Рет қаралды 9 М.
ZX81 repair
19:27
ezContents
Рет қаралды 8 М.
Tearing down some more cheap and nasty smartwatches
43:47
Poking Technology
Рет қаралды 24 М.
ZX Spectrum, Rom Cartridge Research
24:12
James Sharman
Рет қаралды 10 М.
Sinclair ZX81 composite video modification
22:47
Arctic retro
Рет қаралды 8 М.
0044 The ZX Spectrum of North America: The Timex Sinclair 2068
28:49
Adrian's Digital Basement ][
Рет қаралды 46 М.
Hacking a Fnirsi DSO152 mini oscilloscope to play Breakout
31:22
Poking Technology
Рет қаралды 6 М.