Título: Sound custom chip (SCC) detection Publicado por: WYZ en 21 de Marzo de 2006, 12:58:42 pm Snippet extracted from Konami games code
Código: DETECTSCC: LD BC,$0400 LD HL,$FCC1 JC3B8: PUSH BC PUSH HL LD A,[HL] BIT 7,A JR NZ,JC3C5 LD A,C CALL JC3E5 JR JC3C8 JC3C5: CALL JC3D5 JC3C8: POP HL POP BC RET C INC HL INC C DJNZ JC3B8 LD A,$FF LD [SCCTEMP],A RET JC3D5: AND $80 OR C LD B,04 JC3DA: PUSH BC CALL JC3E5 POP BC RET C ADD A,$04 DJNZ JC3DA RET JC3E5: LD [SCCTEMP],A CALL JC401 ;PUSH AF ;may be you will need to patch these lines ;LD A,[$F342] ;LD H,$80 ;CALL $0024 ;POP AF JR NC,JC3FC LD A,[SCCTEMP] SCF RET JC3FC: LD A,[SCCTEMP] AND A RET JC401: LD H,$80 CALL $0024 LD A,02 LD [$9000],A CALL JC415 JR C,JC420 LD A,$3F LD [$9000],A JC415: LD HL,$9800 LD A,[HL] CPL LD [HL],A CP [HL] JR NZ,JC420 SCF RET JC420: OR A RET and write &H3F at $9000 adress as per Eduardo Robsy request. Título: Re: Sound custom chip (SCC) detection Publicado por: pitpan en 21 de Marzo de 2006, 01:42:33 pm Thank you, WYZ. It looks promising!
Título: Re: Sound custom chip (SCC) detection Publicado por: KNM en 21 de Marzo de 2006, 07:54:29 pm This ROCKS!! :guitar: :guitar: :guitar: :guitar: :guitar: :guitar: :guitar: :guitar: :guitar: :guitar:
KNM SCC Roolz! 8) Título: Re: Sound custom chip (SCC) detection Publicado por: jltursan en 22 de Marzo de 2006, 08:56:12 pm ¡Yep!, ¡very useful routine! :)
Título: Re: Sound custom chip (SCC) detection Publicado por: BiFiMSX en 30 de Mayo de 2007, 10:56:56 am If you're going to make a ROM game which uses SCC, it's a bit strange to detect the SCC as it will most likely be available in the game slot anyway. Nonetheless the code can be used to do other detections as well... like other cartridges, RAM in a certain page or MSX-MUSIC.
Título: Re: Sound custom chip (SCC) detection Publicado por: WYZ en 30 de Mayo de 2007, 02:31:20 pm or a second SCC.
Título: Re: Sound custom chip (SCC) detection Publicado por: SapphiRe_MSX en 30 de Mayo de 2007, 02:33:40 pm Or the first SCC if you load the (of course, public domain) .rom file on your real MSX.
|