Subversion Repositories NedoOS

Rev

Rev 2375 | 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. usemoonmid dw 0
  36. framelength dw 0 ;in 42 t-states units
  37. moonmoddefaultpanning dw 0
  38. forcemididevice dw 0
  39. midiuartdelayoverride dw 0
  40. moonsoundstatus ds 1 ; 0 - no device, 1 - BomgeMoon or MoonSound with old firmware (wave ports not working), 2 - MoonSound OK
  41. tfmstatus ds 1 ; 0 - no device, 1 - found TFM
  42. opmstatus ds 1 ; 0 - no device, 1 - single YM2151, 2 - dual YM2151
  43. opnastatus ds 1 ; 0 - no device, 1 - found YM2608
  44.         ends
  45.  
  46. DEVICE_AY_BIT         = 0
  47. DEVICE_TURBOSOUND_BIT = 1
  48. DEVICE_TFM_BIT        = 2
  49. DEVICE_MOONSOUND_BIT  = 3
  50. DEVICE_GS_BIT         = 4
  51. DEVICE_NEOGS_BIT      = 5
  52. DEVICE_MIDI_UART_BIT  = 6
  53. DEVICE_OPM_BIT        = 7
  54. DEVICE_DUAL_OPM_BIT   = 8
  55. DEVICE_OPNA_BIT       = 9
  56.  
  57. DEVICE_AY_MASK         = 1<<DEVICE_AY_BIT
  58. DEVICE_TURBOSOUND_MASK = 1<<DEVICE_TURBOSOUND_BIT
  59. DEVICE_TFM_MASK        = 1<<DEVICE_TFM_BIT
  60. DEVICE_MOONSOUND_MASK  = 1<<DEVICE_MOONSOUND_BIT
  61. DEVICE_GS_MASK         = 1<<DEVICE_GS_BIT
  62. DEVICE_NEOGS_MASK      = 1<<DEVICE_NEOGS_BIT
  63. DEVICE_MIDI_UART_MASK  = 1<<DEVICE_MIDI_UART_BIT
  64. DEVICE_OPM_MASK        = 1<<DEVICE_OPM_BIT
  65. DEVICE_DUAL_OPM_MASK   = 1<<DEVICE_DUAL_OPM_BIT
  66. DEVICE_OPNA_MASK       = 1<<DEVICE_OPNA_BIT
  67.  
  68. MIN_FRAME_LENGTH_FPGA  = 18000000/49/42
  69. MIN_FRAME_LENGTH_ZXEVO = 10000000/49/42
  70.