Poke Graphics On A ZX Spectrum
HTML-код
- Опубликовано: 11 дек 2024
- This is me trying to roll back the years and poke a simple 'brick' graphic on a ZX Spectrum. I used EmuZWin to record this.
It took me a while to remember the right symbo-shift and caps-shift combos to get the right BASIC commands so bear with me!
Using this technique you can (in BASIC) 'poke' up to 21 characters (up to U I think) to make your own 'UDG' graphics.
I can't believe I actually remembered the lines of code!
zxspectrumgames...
amiga-games.blo...
those-funny-gam...
well i liked it, the 'pain' of typing in is part of the nostalgia :) and the end result quite cool
@kmment Cheers! I was struggling to remember how to do it... I haven't really done any BASIC on the Spectrum since about 1988! I used the keyboard helper in EmuZ to help with the symbol shift combos
TO, goddammit! :)
The ZX Spectrum manual never mentioned that you could use decimal numbers instead of BIN whatever, though the latter (if you wrote the program out the way the manual had it) meant you could sort of visualize the character.
Hate to say it, but the BBC had a far more elegant way (single-line!) of doing it (VDU 23,(char#),a,b,c,d,e,f,g,h)
+neildKoR I think the BBC had the best BASIC of all the 8-bit machines. I think I got thid method of poking the characters from Input Magazine, but it's a long time ago so I'm not 100% sure....
+Retro Brothers It's pretty much the same program as in the manual, but in slightly fewer lines - they use eight DATA lines with one BIN number on each; with the monospaced font, you ended up with a neat grid of 1s and 0s. Obviously this is rather a lot of program to type when you can just as easily do DATA a,b,c,d,e,f,g,h in decimal.
@DingKong it looks like it was one of your first contact with ZX Basic. You don't need to begin a program with CLS, because RUN clears screen automatically :P
CLS is required at the start of a program that may be autorun, so that it clears the 128k menu away before running the program.
+Retro Brothers I fail to see what is happening in this program, I was hoping for some smooth pixel by pixel movement of a graphic on screen, when I saw the title of the video.
P.S. If I remember rightly could you not shorten the graphics data to hexadecimal rather than binary?
Hex would be used when writing assembler. ZX BASIC did not handle hexadecimal natively in DATA statements. You either used decimal or binary (with that BIN qualifier). You could write a function to translate hex to decimal, but BASIC ran slowly enough already.
@Abrimaal Seek Keywords? It's only a little bit of retro-nostalgia and a bit of fun
I want to be able to turn the pressing of keys for example abcd into a being b, b being c in binary so when in graphics mode what you type on the keyboard is transformed can you be of assistance. Ive managed to have multiple keys as graphics so that a,b,c,d are graphics but am not able to control them. I'm not sure what is going on with the graphics are they spreading? does it need to be in columns instead of rows? please help
POKE 23606, PEEK 23606 + 8
Cursor "mode E" and "mode G" XD
FOR command just leads to 2 question marks
I did this in 48K Mode. So you press the 'F' key and it automatically puts the word 'FOR' there. The Spectrum (original) had a weird entry system for typing in BASIC. It depends on if you are using a 48K/16K model or say a Spectrum 128.
try master dos and masterbasic on the sam coupe much easier!
+Sam Coupé I might just do that. I've never ever used a real SAM.
It'll give me a break from C# anyway!
you can program in c?
+Sam Coupé I haven't done any 'pure' C for years, but I'm sure I could get into it pretty quickly as C# is similar. I wrote some small C programs for PC DOS years ago.
you wouldn't take a look at bmp2scr program from lcd please?
poke isn't working, it's just flashing red. i'm using 128 mode because 48 mode is a bitch
First write a program, test if it works properly, then show the listing and the result. I've lost 3 mins watching you seek keywords.
Well, nothing special....
I did it when I was 3rd grade. In 4th I started programming my first games in BASIC.