Megacd timing issues and solutions (PCM, HINT, DMA...)
Posted: Sun Mar 11, 2007 5:33 pm
Well, as you may imagine, I start to do silly thing with the hardware
Here is a list of :
- Trying to set HINT enable while the vdp is on display period imediately reset the main cpu, even if the HINT code is situated in megadrive ram (if situated in workram, it will hang anyway).
Workaround -> Do not use HINT at all ;P
- Reading outside the "autorized" areas imediately reset the maincpu
Workaround -> Clean your code ;P
- Trying to enable the play of one pcm channel (different from channel0) work randomely (75% of time, the play command is ignored)
Sample code to reset a pcm channel (to make it play, the channel settings were set before) :
pc=(unsigned char *) 0xFF0011;*pc=0xE2;//Stop Channel1 only
pc=(unsigned char *) 0xFF000F;*pc=0x80+0x40+1;//Select channel1
pc=(unsigned char *) 0xFF000D;*pc=0x80;//Make it START at 0x8000
pc=(unsigned char *) 0xFF0011;*pc=0xE0;//Start all channels
Workaround -> Not found... Maybe i need to add some nops?
If someone have an idea about the pcm channel, it would be great
Here is a list of :
- Trying to set HINT enable while the vdp is on display period imediately reset the main cpu, even if the HINT code is situated in megadrive ram (if situated in workram, it will hang anyway).
Workaround -> Do not use HINT at all ;P
- Reading outside the "autorized" areas imediately reset the maincpu
Workaround -> Clean your code ;P
- Trying to enable the play of one pcm channel (different from channel0) work randomely (75% of time, the play command is ignored)
Sample code to reset a pcm channel (to make it play, the channel settings were set before) :
pc=(unsigned char *) 0xFF0011;*pc=0xE2;//Stop Channel1 only
pc=(unsigned char *) 0xFF000F;*pc=0x80+0x40+1;//Select channel1
pc=(unsigned char *) 0xFF000D;*pc=0x80;//Make it START at 0x8000
pc=(unsigned char *) 0xFF0011;*pc=0xE0;//Start all channels
Workaround -> Not found... Maybe i need to add some nops?
If someone have an idea about the pcm channel, it would be great