just a sort of macro from sjasm
it means:
ld a,(hl)
inc hl
@dioniso
What about your new PT3 player?
Have you corrected the bug in the initialization?
btw I have sent to gasman the link to this page
and my ideas for patching its code.
My problem is that even if my code sounds average
I have ho idea about the fact that this version is an improvement
wrt the original version of the player (the speccy one)
Any idea on how to get a wav file with the original sound
from spectrum running the apology demo?
Hello ARTRAG.
The PT3player was never mine. It was coded mainly by Sergey Bulba. I ported it to MSX. And now, I want to make it shorter (Vortex Tracker II, with frequency table 2) for some coders who have RAM size problems in the MSXDev'05. The thing is that I thought that I could remove the initialization of the different frequency tables, volume tables, version, etc ... and cut the first 100 bytes of the PT3 module. The size is much shorter.
I also have a version without commands. But, as the version of the link, it still needs some cleaning. There are still code not used and hanging around the player; it needs to be clerared.
I sent this code to some coders of the MSXDev'05 and 'XL2S Entertainment' told me they already had thought about it, and they even use the player from ROM (better idea to save RAM space). Their code is better than the file of my link (first post of this topic), and adapted to their purposses.
I'm working on it, making it smaller and smaller. Whenever I have a "final" version I'll put it on-line. I have no MSX here with me, just a laptop, 266 Mhz ... so imagine. I have to go to the University to test the code in faster PCs ...
About the wave file ... obviously you don't have a Speccy. Try with an emulator ... Spectaculator is the best option, though shareware.
This is faster!!
;------------------ MACRO PsgW reg,value ld a,reg ; select AY channel A volume register ; 7 out (#A0),a ; 11 ld a,value ; 7 out (#A1),a ; and write back to the AY ; 11 ENDM ; total 36T ;------------------ MACRO Channel phychan,logchan,reg exx ; 4 ld a,logchan ; 4 xor reg ; flip the appropriate bits of the ; 4 ld reg,a ; stored levels ; 4 ld l,a ; 4 PsgW phychan,(hl) ; 36 exx ; 4 ENDM ; total 60T ;------------------ OUTPUT apo.com org #100 PsgW 7,10111111b ; turn off AY's wave generator ; 36T main di exx ld bc,#00 ld de,bc ld hl,vols exx ld ix,dat mainloop ldi a,(ix) : ld (bchan+1),a ldi a,(ix) : ld (cchan+1),a ldi a,(ix) : ld (dchan+1),a ldi a,(ix) : ld (echan+1),a ldi a,(ix) : ld (hchan+1),a ldi a,(ix) : ld (lchan+1),a ldi a,(ix) or a jp z,fin ld iyh,a ld iyl,0 ; registers b, c, d, e, h, l contain period counters for each channel. ; when they reach zero flip the square wave. loop dec b ; 4 jp nz,1F ; 10 bchan ld b,0 ; note period will be poked here Channel 8,01b,b 1 dec c ; 4 jp nz,2F ; 10 cchan ld c,0 Channel 8,10b,b 2 dec d ; 4 jp nz,3F ; 10 dchan ld d,0 Channel 9,01b,c 3 dec e ; 4 jp nz,4F ; 10 echan ld e,0 Channel 9,10b,c 4 dec h ; 4 jp nz,5F ; 10 hchan ld h,0 Channel 10,01b,d 5 dec l ; 4 jp nz,6F ; 10 lchan ld l,0 Channel 10,10b,d 6 dec iy ; 10 ld a,iyl ; 8 or iyh ; 8 jp nz,loop ; 10 ; total 36 + 6*14 = 120T jp mainloop fin ei ret ;------------------ ALIGN 256 vols db 0,13,13,15 dat db #1F,#27,#34,#4F,#67,#1F,#38,#29,#37,#42,#52,#6E,#A8,#38,#1E,#28 db #3C,#5F,#76,#BA,#50,#24,#28,#3D,#48,#61,#BB,#60,#1A,#27,#34,#4E db #4F,#7C,#78,#24,#28,#35,#47,#6B,#6B,#40,#24,#2A,#3B,#47,#6B,#D5 db #38,#1E,#2A,#3B,#47,#6B,#D5,#48,#20,#28,#3F,#50,#6A,#9F,#30,#1A db #35,#3F,#4F,#6A,#9F,#38,#13,#1E,#25,#3C,#5B,#B6,#70,#23,#27,#47 db #38,#5F,#B6,#40,#14,#22,#28,#44,#65,#C9,#60,#27,#2A,#4F,#5E,#7F db #BC,#50,#49,#56,#56,#6D,#7D,#D8,#30,#3D,#49,#56,#6D,#6D,#D8,#30 db #40,#51,#51,#6D,#A3,#D8,#30,#35,#40,#4F,#6A,#6A,#9C,#38,#1F,#33 db #3D,#67,#3D,#9E,#60,#3B,#3F,#5E,#6A,#6A,#9C,#50,#22,#39,#51,#6A db #A4,#A4,#60,#3E,#46,#6A,#6A,#A6,#A6,#60,#3B,#4F,#5E,#78,#BD,#Bb db #2C,#2F,#4F,#5E,#78,#BD,#BB,#2C,#29,#3B,#52,#67,#8B,#CD,#2C,#22 db #3A,#52,#67,#8A,#CD,#34,#16,#21,#2C,#6F,#DE,#DD,#58,#28,#2D,#51 db #76,#74,#E7,#50,#19,#25,#32,#4B,#97,#EA,#50,#2E,#34,#4E,#5C,#82 db #FF,#50,#28,#3A,#52,#89,#CF,#CF,#2C,#22,#3A,#52,#89,#CF,#CF,#2C db #1C,#2C,#38,#4B,#5A,#9D,#2C,#2D,#4D,#39,#4C,#5B,#9D,#30,#34,#3A db #45,#68,#A6,#A6,#50,#28,#3A,#52,#89,#CF,#CF,#28,#22,#3A,#52,#89 db #CF,#CF,#28,#1C,#2C,#38,#4B,#5A,#9D,#28,#2D,#4D,#39,#4C,#5B,#9D db #30,#34,#3A,#45,#68,#A6,#A6,#50,#28,#3A,#52,#89,#CF,#CF,#30,#22 db #3A,#52,#89,#44,#CF,#30,#1C,#2E,#38,#4B,#60,#9E,#24,#26,#4B,#61 db #74,#61,#F3,#24,#30,#61,#EA,#74,#61,#F3,#28,#34,#44,#67,#8F,#A4 db #A4,#40,#34,#4E,#67,#9A,#BA,#BA,#40,#34,#52,#6A,#6B,#D6,#D7,#30 db #3B,#4F,#5E,#6B,#D6,#D7,#30,#46,#53,#69,#76,#D6,#D7,#60,#1D,#24 db #31,#49,#61,#8F,#40,#25,#32,#3A,#4A,#64,#93,#40,#1B,#24,#36,#56 db #6A,#AB,#40,#21,#25,#38,#42,#58,#AB,#48,#18,#24,#30,#74,#92,#Fb db #70,#21,#25,#31,#42,#63,#C5,#30,#21,#27,#31,#42,#63,#C5,#30,#1C db #27,#31,#42,#63,#C5,#48,#1D,#25,#31,#49,#63,#92,#A0 block 7,0
@dioniso
Link Broken
Just to know. Is the replayer a .com or a .bas file?
Is it possible to have BASIC Instructions to insert in our listing?
Where to find freeware PT3 files?
Regards !!!
PS: what about a basic replayer of .skm music files from SymBos?
9 year old post! C'mon Giuseve, really!?
Anyway, we have a better pt3 player, but it's just z80 asm source code.
To be able to be used in Basic we would need to create a .BIN file with a way to place .pt3 music files on the "hidden" RAM during basic for 64k ram machines (Conversions need 64k machines anyway)...
I'll have to do that for one of my projects, but that's unfortunately on hold now, so...
Maybe someone else knows something that's already ready.
Rgds,
HB
Please correct me if I'm wrong, but as far as I know, there is no way to play PT3 files in MSX BASIC (although I really wish there was).
You need to either do it in assembly, or call that very ASM player code in (Z80) C.
Nyyrikki did it in a basic loader with fantastic audio and video effects.
I saw the call of a xbasic.bin then to the music.psg+a memory address and then some poke.
He said to me the music is a simple pt3 file used with bload+ an header.
Gulp.
I think nyyrikki is a genius, while i am a poor basic coder that need to make 1+1=2 and no more
So i am looking for something easier.
Some pt3 or psg freeware files
A basic code or/and a bload command to load and execute it in the background
I think nyyrikki is a genius
You think? He fucking is. Every MSX coder cries (of joy) when he sees how simple NYYRIKKI solves any problem.
If you are looking for free PT3 files, just download the full VT II package here:
http://bulba.untergrund.net/vortex_e.htm
open "Modules for test" but don't forget to be polite and credit the original composer if you use it in your production. :)
PS: what about a basic replayer of .skm music files from SymBos?
These are compiled Starkos Modules. Z80 source codes (for the MSX as well) are included here:
http://www.julien-nevo.com/arkos/tools/ArkosTracker1_0.zip