06-04-2012, 04:29 PM
britlion Wrote:Very nice little game, LCD. Very difficult, too - even on easy levels! There's never enough time to hit back. I was using poison a lot, and then realised that just shortens lifespan, and really doesn't stop the darned things. Mines seem to be the most winning.It probably uses the BEEP ROM routine which effectively changes IX (I also had this problem with BEEP). Your sub above could be optimized as:
I noticed it seems to crash occasionally - a couple of times when generating a landscape and once right after starting. There's some corruption occurring sometimes, somewhere...
LCD Wrote:By the way, I noticed that BeepFX crashes in ZXBC if is called inside a SUB:
Code:Sub BeepFX(effect as ubyte)
poke 60001,effect
asm
call 60000
end asm
end sub
I think that's because it corrupts the IX register. I've posted a HOWTO for a cleaner method of using it, I think - which pushes IX as part of the beepfx code, and pops it when back to ZXB. Also allows you to just #include assembly, rather than link binaries.
(I know you've seen that, LCD - but thought I'd mention it for anyone else reading this thread later!)
Code:
Sub FASTCALL BeepFX(effect as ubyte)
asm
push ix
ld (60001), a ; 8 bit fascalled params comes into A register
call 60000
pop ix
end asm
end sub