For 2 ch play, you should use a complete different logic, do not use your 1 ch player code. I fixed some timing bugs with my 2 ch player and now it's doing 13.5 Khz on emulator and something as 13.2 Khz on real hardware (Z80 is waiting for 68K bus).TmEE co.(TM) wrote:Fully featured means you can Stop/Pause, give commands - things like that.
It runs very fast but still, If I try to make 2ch player, I can't get over 10KHz !!! All the slowdowns lie in changing banks. I'll upload it tomorrow
how can i do music on megadrive?
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
What kind of different logic ? My method works perfectly, but is slow, because changing bank kills the sample rate. My 1ch code is a big optimization exercize: My first 1ch could go 16KHz and latest 4 times faster !!!
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
I've been doing so much z80 programming last days, that I have started to stare at my ASM help "z80 Destination <- Source, 68K Source -> Destination" - I'm constantly switching operands in my 68K code !!! Just like when I started 68K programming
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
hehe, i got many troubles with 68k programming because of that. I did a lot of x86 assembly (no AT&T) in past...TmEE co.(TM) wrote:I've been doing so much z80 programming last days, that I have started to stare at my ASM help "z80 Destination <- Source, 68K Source -> Destination" - I'm constantly switching operands in my 68K code !!! Just like when I started 68K programming
z80 assembly seems logic for me =)
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
I started with x86 (to speed up my QB stuff), then I moved to MD dev and really started to like 68K and now z80 too. I still like 68K more because I'm spoiled by its flexibilityStef wrote:hehe, i got many troubles with 68k programming because of that. I did a lot of x86 assembly (no AT&T) in past...
z80 assembly seems logic for me =)
Anyone want me to finish my MIDI tracker so I can make a MD tracker ?
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
OOPS, I forgot the source But I can upload it today evening
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Source of my 64KHz playback system (32KB) http://www.hot.ee/tmeeco/DWNLOADS/64KHZ.RAR
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Thanks, very interesting, that gimme some ideas
Edit : now my fastest DAC play loop takes something between 34 and 38 cycles. That mean a rate of ~100 Khz. I believe we reached the limit of Z80, i'm not sure we can do a faster sample player The code can still handle command but no more variable playback rate. Anyway it was just a test
Edit : now my fastest DAC play loop takes something between 34 and 38 cycles. That mean a rate of ~100 Khz. I believe we reached the limit of Z80, i'm not sure we can do a faster sample player The code can still handle command but no more variable playback rate. Anyway it was just a test
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Can I see yours ? It sounds very awesome (and fast )
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
In fact i just did a test with that. I give you the main loop part which is the important part :TmEE co.(TM) wrote:Can I see yours ? It sounds very awesome (and fast )
loop
LD A, (DE) ; (7-8 ) get sample
LD (HL), A ; (7-8 ) put sample to dac
INC E ; (4) increment source address
JR Z, carry_E ; (7-8 )
DJNZ loop ; (13) decrement wav len
...
7+7+4+7+13 = 38 cycles = 94210 Hz
8+8+4+8+13 = 41 cycles = 87317 Hz
oups, i was wrong, my loop does between 38 and 41 cycles so it's not exactly 100 Khz
Edit: I inverted HL and DE in the loop, fixed now :p (anyway i guess you noticed it)
Last edited by Stef on Fri Mar 09, 2007 9:21 am, edited 3 times in total.
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
I'll try it out !!! PS I don't count cycles, I just watch the last result
I just gave a thought on it, it is extremely grealt idea to use DJNZ, but sample rate variations hurt ears, I'm going to figure out a workaround
I just gave a thought on it, it is extremely grealt idea to use DJNZ, but sample rate variations hurt ears, I'm going to figure out a workaround
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
sample variation arrive only each 256/2 loop, which isn't that hurting imoTmEE co.(TM) wrote:I'll try it out !!! PS I don't count cycles, I just watch the last result
I just gave a thought on it, it is extremely grealt idea to use DJNZ, but sample rate variations hurt ears, I'm going to figure out a workaround
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Thats not hurting at all, mine does things after every 256 samples too
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
I was thinking about 1 thing: What would happen if VBL happens while you're changing bank
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen