It is currently Thu Dec 12, 2024 6:26 am



Reply to topic  [ 11 posts ] 
 Still making C64 programs 
Author Message
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Sun Nov 14, 2021 8:07 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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.

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Mon Nov 15, 2021 9:51 am
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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.

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Mon Nov 15, 2021 7:14 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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!

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Tue Nov 16, 2021 7:52 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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.

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Wed Nov 17, 2021 5:18 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
It works! There are a few things I missed, but it's pretty good. In my opinion at least.
Image

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Wed Nov 17, 2021 5:41 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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.

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Wed Nov 17, 2021 6:14 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
All I did today was make a repository and commit all my work. I also lied and said I was writing more code.

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Thu Nov 18, 2021 6:35 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
Well, I got some sprites to move in assembly. Wow. It's crazy fast. Gotta go, but I'll be back tomorrow.

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Mon Nov 22, 2021 6:09 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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)

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Wed Nov 24, 2021 7:27 pm
Profile WWW
Pokemon Trainer
Pokemon Trainer
User avatar

Joined: Sun Feb 17, 2019 10:38 pm
Posts: 49
Location: Somewhere in Canada
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

_________________
My old posts are cringe.

Add me on Discord!
@rvtr


Tue Nov 30, 2021 4:53 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware for PTF.