| |
Slammer
Registered: Feb 2004 Posts: 416 |
Kick Assembler Thread 2
The previous thread took a little long to load, so this is a new fresh one.. |
|
... 592 posts hidden. Click here to view all posts.... |
| |
Mace
Registered: May 2002 Posts: 1799 |
I'd like to do a LoadBinary and redistribute the bytes into the memory in another way than in the original file.
Byte 1 @ $x000
Byte 2 @ $x040
Byte 3 @ $x080
Byte 4 @ $x0c0
.
.
.
Byte 9 @ $x001
Byte 10@ $x041
.
.
.
Byte 17@ $x002 etc.
In other words: byte 1 + n*8 in order, byte 2 + n*8 etc.
My solution now is:
.var theData = LoadBinary "data.prg"
.for (var TelA=0; TelA<8; TelA++) {
.pc = NewData + TelA*64
.for (var TelB=0; TelB<64; TelB=TelB) {
.byte theData.get(TelA + [TelB*8])
}
}
Is there a quicker way to do this?
Like, with some nifty scripty thingy? |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Something like this?
.fill theData.size(), theData.get(mod(i,8)*$40 + floor(i/8))
|
| |
Mace
Registered: May 2002 Posts: 1799 |
Exactly! \o/
Thanks, I knew it was possible, but those floor and mod always seem to slip my mind...
|
| |
Lobogris Account closed
Registered: Oct 2010 Posts: 22 |
Hi! I am coding a nice (double Y) text scroller. It repeats infinitely starting from the start, over an over again.
Lately I had implemented a SID file (from the HSVC) with the Loadsid function of Kickass, and it works cool... but when the SID comes to silence, it doesn't repeat again.
I'll put a "jsr music.init" as soon as someone tells me how to detect that a song has ended playing. Thanks a lot.
|
| |
Mace
Registered: May 2002 Posts: 1799 |
Do some SID hacking, find the register that shows the song has ended.
Or find the editor in which the SID is made and change the end into a loop.
Of use a SID that loops. |
| |
Lobogris Account closed
Registered: Oct 2010 Posts: 22 |
thanks mace, I was asking here to avoid doing things like that, wondering if kickass has an easier or comfortable way to know the end of the sid. |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Guess there is a little misunderstanding. KickAssebler just helps you read the sid file format. Inside is the musicdata and a player, so when you do jsr music.init / jsr music.play you call the init routine and player thats stored in that particular sidfile.
KickAssembler has nothing to do with how the player works, so if you do some SidHacking, you have to do it each time you change sid.
|
| |
Frantic
Registered: Mar 2003 Posts: 1641 |
The brute force no-brain way would be to just increase a counter each time the player is called, and then find out which value that actually corresponds to the end of the song, without looking inside the tune at all... Not necessarily that much of a hassle, and may not have take more time than peeking into the player flow anyway. |
| |
Lobogris Account closed
Registered: Oct 2010 Posts: 22 |
@Slammer: much clearer. I thought so. Just wondering what if there was something that escaped me in this regard.
an excellent idea, Frantic. I was thinking about a timer too.
I'll try it. |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Frantic: With Warpmode your approach might be the fastest way. |
Previous - 1 | ... | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ... | 61 - Next |