Título: PT3 Replayer SCC patch Publicado por: WYZ en 11 de Diciembre de 2006, 10:51:57 pm Here you have the original pack: http://www.geocities.com/dioniso072/PT3_asMSX.zip replace code.rob.txt with: Código: .START Comienzo_Programa PT3_Stop .equ $c014 PT3_Init .equ $c020 PT3_Play .equ $c472 SCCSLOT EQU $E840 ;DB SLOT DEL SCC SCC_REG EQU $9880 ;SCC ADDRESS FUNCTION AYREGS EQU $C663 Comienzo_fichero: .incbin "pt3play.bin" ;PLAYER PT3 PARA MSX PT3_Song: .incbin "ijones.pt3" ;INCLUYE AQUI TU PT3 WAVESSCC: .INCBIN "WAVES.SCC" ;ARCHIVO DE ONDAS LONGITUD 4X$20 Comienzo_Programa: DI CALL DETECTSCC ;DETECTA EL SCC **** PROVISIONAL LD DE,$9800 ;COPIA ONDAS A LA TABLA LD HL,WAVESSCC LD BC,$20*4 LDIR LD HL,Comienzo_fichero ;SITUA EL PLAYER $C000 LD DE,$C000 LD BC,WAVESSCC-Comienzo_fichero LDIR ;PARCHEA EL PLAYER LD A,$CD ;OPCODE CALL LD [$C566],A LD HL,ROUT LD [$C567],HL LD A,$C9 ;OPCODE RET LD [$C569],A EI halt ld hl,PT3_Song call PT3_Init ;Inicializamos Main_Loop: halt call PT3_Play xor a call $00d8 ;Espacio pulsado? or a jp z,Main_Loop ;No=Volvemos a Main_Loop call PT3_Stop ;Apagamos los 3 canales del PSG. ret ;Y salimos. Fin_Fichero: ;VIENE DE PT3PLAY ROUT: LD HL,AYREGS ;REPRODUCE SONIDO EN PSG LOUT: OUT [C],A INC C OUTI DEC C INC A CP 13 JR NZ,LOUT OUT [C],A LD A,[HL] AND A JP M,SCCOUT INC C OUT [C],A ;CLONA SONIDO AL SCC ;CANALES PSG SCC ; A 1+4 ; B 2+5 ; C 3 SCCOUT: ;FRECUENCIA LD HL,[AYREGS+0] ;REPRODUCE SONIDO EN SCC LD [SCC_REG+0],HL DEC HL ;CHORUS EN CANAL 4 OPCIONAL LD [SCC_REG+6],HL ;* LD HL,[AYREGS+2] LD [SCC_REG+2],HL DEC HL ;CHORUS EN CANAL 5 OPCIONAL DEC HL LD [SCC_REG+8],HL ;* LD HL,[AYREGS+4] LD [SCC_REG+4],HL ;VOLUMEN LD A,[AYREGS+8] LD [SCC_REG+$0A],A LD [SCC_REG+$0D],A LD A,[AYREGS+9] LD [SCC_REG+$0B],A LD [SCC_REG+$0E],A LD A,[AYREGS+10] LD [SCC_REG+$0C],A RET ;DETECTA SCC **** PROVISIONAL 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 [SCCSLOT],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 [SCCSLOT],A CALL JC401 ;PUSH AF ;SOLO SI HAY DISCO ;LD A,[$F342] ;LD H,$80 ;CALL $0024 ;POP AF JR NC,JC3FC LD A,[SCCSLOT] SCF RET JC3FC: LD A,[SCCSLOT] 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 You will find attached an example WAVE.SCC file, any way you can create/rip your own one. This code needs no improve the SCC searching rutine. Título: Re: PT3 Replayer SCC patch Publicado por: WYZ en 11 de Diciembre de 2006, 11:07:40 pm DEMO CoT-SCC cover. :o
Título: Re: PT3 Replayer SCC patch Publicado por: Dioniso en 11 de Diciembre de 2006, 11:34:00 pm We have already talked about it WYZ. Good job.
I just would like you to change the link, please: http://www.geocities.com/dioniso072/pt3player.zip That's only the replayer, and already fixed, frikies ;) Título: Re: PT3 Replayer SCC patch Publicado por: Jon_Cortazar en 12 de Diciembre de 2006, 06:42:44 am Good job! :o :o :o :o
Título: Re: PT3 Replayer SCC patch Publicado por: KNM en 12 de Diciembre de 2006, 12:23:09 pm ¡ES QUE ESTAS COSAS ME PONEN CACHONDOOOOOOOO!
KNM MAAAAAAAAAS! ;D ;D ;D ;D ;D ;D ;D ;D Título: Re: PT3 Replayer SCC patch Publicado por: SapphiRe en 12 de Diciembre de 2006, 06:23:48 pm ¡¡Acojonante!! ¡¡Suena mejor de lo que me dijiste por teléfono!! :o :o
Título: Re: PT3 Replayer SCC patch Publicado por: burguera en 12 de Diciembre de 2006, 06:31:36 pm Great! It sounds great! :o
Título: Re: PT3 Replayer SCC patch Publicado por: e_sedes en 12 de Diciembre de 2006, 07:20:44 pm Hey, mooola! suena guapo, guapo!
Título: Re: PT3 Replayer SCC patch Publicado por: MsxKun en 12 de Diciembre de 2006, 10:55:59 pm Remola! Buen trabajo!
Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 13 de Diciembre de 2006, 12:14:35 am DEMO CoT-SCC cover. :o GREAT!! It sounds amazing!! Título: Re: PT3 Replayer SCC patch Publicado por: dvik en 14 de Diciembre de 2006, 09:40:26 am Wow! This forum needs bigger smileys. Thus is amazing. Really, really, really good :o :o
Título: Re: PT3 Replayer SCC patch Publicado por: dvik en 14 de Diciembre de 2006, 09:47:23 am I've been listening for an hour now and its still as good :guitar:
Título: Re: PT3 Replayer SCC patch Publicado por: jltursan en 14 de Diciembre de 2006, 11:31:55 am Indeed!, last day I was playing it for a looong time and I'm still shocked! :D
Título: Re: PT3 Replayer SCC patch Publicado por: Darth_Fistro en 19 de Abril de 2007, 02:21:04 pm Acongojante... qué digo, acojonante :D :D :D
Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 15 de Julio de 2007, 10:51:14 pm Hi WYZ
have you updated your code? I saw on MRC you spotted some bugs could you update the code here and release an update? Título: Re: PT3 Replayer SCC patch Publicado por: WYZ en 15 de Julio de 2007, 11:12:05 pm Not yet ARTRAG. I forgot it! In a few days I will upload a new versión which performs a search/patch rutine. (RAM)
Anyway the bugs reported to MRC was related to OpenMSX new version with improved SCC features and my own replayer ( It tries to read the SCC RAM) and now it's fixed. meanwhile, check the music from Shiru's PT3. Thanks to Shiru!! ;D EDIT: **** update new version ****reupdated*** ;D .txt modifies the file ??? Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 16 de Julio de 2007, 12:34:26 pm :'(
My current player works in ROM so your search/patch would not be very useful. It is easier if you write few lines of comment in order to guide us to patch the pt3 player ourself. Have you removed the issue about reading SCC ram ? Is this already reflected in the code at the beginning of this tread ? What you mean referring to Shiru's replayer ? Have you patched Shiru's replayer in order to work with the SCC ? That would be great! This was my purpose from the beginning! Can you release the asm ? BTW the rom you attach seems corrupted It hangs any msx i tried (I used bluemsx) PS I tried also openmsx, and it does not fits the correct size for 16K roms PPS :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? :'( ??? EDIT2 WYZ the new ROM "test2.rom" does not wok, BUT the newest ("test3.rom") rocks!!!! Título: Re: PT3 Replayer SCC patch Publicado por: WYZ en 16 de Julio de 2007, 09:40:04 pm @Artrag I'm checking the AYFX code and I have a not fixed Shiru's replayer fixed with the Dioniso's code!!!!
So please don't use it in a Real MSX. -->>> download this new one. Sorry!!! :( <<<-- Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 16 de Julio de 2007, 09:52:51 pm I just reported that test3.rom works great!
Please keep it. ;D Actually now both test.rom and test3.rom works great, what are you working on? Título: Re: PT3 Replayer SCC patch Publicado por: WYZ en 16 de Julio de 2007, 10:01:15 pm Test3.rom don't avoid to write wrong values to PSG. I download the Shiru's code from the MRC first post and it was not updated. That's all
Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 01 de Agosto de 2007, 10:48:34 pm @WYZ,
How is going you work on the PT3+FX+SCC replayer ? You promised to release the code, but since then I had no news from you ... In holiday time I have a bit more of spare time for msxing. ;D Do you need some support ? Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 03 de Agosto de 2007, 12:03:35 pm Hello
I'm finding that the SCC detection in WYZ seems to hang my code. WYZ 's code is here: http://karoshi.msxgamesbox.com/index.php?topic=562.0 and the SCC DETECT is this one Código: ;DETECTA SCC **** PROVISIONAL 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 [SCCSLOT],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 [SCCSLOT],A CALL JC401 ;PUSH AF ;SOLO SI HAY DISCO ;LD A,[$F342] ;LD H,$80 ;CALL $0024 ;POP AF JR NC,JC3FC LD A,[SCCSLOT] SCF RET JC3FC: LD A,[SCCSLOT] 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 Do anyone know why it does not work ? :'( :'( :'( EDIT MY fault, my code is switched away by the SCCDETECT code Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 06 de Agosto de 2007, 09:33:42 am After try and errors, it is time to recollect about the SCC.
SCC chip can be accessed using the area 9800h - 98FFh of page 3Fh of the slot where a Konami ROM with SCC is. So, at boot time I need to locate the slot where the SCC is Moreover, at each interrupt, I should: 1) enable the slot where the SCC is 2) set page 3Fh in Bank 3 of that Konami ROM (i.e. write 3Fh in (9000h) ) 3) access to area 9800h - 98FFh 4) set back my own slot and Bank I'm using an ASCII 8 mapper for my game, what about moving to different mapper, e.g. Konami5 ? If I understand, using as ROM mapper "Konami with SCC" means that all I need to do is to 1) set page 3Fh in Bank 3 of the Konami ROM (i.e. write 3Fh in (9000h) ) 2) access to area 9800h - 98FFh 3) set back Bank 3 to its previous value I would save two slot swaps. Moreover I do not need to detect the SCC as it is in my own slot... Can anyone confirm if this is the correct way of acting ? Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 08 de Agosto de 2007, 06:24:45 am I've spotted a problem in the code of WYZ
It does not control the mixer in the SCC. This is a issue, as when the PT3 player switches off a channel, the SCC continues to play that note. Here there is a patch to the WYZ's patch able to override the problem, modify the code at the beginning of this tread with this routine: Código: LD HL,AYREGS ;REPRODUCE SONIDO EN PSG _LOUT: OUT (C),A INC C OUTI DEC C INC A CP 13 JR NZ,_LOUT OUT (C),A LD A,(HL) AND A JP M,SCCOUT INC C OUT (C),A ;CLONA SONIDO AL SCC ;CANALES PSG SCC ; A 1+4 ; B 2+5 ; C 3 SCCOUT: ;FRECUENCIA ld a,0x3fh ld (Bank3),a LD HL,(AYREGS+0) ;REPRODUCE SONIDO EN SCC LD (SCC_REG+0),HL DEC HL ;CHORUS EN CANAL 4 OPCIONAL LD (SCC_REG+6),HL ;* LD HL,(AYREGS+2) LD (SCC_REG+2),HL DEC HL ;CHORUS EN CANAL 5 OPCIONAL DEC HL LD (SCC_REG+8),HL ;* LD HL,(AYREGS+4) LD (SCC_REG+4),HL ;VOLUMEN LD A,(AYREGS+8) LD (SCC_REG+0x0A),A LD (SCC_REG+0x0D),A LD A,(AYREGS+9) LD (SCC_REG+0x0B),A LD (SCC_REG+0x0E),A LD A,(AYREGS+10) LD (SCC_REG+0x0C),A ;MIXER ld a,(AYREGS+AR_Mixer) ld b,a xor a bit 0,b jp nz,noA or 00001001B ; A-> ch 1 & 4 noA: bit 1,b jp nz,noB or 00010010B ; B-> ch 2 & 5 noB: bit 2,b jp nz,noC or 00000100B ; C-> ch 3 noC: ld (SCC_REG+0x0F),a RET Título: Re: PT3 Replayer SCC patch Publicado por: ARTRAG en 09 de Agosto de 2007, 07:37:35 am Replace the Mixer part with this code that is by far better (thanks to Vincent van Dam)
Código: ; MIXER ld a,(AYREGS+AR_Mixer) xor 7 ld b,a and 3 add a,a add a,a add a,a or b ld (SCC_REG+0x0F),a |