![]() |
Using ZXbasic to add page banked IM music - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Gallery (https://www.boriel.com/forum/forumdisplay.php?fid=18) +---- Thread: Using ZXbasic to add page banked IM music (/showthread.php?tid=790) |
Using ZXbasic to add page banked IM music - emook - 02-18-2017 Hi, As a small challange I wanted to see if I could add music to games written with ADG by Jonathan Caudwell. ADG games usually take around 30k of memory starting from around 32000 so this leaves no room for music and playback. My idea was that I would swap in bank 4 (@49152) and set up my music and then an IM routine at 25500. The IM routine swaps to bank 4, plays a frame of music and swaps the bank back to 0 and allows the game to continue. Here's the code I came up with (the music routine and data have been compressed with zx7 to take up less space) An working example can be seen here with : http://torinak.com/qaop#128#l=http://zxbasic.uk/uploads/monty_tls.z80 Code: #include <memcopy.bas> Re: Using ZXbasic to add page banked IM music - boriel - 05-17-2017 OMG! I overlooked this msg!! ![]() This is awesome, and I actually thinking of using it. :!: |