displaying and animating UDG's on the spectrum

Crayon21
Posts: 354
Joined: Sun Nov 04, 2018 2:33 am

displaying and animating UDG's on the spectrum

Post by Crayon21 »

I can enter the binary data well enough but how do I display it? I'm not talking about poking the data for the small ones either. Commodore allows you to show the sprite, the C128 has a sprite command. How do I do this on the spectrum?

Data bin (numbers) then what?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: displaying and animating UDG's on the spectrum

Post by XavSnap »

Spectrum 48k.
UDG.zip
(77.81 KiB) Downloaded 167 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Crayon21
Posts: 354
Joined: Sun Nov 04, 2018 2:33 am

Re: displaying and animating UDG's on the spectrum

Post by Crayon21 »

could you clarify the code?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: displaying and animating UDG's on the spectrum

Post by XavSnap »

Yes Crayon,

Code: Select all

10 CLS:LET u1=PEEK 23675+256*PEEK 23676
20 LET u2=10000:PRINT u2-INT(u2/256)*256
30 POKE 23675,u2-INT(u2/256)*256:POKE 23676,INT(u2/256)
40 PRINT AT 0,0;"\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u";AT 5,5;u2
50 IF INKEY$="" THEN GO TO 50
60 LET u2=u2+8
70 GO TO 30
To enter UDG:

Code: Select all

9940 REM ***********************
9945 RESTORE 9940:FOR a=USR"a" TO USR"a"+7:READ b:POKE a,b:NEXT a:DATA 16,16,56,108,198,254,40,40
PRINT "\a"
Where \a = GRAPHICS +"a"
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Crayon21
Posts: 354
Joined: Sun Nov 04, 2018 2:33 am

Re: displaying and animating UDG's on the spectrum

Post by Crayon21 »

got the UDG on screen finally but what if I wanted to use a joystick (cursor keys in this case, I don't have an actual spectrum), how would I do that?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: displaying and animating UDG's on the spectrum

Post by XavSnap »

Hi Crayon,

Try to code a simple ZX81 like basic program based on the "PRIINT AT" command, it will work on the Spectrum.
Ever seen in your previous posts...
:arrow:
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Crayon21
Posts: 354
Joined: Sun Nov 04, 2018 2:33 am

Re: displaying and animating UDG's on the spectrum

Post by Crayon21 »

btw, how do you pronounce xavsnap anyway?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: displaying and animating UDG's on the spectrum

Post by dr beep »

Crayon21 wrote: Sun Jul 03, 2022 10:21 pm got the UDG on screen finally but what if I wanted to use a joystick (cursor keys in this case, I don't have an actual spectrum), how would I do that?
You only have to test for the keys 5678 and 0 for fire.
An external cursorjoystick works like that.
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: displaying and animating UDG's on the spectrum

Post by XavSnap »

Crayon21 wrote: Mon Jul 04, 2022 5:21 am btw, how do you pronounce xavsnap anyway?
:shock:
You kill me ! ... xavsnap with the french accent !
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Crayon21
Posts: 354
Joined: Sun Nov 04, 2018 2:33 am

Re: displaying and animating UDG's on the spectrum

Post by Crayon21 »

zes-net?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
Post Reply