I have my game that calls the tune with
Code: Select all
randomize usr val "60000"
Im using zx basic for the program. It's my first time adding music to a game, I feel like I'm so close lol - please help!
Code: Select all
randomize usr val "60000"
Maybe I can do this...Note that it is possible to join .TAP files by simply stringing them together; for example, in DOS / Windows: COPY /B FILE1.TAP + FILE2.TAP ALL.TAP ; or in Unix/Linux: cp file1.tap all.tap && cat file2.tap >> all.tap
Probably because the memory is clear, and the CPU executes a bunch of NOPs from address 40000 all the way to 60000. Try adding the following line in your loader before the RANDOMIZE USR statement:
Code: Select all
25 POKE 50000,201
Is that really true? The .tap format is pretty much made to facilitate concatenating, afaik. Each header+data chunk is self-contained, there is no meta-data across blocks.Ast A. Moore wrote: ↑Tue Feb 16, 2021 10:04 pm P.S. It’s not a good idea to concatenate TAP files, because aside from actual data, they contain additional information relevant to the container itself. You’ll end up with a bunch of garbage at the “joint” of the files.
So my loader code does not influence where the code goes in the spectrum memory, but the way beepola saves the code block does? This that correct?Ast A. Moore wrote: ↑Tue Feb 16, 2021 10:04 pm
Probably because the memory is clear, and the CPU executes a bunch of NOPs from address 40000 all the way to 60000. Try adding the following line in your loader before the RANDOMIZE USR statement:
This should drop you back into BASIC before the player routine starts executing.Code: Select all
25 POKE 50000,201
P.S. It’s not a good idea to concatenate TAP files, because aside from actual data, they contain additional information relevant to the container itself. You’ll end up with a bunch of garbage at the “joint” of the files.
Sure, you can concatenate it for use in an emulator. What I was warning against was using this method for merging the data chunks themselves.utz wrote: ↑Tue Feb 16, 2021 10:38 pmIs that really true? The .tap format is pretty much made to facilitate concatenating, afaik. Each header+data chunk is self-contained, there is no meta-data across blocks.Ast A. Moore wrote: ↑Tue Feb 16, 2021 10:04 pm P.S. It’s not a good idea to concatenate TAP files, because aside from actual data, they contain additional information relevant to the container itself. You’ll end up with a bunch of garbage at the “joint” of the files.
Because you leave out the argument in your LOAD "" CODE statement, the Spectrum will load the data at the address specified in the header (which is set by Beepola). If you want to force-load the code at an arbitrary address, you’ll need to specify it, i.e. LOAD "" CODE 45000. Note, however, that Beepola’s players are not freely relocatable. If you load and run them at an address other than what was specified in Beepola itself, you’ll likely crash the Spectrum.
It would matter if you put an address after CODE, i.eJbizzel wrote: ↑Tue Feb 16, 2021 10:39 pmSo my loader code does not influence where the code goes in the spectrum memory, but the way beepola saves the code block does? This that correct?Ast A. Moore wrote: ↑Tue Feb 16, 2021 10:04 pm
Probably because the memory is clear, and the CPU executes a bunch of NOPs from address 40000 all the way to 60000. Try adding the following line in your loader before the RANDOMIZE USR statement:
This should drop you back into BASIC before the player routine starts executing.Code: Select all
25 POKE 50000,201
P.S. It’s not a good idea to concatenate TAP files, because aside from actual data, they contain additional information relevant to the container itself. You’ll end up with a bunch of garbage at the “joint” of the files.
I will try as you suggest and load it all into fuse to create the tap file. I'm still grabbling with the very basics really! Thanks for your help @Ast A. Moore
Correct, except that those saves should be loads.
Code: Select all
Randomize usr val "60000"
Code: Select all
10 LET PlayerAddr = 60000
20 LET SongAddr = 61000
30 POKE PlayerAddr + 25,SongAddr - 256 * INT(SongAddr /2 56)
40 POKE PlayerAddr + 26,INT(SongAddr / 256)
You can save each song individually and then combine them into a single code block. I don’t remember if it’s possible to save Beepola’s players separately as well. If it is, you could do that. In any event, you can separate the song form the player at any time later and then move the song to a convenient place in memory.
It's definitely worth a shot, then. I've been reading music in one form or another since the launch of the Toastrack, so I'm well ahead on that front.Jbizzel wrote: ↑Wed Feb 17, 2021 11:40 pm @TMD2003 Its very easy - I mean it might sound crap, but its very easy to use.
it really depends on how musical you are. I can't read music but had a keyboard handy that meant I could try notes out and get a tune. Then I just repeated the tune in beepola.
compiling the track is easy too, beepola makes a tap file and gives you options for how the track will play in your game.
I haven't got as far as multiple tracks as in @Ast A. Moore example - I'm working towards that.
If you can read music then you should have no troubleTMD2003 wrote: ↑Thu Feb 18, 2021 4:06 pmIt's definitely worth a shot, then. I've been reading music in one form or another since the launch of the Toastrack, so I'm well ahead on that front.Jbizzel wrote: ↑Wed Feb 17, 2021 11:40 pm @TMD2003 Its very easy - I mean it might sound crap, but its very easy to use.
it really depends on how musical you are. I can't read music but had a keyboard handy that meant I could try notes out and get a tune. Then I just repeated the tune in beepola.
compiling the track is easy too, beepola makes a tap file and gives you options for how the track will play in your game.
I haven't got as far as multiple tracks as in @Ast A. Moore example - I'm working towards that.