?login_element?

Subversion Repositories NedoOS

Rev

Rev 1764 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.     MODULE VortexProcessor
  2.         IFDEF MSX
  3. play:
  4.     call Console.peekC : and a
  5.     jr nz, play
  6.  
  7.     ld hl, message : call DialogBox.msgNoWait
  8.  
  9.     ld hl, outputBuffer  : call VTPL.INIT
  10. .loop
  11.     halt : di : call VTPL.PLAY : ei
  12.     call Console.peekC : and a : jp nz, .stop
  13.     jr nc, .loop
  14. .stop
  15.     call VTPL.MUTE
  16. .wlp
  17.     call Console.peekC : and a
  18.     jr nz, .wlp
  19.     ret
  20.  
  21. message db "Press key to stop...", 0
  22.     ENDMODULE
  23.     include "msxplayer.asm"    
  24.         ELSE
  25. play:
  26.     ld a, 255
  27.     ld (oldminutes), a
  28.    
  29.     call Console.waitForKeyUp
  30.  
  31.     ld hl, message : call DialogBox.msgNoWait
  32.  
  33.     ld hl, outputBuffer  : call VTPL.INIT
  34.  
  35.    
  36.     ld a, 1, (Render.play_next), a
  37.    
  38.     IFDEF GS
  39.     call GeneralSound.stopModule
  40.     ENDIF
  41. .loop
  42.     halt : di : call VTPL.PLAY : ei
  43.     xor a : in a, (#fe) : cpl : and 31 : jp nz, .stopKey
  44.     call printRTC
  45.     ld a, (VTPL.SETUP) : rla : jr nc, .loop
  46.     ld a, 1, (Render.play_next), a
  47. .stop
  48.     call VTPL.MUTE
  49.    
  50.     IFDEF AY
  51.     call restoreAyState
  52.     ENDIF
  53.  
  54.     call Console.waitForKeyUp
  55.     ret
  56. .stopKey
  57.     xor a : ld (Render.play_next), a
  58.     jr .stop
  59.  
  60.     IFDEF AY
  61. restoreAyState:
  62.     ld a, #07
  63.     ld bc, #fffd
  64.     out (c), a
  65.     ld a, #fc
  66.     ld b, #bf
  67.     out (c), a ; Enable read mode
  68.    
  69.     ld a, #0e
  70.     ld bc, #fffd
  71.     out (c), a
  72.     ret
  73.         ENDIF
  74. message db "Press key to stop...", 0
  75.     ENDMODULE
  76.     include "player.asm"
  77.     ENDIF