Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EndlessLoop:
- bsr ProcessJoypad
- @DontAllowButton:
- Echo_Z80Request
- lea (Echo68K), a0
- lea (EchoZ80), a1
- rept 6
- move.b (a1), (a0)+ ;since z80 can only do byte shits... sucks, man.
- move.b #0, (a1)+
- endr
- rept 5
- move.b (a1)+, (a0)+ ;since z80 can only do byte shits... sucks, man.
- endr
- ; We should probably do things with it here. But I'm lazy. Until next time, good bye :D
- Echo_Z80Release
- bsr VUProcess
- bsr ProcessVUTiles
- waitframe
- bra @EndlessLoop
- ProcessVUTiles:
- lea (VUMeters), a0
- lea (VUTiles), a1
- moveq #10, d2
- @That:
- lea (Empty), a3
- lea (normal), a4
- moveq #0, d0
- move.b (a0)+, d0
- @Write:
- moveq #38, d1
- sub.b d0, d1
- @WriteEmpty:
- move.l (a3)+, (a1)+
- add.l #4, a4
- dbf d1, @WriteEmpty
- @WriteNormal:
- move.l (a4)+, (a1)+
- dbf d0, @WriteNormal
- @FailSata
- dbf d2, @That
- rts
- PaletteCycle:
- rts
- LoadChassisMaps:
- lea (Chassis_Mappings), a0
- move.l #$44000003, (VDPControl)
- lea (VDPData), a1
- move.l #1792, d0
- @Loop:
- move.w (a0)+, (a1)
- dbf d0, @Loop
- rts
- VUProcess:
- lea (VUMeters), a0
- lea (Echo68K), a1
- moveq #5, d1
- @ProcessDecay:
- tst.b (a1)
- beq @NoNewNote
- move.b #38, (a0)+
- clr.b (a1)+
- bra.s @FM_Done
- @NoNewNote:
- tst.b (a0)
- bne.s @Bowls
- move.b #1, (a0)
- @Bowls:
- subq.b #1, (a0)+
- clr.b (a1)+
- @FM_Done:
- dbf d1, @ProcessDecay
- bsr HandlePSG
- rts
- HandlePSG:
- lea (Echo68K+6), a0
- lea (VUMeters+6), a1
- rept 4
- move.b (a0)+, d1
- not.b d1
- and.b #$F, d1
- beq *+8
- add.b d1, d1
- addq.b #6, d1
- move.b d1, (a1)+
- endr
- HandlePCM:
- move.b (Echo68k+10), d0
- cmp.b #$81, d0
- bne @NotZero
- clr.b (VUMeters+10)
- rts
- @NotZero
- bcc.s @GreaterSpyer
- not.b d0
- @GreaterSpyer:
- and.b #$7F, d0
- lsr.b #2, d0
- addq.b #6, d0
- move.b d0, (VUMeters+10)
- rts
- ProcessJoypad:
- move.b (Joypad1), d0
- move.b (Timer1), d2
- cmp.b d0, d2
- beq.s @NoButtonsYet
- move.b d0, (Timer1)
- btst #4, d0
- beq.s @Bbtn
- btst #5, d0
- beq.s @Cbtn
- @NoButtonsYet:
- rts
- @CBtn:
- moveq #0, d0
- jsr PlayBGM
- rts
- @BBtn:
- jsr StopBGM
- rts
Add Comment
Please, Sign In to add comment