Subversion Repositories NedoOS

Rev

Rev 2286 | Blame | Compare with Previous | Last modification | View Log | Download

  1. PLAYERSTART = 0x4000
  2. PLAYEREND   = 0x8000
  3.  
  4.         macro PLAYERHEADER
  5.         dw playerinit      ;called once, should check if sound device is available (if possible)
  6.         dw playerdeinit    ;called once when the application is exiting
  7.         dw musicload       ;function that loads the file allocating all required resources
  8.         dw musicunload     ;function that frees all resources allocated in musicload and mutes the sound device
  9.         dw musicplay       ;function called in the main loop, should update progress variable
  10.         dw isfilesupported ;function to determine if this player can handle the file
  11.         dw playernamestr   ;player name string
  12.         dw 0 ;address of the song title, zero means the title is unavailable and file name should be displayed instead
  13.         dw 0 ;address of play progress variable, setting this to zero disables progress bar
  14.         dw 0 ;address of error string
  15.         endm
  16.  
  17. PLAYERINITPROCADDR      = PLAYERSTART+0x00
  18. PLAYERDEINITPROCADDR    = PLAYERSTART+0x02
  19. MUSICLOADPROCADDR       = PLAYERSTART+0x04
  20. MUSICUNLOADPROCADDR     = PLAYERSTART+0x06
  21. MUSICPLAYPROCADDR       = PLAYERSTART+0x08
  22. ISFILESUPPORTEDPROCADDR = PLAYERSTART+0x0a
  23. PLAYERNAMESTRADDR       = PLAYERSTART+0x0c
  24. MUSICTITLEADDR          = PLAYERSTART+0x0e
  25. MUSICPROGRESSADDR       = PLAYERSTART+0x10
  26. ERRORSTRINGADDR         = PLAYERSTART+0x12
  27.  
  28.         struct GPSETTINGS
  29. sharedpages ds 3
  30. usemp3 dw 0
  31. usemwm dw 0
  32. usept3 dw 0
  33. usevgm dw 0
  34. usemoonmod dw 0
  35. framelength dw 0 ;in 42 t-states units
  36. moonmoddefaultpanning dw 0
  37. midiuartdelayoverride dw 0
  38. moonsoundstatus ds 1 ; 0 - no device, 1 - BomgeMoon or MoonSound with old firmware (wave ports not working), 2 - MoonSound OK
  39. tfmstatus ds 1 ; 0 - no device, 1 - found TFM
  40. opmstatus ds 1 ; 0 - no device, 1 - single YM2151, 2 - dual YM2151
  41. opnastatus ds 1 ; 0 - no device, 1 - found YM2608
  42.         ends
  43.  
  44. DEVICE_AY_BIT         = 0
  45. DEVICE_TURBOSOUND_BIT = 1
  46. DEVICE_TFM_BIT        = 2
  47. DEVICE_MOONSOUND_BIT  = 3
  48. DEVICE_GS_BIT         = 4
  49. DEVICE_NEOGS_BIT      = 5
  50. DEVICE_MIDI_UART_BIT  = 6
  51. DEVICE_OPM_BIT        = 7
  52. DEVICE_DUAL_OPM_BIT   = 8
  53. DEVICE_OPNA_BIT       = 10
  54.  
  55. DEVICE_AY_MASK         = 1<<DEVICE_AY_BIT
  56. DEVICE_TURBOSOUND_MASK = 1<<DEVICE_TURBOSOUND_BIT
  57. DEVICE_TFM_MASK        = 1<<DEVICE_TFM_BIT
  58. DEVICE_MOONSOUND_MASK  = 1<<DEVICE_MOONSOUND_BIT
  59. DEVICE_GS_MASK         = 1<<DEVICE_GS_BIT
  60. DEVICE_NEOGS_MASK      = 1<<DEVICE_NEOGS_BIT
  61. DEVICE_MIDI_UART_MASK  = 1<<DEVICE_MIDI_UART_BIT
  62. DEVICE_OPM_MASK        = 1<<DEVICE_OPM_BIT
  63. DEVICE_DUAL_OPM_MASK   = 1<<DEVICE_DUAL_OPM_BIT
  64. DEVICE_OPNA_MASK       = 1<<DEVICE_OPNA_BIT
  65.  
  66. MIN_FRAME_LENGTH_FPGA  = 18000000/49/42
  67. MIN_FRAME_LENGTH_ZXEVO = 10000000/49/42
  68.