Discovery...
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Discovery...
If 68K accesses VDP, it affects the bank access of z80. Yesterday I put a PCM playing in background in my game, and every more intense VDP access made the sample rate drop a little. The higher the sample rate the bigger the effect.
Also when 68K is halted in MD mode (MD has SMS mode too), z80 can't access bank, and gets halted aswell (until 68K gets unhalted). If you bomb the VDP too fast, it'll pull up DTACK! signal which halts 68K until VDP has its business done, so in that period, z80 has difficulty getting data from its bank. Thats my idea what happens, anyone different ideas ?
Also when 68K is halted in MD mode (MD has SMS mode too), z80 can't access bank, and gets halted aswell (until 68K gets unhalted). If you bomb the VDP too fast, it'll pull up DTACK! signal which halts 68K until VDP has its business done, so in that period, z80 has difficulty getting data from its bank. Thats my idea what happens, anyone different ideas ?
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:
I believe that when you push too much datas to the VDP, it will lock the 68K on a BUS cycle then Z80 can't access the 68000 BUS anymore at the same time. You can avoid that by checking the VDP FIFO full/empty flag. It doesn't work on Gens (Fudged) but it does on real hardware, this permit to avoid some BUS lock to the Z80 (for 68K it doesn't change anythink as you have to wait anyway).
Last edited by Stef on Thu May 31, 2007 11:52 am, edited 1 time in total.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
I wonder what happens when you do a DMA
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: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
There's always something that limits MDs sound capabilities !!!Why !!!??? Why !!!???
I must try it out, I want to see what happens. I believe it just halts, but you'll never know unless you try it out
I must try it out, I want to see what happens. I believe it just halts, but you'll never know unless you try it out
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: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
This really affects high quality samples, where you'll hear problem too well. You listened my tune, percussions will sound the same once I finish my tracker and MD Music & Sound Engine (MSE). Cymbals get really sucky when something interrupts the sound processing process, and I must keep the quality high as if I don't cymbals sound too sucky (more like Shhh Shhh not TSHHhhh...
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: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Well, the sample set is near half a megabyte and almost half of it are cymbals... I can't do that
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: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Z80 does ALL the dirty work, 68K just has to load the driver and issue commands, nothing else. BTW your ADPCM demo is really nice.
There will be 2ch mixing at 22KHz, very similiar to Shiru's 4ch mixer.
There will be 2ch mixing at 22KHz, very similiar to Shiru's 4ch mixer.
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: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Another discovery: YOU DO NOT HAVE HALT Z80 WHEN YOU ARE GOING DO A DMA TRANSFER. Z80 stops itself, and leaves a nasty gap into the sound if you transfer 320x480 pixels of tiles. But if the images are small it is not so big deal. No crashes or halts or any other issues.
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: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Maybe some models do crash, but I'll leave that to be found out by beta tester, but when my game is in a half finished state...
Also, is there any DMA issues on real hardware ? My DMA routine doesn't always work correctly on Fusion and MD.
Here's my code, is there any bugs in it ? :
Also, is there any DMA issues on real hardware ? My DMA routine doesn't always work correctly on Fusion and MD.
Here's my code, is there any bugs in it ? :
Code: Select all
LoadTiles: ; D0=Start tile , D3=tiles , A0=Source address
LSL.W #5, D0 ; modifying routines, uses DMA
SWAP D0
CLR.W D0
SWAP D0
MOVE.L D0, D2
LSL.L #2, D2
CLR.W D2
SWAP D2
AND.L #$3FFF, D0
SWAP D0
OR.L D0, D2 ; Add rest of the Address bits
LSL.W #4, D3
MOVE.W D3, D0
JSR DoDMAtoVRAM
RTS
DoDMAtoVRAM: ; Does DMA to VRAM
MOVE.L #CPORT, A1
MOVE.L A0, D1 ; D0 = WORDs to transfer
LSR.L #1, D1 ; D2 = VRAM address
MOVE.L D1, A0 ; A0 = source address
MOVE.W D0, D1
AND.W #$00FF, D1
OR.W #$9300, D1
MOVE.W D1, (A1)
LSR.W #8, D0
OR.W #$9400, D0
MOVE.W D0, (A1)
MOVE.L A0, D0
MOVE.W #$9500, D1
OR.B D0, D1
MOVE.W D1, (A1)
LSR.L #8, D0
MOVE.W #$9600, D1
OR.B D0, D1
MOVE.W D1, (A1)
LSR.L #8, D0
AND.B #$7F, D0
MOVE.W #$9700, D1
OR.B D0, D1
MOVE.W D1, (A1)
OR.L #$40000080, D2
MOVE.L D2, (A1)
RTS
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: 159
- Joined: Sat Feb 24, 2007 11:35 pm
- Location: San Antonio, TX
I don't use DMA right now (aside from the VDP memory clear at startup), but I have seen a case where a DMA fill cleared one more character cell on real hardware than on the MESS emulator. Since I thought I was doing it right and don't know why the real hardware was clearing more than I thought it should, I just disabled it in favor of a write loop.TmEE co.(TM) wrote:Maybe some models do crash, but I'll leave that to be found out by beta tester, but when my game is in a half finished state...
Also, is there any DMA issues on real hardware ? My DMA routine doesn't always work correctly on Fusion and MD.
So it is entirely possible that an emulator could be emulating DMA incorrectly.