processor 6502 include "vcs.h" include "macro.h" MAC Linea1old LDX #4 ; 192 Scanlines to Display LDY #0 .Draw_Picture LDA #8 STA $80 .DoblePasada STA WSYNC LDA {1},Y STA PF0 LDA Cero,Y STA PF1 LDA {2},Y STA PF2 SLEEP 4 LDA {3},Y STA PF0 LDA Cero,Y STA PF1 LDA {4},Y STA PF2 DEC $80 BNE .DoblePasada INY DEX BNE .Draw_Picture JMP Retorno ENDM MAC Linea2old LDX #4 ; 192 Scanlines to Display LDY #0 .Draw_Picture2 LDA #8 STA $80 .DoblePasada2 STA WSYNC LDA {1},Y STA PF0 LDA Cero,Y STA PF1 LDA {2},Y STA PF2 SLEEP 4 LDA {3},Y STA PF0 LDA Cero,Y STA PF1 LDA {4},Y STA PF2 DEC $80 BNE .DoblePasada2 INY DEX BNE .Draw_Picture2 JMP Retorno2 ENDM MAC Linea1 LDA <#{1} STA $92 LDA >#{1} STA $93 LDA <#{2} STA $94 LDA >#{2} STA $95 LDA <#{3} STA $96 LDA >#{3} STA $97 LDA <#{4} STA $98 LDA >#{4} STA $99 JSR Linea JMP Retorno ENDM MAC Linea2 LDA <#{1} STA $92 LDA >#{1} STA $93 LDA <#{2} STA $94 LDA >#{2} STA $95 LDA <#{3} STA $96 LDA >#{3} STA $97 LDA <#{4} STA $98 LDA >#{4} STA $99 JSR Linea JMP Retorno2 ENDM Gris = 8 Marron = 4*8 Verde = 3*16 + 10 Naranja = 4*16 + 10 Celeste = 9*16 + 14 Azul = 11*16 + 4 Amarillo = 2*16 + 14 ; es amarillo? Rojo = 6*16 + 4 ; es rojo? PunteroRoom = $86 PunteroRoomBKP = $8C TieneObjeto = 1 Guante = 2 Lamp = 4 Llave = 8 PushQ = 16 Dia2 = 32 Inventario = $8E ControlBoton = $8F Temp = $91 ScanLine1 = $9A ScanLine2 = $9B ScanLine3 = $9C ScanLine4 = $9D ScanLine5 = $9E ScanLine6 = $9F ScanLine7 = $A0 ScanLine8 = $A1 ScanLine9 = $A2 ScanLine10 = $A3 ScanLine11 = $A4 ScanLine12 = $A5 ScanLine13 = $A6 ScanLine14 = $A7 ScanLine1_2 = $A8 ScanLine2_2 = $A9 ScanLine3_2 = $AA ScanLine4_2 = $AB ScanLine5_2 = $AC ScanLine6_2 = $AD ScanLine7_2 = $AE ScanLine8_2 = $AF ScanLine9_2 = $B0 ScanLine10_2 = $B1 ScanLine11_2 = $B2 ScanLine12_2 = $B3 ScanLine13_2 = $B4 ScanLine14_2 = $B5 ;///////////////// Start of Code ///////////////////////////////////// SEG ORG $F000 Reset ; Clear RAM, TIA registers and Set Stack Pointer to #$FF SEI CLD LDX #$FF TXS LDA #0 Clear_Mem STA 0,X DEX BNE Clear_Mem LDA #$00 STA COLUBK ; Set Background to Black LDA #TieneObjeto STA Inventario LDA #2 STA $81 LDA <#0;Habitacion1 STA PunteroRoom STA PunteroRoomBKP LDA >#0;Habitacion1 STA PunteroRoom + 1 STA PunteroRoomBKP + 1 LDA <#Cursor1 STA $82 LDA >#Cursor1 STA $83 LDA <#Cursor2 STA $84 LDA >#Cursor2 STA $85 LDA <#DibujaHabitacion3;Calle1 STA $88 LDA >#DibujaHabitacion3;Calle1 STA $89 LDY #0 LDX #36;13 ;14 jmp llens Llenar LDA #0;Barras1,Y STA ScanLine1,X ;LDA Barras2,Y ;STA ScanLine1_2,X INY DEX BNE Llenar llens lda #0 sta ControlBoton lda #8 sta Temp lda #1 sta PunteroRoomBKP + 1 jsr Trace ;/////////////////// Picture Starts Here ///////////////////////////// Start_Frame LDA #8 STA COLUPF ; Start VSYNC LDA #2 STA VSYNC STA WSYNC STA WSYNC STA WSYNC ; 3 Scanlines of VSYNC LDA #0 STA VSYNC ; End VSYNC ; 37 Scanlines of Vertical Blank... LDX #37 Vertical_Blank STA WSYNC DEX BNE Vertical_Blank LDA #0 STA VBLANK ; Enable TIA Output ;////////////// Start To Draw Playfield /////////////////////////////// LDX #4 ; Frase 1 empieza mas arriba Tiempo STA WSYNC DEX BNE Tiempo JMP ($82);Frase1 Retorno LDA Cero STA PF0 STA PF1 STA PF2 STA WSYNC STA WSYNC STA WSYNC STA WSYNC STA WSYNC STA WSYNC JMP ($84);Frase2 Retorno2 LDA Cero STA PF0 STA PF1 STA PF2 LDA #1 STA CTRLPF JMP ($88) Retorno3 LDA #0 STA CTRLPF LDA Cero STA PF0 STA PF1 STA PF2 ldy #17;9 DibuMapi lda Mapita,y cpy Temp beq HayMap jmp HayMaps HayMap ora PunteroRoomBKP + 1 HayMaps sta WSYNC sta GRP0 lda Mapita2,y cpy Temp beq HayMap2 jmp HayMap2s HayMap2 ora $90 HayMap2s sta GRP1 sta RESP0 sta RESP1 dey bne DibuMapi ;LDX #184 LDX #70;80;90 ;112 DibujaCola STA WSYNC DEX BNE DibujaCola LDA SWCHA AND #%10000000 BEQ Decision3 LDA SWCHA AND #%01000000 BEQ Decision LDA SWCHA AND #%00010000 BEQ Decision2 LDA INPT4 BMI RetDeci BNE Boton ;Decision ;TogImg ; LDA $90 ; CMP #1 ; BEQ Uno ; LDA #1 ; STA $90 ; JMP RetDeci ;Uno ; LDA #0 ; STA $90 RetDeci ;////////////// End Of Display //////////////////////////////////////// LDA #%01000010 ; Disable VIA Output STA VBLANK ; 30 scanlines of overscan... LDX #10 Overscan STA WSYNC DEX BNE Overscan ; LDA $90 ; CMP #1 ; BEQ MostraImg JMP Start_Frame ;MostraImg ; JMP Start_Frame0 ; Build Next Frame ; Playfield generated by TIA Playfield Painter ; Mode Used = ASYMMETRICAL ; Playfields generated = PF0, PF1, PF2, PF3, PF4, PF5 ; Datas lines are reversed ; 192 Line(s) saved = 191 - 0 Decision3 lda ControlBoton beq escer dec ControlBoton beq escer jmp RetDeci escer lda #35 sta ControlBoton jmp RetDeci Decision LDA #0 STA SWCHA inc ControlBoton lda ControlBoton cmp #36;13 beq esetorc jmp RetDeci esetorc lda #0 sta ControlBoton Boton jmp RetDeci Decision2 ;inc PunteroRoom + 1 lda #36 sec sbc ControlBoton sec sbc #7 tay lda PunteroRoom + 1 clc adc ListaDeRumbos,y sta PunteroRoom + 1 lda ListaDeRumbos,y cmp #255 beq Izq cmp #1 beq Der cmp #241 beq ArrDer cmp #240 beq Arr cmp #239 beq ArrIzq cmp #15 beq AbIzq cmp #16 beq Ab cmp #17 beq AbDer Izq clc rol $90 rol PunteroRoomBKP + 1 jmp saTrace Der clc ror PunteroRoomBKP + 1 ror $90 jmp saTrace ArrDer clc ror PunteroRoomBKP + 1 ror $90 inc Temp jmp saTrace ArrIzq clc rol $90 rol PunteroRoomBKP + 1 inc Temp jmp saTrace AbDer clc ror PunteroRoomBKP + 1 ror $90 dec Temp jmp saTrace Ab dec Temp jmp saTrace Arr inc Temp jmp saTrace AbIzq clc rol $90 rol PunteroRoomBKP + 1 dec Temp saTrace jsr Trace jmp RetDeci Cero .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 Flecha .byte #%01000000 .byte #%11100000 .byte #%01000000 .byte #%01000000 Flecha2 .byte #%0000010 .byte #%0000111 .byte #%0000010 .byte #%0000010 Cursor1 Linea1 Flecha,Cero,Cero,Cero Cursor2 Linea2 Cero,Flecha2,Cero,Cero ALIGN 256 Habitacion1 .word Cursor1 .word Cursor2 .word Cursor1 .word Cursor2 .word #TieneObjeto .word #TieneObjeto .word #TieneObjeto .word #TieneObjeto .word #TieneObjeto .word #TieneObjeto .word #TieneObjeto .word #TieneObjeto .word Habitacion1 .word Habitacion1 .word Habitacion1 .word Habitacion1 ScanL0 .byte #0 Barras1 .byte #%11111111 .byte #%01111111 .byte #%00111111 .byte #%00011111 .byte #%00001111 .byte #%00000111 .byte #%00000011 .byte #%00000001 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 Barras2 .byte #%11111111 .byte #%11111111 .byte #%11111111 .byte #%11111111 .byte #%11111111 .byte #%11111111 .byte #%11111111 .byte #%11111111 .byte #%11111111 .byte #%11111110 .byte #%11111100 .byte #%11111000 .byte #%11110000 .byte #%11100000 Colores .byte #1 .byte #1 .byte #2 .byte #2 .byte #3 .byte #4;3 .byte #5;4 .byte #6;4 .byte #7;5 .byte #8;5 .byte #6 .byte #6 .byte #7 .byte #7 Linea LDX #4 ; 192 Scanlines to Display LDY #0 Draw_Picture LDA #8 STA $80 DoblePasada STA WSYNC LDA ($92),Y STA PF0 LDA Cero,Y STA PF1 LDA ($94),Y STA PF2 SLEEP 4 LDA ($96),Y STA PF0 LDA Cero,Y STA PF1 LDA ($98),Y STA PF2 DEC $80 BNE DoblePasada INY DEX BNE Draw_Picture RTS DibujaHabitacion3 lda #13;7 sta Inventario lda #36;13 sec sbc ControlBoton sta PunteroRoom ldx PunteroRoom ldy PunteroRoom ;LDX #13; 14 ; 192 Scanlines to Display ;LDY #0 LDA #Celeste ;SBC #13 ;STA $90 ;LDA #Verde ;SBC #11 ;LDA #0 ;STA $91 ;A0 Draw_PictureW LDA #4 STA $80 ;LDA $90 ;ADC #1 ;STA $90 ;INC $90 ;INC $91 ;A0 DoblePasadaW ;STX COLUPF ;LDA $91 ;A0 LDA ScanLine1 + 37,y ;Colores,Y STA COLUPF LDA #Gris ;$90 STA COLUBK STA WSYNC LDA ScanL0 STA PF0 LDA ScanLine1,X STA PF1 ;LDA #0;255;ScanLine1_2,X STA PF2 sleep 24 LDA #0 ;stx PunteroRoomBKP ;txa ;adc #13 ;tax ;lda ScanLine1,X ;ldx PunteroRoomBKP ;sleep 10 STA PF1 STA PF2 DEC $80 BNE DoblePasadaW dey;INY DEX beq lim jmp lims lim ldx #36;13 ldy #36;13 lims dec Inventario BNE Draw_PictureW JMP Retorno3 Luzz6 .byte 0, 0, 0, 0, 0, 0, 0,11,12, 0, 0, 0, 0, 0, 0, 0 .byte 0, 0, 0, 0, 0, 9,10, 0, 0,13,14, 0, 0, 0, 0, 0 .byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,15, 0, 0, 0, 0 .byte 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0,16, 0, 0, 0 .byte 0, 0, 6, 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 0, 0, 0, 0, 0, 0, 0, 0, 0 .byte 0,99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 Trace ldx #36 Borra lda #0 sta ScanLine1,x dex bne Borra ldy #255 tr sty PunteroRoomBKP lda Luzz6,y jsr Mover cmp Mapa,y bmi Hay ldy PunteroRoomBKP dey bne tr jmp Trace2 Hay ldy PunteroRoomBKP ldx Luzz6,y beq jup sty PunteroRoomBKP ldy #8 lda Barras1,y sta ScanLine1,x lda Colores,y sta ScanLine1 + 37,x ;lda Barras2,y ;sta ScanLine1_2,x ldy PunteroRoomBKP jup dey bne tr Trace2 ldy #255 tr2 sty PunteroRoomBKP lda Luzz5,y jsr Mover cmp Mapa,y bmi Hay2 ldy PunteroRoomBKP dey bne tr2 jmp Trace3 Hay2 ldy PunteroRoomBKP ldx Luzz5,y beq jup2 sty PunteroRoomBKP ldy #7 lda Barras1,y sta ScanLine1,x sta ScanLine1+1,x lda Colores,y sta ScanLine1 + 37,x sta ScanLine1 + 38,x ;lda Barras2,y ;sta ScanLine1_2,x ;sta ScanLine1_2+1,x ldy PunteroRoomBKP jup2 dey bne tr2 Trace3 ldy #255 tr3 sty PunteroRoomBKP lda Luzz4,y jsr Mover cmp Mapa,y bmi Hay3 ldy PunteroRoomBKP dey jmp Trace4 rts Hay3 ldy PunteroRoomBKP ldx Luzz4,y beq jup3 sty PunteroRoomBKP ldy #6 lda Barras1,y sta ScanLine1,x sta ScanLine1+1,x lda Colores,y sta ScanLine1 + 37,x sta ScanLine1 + 38,x ;lda Barras2,y ;sta ScanLine1_2,x ;sta ScanLine1_2+1,x ldy PunteroRoomBKP jup3 dey bne tr3 Trace4 ldy #255 tr4 sty PunteroRoomBKP lda Luzz3,y jsr Mover cmp Mapa,y bmi Hay4 ldy PunteroRoomBKP dey bne tr4 jmp Trace5 Hay4 ldy PunteroRoomBKP ldx Luzz3,y beq jup4 sty PunteroRoomBKP ldy #5 lda Barras1,y sta ScanLine1,x sta ScanLine1+1,x lda Colores,y sta ScanLine1 + 37,x sta ScanLine1 + 38,x ;lda Barras2,y ;sta ScanLine1_2,x ;sta ScanLine1_2+1,x ldy PunteroRoomBKP jup4 dey bne tr4 Trace5 ldy #255 tr5 sty PunteroRoomBKP lda Luzz2,y jsr Mover cmp Mapa,y bmi Hay5 ldy PunteroRoomBKP dey bne tr5 jmp Trace6 Hay5 ldy PunteroRoomBKP ldx Luzz2,y beq jup5 sty PunteroRoomBKP ldy #4 lda Barras1,y sta ScanLine1,x sta ScanLine1+1,x lda Colores,y sta ScanLine1 + 37,x sta ScanLine1 + 38,x ;lda Barras2,y ;sta ScanLine1_2,x ;sta ScanLine1_2+1,x ldy PunteroRoomBKP jup5 dey bne tr5 Trace6 ldy #255 tr6 sty PunteroRoomBKP lda Luzz1,y jsr Mover cmp Mapa,y bmi Hay6 ldy PunteroRoomBKP dey bne tr6 rts Hay6 ldy PunteroRoomBKP ldx Luzz1,y beq jup6 sty PunteroRoomBKP ldy #3 lda Barras1,y sta ScanLine1,x sta ScanLine1+1,x lda Colores,y sta ScanLine1 + 37,x sta ScanLine1 + 38,x sta ScanLine1 + 39,x ;lda Barras2,y ;sta ScanLine1_2,x ;sta ScanLine1_2+1,x ldy PunteroRoomBKP jup6 dey bne tr6 rts Mover ;ldx PunteroRoom + 1 ;bne Mover2 ;rts ;Mover2 ; iny ; dex ; bne Mover2 sta PunteroRoom tya clc adc PunteroRoom + 1 tay lda PunteroRoom rts ListaDeRumbos .byte #255 .byte #255 .byte #255 .byte #255 .byte #239 .byte #239 .byte #239 .byte #239 .byte #239 .byte #240 .byte #240 .byte #240 .byte #240 .byte #241 .byte #241 .byte #241 .byte #241 .byte #241 .byte #1 .byte #1 .byte #1 .byte #1 .byte #17 .byte #17 .byte #17 .byte #17 .byte #17 .byte #16 .byte #16 .byte #16 .byte #16 .byte #15 .byte #15 .byte #15 .byte #15 .byte #15 Mapita .byte #%00000000 .byte #%00000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01111111 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 .byte #%01000000 Mapita2 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%11100000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 .byte #%00000000 ;////////////// Set Vectors /////////////////////////////////////////// ORG $FFFA ; Interrupt Vectors .word Reset ; NMI .word Reset ; RESET .word Reset ; IRQ END