Psypoke
http://www.psypokes.com/forums/

Still making C64 programs
http://www.psypokes.com/forums/viewtopic.php?f=1&t=47152
Page 1 of 1

Author:  Lord Darksol [ Sun Nov 14, 2021 8:07 pm ]
Post subject:  Still making C64 programs

Yeah, I'm still doing stuff with the Commodore 64. And now I don't think I know everything, and my programs are a little less cringe.

Today I was working on an intro to a program I made. I made it under the name of a group my friend put together*. He wants me to write a fancy intro. The group is named VTC, or Very Terrible Code. We agreed to have the 3 letters printed in the middle of the screen, and to make them float up and down. I've made them use a sine wave (and my friend made me make them use the sine wave), and I'm pretty happy about it. I've also got them moving back and forth across the screen.

I wrote it in BASIC, so it's pretty slow. Tomorrow I'm going to try making the program in assembly. I'd use BASIC if I could, but it's unbearably slow. I also wanted to have some text scrolling across the screen, so that'll make it even slower. Once all that is sorted out, my friend will make music for it. He's a genius when it comes to making music.

There's one big problem I missed. I barely know any assembly! I guess I'm going to have to learn assembly and keep pretending I know what I'm doing.

Have a great day bots/non-existant readers!


*Shameless self promotion time! We make programs. Mostly s-h-i-tposty programs. (stop censoring my words psypokes. I don't like having to go back and add dashes) https://github.com/Very-Terrible-Code

Author:  Lord Darksol [ Mon Nov 15, 2021 9:51 am ]
Post subject:  Re: Still making C64 programs

I fixed the sprites! I think they're pretty good.
Image
The old sprites were nothing like the VTC logo. It'll be easy enough to swap them out (just replace some data statements). Also here, you can see everything moving.
https://youtu.be/JWL4Ra0TWmg
Once it's in assembly it'll run at a good speed. It'll be a pain to do, but it'll be worth it.

Author:  Lord Darksol [ Mon Nov 15, 2021 7:14 pm ]
Post subject:  Re: Still making C64 programs

I think my friend is unhappy with my decision to use a precalculated sine wave instead of having a fancy algorithm to move the letters up and down. I can see where he's coming from, but I think it'll have to be calculated beforehand. As stated before, I know barely any assembly. Writing a program to calculate a sine wave in assembly is past my level. And anyways, it'll be faster. I hope he's okay with it.
If not, he can write it himself.

When I'm designing sprites with spritemate, they look fatter than they actually are. So when I diplayed the letters, my C= was waaaaay thinner than expected. I'm going to have to work on it later.

Oh and here's something annoying. Often times I'll google (or use duckduckgo because duckduckgo is better) how to do something on the C64, and I'll find nothing. There are a lot of things that should be easy to find. But they aren't. My dad preposed the idea of a "cookbook" filled with information on how to do things, useful routines, and tips. Things like a text scroller or how to use seeds to get predictable results from RND(). Instead of searching through 246564 blog articles and github repositories, all that could be in one place. I love the idea, so I'm going to start compiling a list.

Even though 0 people will see this thread, I feel happy sharing all this. It's like a diary, but it's open to the non-existant public.

Author:  Lord Darksol [ Tue Nov 16, 2021 7:52 pm ]
Post subject:  Re: Still making C64 programs

I slacked off today. The most I did was try to figure out how to get an assembly program and BASIC program to build to the same .prg file. No luck, but I`ll duckduckgo it in the morning. Also, to the zero people to see this...

IPTB.
Coming eventually.

Do not ask me to elaborate. Have a good day!

Author:  Lord Darksol [ Wed Nov 17, 2021 5:18 pm ]
Post subject:  Re: Still making C64 programs

More sprites! This time I've got shadows.
Image
Now I'll try putting them in my program. See you all in a few minutes or a day.

Author:  Lord Darksol [ Wed Nov 17, 2021 5:41 pm ]
Post subject:  Re: Still making C64 programs

It works! There are a few things I missed, but it's pretty good. In my opinion at least.
Image

Author:  Lord Darksol [ Wed Nov 17, 2021 6:14 pm ]
Post subject:  Re: Still making C64 programs

Done for today.

With the emulator on warp mode:
Image
With the emulator running at the normal speed:
Image
You can see why this can't be done in BASIC. Waaaaaaay too slow.

Author:  Lord Darksol [ Thu Nov 18, 2021 6:35 pm ]
Post subject:  Re: Still making C64 programs

All I did today was make a repository and commit all my work. I also lied and said I was writing more code.

Author:  Lord Darksol [ Mon Nov 22, 2021 6:09 pm ]
Post subject:  Re: Still making C64 programs

Well, I got some sprites to move in assembly. Wow. It's crazy fast. Gotta go, but I'll be back tomorrow.

Author:  Lord Darksol [ Wed Nov 24, 2021 7:27 pm ]
Post subject:  Re: Still making C64 programs

I guess this isn't tomorrow. I didn't do much again. I still want to get this in working order, so don't worry about me forgetting to do stuff.

I need to figure out what goes where in the C64's memory. Right now all my assembly programs are being loaded to the same place (49152). I'm going to need to move one of them.

I also need to find a good fastloader. (one that I can butcher)

I'm going to head out. Midterms are here, so wish me luck. (with a 78, 82, 73, and 75, I'm gonna be in a fair amount of trouble)

Author:  Lord Darksol [ Tue Nov 30, 2021 4:53 pm ]
Post subject:  Re: Still making C64 programs

No, I'm not dead. Look here! This code, not written by me, will update all the sprite y positions, using a sine wave stored in mystr.

*=$c000

SPRITE0X = $d000
SPRITE0Y = $d001
SPRITE1X = $d002
SPRITE1Y = $d003
SPRITE2X = $d004
SPRITE2Y = $d005
SPRITE3X = $d006
SPRITE3Y = $d007
SPRITE4X = $d008
SPRITE4Y = $d009
SPRITE5X = $d00a
SPRITE5Y = $d00b

; call only on startup? SYS 49152
; depends on whether this is all one big blob
init lda #$1f
sta pointer
lda #$07
sta pointer+1
lda #$0f
sta pointer+2
; consider clearing kbd buffer
rts

; entry point for moving sprites vertically
; SYS (something)
update ldx pointer
inx
txa
and #$1f
sta pointer
ldx pointer+1
inx
txa
and #$1f
sta pointer+1
ldx pointer+2
inx
txa
and #$1f
sta pointer+2

ldx pointer
lda mystr,x
sta SPRITE0Y
sta SPRITE3Y
ldx pointer
lda mystr,x
sta SPRITE1Y
sta SPRITE4Y
ldx pointer
lda mystr,x
sta SPRITE2Y
sta SPRITE5Y

; write some text scroller thing
; or call another subroutine (JSR)

; learn to test for SPACE key to exit
rts

pointer byte $00,$00,$00
mystr text "dummy text cause i need dummy text"
byte $00


; replace mystr with sine wave

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/