Experimentations/getting back into the thick of it.

Talk about your programs in progress. Discuss how to implement features, etc.
Forum rules
This section is for testing Commander X16 programs and programs related to the CX16 for other platforms (compilers, data conversion tools, etc.)

Feel free to post works in progress, test builds, prototypes, and tech demos.

Finished works go in the Downloads category. Don't forget to add a hashtag (#) and the version number your program was meant to run on. (ie: #R41).
User avatar
BullboyAT05
Posts: 11
Joined: Mon Jun 24, 2024 12:36 am

General - CX16 Experimentations/getting back into the thick of it.

Post by BullboyAT05 »

Hi, I'm back into dabling into some X16 coding after quite a while!

As I'm writting this first comment, I followed this guide (https://www.youtube.com/watch?v=2hE7T_JwV8k&t=0s) and got a sprite to move in basic. Couldn't animate it though.

The sprite was influenced by Falcom's Xanadu (mainly the MSX sprites due to the PC-8801 sprites not being dumped on The Spriter Ressource yet)

I used this program to make the sprites: https://hyperpyxel.com/ . Not having been able to save the file means the sprites only exists in code form now (at least there's the screenshot so you have the idea of how the first sprite came out).

And now, here's the code. Feel free to paste it into your X16 emulator and see it going!
100 SCREEN 3 : REM LORES
101 GOSUB 1000 : REM READ SPRITE DATA
102 GOSUB 1050 : REM SETUP SPRITE 0
103 Y0=150: FOR X=0 TO 320: X0=X
104 GOSUB 1070
105 FORD=1 TO 70:NEXT D
106 NEXT X
107 GOTO 10000
1000 REM READ SPRITE DATA
1001 FOR I=O TO 255
1002 READ PX
1003 VPOKE $0,$4000+I,PX
1004 NEXT I
1005 RETURN
1050 REM INIT SPRITE
1051 POKE $9F29,($40 OR PEEK($9F29)): PO=0
1052 REM SET SPRITE DATA
1053 VPOKE $1,$FC11,$02 : REM 4BPP ADRESS $04000
1060 VPOKE $1,$FC16,$0C : REM NO COLLISIONS, ZDEPTH 3, NO FLIP
1061 VPOKE $1,$FC17, $50+PO : REM 16x16 PIXELS, PALETTE OFFSET PO
1062 RETURN
1070 REM SET SPRITE 0,X0.Y0
1071 VPOKE $1,$FC12,X0 AND $FF
1072 VPOKE $1,$FC13,(X0 AND $0300)/$100
1073 VPOKE $1,$FC14,Y0 : REM YPOS 128
1074 VPOKE $1,$FC15,$00
1075 RETURN
1080 REM SET SPRITE IMG DATA
1081 VPOKE $1,$FC10,D0
1082 RETURN
5000 DATA $00, $00, $09, $99, $99, $90, $0E, $00
5001 DATA $00, $00, $99, $99, $99, $99, $0E, $00
5002 DATA $00, $00, $99, $99, $97, $90, $0E, $00
5003 DATA $00, $09, $99, $99, $79, $99, $0E, $00
5004 DATA $00, $00, $99, $79, $79, $70, $0E, $00
5005 DATA $00, $99, $9E, $97, $77, $9E, $0E, $00
5006 DATA $00, $09, $99, $9E, $E9, $90, $0E, $00
5007 DATA $09, $EE, $99, $77, $77, $79, $0E, $00
5008 DATA $0E, $7E, $E9, $EE, $EE, $77, $EE, $E0
5009 DATA $0E, $9E, $E9, $EE, $9E, $97, $77, $90
5010 DATA $0E, $EE, $E9, $97, $79, $09, $77, $90
5011 DATA $0E, $EE, $99, $EE, $EE, $90, $99, $00
5012 DATA $09, $E9, $9E, $EE, $EE, $90, $00, $00
5013 DATA $00, $99, $99, $99, $99, $90, $00, $00
5014 DATA $00, $00, $97, $79, $97, $79, $00, $00
5015 DATA $00, $00, $97, $77, $99, $77, $90, $00
6000 DATA $00, $00, $09, $99, $99, $90, $00, $00
6001 DATA $00, $00, $99, $99, $99, $99, $00, $E0
6002 DATA $00, $00, $99, $99, $97, $90, $00, $E0
6003 DATA $00, $09, $99, $99, $79, $99, $00, $E0
6004 DATA $00, $00, $99, $79, $79, $70, $00, $E0
6005 DATA $00, $99, $9E, $97, $77, $9E, $0E, $00
6006 DATA $09, $EE, $99, $9E, $E9, $90, $0E, $00
6007 DATA $0E, $7E, $E9, $77, $77, $79, $0E, $00
6008 DATA $0E, $9E, $E9, $EE, $EE, $77, $EE, $00
6009 DATA $0E, $EE, $E9, $EE, $9E, $97, $77, $E0
6010 DATA $0E, $EE, $99, $97, $79, $09, $77, $90
6011 DATA $09, $E9, $99, $EE, $EE, $97, $99, $00
6012 DATA $00, $99, $9E, $EE, $EE, $97, $70, $00
6013 DATA $00, $97, $79, $99, $99, $77, $70, $00
6014 DATA $00, $97, $79, $99, $99, $77, $90, $00
6015 DATA $00, $09, $77, $99, $00, $00, $00, $00
10000 REM END PRG
If you have any tips to give me, feel free to reply :D

Maybe I could share some game ideas for the x16 next time.

Have all a nice day!
Attachments
Capture d’écran 2025-02-24 194923.png
Capture d’écran 2025-02-24 194923.png (14.7 KiB) Viewed 9400 times
kelli217
Posts: 552
Joined: Sun Jul 05, 2020 11:27 pm

Re: Experimentations/getting back into the thick of it.

Post by kelli217 »

Animating a sprite means having all the different animation frames in the VERA video memory at the same time, and then changing the memory pointer for that sprite to point to which frame you wish to display.

Technically, it is possible that you could use VPOKE to make changes to the sprite data without changing the pointer, but I think it would probably be too slow to be useful.
User avatar
BullboyAT05
Posts: 11
Joined: Mon Jun 24, 2024 12:36 am

Re: Experimentations/getting back into the thick of it.

Post by BullboyAT05 »

UPDATED CODE: Sprite still not animated, but it goes faster now.
100 SCREEN 3 : REM LORES
101 HM$=CHR$(19) : REM HOME CHARACTER
102 GOSUB 1000 : REM READ SPRITE DATA
103 GOSUB 1050 : REM SETUP SPRITE 0
104 Y0=150: FOR X=0 TO 255: X0=X: GOSUB 1070: NEXT: REM MOVE THE SPRITE
105 GOTO 10000
999 REM SPRITE ROUTINES
1000 REM READ SPRITE DATA
1001 FOR I=O TO 255
1002 READ PX
1003 VPOKE $0,$4000+I,PX
1004 NEXT I
1005 RETURN
1050 REM INIT SPRITE
1051 POKE $9F29,($40 OR PEEK($9F29)): PO=0
1052 REM SET SPRITE DATA
1053 VPOKE $1,$FC11,$02 : REM 4BPP ADRESS $04000
1060 VPOKE $1,$FC16,$0C : REM NO COLLISIONS, ZDEPTH 3, NO FLIP
1061 VPOKE $1,$FC17, $50+PO : REM 16x16 PIXELS, PALETTE OFFSET PO
1062 RETURN
1070 REM SET SPRITE 0,X0.Y0
1071 VPOKE $1,$FC12,X0 AND $FF
1072 VPOKE $1,$FC13,(X0 AND $0300)/$100
1073 VPOKE $1,$FC14,Y0 : REM YPOS 128
1074 VPOKE $1,$FC15,$00
1075 RETURN
1080 REM SET SPRITE IMG DATA
1081 VPOKE $1,$FC10,D0
1082 RETURN
4999 REM SPRITE DATA BELLOW
5000 DATA $00, $00, $09, $99, $99, $90, $0E, $00
5001 DATA $00, $00, $99, $99, $99, $99, $0E, $00
5002 DATA $00, $00, $99, $99, $97, $90, $0E, $00
5003 DATA $00, $09, $99, $99, $79, $99, $0E, $00
5004 DATA $00, $00, $99, $79, $79, $70, $0E, $00
5005 DATA $00, $99, $9E, $97, $77, $9E, $0E, $00
5006 DATA $00, $09, $99, $9E, $E9, $90, $0E, $00
5007 DATA $09, $EE, $99, $77, $77, $79, $0E, $00
5008 DATA $0E, $7E, $E9, $EE, $EE, $77, $EE, $E0
5009 DATA $0E, $9E, $E9, $EE, $9E, $97, $77, $90
5010 DATA $0E, $EE, $E9, $97, $79, $09, $77, $90
5011 DATA $0E, $EE, $99, $EE, $EE, $90, $99, $00
5012 DATA $09, $E9, $9E, $EE, $EE, $90, $00, $00
5013 DATA $00, $99, $99, $99, $99, $90, $00, $00
5014 DATA $00, $00, $97, $79, $97, $79, $00, $00
5015 DATA $00, $00, $97, $77, $99, $77, $90, $00
6000 DATA $00, $00, $09, $99, $99, $90, $00, $00
6001 DATA $00, $00, $99, $99, $99, $99, $00, $E0
6002 DATA $00, $00, $99, $99, $97, $90, $00, $E0
6003 DATA $00, $09, $99, $99, $79, $99, $00, $E0
6004 DATA $00, $00, $99, $79, $79, $70, $00, $E0
6005 DATA $00, $99, $9E, $97, $77, $9E, $0E, $00
6006 DATA $09, $EE, $99, $9E, $E9, $90, $0E, $00
6007 DATA $0E, $7E, $E9, $77, $77, $79, $0E, $00
6008 DATA $0E, $9E, $E9, $EE, $EE, $77, $EE, $00
6009 DATA $0E, $EE, $E9, $EE, $9E, $97, $77, $E0
6010 DATA $0E, $EE, $99, $97, $79, $09, $77, $90
6011 DATA $09, $E9, $99, $EE, $EE, $97, $99, $00
6012 DATA $00, $99, $9E, $EE, $EE, $97, $70, $00
6013 DATA $00, $97, $79, $99, $99, $77, $70, $00
6014 DATA $00, $97, $79, $99, $99, $77, $90, $00
6015 DATA $00, $09, $77, $99, $00, $00, $00, $00
10000 REM END PRG
User avatar
ahenry3068
Posts: 1219
Joined: Tue Apr 04, 2023 9:57 pm

Re: Experimentations/getting back into the thick of it.

Post by ahenry3068 »

Change THIS
1000 REM READ SPRITE DATA
1001 FOR I=O TO 255
1002 READ PX
1003 VPOKE $0,$4000+I,PX
1004 NEXT I
To THIS
REM VERA LOW ADDR
1000 POKE $9F20, 0     
REM VERA MID ADDR       
1001 POKE $9F21, $40
REM VERA HIGH ADDR, AUTOINCREMENT 1
1002 POKE $9F22, %00010000
1003 FOR I = 0 TO 255
1004 READ PX
1005 POKE $9F23, PX
1006 NEXT

This will load the sprite noticeably faster.

For the rest of the stuff.
Go HERE: https://github.com/X16Community/x16-doc ... 20BASIC.md

Look at the BASIC Commands SPRMEM, SPRITE, & MOVSPR
User avatar
BullboyAT05
Posts: 11
Joined: Mon Jun 24, 2024 12:36 am

Re: Experimentations/getting back into the thick of it.

Post by BullboyAT05 »

I change at what line then? The "REM SET SPRITE DATA" section at 1052? Or maybe elsewhere?

In any cases, thanks for the advice.
Last edited by BullboyAT05 on Wed Feb 26, 2025 2:33 pm, edited 1 time in total.
User avatar
BullboyAT05
Posts: 11
Joined: Mon Jun 24, 2024 12:36 am

Re: Experimentations/getting back into the thick of it.

Post by BullboyAT05 »

Here's some more of the sprites btw. Just finished to make the up and down ones.
Attachments
AzureAmazoness(big)001.png
AzureAmazoness(big)001.png (5.23 KiB) Viewed 8860 times
AzureAmazoness001.png
AzureAmazoness001.png (836 Bytes) Viewed 8860 times
User avatar
BullboyAT05
Posts: 11
Joined: Mon Jun 24, 2024 12:36 am

Re: Experimentations/getting back into the thick of it.

Post by BullboyAT05 »

Updated the code by starting back with a new sprite, but sadly, it says it has an error in 1004
100 SCREEN 3 : REM LORES
101 HM$=CHR$(19) : REM HOME CHARACTER
102 GOSUB 1000 : REM READ SPRITE DATA
103 GOSUB 1050 : REM SETUP SPRITE 0
104 Y0=150: FOR X=0 TO 255: X0=X: GOSUB 1070: NEXT: REM MOVE THE SPRITE
105 GOTO 10000
999 REM SPRITE ROUTINES
REM VERA LOW ADDR
1000 POKE $9F20, 0
REM VERA MID ADDR
1001 POKE $9F21, $40
REM VERA HIGH ADDR, AUTOINCREMENT 1
1002 POKE $9F22, %00010000
1003 FOR I = 0 TO 255
1004 READ PX
1005 POKE $9F23, PX
1006 NEXT
1050 REM INIT SPRITE
1051 POKE $9F29,($40 OR PEEK($9F29)): PO=0
1052 REM SET SPRITE DATA
1053 VPOKE $1,$FC11,$02 : REM 4BPP ADRESS $04000
1060 VPOKE $1,$FC16,$0C : REM NO COLLISIONS, ZDEPTH 3, NO FLIP
1061 VPOKE $1,$FC17, $50+PO : REM 16x16 PIXELS, PALETTE OFFSET PO
1062 RETURN
1070 REM SET SPRITE 0,X0.Y0
1071 VPOKE $1,$FC12,X0 AND $FF
1072 VPOKE $1,$FC13,(X0 AND $0300)/$100
1073 VPOKE $1,$FC14,Y0 : REM YPOS 128
1074 VPOKE $1,$FC15,$00
1075 RETURN
1080 REM SET SPRITE IMG DATA
1081 VPOKE $1,$FC10,D0
1082 RETURN
4999 REM SPRITE DATA BELLOW
5000 DATA $00, $00, $00, $99, $99, $90, $0E, $00
5001 DATA $00, $00, $09, $99, $99, $99, $0E, $00
5002 DATA $00, $00, $09, $99, $97, $90, $0E, $00
5003 DATA $00, $00, $99, $99, $79, $99, $0E, $00
5004 DATA $00, $00, $09, $79, $79, $79, $0E, $00
5005 DATA $00, $00, $9E, $97, $77, $9E, $0E, $00
5006 DATA $00, $00, $99, $99, $E9, $99, $0E, $00
5007 DATA $00, $9E, $E9, $77, $77, $79, $0E, $00
5008 DATA $00, $E7, $EE, $9E, $EE, $E7, $EE, $E0
5009 DATA $00, $E9, $EE, $9E, $9E, $97, $77, $90
5010 DATA $00, $EE, $EE, $99, $79, $09, $77, $90
5011 DATA $00, $EE, $E9, $EE, $EE, $90, $99, $00
5012 DATA $00, $9E, $97, $7E, $EE, $E9, $00, $00
5013 DATA $00, $99, $77, $77, $99, $99, $00, $00
5014 DATA $00, $00, $77, $77, $99, $79, $00, $00
5015 DATA $00, $00, $97, $79, $99, $90, $00, $00


10000 REM END PRG
EDIT. I added the second sprite, it works now
100 SCREEN 3 : REM LORES
101 HM$=CHR$(19) : REM HOME CHARACTER
102 GOSUB 1000 : REM READ SPRITE DATA
103 GOSUB 1050 : REM SETUP SPRITE 0
104 Y0=150: FOR X=0 TO 255: X0=X: GOSUB 1070: NEXT: REM MOVE THE SPRITE
105 GOTO 10000
999 REM SPRITE ROUTINES
REM VERA LOW ADDR
1000 POKE $9F20, 0
REM VERA MID ADDR
1001 POKE $9F21, $40
REM VERA HIGH ADDR, AUTOINCREMENT 1
1002 POKE $9F22, %00010000
1003 FOR I = 0 TO 255
1004 READ PX
1005 POKE $9F23, PX
1006 NEXT
1050 REM INIT SPRITE
1051 POKE $9F29,($40 OR PEEK($9F29)): PO=0
1052 REM SET SPRITE DATA
1053 VPOKE $1,$FC11,$02 : REM 4BPP ADRESS $04000
1060 VPOKE $1,$FC16,$0C : REM NO COLLISIONS, ZDEPTH 3, NO FLIP
1061 VPOKE $1,$FC17, $50+PO : REM 16x16 PIXELS, PALETTE OFFSET PO
1062 RETURN
1070 REM SET SPRITE 0,X0.Y0
1071 VPOKE $1,$FC12,X0 AND $FF
1072 VPOKE $1,$FC13,(X0 AND $0300)/$100
1073 VPOKE $1,$FC14,Y0 : REM YPOS 128
1074 VPOKE $1,$FC15,$00
1075 RETURN
1080 REM SET SPRITE IMG DATA
1081 VPOKE $1,$FC10,D0
1082 RETURN
4999 REM SPRITE DATA BELLOW
5000 DATA $00, $00, $00, $99, $99, $90, $0E, $00
5001 DATA $00, $00, $09, $99, $99, $99, $0E, $00
5002 DATA $00, $00, $09, $99, $97, $90, $0E, $00
5003 DATA $00, $00, $99, $99, $79, $99, $0E, $00
5004 DATA $00, $00, $09, $79, $79, $79, $0E, $00
5005 DATA $00, $00, $9E, $97, $77, $9E, $0E, $00
5006 DATA $00, $00, $99, $99, $E9, $99, $0E, $00
5007 DATA $00, $9E, $E9, $77, $77, $79, $0E, $00
5008 DATA $00, $E7, $EE, $9E, $EE, $E7, $EE, $E0
5009 DATA $00, $E9, $EE, $9E, $9E, $97, $77, $90
5010 DATA $00, $EE, $EE, $99, $79, $09, $77, $90
5011 DATA $00, $EE, $E9, $EE, $EE, $90, $99, $00
5012 DATA $00, $9E, $97, $7E, $EE, $E9, $00, $00
5013 DATA $00, $99, $77, $77, $99, $99, $00, $00
5014 DATA $00, $00, $77, $77, $99, $79, $00, $00
5015 DATA $00, $00, $97, $79, $99, $90, $00, $00

5016 DATA $00, $00, $00, $99, $99, $90, $00, $00
5017 DATA $00, $00, $09, $99, $99, $99, $00, $E0
5018 DATA $00, $00, $09, $99, $97, $90, $00, $E0
5019 DATA $00, $00, $99, $99, $79, $99, $00, $E0
5020 DATA $00, $00, $09, $79, $79, $79, $00, $E0
5021 DATA $00, $99, $9E, $97, $77, $9E, $0E, $00
5022 DATA $00, $EE, $99, $99, $E9, $99, $0E, $00
5023 DATA $0E, $7E, $E9, $77, $77, $79, $0E, $00
5024 DATA $0E, $0E, $E9, $EE, $EE, $E7, $EE, $00
5025 DATA $0E, $EE, $E9, $9E, $0E, $07, $77, $E0
5026 DATA $0E, $EE, $99, $99, $70, $09, $77, $90
5027 DATA $00, $E9, $99, $9E, $EE, $E9, $99, $00
5028 DATA $00, $99, $09, $EE, $EE, $77, $90, $00
5029 DATA $00, $00, $09, $99, $97, $77, $70, $00
5030 DATA $00, $00, $09, $79, $97, $77, $70, $00
5031 DATA $00, $00, $00, $99, $99, $77, $00, $00

10000 REM END PRG
User avatar
ahenry3068
Posts: 1219
Joined: Tue Apr 04, 2023 9:57 pm

Re: Experimentations/getting back into the thick of it.

Post by ahenry3068 »

Here's another way. BASLOAD source code.

Code: Select all

    SCREEN 3 : REM LORES
    HM$=CHR$(19) : REM HOME CHARACTER
    GOSUB LOADSPRITEDATA : REM READ SPRITE DATA
    GOSUB INITSPRITE : REM SETUP SPRITE 0

    Y0=150: FOR X0=0 TO 255 STEP 1:  GOSUB SETSPRITE: NEXT: REM MOVE THE SPRITE

    REM ALSO TRY
    REM
     Y0=150: FOR X0=0 TO 255 STEP 2:SLEEP:GOSUB SETSPRITE: NEXT: REM MOVE THE SPRITE

    GOTO ENDPROG
    REM SPRITE ROUTINES

LOADSPRITEDATA:
     POKE $9F20, 0
     POKE $9F21, $40
     POKE $9F22, %00010000
     FOR I = 0 TO 255
     READ PX
     POKE $9F23, PX
     NEXT
     RETURN

INITSPRITE:
     REM INIT SPRITE
     REM POKE $9F29,($40 OR PEEK($9F29)): PO=0


     REM SET SPRITE DATA
     REM VPOKE $1,$FC11,$02 : REM 4BPP ADRESS $04000

     SPRMEM 0, 0,$4000, 0

     REM VPOKE $1,$FC16,$0C : REM NO COLLISIONS, ZDEPTH 3, NO FLIP
     REM VPOKE $1,$FC17, $50+PO : REM 16 PIXELS, PALETTE OFFSET PO

     SPRITE 0,3,0,0,1,1

     RETURN

REM SET SPRITE 0,X0.Y0
SETSPRITE:

  REM REMOVE REMARK TO MAKE IT MORE REASONABLE SPEED
   REM SLEEP
   MOVSPR 0, X0,Y0
   RETURN


     REM SET SPRITE IMG DATA
     VPOKE $1,$FC10,D0
     RETURN
     REM SPRITE DATA BELLOW
SPRITEDATA:
     DATA $00, $00, $00, $99, $99, $90, $0E, $00
     DATA $00, $00, $09, $99, $99, $99, $0E, $00
     DATA $00, $00, $09, $99, $97, $90, $0E, $00
     DATA $00, $00, $99, $99, $79, $99, $0E, $00
     DATA $00, $00, $09, $79, $79, $79, $0E, $00
     DATA $00, $00, $9E, $97, $77, $9E, $0E, $00
     DATA $00, $00, $99, $99, $E9, $99, $0E, $00
     DATA $00, $9E, $E9, $77, $77, $79, $0E, $00
     DATA $00, $E7, $EE, $9E, $EE, $E7, $EE, $E0
     DATA $00, $E9, $EE, $9E, $9E, $97, $77, $90
     DATA $00, $EE, $EE, $99, $79, $09, $77, $90
     DATA $00, $EE, $E9, $EE, $EE, $90, $99, $00
     DATA $00, $9E, $97, $7E, $EE, $E9, $00, $00
     DATA $00, $99, $77, $77, $99, $99, $00, $00
     DATA $00, $00, $77, $77, $99, $79, $00, $00
     DATA $00, $00, $97, $79, $99, $90, $00, $00
     DATA $00, $00, $00, $99, $99, $90, $00, $00
     DATA $00, $00, $09, $99, $99, $99, $00, $E0
     DATA $00, $00, $09, $99, $97, $90, $00, $E0
     DATA $00, $00, $99, $99, $79, $99, $00, $E0
     DATA $00, $00, $09, $79, $79, $79, $00, $E0
     DATA $00, $99, $9E, $97, $77, $9E, $0E, $00
     DATA $00, $EE, $99, $99, $E9, $99, $0E, $00
     DATA $0E, $7E, $E9, $77, $77, $79, $0E, $00
     DATA $0E, $0E, $E9, $EE, $EE, $E7, $EE, $00
     DATA $0E, $EE, $E9, $9E, $0E, $07, $77, $E0
     DATA $0E, $EE, $99, $99, $70, $09, $77, $90
     DATA $00, $E9, $99, $9E, $EE, $E9, $99, $00
     DATA $00, $99, $09, $EE, $EE, $77, $90, $00
     DATA $00, $00, $09, $99, $97, $77, $70, $00
     DATA $00, $00, $09, $79, $97, $77, $70, $00
     DATA $00, $00, $00, $99, $99, $77, $00, $00
ENDPROG:
 END
Try It Now!

Pretty much copied your logic. Just so you could follow it a bit better.
Attachments
SPRITEB.PRG
(1.7 KiB) Downloaded 162 times
spriteb.bas
(2.75 KiB) Downloaded 157 times
User avatar
BullboyAT05
Posts: 11
Joined: Mon Jun 24, 2024 12:36 am

File Download Re: Experimentations/getting back into the thick of it.

Post by BullboyAT05 »

Followed the guide: https://x16docs.dreamtracker.org/#index.html
And made test sprites into .bin via this program: https://notin.tokyo/X16tiles/
Here's the resulting code
10 BVLOAD "AZAMTEST001.BIN",8,1,$3000
20 SPRMEM 0,0,$3000,0
30 SPRITE 1,3,0,0,1,1
40 MOVSPR 1,320,200
50 GOTO 60
60 MOVSPR 1,480,200
70 GOTO 40
Main problem here is that the sprites in .bin come out as giberish while it's supposed to be a character (Maybe I've put the wrong values or that the file needs to be named a certain way like all being in caps directly or something like that). At least the mini loop I did with MOVSPR works (I do like the effect), even if I expected translation from a point to another rather than rerendering the sprite from top to bottom so directly.

At least it's sure that I'm least learning, to some extent.
Attachments
azamtest001.bin
(8 KiB) Downloaded 126 times
azamtest000.bin
"This one was exported with the 2 Byte header option activated"
(8 KiB) Downloaded 128 times
User avatar
ahenry3068
Posts: 1219
Joined: Tue Apr 04, 2023 9:57 pm

Re: Experimentations/getting back into the thick of it.

Post by ahenry3068 »

BullboyAT05 wrote: Fri Feb 28, 2025 6:29 pm Followed the guide: https://x16docs.dreamtracker.org/#index.html
And made test sprites into .bin via this program: https://notin.tokyo/X16tiles/
Here's the resulting code
10 BVLOAD "AZAMTEST001.BIN",8,1,$3000
20 SPRMEM 0,0,$3000,0
30 SPRITE 1,3,0,0,1,1
40 MOVSPR 1,320,200
50 GOTO 60
60 MOVSPR 1,480,200
70 GOTO 40
Main problem here is that the sprites in .bin come out as giberish while it's supposed to be a character (Maybe I've put the wrong values or that the file needs to be named a certain way like all being in caps directly or something like that). At least the mini loop I did with MOVSPR works (I do like the effect), even if I expected translation from a point to another rather than rerendering the sprite from top to bottom so directly.

At least it's sure that I'm least learning, to some extent.
Haven't had a chance to look at your Sprite BIN yet but 2 things. If your BIN has the two byte header you use VLOAD NOT BVLOAD.
(You could BVLOAD to $2998 but that's missing the point...lol) . The second is to make sure that if you exported as 4bpp then your setting 4bpp with SPRMEM or likewise if it's an 8bpp sprite.
Post Reply