Jump to content
IGNORED

C-64 sound problem after loading


Recommended Posts

I just finished programming a music program into my Commodore 64 in BASIC. I ran it before saving, and it worked fine. I saved it and turned the computer off, then back on and loaded it, then typed 'list' to make sure all the lines of the program were there. They were. So I ran it. All that I could hear was (the best way I can describe it) a clicking sound rather than the musical melody that was there before saving and loading. The program ran for it's regular cycle and exited like it was supposed to, but the sound was messed up. I tried this a few times with the same results. Thinking that perhaps my sound chip was burned out, I loaded games on both cartridge and floppy disk. They worked fine. So my next step was to type the program again, save it under a different name and on a different disk, and run it. Same results.The last thing I did was turn the computer off and back on, then type the program into it again. I ran it without saving and it worked fine. Bad drive maybe? It's just weird that I can load it and the program shows all the lines, but it won't work right. And only after loading it from a 5.25 floppy. Any ideas or thoughts?

 

Just so you know, I am doing this on original hardware. I am using an actual breadbox C64 with a 1541 disk drive and disks that were brand new in the packages(DD Fujifilm). They formatted just fine too. Any advice you can give would be appreciated. Thanks guys!

Link to comment
Share on other sites

The other program you loaded from floppy disk, though plays sounds as it should? I'm thinking if there would be something with the CIA that for any reason, unknown to me, would affect the SID.

 

You can enable simple sound directly from the BASIC prompt just to ensure you get anything:

S=54272:POKES+24,15:POKES+6,240:POKES+1,150:POKES+4,33

 

would give you a rather shrill sawtooth sound that goes on and on until you hit RUN/STOP + RESTORE or type POKES+4,32.

 

I remember the SID chip may be mapped in at a few locations, of which 54272 ($D400) is the default one and the other are shadow locations. Make sure your program actually accesses it from 54272 and no other weird address that may be incompletely decoded.

Link to comment
Share on other sites

The other program you loaded from floppy disk, though plays sounds as it should? I'm thinking if there would be something with the CIA that for any reason, unknown to me, would affect the SID.

 

You can enable simple sound directly from the BASIC prompt just to ensure you get anything:

S=54272:POKES+24,15:POKES+6,240:POKES+1,150:POKES+4,33

 

would give you a rather shrill sawtooth sound that goes on and on until you hit RUN/STOP + RESTORE or type POKES+4,32.

 

I remember the SID chip may be mapped in at a few locations, of which 54272 ($D400) is the default one and the other are shadow locations. Make sure your program actually accesses it from 54272 and no other weird address that may be incompletely decoded.

Yes, the other programs on floppy play sounds fine.I've enabled the sound program too as you pointed out. It seems fine. It is only a problem after I save it to a floppy then load, and try to run it. And 54272 is the right access location. It's weird, man. It's like my Commodore is possessed or something. haha! I'll keep checking and let you know what I find out. Thanks so much for the reply. I appreciate it!

Link to comment
Share on other sites

Would it be a lot of trouble posting the program here? As you're able to load other software from a newly powered on computer, and the sound works in those but not in your program, makes me curious. If your program would playback only after powering on and loading it again, but not immediately after saving it to disk, I would start investigating around the CIA chips anyway, although I'm not sure exactly what I was expecting to find.

 

You're using a breadbox. Are you never having trouble starting it? As you may know, the PLA chip (memory management) in those is a ticking bomb, and a majority of broken breadboxes are due to the PLA giving up. Perhaps you're having a partial failure around there, but then I would presume any program you load would fail in the same manner.

Link to comment
Share on other sites

Would it be a lot of trouble posting the program here? As you're able to load other software from a newly powered on computer, and the sound works in those but not in your program, makes me curious. If your program would playback only after powering on and loading it again, but not immediately after saving it to disk, I would start investigating around the CIA chips anyway, although I'm not sure exactly what I was expecting to find.

 

You're using a breadbox. Are you never having trouble starting it? As you may know, the PLA chip (memory management) in those is a ticking bomb, and a majority of broken breadboxes are due to the PLA giving up. Perhaps you're having a partial failure around there, but then I would presume any program you load would fail in the same manner.

Problem solved! Well sort of anyway. I do not know how I did not remember, but I had an old commodore 128 in my closet. I just thought about it last night before going to bed. So I got up this morning and hooked the same disk drive up to it. Then I loaded the program from the same disk with the computer in c64 mode. It worked fine! I'm at work now, so I do not have access to the program. But if you still want to see it, I'll post it here later tonight or tomorrow. It is just a small 20 line program full of a lot of pokes. But for now, my problem is solved. I will also look into the chip issue that you mentioned. Anything is possible with these old machines. Thanks so much for your help!

  • Like 1
Link to comment
Share on other sites

Good that you found another solution, although this sounds rather peculiar:

 

1. If you type in POKEs in direct mode or in a program and run it, you get sound

2. If you load someone else's program onto this C64 and run it, you get sound

3. If you load your program onto another computer and run it, you get sound

4. If you load your program onto this C64 and run it, you don't get sound

 

Any chip errors should occur no matter which program you load, IMHO.

 

Something else you can try after loading your program:

 

SYS 64738 (soft reset)

POKE 2050,8 (restore first line)

0 (to rebuild line pointers)

RUN

 

Watch out for trying to add more lines into the program at this point, as it will crash the computer. It is like poor man's OLD command but without full editing capacity.

 

If you get sound from your program after a soft reset that should restore most chips, something is happening after the LOAD. If it still doesn't work, something Else is at fault.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...