Subversion Repositories NedoOS

Rev

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

  1. PLAYERSTART = 0x4000
  2. PLAYEREND   = 0x8000
  3.  
  4.         macro PLAYERHEADER
  5.         db 0xc3 : dw playerinit      ;called once, should check if sound device is available (if possible)
  6.         db 0xc3 : dw playerdeinit    ;called once when the application is exiting
  7.         db 0xc3 : dw musicload       ;function that loads the file allocating all required resources
  8.         db 0xc3 : dw musicunload     ;function that frees all resources allocated in musicload and mutes the sound device
  9.         db 0xc3 : dw musicplay       ;function called in the main loop, should update progress variable
  10.         db 0xc3 : 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.         dw 0 ;address of custom UI elements
  16.         endm
  17.  
  18. PLAYERINITPROCADDR      = PLAYERSTART+0x01
  19. PLAYERDEINITPROCADDR    = PLAYERSTART+0x04
  20. MUSICLOADPROCADDR       = PLAYERSTART+0x07
  21. MUSICUNLOADPROCADDR     = PLAYERSTART+0x0a
  22. MUSICPLAYPROCADDR       = PLAYERSTART+0x0d
  23. ISFILESUPPORTEDPROCADDR = PLAYERSTART+0x10
  24. PLAYERNAMESTRADDR       = PLAYERSTART+0x12
  25. MUSICTITLEADDR          = PLAYERSTART+0x14
  26. MUSICPROGRESSADDR       = PLAYERSTART+0x16
  27. ERRORSTRINGADDR         = PLAYERSTART+0x18
  28. CUSTOMUIADDR            = PLAYERSTART+0x1a
  29.  
  30.         struct GPSETTINGS
  31. sharedpages ds 3
  32. usemp3 dw 0
  33. usemwm dw 0
  34. usept3 dw 0
  35. usevgm dw 0
  36. usemoonmod dw 0
  37. usemoonmid dw 0
  38. moonmoddefaultpanning dw 0
  39. midiuartdelayoverride dw 0
  40. mididevice dw 0
  41. moddevice dw 0
  42. slowtfm dw 0
  43. framelength dw 0 ;in 42 t-states units
  44. moonsoundstatus ds 1 ; 0 - no device, 1 - BomgeMoon or MoonSound with old firmware (wave ports not working), 2 - MoonSound OK
  45. tfmstatus ds 1 ; 0 - no device, 1 - found TFM
  46. opmstatus ds 1 ; 0 - no device, 1 - single YM2151, 2 - dual YM2151
  47. opnastatus ds 1 ; 0 - no device, 1 - found YM2608
  48.         ends
  49.  
  50. DEVICE_AY_BIT         = 0
  51. DEVICE_TURBOSOUND_BIT = 1
  52. DEVICE_TFM_BIT        = 2
  53. DEVICE_MOONSOUND_BIT  = 3
  54. DEVICE_GS_BIT         = 4
  55. DEVICE_NEOGS_BIT      = 5
  56. DEVICE_MIDI_UART_BIT  = 6
  57. DEVICE_OPM_BIT        = 7
  58. DEVICE_DUAL_OPM_BIT   = 8
  59. DEVICE_OPNA_BIT       = 9
  60.  
  61. DEVICE_AY_MASK         = 1<<DEVICE_AY_BIT
  62. DEVICE_TURBOSOUND_MASK = 1<<DEVICE_TURBOSOUND_BIT
  63. DEVICE_TFM_MASK        = 1<<DEVICE_TFM_BIT
  64. DEVICE_MOONSOUND_MASK  = 1<<DEVICE_MOONSOUND_BIT
  65. DEVICE_GS_MASK         = 1<<DEVICE_GS_BIT
  66. DEVICE_NEOGS_MASK      = 1<<DEVICE_NEOGS_BIT
  67. DEVICE_MIDI_UART_MASK  = 1<<DEVICE_MIDI_UART_BIT
  68. DEVICE_OPM_MASK        = 1<<DEVICE_OPM_BIT
  69. DEVICE_DUAL_OPM_MASK   = 1<<DEVICE_DUAL_OPM_BIT
  70. DEVICE_OPNA_MASK       = 1<<DEVICE_OPNA_BIT
  71.  
  72. MIN_FRAME_LENGTH_FPGA  = 18000000/49/42
  73. MIN_FRAME_LENGTH_ZXEVO = 10000000/49/42
  74.  
  75. COLOR_DEFAULT = 0x07
  76. COLOR_PANEL = 0x4f
  77. COLOR_CURSOR = 0x28
  78. COLOR_PANEL_FILE = 0x0f
  79. COLOR_PANEL_DIR = 0x4f
  80. COLOR_PANEL_DRIVE = 0x4b
  81. COLOR_ERROR_WINDOW = 0x17
  82.  
  83. CUSTOM_UI_CMD_DRAW_WINDOW = 0
  84. CUSTOM_UI_CMD_PRINT_TEXT  = 1
  85. CUSTOM_UI_CMD_SET_COLOR   = 2
  86. CUSTOM_UI_CMD_COUNT       = 3
  87.  
  88.         struct CUSTOMUIDRAWEND
  89. cmd db CUSTOM_UI_CMD_COUNT
  90.         ends
  91.  
  92.         struct CUSTOMUIDRAWWINDOW
  93. cmd db CUSTOM_UI_CMD_DRAW_WINDOW
  94. topleftx db 0
  95. toplefty db 0
  96. clientwidth db 0
  97. clientheight db 0
  98.         ends
  99.  
  100.         struct CUSTOMUIPRINTTEXT
  101. cmd db CUSTOM_UI_CMD_PRINT_TEXT
  102. posx db 0
  103. posy db 0
  104. straddr dw 0
  105.         ends
  106.  
  107.         struct CUSTOMUISETCOLOR
  108. cmd db CUSTOM_UI_CMD_SET_COLOR
  109. color db 0
  110.         ends
  111.