Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 12, 2014 17:38:02 GMT
Hello, I've been on-off working on a game since the summer and after (manually) migrating it from AGD 3 to AGD 4.6 have finally completed it. I am trying to add AY music made in Soundtracker.
I've followed the method given in the manual but, have to admit the 'remainder' part is losing me a little.
My game starts at memory address 30406.
The values Soundtracker gave me are: Init Song: 28464 Play Song: 28470 Delay Set: 29548 Length: 1942
In my intro event I input:
ASM 205 ASM -----****This is the one I'm messing up I think - the remainder**** ASM 111
Any help would be appreciated
|
|
|
Post by egotrip on Nov 14, 2014 12:56:14 GMT
I only use the CPC version. But if you want to convert your 16 bit number to two 8 bit numbers so you can call it from assembly, what I do is this:
Open up Calculator. Go into Programmer mode. Type in the number in DEC mode if necessary, then convert it to HEX.
So for Init Song: 28464 is 6F30 in HEX.
Split the HEX into 2. 6F and 30. 6F is 111 in DEC, and 30 is 48 in DEC. Reverse them after the CALL opcode (205)
So you will have: ASM 205 ASM 48 ASM 111
Hope this helps.
|
|
|
Post by Jonathan Cauldwell on Nov 14, 2014 20:02:47 GMT
That's right.
Another way would have been to multiply the 111 by 256 to give 28416, then subtracting that from your Init Song address of 28464 to get 48.
Basically, 28464 / 256 = 111 remainder 48.
28464 / 256 = 111 256 * 111 = 28416 28464 - 28416 = 48
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 14, 2014 20:15:20 GMT
That's great, thanks - I was in completely the wrong frame of mind with that one! Hello Jonathan, and everybody, - my game is called CAP'N RESCUE and I'm hoping to submit it to World of Spectrum in the next couple of days. I was literally just about to submit it without music, but I understand what to do now. Thankyou! I used version 4.6 of AGD to make this game, and this will be my first ever game, and on my old pal the ZX Spectrum too
|
|