DMA to VRAM from RAM

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Tue Jun 04, 2013 11:08 pm

Chilly Willy wrote:Doesn't make a sound. Not crashing, though.
Strange. May be I upload driver, then send play command, but after it, driver init his memory and clear all things, such as command FIFO. I will add delay.
Chilly Willy wrote:Maybe you forgot that the length you pass to copy_tiles is one less than the number of tiles to copy (for the dbra).
Only after you say about copy_tiles and length, I understood which of w x y z you said. wxyz - from VRAM, not on screen!
Now I understand what realy happens. Tiles from w to arrow, and may be after, filled with trash in VRAM.
Why I confused before: I use DMA only for upload and update tile map into plane A.

I think, problem is: again, not correct DMA last access.
Last access sets destination of DMA and starts DMA process.
As we can see, sometimes, some tiles trashed. From this fact, I conclude that this way of set destination of DMA not stable. To replace tiles from w, needs to send command $2EE00080
So, I replaced move.l, with two move.w

Again, here is new ROM: http://elektropage.ru/r57shell/GEMS_Player_cut_dma.bin
Image

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Jun 04, 2013 11:46 pm

Still no sound. Select arrow still corrupted.

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Wed Jun 05, 2013 12:04 am

Sorry, me = stupid idiot. Now updated, before not. :(
Image

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Jun 05, 2013 12:21 am

r57shell wrote:Sorry, me = stupid idiot. Now updated, before not. :(
:lol:

I do that all the time when debugging... "Did I rebuild that, or not???"

Anywho, the select arrow is okay now, but still no sound and the counters no longer advance. Looks like something crashed.

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Wed Jun 05, 2013 12:46 am

Argh I don't get it! I just added wait_vblank before play song, and replaced last .l access in dma into two .w access.
Removed play song. If it will not work, then .w last access don't work, then everything blows up, because I saw many examples of it in games :S.
Same link.

Example from game

Code: Select all

8F02 ; inc 2
8174 ; dma on display on vblank on
93049400 ; length
95AA96B0 ; source low, mid
977F7800 ; source high, dest low
0082     ; dest high <- last access
8164     ; dma off display on vblank on
all move (a0)+,($C00006).
Last edited by r57shell on Wed Jun 05, 2013 12:59 am, edited 1 time in total.
Image

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Jun 05, 2013 12:59 am

This one runs - the counters advance and the pad state is shown... no music, but I don't know if this one was supposed to have music.

You're getting there! You've got the DMA for the tiles working (no corrupted chars), the counters advance, the pad reads correctly. Now to just get that pesky music working...

Oh, and the select arrow doesn't move on the screen. None of the fields update on screen, either.

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Wed Jun 05, 2013 1:12 am

At last!
1) Only .w last access from RAM. At least for DMA from RAM.
2) DMA ON flag remains.
Turned on controls: http://elektropage.ru/r57shell/Player.bin
Reply in Demos section.
Image

Post Reply