Weird problem with SGDK on REAL hardware

SGDK only sub forum

Moderator: Stef

Hik
Very interested
Posts: 68
Joined: Thu Jul 30, 2015 11:39 pm
Location: Iceland

Re: Weird problem with SGDK on REAL hardware

Post by Hik » Sun Sep 25, 2016 9:46 pm

I think it's got something to do with the dma.c (my rom works fine on the emulators I have)
To be honest I don't know what the issue is either other than it just displaying blackscreen on a friend's real hardware.
I don't have my mega drive working so I can't test it myself and I'm not really sure how to program the fix for it.
It looks like doragasu made a fix but would that work on the latest version of SGDK?

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Weird problem with SGDK on REAL hardware

Post by Stef » Mon Sep 26, 2016 8:26 am

Hik wrote:I think it's got something to do with the dma.c (my rom works fine on the emulators I have)
To be honest I don't know what the issue is either other than it just displaying blackscreen on a friend's real hardware.
I don't have my mega drive working so I can't test it myself and I'm not really sure how to program the fix for it.
It looks like doragasu made a fix but would that work on the latest version of SGDK?
Doragasu just replaced some of its own code (borrowed from Shiru) by the SGDK method, so normally if you are already using SGDK methods for DMA you should not experience problem.
In fact we found an issue on MD1 VA0 when the Z80 access 68K BUS while a DMA is occurring, in that particular case you can experience crash or freezes only on these systems. A way to avoid it is indeed to disable Z80 while DMA occurs (but that destroy PCM playback quality) or correctly time Z80 code so it never access 68K BUS during DMA operation.

Post Reply