Author Topic: VRAM to VRAM DMA help  (Read 929 times)

touko

  • Hero Member
  • *****
  • Posts: 953
Re: VRAM to VRAM DMA help
« Reply #15 on: December 10, 2014, 09:30:10 PM »
From my old tests exactly 168 bytes per line(5 cycles are not used).
With the sync disabled between VDC and VCE the transfer is slighty better because every cycle is used.
Are for all kind of DMA ??
« Last Edit: December 10, 2014, 09:52:18 PM by touko »

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: VRAM to VRAM DMA help
« Reply #16 on: December 10, 2014, 11:02:29 PM »
Kind of curious - how many xfer operations are you trying to do during one vblank ?
In each case, are you waiting sufficient time for the preceding one to complete before setting up the next ?

Or are you saying that you set up one - during the first vblank - and it never works again, on the next vblank or whatever ?

(also sounds like a status register may need to be given an acknowledgement).

I only do one DMA... tried 256 words up to 1024 words...

Acknowledgement, if it means reading $0000 each VBlank, yeah, that gets done automatically by MagicKit's include code.

Aladar

  • Newbie
  • *
  • Posts: 39
Re: VRAM to VRAM DMA help
« Reply #17 on: December 10, 2014, 11:33:29 PM »
From my old tests exactly 168 bytes per line(5 cycles are not used).
With the sync disabled between VDC and VCE the transfer is slighty better because every cycle is used.

Are for all kind of DMA ??
Tested only VRAM to VRAM DMA.
Results:
- 5.37 MHz: 168 bytes/line.
- 5.37 MHz (no VDC-VCE sync): ~170.5 bytes/line (with HSW=2, HDS=2, HDW=$1F and HDE=4).
- 7.16 MHz (no VDC-VCE sync): 227.5 bytes/line.
« Last Edit: December 11, 2014, 12:02:21 AM by Aladar »

touko

  • Hero Member
  • *****
  • Posts: 953
Re: VRAM to VRAM DMA help
« Reply #18 on: December 10, 2014, 11:45:42 PM »
Aaaah, this is excellent ...  :D
« Last Edit: December 10, 2014, 11:48:34 PM by touko »

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: VRAM to VRAM DMA help
« Reply #19 on: December 11, 2014, 06:42:00 AM »
Holy crap, that is fast: just think of 10.74mhz mode O_O
Now I'm really sad that the PCE didn't get the full 128k vram :/
« Last Edit: December 11, 2014, 06:43:44 AM by Bonknuts »

touko

  • Hero Member
  • *****
  • Posts: 953
Re: VRAM to VRAM DMA help
« Reply #20 on: December 11, 2014, 07:00:31 AM »
Holy crap, that is fast: just think of 10.74mhz mode O_O
Now I'm really sad that the PCE didn't get the full 128k vram :/
And for SGX ???, 13ko for each VDC in 512 pixels ..

touko

  • Hero Member
  • *****
  • Posts: 953
Re: VRAM to VRAM DMA help
« Reply #21 on: March 02, 2015, 09:53:12 PM »
Chris have you solved your DMA problems ???
I experienced a DMA problem when an auto DMA SAT update and a DMA VRAM->VRAM transfert occur at same time .
DMA vram->vram seems to be occur only once, or your sprite update can be also corrupted .
I think,is not good if the two DMA occur at same time, and one can be corrupted by the other if they are at the same time .

Soluce: Do a manual SAT DMA transfert, or start a vram->vram transfert when SAT update is entirely done (with DMA int) .
« Last Edit: March 02, 2015, 09:55:15 PM by touko »

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: VRAM to VRAM DMA help
« Reply #22 on: March 03, 2015, 05:52:55 AM »
Soluce: Do a manual SAT DMA transfert, or start a vram->vram transfert when SAT update is entirely done (with DMA int) .

Just in case this helps clarify what you're seeing ...

Quote
VRAM-SATB Block Transfer Source Address Register:

The VRAM-SATB block transfer source address register specifies the source start address for a VRAM-SATB block transfer.

The block transfer will not work normally if this register is updated during the VRAM-VRAM transfer cycle.

That warning applies when writing to any of block transfer registers (10, 11, 12 or 13) while a transfer is still in progess.

I'd guess that VRAM-SATB auto-repeat falls under this same restriction.
« Last Edit: March 03, 2015, 05:55:28 AM by elmer »

touko

  • Hero Member
  • *****
  • Posts: 953
Re: VRAM to VRAM DMA help
« Reply #23 on: March 03, 2015, 06:38:53 AM »
Quote
Just in case this helps clarify what you're seeing ...
In my sgx shmup SATB dma is not finished correctly, and sprites are not updated correctly (some are fixed on screen) ..

Quote
That warning applies when writing to any of block transfer registers (10, 11, 12 or 13) while a transfer is still in progess.
I do this at start of my frame (normaly all SATB dma were done), i set the dma vram->vram registers (for starting immediatly when vblank occur),and sometimes sprites are not entirely updated, or vram DMA is corrupted .
For information, i use the two VDC (sgx) int for vram dma ..

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: VRAM to VRAM DMA help
« Reply #24 on: March 03, 2015, 03:12:04 PM »
Quote
Just in case this helps clarify what you're seeing ...
In my sgx shmup SATB dma is not finished correctly, and sprites are not updated correctly (some are fixed on screen) ..

Quote
That warning applies when writing to any of block transfer registers (10, 11, 12 or 13) while a transfer is still in progess.
I do this at start of my frame (normaly all SATB dma were done), i set the dma vram->vram registers (for starting immediatly when vblank occur),and sometimes sprites are not entirely updated, or vram DMA is corrupted .
For information, i use the two VDC (sgx) int for vram dma ..


 So you've checked the DMA flag to make sure SATB dma finished? Maybe it's possible that you're getting double satb dma's in a single VCE frame. If you set the "vblank" frame to something really big (200 lines), it should prevent this (I've seen quite a few commercial games do this).

 I'd love to confirm some of these things, but I don't have a monitor to run my real system yet - so I can't test anything :/

touko

  • Hero Member
  • *****
  • Posts: 953
Re: VRAM to VRAM DMA help
« Reply #25 on: March 03, 2015, 07:14:14 PM »
Quote
So you've checked the DMA flag to make sure SATB dma finished?
No only try to enable satb dma int, but with no success(but i think this is because i use the system cd irq handler) .

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: VRAM to VRAM DMA help
« Reply #26 on: March 03, 2015, 08:57:05 PM »
I haven't looked at this since my last post, but I believe my code didn't even use sprites, and had SPR-RAM DMA disabled, etc.  Still, the VRAM to VRAM DMA didn't work.  All a mystery.

touko

  • Hero Member
  • *****
  • Posts: 953
Re: VRAM to VRAM DMA help
« Reply #27 on: March 04, 2015, 08:27:47 PM »
I solved my problem, i start my first DMA directly in vblank, and not in my main loop like before .