It is currently Wed Jul 18, 2018 9:18 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Mar 30, 2018 1:32 am 
Offline

Joined: Fri Feb 16, 2018 5:52 am
Posts: 13
Location: Ukraine
I create a SNES on FPGA. And now I tested several small games with simple LoROM mapper (Dr.Mario, Super Mario World 1, Tetris Attack, Battletoads, Tom and Jerry, Daffy Duck, Sim Sity). All tested games works well. But one game (Sim Sity) works with damaged sprites (and backgrounds, and objects).

I found that the problem disappears if I temporarily remove dram refresh mode in SCPU module. I'm thinking the problem in DMA. I can't understand how DMA should work during dram refresh cycle.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2018 3:04 am 
Offline
User avatar

Joined: Mon Jan 23, 2006 7:47 am
Posts: 117
(Afaik) DMA can't work during DRAM refresh; for each cycle of the 21MHz clock the 5A22 has these priorities:

Code:
1. [if DRAM refresh] step the DRAM refresh state machine
2. [if DMA]          if DMA      delay counter = 0 then step the DMA engine;  increment the DMA      delay counter (reset at 8)
3.                   if bus hold delay counter = 0 then step the 65c816 core; increment the bus hold delay counter (reset at 6, 8 or 12, depending on the value on the 65c816 core's address bus)


Last edited by creaothceann on Sat Mar 31, 2018 5:09 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Mar 30, 2018 11:23 pm 
Offline

Joined: Fri Feb 16, 2018 5:52 am
Posts: 13
Location: Ukraine
You're right, and I did the same in my project, active REFRESH signal disable CPU core and DMA, only delay counter I have one (common for DMA and 65c816). I'll rewrite the code DMA/HDMA.

creaothceann wrote:
2. [if DMA]          if DMA      delay counter = 0 then step the DMA engine;  increment the DMA      delay counter (reset at 12)

In my opinion: for DMA reset at 8.


Top
 Profile  
 
PostPosted: Sat Mar 31, 2018 5:10 am 
Offline
User avatar

Joined: Mon Jan 23, 2006 7:47 am
Posts: 117
Yeah... fixed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group